发明名称 METHOD FOR GENERATING ROUTE ENTRY, AND BORDER GATEWAY PROTOCOL SPEAKER
摘要 Embodiments of the present disclosure provide a method for generating a route entry, including: receiving, by a first BGP speaker, a first route message and a second route message that are distributed respectively by a second BGP speaker by using a first distribution path and a second distribution path; determining, by the first BGP speaker, that a quantity of next hops in a first next hop list attribute is less than a quantity of next hops in a second next hop list attribute; and generating, by the first BGP speaker, a route entry according to path attributes, of a path towards a destination, in the first route message. In addition, the embodiments of the present disclosure further provide a first BGP speaker. The foregoing technical solution helps reduce a workload in configuring route preference policies.
申请公布号 US2016149797(A1) 申请公布日期 2016.05.26
申请号 US201615011211 申请日期 2016.01.29
申请人 Huawei Technologies Co., Ltd. 发明人 ZHANG Li
分类号 H04L12/733;H04L12/66;H04L12/803 主分类号 H04L12/733
代理机构 代理人
主权项 1. A method for generating a route entry, comprising: receiving, by a first Border Gateway Protocol (BGP) speaker, a first route message and a second route message that are distributed respectively by a second BGP speaker by using a first distribution path and a second distribution path, wherein a head node of the first distribution path is the second BGP speaker, a tail node of the first distribution path is the first BGP speaker, a head node of the second distribution path is the second BGP speaker, a tail node of the second distribution path is the first BGP speaker, path attributes, of a path towards a destination, in the route messages comprise a next hop list attribute, and the process of obtaining the first route message and the second route message comprises: constructing, by the second BGP speaker, a third route message, wherein the third route message comprises a route towards the destination, the route towards the destination in the third route message comprises a next hop list attribute and a next hop attribute, of a next hop towards the destination, the next hop list attribute in the third route message comprises a next hop, and a value of the next hop in the next hop list attribute in the third route message is equal to a value of the NEXT_HOP attribute, of a next hop towards the destination;sending, by the second BGP speaker, the third route message to a head node of a first path, so as to distribute a route towards the destination to each node on the first path, wherein the first path is a path in the first distribution path, the head node of the first path is a peer of the second BGP speaker, and a tail node of the first path is a peer of the first BGP speaker;when the route that is distributed by the second BGP speaker reaches each node of the first path, generating, by each node according to the route towards the destination, a fourth route message to be sent to a next hop BGP speaker, which comprises: adding a first next hop to the next hop list attribute in the route towards the destination, so as to generate a first next hop list attribute, wherein the fourth route message comprises path attributes of a path towards the destination, the path attributes in the fourth route message comprise a NEXT_HOP attribute, the path attributes in the fourth route message comprise the first next hop list attribute, and a value of the first next hop is equal to a value of the NEXT_HOP attribute in the fourth route message, wherein the tail node of the first path generates the first route message;constructing, by the second BGP speaker, a fifth route message, wherein the fifth route message comprises a route towards the destination, the route towards the destination in the fifth route message comprises a next hop list attribute and the NEXT_HOP attribute, of a next hop towards the destination, distributed by the second BGP speaker, the next hop list attribute in the fifth route message comprises a next hop, and a value of the next hop in the next hop list attribute in the fifth route message is equal to a value of the NEXT_HOP attribute, of a next hop towards the destination, distributed by the second BGP speaker;sending, by the second BGP speaker, the fifth route message to a head node of a second path, so as to distribute a route towards the destination to each node on the second path, wherein the second path is a path in the second distribution path, the head node of the second path is a peer of the second BGP speaker, and a tail node of the second path is a peer of the first BGP speaker; andwhen the route that is distributed by the second BGP speaker and is towards the destination reaches each node of the second path, generating, by each node according to the route towards the destination, a sixth route message to be sent to a next hop BGP speaker, which comprises: adding a second next hop to the next hop list attribute in the route towards the destination, so as to generate a second next hop list attribute, wherein the sixth route message comprises path attributes of a path towards the destination, the path attributes in the sixth route message comprise a NEXT_HOP attribute, the path attributes in the sixth route message comprise the second next hop list attribute, and a value of the second next hop is equal to a value of the NEXT_HOP attribute in the sixth route message, wherein the tail node of the second path generates the second route message; determining, by the first BGP speaker, that a quantity of next hops in the first next hop list attribute is less than a quantity of next hops in the second next hop list attribute; and generating, by the first BGP speaker, a route entry according to the path attributes, of the path towards the destination, in the first route message.
地址 Shenzhen CN