Method, device, storage medium and electronic device for sending BGP route
By adding indication information to BGP routes to indicate the impact of attributes, the problem of traffic black holes caused by intermediate nodes preventing BGP attributes from being applied to the forwarding plane is solved, resulting in better BGP route relay and reduced network maintenance costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-16
- Publication Date
- 2026-03-27
AI Technical Summary
During the process of BGP routes being forwarded through intermediate nodes, the receiving end cannot identify whether the intermediate nodes will prevent certain BGP attributes in the BGP route from being applied to the forwarding plane, leading to the problem of traffic black holes.
The second node receives the BGP route from the third node, identifies and processes the second attribute, adds indication information to indicate to the first node whether the attribute has an impact, retains the first attribute in the BGP route, and sends it to the first node.
It solves the problem of traffic black holes caused by intermediate nodes preventing BGP attributes from being applied to the forwarding plane, shortens the scope of network node upgrades, and reduces network maintenance costs.
Smart Images

Figure CN116805930B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and more specifically, to a method, apparatus, storage medium, and electronic device for transmitting BGP routes. Background Technology
[0002] In related technologies, in MPLS (Multi-Protocol Label Switching) networks, LSR (Label Switching Router) devices need to extract the IP content carried in MPLS packets to calculate the HASH KEY when performing traffic load balancing. However, there are problems such as ineffective extraction and low extraction performance during the extraction process.
[0003] RFC 6790 introduced the concept of entropy label to address this problem.
[0004] The entropy label is a label generated entirely by the Ingress LSR based on load balancing information. It is not used for forwarding or signaling, but only for improving the load balancing process.
[0005] Entropy labels are generated on the Ingress LSR and encapsulated into the MPLS label stack. Before MPLS labels are encapsulated in packets on the Ingress LSR, the IP content can be easily obtained. When the Ingress LSR recognizes that the downstream LSR has enabled entropy labeling, it calculates the entropy label based on the IP content in the packet and pushes it onto the MPLS label stack, passing the entropy label to the downstream LSR. The transit LSR no longer needs to extract the inner IP data carried in the MPLS packet; it can directly use the entropy label in the label stack to calculate the hash key, thereby achieving flow-by-flow load balancing.
[0006] The above process is as follows: Figure 3 As shown, the engress LSR (P0) distributes labels upstream and announces entropy label capabilities. For two IP flows, the ingress LSR (P4) enters the MPLS forwarding domain and calculates two different entropy labels respectively, pushes them onto the label stack, and P3 updates the entropy labels to achieve flow-by-flow load balancing.
[0007] To support the above scenarios, RFC6790 added ELC attributes to various label signaling protocols. For example, in the BGP protocol, an optional transition attribute with an attribute type value of 28 was added, namely the ELC attribute (BGP Entropy Label CapabilityAttribute).
[0008] However, this attribute was deprecated in RFC7447. The reason for deprecation is that if the current device does not support processing entropy labels, then when sending labels to the upstream LSR and modifying the next hop, the entropy label capability must be removed; otherwise, a traffic black hole will be created. Unfortunately, the ELC attribute is an optional transitional attribute. According to the processing principle of RFC4271, if this attribute cannot be recognized, it should be processed as a pass-through.
[0009] Regarding the generation process of the aforementioned flow black hole, see Appendix Figure 4 It was described as follows:
[0010] As attached Figure 4 As shown, AS3 is a 6PE network, AS2 is a pure IPv6 network, and AS1 is a 6PE network. In this hybrid network, some devices do not support entropy label processing and do not recognize ELC attributes. Only PE0 and PE5 support ELC. When the engress LSRPE0 sends routes and labels, it carries ELC attributes. However, since PE1-PE4 do not recognize ELC attributes, they will pass the ELC attributes through. PE5 supports ELC. After receiving this attribute, for IP1 data flows entering the 6PE network, an entropy label will be inserted. However, after the traffic reaches PE4, PE4 cannot remove the entropy label, so the traffic is dropped on PE3 after reaching PE3.
[0011] However, not all nodes that cannot recognize ELCA (ELC attribute) will cause a traffic black hole. For example, see the following: Figure 5 Although there are nodes that cannot recognize ELCA (i.e., ABR2 nodes), this will not lead to a traffic black hole.
[0012] After RFC7447 deprecated the ELC attribute, existing technologies have not provided an alternative solution. When a BGP route published by an egress node passes through an intermediate node, if that intermediate node does not recognize a certain ELC attribute in the BGP route, existing technologies lack a mechanism to enable the ingress node to identify whether the intermediate node is a node that can cause a traffic black hole through that ELC attribute.
[0013] In related technologies, when BGP routes are relayed through intermediate nodes, the receiving end cannot identify whether the intermediate nodes will prevent certain BGP attributes in the BGP route from being applied to the forwarding plane. Existing technologies have not yet proposed a solution. Summary of the Invention
[0014] This application provides a method, apparatus, storage medium, and electronic device for transmitting BGP routes, in order to at least solve the problem in the related art where, during the transmission of BGP routes through intermediate nodes, the receiving end cannot identify whether the intermediate nodes will prevent certain BGP attributes in the BGP routes from being applied to the forwarding plane.
[0015] According to one aspect of the embodiments of this application, a method for sending a BGP route is provided, comprising: a second node receiving a first BGP route from a third node, wherein the first BGP route carries a first attribute and a second attribute; the second node performing a first processing on the second attribute to obtain a second BGP route; wherein the second node is located between the third node and the first node, the second node cannot recognize the first attribute, but the second node has the ability to recognize the second attribute, and the first processing is the second node modifying the second attribute; in response to the second node's inability to recognize the first attribute, the second node adding first indication information to the second BGP route while retaining the first attribute, and sending the second BGP route to the first node, wherein the first indication information is indication information indicating whether the first processing has an impact on the first attribute.
[0016] In an optional embodiment, the method further includes: when the first processing affects the first attribute, the first indication information further includes second indication information; when the first processing does not affect the first attribute, the first indication information further includes third indication information, and the second indication information is different from the third indication information, wherein the second indication information is an indication information for instructing the first node to perform the second processing, and the third indication information is an indication information for instructing the first node to perform the third processing, wherein the second processing is: when the second BGP route carries the second indication information, the first node does not add the first forwarding plane entity to the data packet corresponding to the second BGP route; wherein the first forwarding plane entity is the forwarding plane entity corresponding to the first attribute; the third processing includes: when the second BGP route carries the third indication information, instructing the first node to add the first forwarding plane entity to the data packet corresponding to the second BGP route; wherein the first forwarding plane entity is the forwarding plane entity corresponding to the first attribute.
[0017] In an optional embodiment, the first attribute, the first forwarding plane entity, and the second attribute satisfy one of three conditions: a third condition, a fourth condition, and a fifth condition. The third condition includes: the first attribute is an Entropy Label Capability Attribute (ELCA), the first forwarding plane entity is an Entropy Label Indicator (ELI) label corresponding to the ELCA, and the second attribute is an MPLS label attribute of the first BGP route. The fourth condition includes: the first attribute is a Flow Label Capability Attribute (FLCA), the first forwarding plane entity is a flow label corresponding to the FLCA, and the second attribute is an MPLS label attribute of the first BGP route. The fifth condition includes: the first attribute is a Control Word Capability Attribute (CWCA), the first forwarding plane entity is a control word corresponding to the CWCA, and the second attribute is an MPLS label attribute of the first BGP route.
[0018] In an optional embodiment, the method further includes: the first BGP route also carries fourth indication information, and the second node determines the third indication information as fifth indication information based on the fourth indication information, wherein: the fifth indication information includes a Partial flag with a value of 0.
[0019] In an optional embodiment, the method includes: the first BGP route further carries fourth indication information; the second node determines, based on the fourth indication information, that the second indication information includes either a sixth indication information or a seventh indication information, or determines that the third indication information includes an eighth indication information, wherein: the sixth indication information includes a No-Partial flag with a value of 0 and keeps the fourth indication information unchanged; the seventh indication information includes a New-Partial flag with a value of 1 and keeps the fourth indication information unchanged; the eighth indication information includes a Partial flag with a value of 0 and keeps the fourth indication information unchanged.
[0020] In an optional embodiment, before the second node receives the first BGP route published by the third node, the method further includes: the third node adding the fourth indication information to the first BGP route.
[0021] In an optional embodiment, the second node adds the third indication information to the second BGP route only when it sends the second BGP route to the first node, provided that any modifications made to the attributes other than the first attribute in the first BGP route do not affect the validity of the first attribute.
[0022] In an optional embodiment, the fourth indication information is the ninth indication information, wherein the ninth indication information consists of a value of 1 for the Transitive flag bit in the first attribute and a value of 1 for the Smart-Partial flag bit in the first attribute.
[0023] In an optional embodiment, the fourth indication information is the tenth indication information, wherein the tenth indication information consists of a value of 0 for the Transitive flag bit in the first attribute and a value of 1 for the New-Transitive flag bit in the first attribute.
[0024] In an optional embodiment, when the first condition is not met, it is determined that the first processing has an impact on the first attribute; or, when the first condition is met, it is determined that the first processing has no impact on the first attribute. The first condition includes one of the following: the second node does not modify the next hop of the first BGP route; the second node modifies the next hop address of the first BGP route to the IP address of the second node, and the second attribute carried by the second BGP route satisfies the second condition.
[0025] In one alternative embodiment, the second condition includes: the second attribute does not cause the first forwarding plane entity to be exposed on the second node.
[0026] In an optional embodiment, the second condition includes: the second attribute does not cause the second forwarding plane entity to be stripped on the second node, wherein the second forwarding plane entity is the forwarding plane entity adjacent to the first forwarding plane entity in the outer layer of the first forwarding plane entity.
[0027] In an optional embodiment, the second attribute is the first MPLS label of the first BGP route, and the first process is that the second node modifies the first MPLS label of the first BGP route to the second MPLS label allocated by the second node. The method further includes: if the label operation corresponding to the second MPLS label in the forwarding plane is Swap, adding the third indication information before the second node publishes the second BGP route to the first node; if the label operation corresponding to the second MPLS label in the forwarding plane is Pop, adding the second indication information before the second node publishes the second BGP route to the first node.
[0028] In an optional embodiment, the third indication information includes a Partial flag bit with a value of 0 in the first attribute.
[0029] In an optional embodiment, the fourth indication information is the New-Transitive flag bit in the first attribute, and the method further includes: the third node setting the No-Partial flag bit to 1 before publishing the first BGP route; in response to the value of the New-Transitive flag bit being 1, the second node determines that the third indication information includes the No-Partial flag bit with a value of 1 and the Transitive flag bit with a value of 0 in the first attribute.
[0030] In an optional embodiment, the fourth indication information is the Smart-Partial flag bit in the first attribute, and the method further includes: in response to the value of the Smart-Partial flag bit being 1, determining that the second indication information contains the Partial flag bit with a value of 1 in the first attribute.
[0031] In an optional embodiment, the first processing is a processing that has no effect on the first attribute. There is also a fourth node between the first node and the third node. The fourth node is a node that cannot recognize the New-Transitive flag, Smart-Partial flag, New-Partial flag, No-Partial flag, and the first attribute. The fourth node sends the fifth BGP route to the first node. Both the second node and the fourth node modify the second attribute in a way that has no effect on the first attribute. The third indication information is different from the value of the corresponding field in the fifth BGP route.
[0032] According to another aspect of the present invention, a BGP route sending apparatus is also provided, applied to a second node, comprising: a receiving module, configured to receive a first BGP route published by a third node, wherein the first BGP route carries a first attribute and a second attribute; a processing module, configured to perform a first processing on the second attribute to obtain a second BGP route; wherein the second node is located between the third node and the first node, the second node cannot recognize the first attribute, but the second node has the ability to recognize the second attribute, and the first processing is the second node modifying the second attribute; and a sending module, configured to, in response to the second node's inability to recognize the first attribute, add first indication information to the second BGP route while retaining the first attribute, and send the second BGP route to the first node, wherein the first indication information is indication information indicating whether the first processing has an impact on the first attribute.
[0033] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-described method for sending BGP routes when it is run.
[0034] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the BGP route transmission method through the computer program.
[0035] This application provides a method for a second node to receive a first BGP route from a third node, wherein the first BGP route carries a first attribute and a second attribute. The second node performs a first processing on the second attribute to obtain a second BGP route. The second node is located between the third node and the first node. The second node cannot recognize the first attribute, but it has the ability to recognize the second attribute. The first processing involves the second node modifying the second attribute. In response to the second node's inability to recognize the first attribute, the second node adds first indication information to the second BGP route while retaining the first attribute, and sends the second BGP route to the first node. The first indication information indicates whether the first processing affects the first attribute. This solves the technical problem in related technologies where, during the relay transmission of BGP routes through intermediate nodes, the receiving end of the BGP route cannot identify whether the intermediate node will prevent certain BGP attributes in the BGP route from being applied to the forwarding plane, especially the problem of traffic black holes caused by the intermediate node through the obstructed BGP attributes. This achieves the technical effect of shortening the scope of network node upgrades and reducing network maintenance costs. Attached Figure Description
[0036] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and, together with the description thereof, serve to explain this application and do not constitute an undue limitation thereof. In the drawings:
[0037] Figure 1 This is a hardware structure block diagram of an optional computer terminal for a BGP route transmission method according to an embodiment of this application.
[0038] Figure 2 This is a flowchart of a BGP route transmission method according to an embodiment of this application;
[0039] Figure 3 This is a flowchart illustrating an optional entropy-label-based BGP route transmission method in related technologies.
[0040] Figure 4 This is a schematic diagram illustrating the generation process of an optional flow black hole in related technologies;
[0041] Figure 5 This is a flowchart illustrating another optional entropy label-based BGP route transmission method in related technologies;
[0042] Figure 6 This is a flowchart (I) illustrating an optional BGP route transmission method according to an embodiment of this application;
[0043] Figure 7 This is a schematic diagram of the ELCA structure of an optional BGP route transmission method according to an embodiment of this application (I);
[0044] Figure 8 This is a flowchart (II) illustrating an optional BGP route transmission method according to an embodiment of this application;
[0045] Figure 9 This is a flowchart (III) illustrating an optional BGP route transmission method according to an embodiment of this application;
[0046] Figure 10 This is a schematic diagram of the ELCA structure of an optional BGP route transmission method according to an embodiment of this application (II);
[0047] Figure 11 This is a flowchart (four) illustrating an optional BGP route transmission method according to an embodiment of this application;
[0048] Figure 12 This is a flowchart (V) illustrating an optional BGP route transmission method according to an embodiment of this application;
[0049] Figure 13 This is a flowchart illustrating an optional method for sending BGP routes with legacy PE according to an embodiment of this application.
[0050] Figure 14 This is a structural block diagram of a BGP route sending device according to an embodiment of this application. Detailed Implementation
[0051] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0052] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0053] It should be noted that, in the following embodiments, some terms and their definitions are as follows:
[0054] ELC (Entropy Label Capability);
[0055] ELCA (Entropy Label Capability Attribute);
[0056] FL (Flow Label);
[0057] FLC (Flow Label Capability);
[0058] CW (Control Word);
[0059] CWC (Control Word Capability);
[0060] EL (Entropy Label);
[0061] ELI (Entropy Label Indicator);
[0062] EVI (EVPN Instance, specifically referring to L2 EVPN instance);
[0063] BD (Broadcast Domain);
[0064] BUM (Broadcast, Unknown Unicast and Multicast);
[0065] EC (Extended Community);
[0066] The Partial flag, which is the Partial bit in Attr.Flags as defined on page 16 of RFC4271;
[0067] The Transitive flag, specifically the Transitive bit in Attr.Flags as defined on page 16 of RFC4271.
[0068] The methods and embodiments provided in this application can be executed on a computer terminal or similar computing device. Taking running on a computer terminal as an example, Figure 1 This is a hardware structure block diagram of a computer terminal for a BGP route transmission method according to an embodiment of this application. For example... Figure 1 As shown, a computer terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor unit (MPU) or a programmable logic device (PLD)) and a memory 104 for storing data are also shown. In one exemplary embodiment, the computer terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer terminal described above. For example, the computer terminal may also include components that are more complex than those described above. Figure 1 The more or fewer components shown, or having the same Figure 1 Equivalent functions or ratios shown Figure 1 The functions shown have more different configurations.
[0069] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the BGP routing transmission method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to a computer terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0070] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the computer terminal. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0071] Figure 2 This is a flowchart of a BGP route transmission method according to an embodiment of this application, as shown below. Figure 2 As shown, the steps of this BGP route sending method include:
[0072] Step S202: The second node receives the first BGP route from the third node, wherein the first BGP route carries a first attribute and a second attribute.
[0073] Step S204: The second node performs a first processing on the second attribute to obtain a second BGP route; wherein, the second node is located between the third node and the first node, the second node cannot recognize the first attribute, the second node has the ability to recognize the second attribute, and the first processing is that the second node modifies the second attribute;
[0074] In step S206, in response to the second node's inability to recognize the first attribute, the second node adds first indication information to the second BGP route while retaining the first attribute, and sends the second BGP route to the first node, wherein the first indication information is indication information indicating whether the first processing has an impact on the first attribute.
[0075] This application embodiment receives a first BGP route from a third node via a second node. The first BGP route carries a first attribute and a second attribute. The second node performs a first processing on the second attribute to obtain a second BGP route. The second node is located between the third node and the first node. The second node cannot recognize the first attribute, but it has the ability to recognize the second attribute. The first processing involves the second node modifying the second attribute. In response to the second node's inability to recognize the first attribute, the second node adds first indication information to the second BGP route while retaining the first attribute, and then sends the second BGP route to the first node. The first indication information indicates whether the first processing affects the first attribute. This solves the technical problem in related technologies where, during the relay transmission of BGP routes through intermediate nodes, the receiving end cannot identify whether the intermediate nodes will prevent certain BGP attributes in the BGP route from being applied to the forwarding plane, especially the problem of traffic black holes caused by intermediate nodes through obstructed BGP attributes. This achieves the technical effect of shortening the scope of network node upgrades and reducing network maintenance costs.
[0076] It should be noted that the second node cannot recognize the first attribute, meaning it cannot recognize the content part of the first attribute, but the second node can recognize some header information of the first attribute, such as the flag bits in Attr.Flags.
[0077] It should be noted that this application describes a method for sending BGP routes applied to a third node and a second node. In this embodiment, the third node publishes BGP route attributes to the first node through the second node. This allows the first node to know whether the second node will prevent it from applying the BGP route attribute to the forwarding plane of the corresponding BGP route, even if the second node cannot recognize a certain BGP route attribute. This achieves better BGP route attribute relay. This embodiment can be implemented in different ways, as detailed below:
[0078] Method 1: The third node advertises a first BGP route to the second node, carrying a first attribute (e.g., ELCA) and Xth indication information (i.e., a new Smart-Partial flag). The Xth indication information is used to instruct the second node to perform Yth processing and / or instruct the first node to perform Zth processing. Here, the second node is a PE located between the third node and the first node, and the second node forwards the first BGP route to the first node. The second node is a device that cannot recognize the first attribute, while the first node is a device that can recognize the first attribute.
[0079] Method 2: The third node advertises a first BGP route to the second node, carrying a first attribute (e.g., ELCA) and Xth indication information (i.e., a new New-Transitive flag). The Xth indication information is used to instruct the second node to perform Yth processing and / or instruct the first node to perform Zth processing. Here, the second node is a PE located between the third node and the first node, and the second node will forward the first BGP route to the first node. The second node is a device that cannot recognize the first attribute, while the first node is a device that can recognize the first attribute.
[0080] The Y-th process is as follows: when the Y-th condition is met, the second node does not set the Partial flag for the first attribute when relaying the first BGP route to other nodes, while keeping the X-th indication information unchanged; and when the Y-th condition is not met, the second node sets the Partial flag for the first attribute only when relaying the first BGP route to other nodes, while keeping the X-th indication information unchanged.
[0081] The Zth process is as follows: when the first attribute carries the Partial flag (i.e., carries the Partial flag with a value of 1), the first node does not add the first forwarding plane entity to the data packet corresponding to the first BGP route; and when the first attribute does not carry the Partial flag (i.e., does not carry the Partial flag with a value of 1), the first node adds the first forwarding plane entity to the data packet corresponding to the first BGP route.
[0082] Wherein, the Y-th condition is that the second node satisfies one of the following conditions: the second node does not modify the next hop of the first BGP route; although the second node modifies the next hop of the first BGP route to itself, the second attribute carried by the first BGP route satisfies the sixth condition; wherein, the sixth condition is that the second attribute (such as a VPN label) is modified together with the next hop, but the modified second attribute will not cause the first forwarding plane entity (such as an entropy label) to be exposed on the second node, the second attribute is the routing attribute corresponding to the second forwarding entity (VPN label in the label stack) in the data packet encapsulation of the forwarding plane, wherein, the second forwarding entity is the forwarding plane entity that is immediately adjacent to the first forwarding plane entity (such as an ELI label or a flow label) (i.e., outside the first forwarding plane entity and adjacent to the first forwarding plane entity).
[0083] It should be noted that in some embodiments, the New-Transitive flag and the Smart-Partial flag, as well as the New-Partial flag, No-Partial flag, and Partial-Disabled flag in other embodiments, are all flags in Attr.Flags, and these flags are all located in the 4 currently unused bits of Attr.Flags. Figure 7 and Figure 10 (Represented by bits numbered 4 to 7), the Attr.Flags here refers to the Attr.Flags defined on page 16 of RFC4271 (see also...). Figure 7 ).
[0084] In one embodiment, based on the above-described BGP route transmission method, a method for processing BGP route attributes with the Partial flag is also proposed, applied to the first node and the second node, as follows:
[0085] The first node receives a first BGP route carrying a first attribute (e.g., ELCA) that satisfies the ninth condition. If the first attribute also satisfies the seventh condition, the third process is executed. If the first attribute does not satisfy the seventh condition, the second process is executed. The ninth condition is that the Partial flag of the first attribute is 1, and the seventh condition is that the first attribute carries third indication information (e.g., a new Partial-Disabled flag). The third process is to encapsulate the first forwarding plane entity in the data packet corresponding to the first BGP route. The second process is to not encapsulate the first forwarding plane entity in the data packet corresponding to the first BGP route.
[0086] The Partial flag is set to 1 by the second node, the third indication information is used to indicate that the second node satisfies the eighth condition, and the first forwarding plane entity (e.g., entropy label) is the forwarding plane entity corresponding to the first attribute (e.g., ELCA).
[0087] The eighth condition is that the second node satisfies one of the following conditions: the second node does not modify the next hop of the first BGP route; although the second node modifies the next hop of the first BGP route to itself, the second attribute carried by the first BGP route satisfies the tenth condition; wherein the tenth condition is that the second attribute (such as a VPN label) is modified together with the next hop, but the modified second attribute does not cause the first forwarding plane entity (such as an entropy label) to be exposed on the second node.
[0088] In one exemplary embodiment, the method further includes: when the first processing affects the first attribute, the first indication information further includes second indication information; when the first processing does not affect the first attribute, the first indication information further includes third indication information, and the second indication information is different from the third indication information, wherein the second indication information is indication information for instructing the first node to perform a second processing, and the third indication information is indication information for instructing the first node to perform a third processing, wherein the second processing is: when the second BGP route carries the second indication information, the first node does not add a first forwarding plane entity to the data packet corresponding to the second BGP route; wherein the first forwarding plane entity is a forwarding plane entity corresponding to the first attribute; the third processing includes: when the second BGP route carries the third indication information, instructing the first node to add the first forwarding plane entity to the data packet corresponding to the second BGP route; wherein the first forwarding plane entity is a forwarding plane entity corresponding to the first attribute.
[0089] In an exemplary embodiment, the first attribute, the first forwarding plane entity, and the second attribute satisfy one of three conditions: a third condition, a fourth condition, and a fifth condition. The third condition includes: the first attribute is an Entropy Label Capability Attribute (ELCA), the first forwarding plane entity is an Entropy Label Indicator (ELI) label corresponding to the ELCA, and the second attribute is an MPLS label attribute of the first BGP route. The fourth condition includes: the first attribute is a Flow Label Capability Attribute (FLCA), the first forwarding plane entity is a flow label corresponding to the FLCA, and the second attribute is an MPLS label attribute of the first BGP route. The fifth condition includes: the first attribute is a Control Word Capability Attribute (CWCA), the first forwarding plane entity is a control word corresponding to the CWCA, and the second attribute is an MPLS label attribute of the first BGP route.
[0090] It should be noted that in some embodiments, the FLCA and the CWCA are both extended community attributes of EVPN Layer2Attributes, wherein the flow label capability and the control word capability are respectively a flag bit of the extended community attribute, and the ELCA is the entropy label capability attribute defined in RFC6790.
[0091] In one exemplary embodiment, the method further includes: the first BGP route also carries fourth indication information, and the second node determines the third indication information as fifth indication information based on the fourth indication information, wherein: the fifth indication information includes a Partial flag with a value of 0.
[0092] In one exemplary embodiment, the first BGP route further carries fourth indication information. The second node determines, based on the fourth indication information, that the second indication information includes either a sixth indication information or a seventh indication information, or determines that the third indication information includes an eighth indication information, wherein: the sixth indication information includes a No-Partial flag with a value of 0 and keeps the fourth indication information unchanged; the seventh indication information includes a New-Partial flag with a value of 1 and keeps the fourth indication information unchanged; and the eighth indication information includes a Partial flag with a value of 0 and keeps the fourth indication information unchanged.
[0093] In one exemplary embodiment, before the second node receives the first BGP route published by the third node, the method further includes: the third node adding the fourth indication information to the first BGP route.
[0094] In one exemplary embodiment, the second node adds the third indication information to the second BGP route only when it sends the second BGP route to the first node, provided that any modifications made to the attributes other than the first attribute in the first BGP route do not affect the validity of the first attribute.
[0095] In one exemplary embodiment, the fourth indication information is the ninth indication information, wherein the ninth indication information consists of a value of 1 for the Transitive flag bit in the first attribute and a value of 1 for the Smart-Partial flag bit in the first attribute.
[0096] In one exemplary embodiment, the fourth indication information is the tenth indication information, wherein the tenth indication information consists of a value of 0 for the Transitive flag bit in the first attribute and a value of 1 for the New-Transitive flag bit in the first attribute.
[0097] In an exemplary embodiment, when the first condition is not met, it is determined that the first processing has an effect on the first attribute; or when the first condition is met, it is determined that the first processing has no effect on the first attribute. The first condition includes one of the following: the second node does not modify the next hop of the first BGP route; the second node modifies the next hop address of the first BGP route to the IP address of the second node, and the second attribute carried by the second BGP route satisfies the second condition.
[0098] In one exemplary embodiment, the second condition includes: the second attribute does not cause the first forwarding plane entity to be exposed on the second node.
[0099] In one exemplary embodiment, the second condition includes: the second attribute does not cause the second forwarding plane entity to be stripped on the second node, wherein the second forwarding plane entity is a forwarding plane entity adjacent to the first forwarding plane entity in the outer layer of the first forwarding plane entity.
[0100] In one exemplary embodiment, the second attribute is the first MPLS label of the first BGP route, and the first process is that the second node modifies the first MPLS label of the first BGP route to the second MPLS label allocated by the second node. The method further includes: if the label operation corresponding to the second MPLS label in the forwarding plane is Swap, adding the third indication information before the second node publishes the second BGP route to the first node; if the label operation corresponding to the second MPLS label in the forwarding plane is Pop, adding the second indication information before the second node publishes the second BGP route to the first node.
[0101] In one exemplary embodiment, the third indication information includes a Partial flag bit with a value of 0 in the first attribute.
[0102] In an exemplary embodiment, the fourth indication information is the New-Transitive flag bit in the first attribute, and the method further includes: the third node setting the No-Partial flag bit to 1 before publishing the first BGP route; in response to the value of the New-Transitive flag bit being 1, the second node determines that the third indication information includes the No-Partial flag bit with a value of 1 and the Transitive flag bit with a value of 0 in the first attribute.
[0103] In one exemplary embodiment, the fourth indication information is the Smart-Partial flag bit in the first attribute, and the method further includes: in response to the value of the Smart-Partial flag bit being 1, determining that the second indication information contains the Partial flag bit with a value of 1 in the first attribute.
[0104] In an exemplary embodiment, the first process is a process that has no effect on the first attribute. There is also a fourth node between the first node and the third node. The fourth node is a node that cannot recognize the New-Transitive flag, Smart-Partial flag, New-Partial flag, No-Partial flag, and the first attribute. The fourth node sends the fifth BGP route to the first node. Both the second node and the fourth node modify the second attribute in a way that has no effect on the first attribute. The third indication information is different from the value of the corresponding field in the fifth BGP route.
[0105] It should be noted that the first node in the above embodiments can be understood as the first PE, the second node can be understood as the second PE, the third node can be understood as the third PE, and the fourth node can be understood as the fourth PE. The embodiments of the present invention do not limit this.
[0106] In one embodiment, combined Figure 6 The method for sending BGP routes is explained, with appendix. Figure 6 This is a flowchart (I) illustrating an optional BGP route transmission method according to an embodiment of this application. Figure 6 As shown:
[0107] The third PE advertises a BGP route to the first PE through the second PE. This BGP route contains at least one optional, transitional BGP route attribute that cannot be recognized by the second PE. If the first PE, when forwarding data packet P0 according to the BGP route, inserts the "forwarding plane entity indicated by the BGP route attribute" into the data packet P0 (referred to as data packet P0b), the data packet P0 may pass through the second PE or be dropped by the second PE, depending on the conditions met by the second PE's processing of the BGP route. Specifically, if the second PE's processing of the BGP route meets a first-type condition, the second PE can determine that it can forward P0b; if the second PE's processing of the BGP route meets a second-type condition, the second PE can determine that it will drop P0b. The second PE informs the first PE whether it can forward P0b through a certain mechanism, thereby instructing the first PE to decide whether to insert the "data plane entity indicated by the BGP route attribute" into the data packet P0.
[0108] It should be noted that the BGP route can be a BGP label unicast BGP-LU route, an EVPN route, an L3VPN route, or other BGP routes. The BGP route attributes can be entropy label capability (ELC) attributes, attributes indicating flow label capabilities, and attributes indicating control word capabilities. Specifically, the data plane entity indicated by ELCA is the entropy label (EL) and entropy label indicator (ELI); the data plane entity indicated by the attribute indicating flow label capabilities is the flow label; and the data plane entity indicated by the attribute indicating control word capabilities is the control word.
[0109] The following examples will further illustrate the method for sending BGP routes.
[0110] Example 1
[0111] In this embodiment, in conjunction with the appendix Figure 7 The process of sending BGP routes will be explained. Figure 7 This is a schematic diagram (I) of an optional BGP route transmission method according to an embodiment of this application, showing the ELCA structure. Figure 7 As shown, the specific steps include:
[0112] S101000: The third PE advertises the first BGP route to the second PE. The first BGP route carries the Entropy Label Capability (ELCA) attribute, which includes a New-Transitive flag and a Transitive flag with a value of 0, as shown in the attached diagram. Figure 7 As shown;
[0113] S102000: The second PE receives the first BGP route. The second PE can recognize the first BGP route, but cannot recognize the ELCA.
[0114] S103000: The second PE modifies the next-hop address of the first BGP route to the IP address that identifies the second PE. At the same time, the second PE modifies the MPLS label of the first BGP route to the MPLS label allocated by the second PE (denoted as L1) to obtain the second BGP route. Then, in response to the value of the New-Transitive flag being 1, the second PE advertises the second BGP route to the first PE.
[0115] Step S103000 further includes the following steps:
[0116] S103010: If the label operation corresponding to label L1 in the forwarding plane is Swap, then before the second PE publishes the first BGP route to the first PE, in response to the value of the New-Transitive flag being 1, the Partial flag in the ELCA is not set to 1, and the New-Transitive flag is kept unchanged.
[0117] S103020: If the label operation corresponding to label L1 in the forwarding plane is Pop, then before the second PE publishes the second BGP route to the first PE, the Partial flag in the ELCA is set to 1, while the New-Transitive flag remains unchanged.
[0118] S104000: When the first PE receives the second BGP route, it determines whether the second PE will prevent the addition of an entropy label to the P1 packet based on the Partial flag in the ELCA of the second BGP route, and decides whether to add the entropy label to the P1 packet based on whether the second PE will prevent the addition of the entropy label to the P1 packet.
[0119] Step S104000 further includes the following steps:
[0120] S104011: When the first PE receives the first BGP route, if the Partial flag in the ELCA of the second BGP route is 1, then when forwarding data packet P1 according to the second BGP route, the entropy label will not be inserted into the P1 packet.
[0121] S104021: When the first PE receives the second BGP route, if the Partial flag in the ELCA of the second BGP route is 0, then when forwarding data packet P1 according to the first BGP route, the entropy label is inserted into the P1 packet.
[0122] Example 2
[0123] S201000: The third PE advertises the first BGP route to the second PE. The first BGP route carries the Entropy Label Capability Attribute (ELCA). The ELCA does not carry the New-Transitive flag, but carries the Transitive flag with a value of 1.
[0124] S202000: The second PE receives the first BGP route. The second PE can recognize the first BGP route, but cannot recognize the ELCA.
[0125] S203000: The second PE modifies the next-hop address of the first BGP route to the IP address that identifies the second PE. At the same time, the second PE modifies the MPLS label of the first BGP route to the MPLS label (denoted as L1) allocated by the second PE to obtain the second BGP route. Then, the second PE advertises the second BGP route to the first PE.
[0126] Step S203000 further includes the following steps:
[0127] S203010: If the label operation corresponding to label L1 in the forwarding plane is Swap, the Partial flag in the ELCA shall not be set to 1 before the second PE publishes the second BGP route to the first PE;
[0128] S203020: If the label operation corresponding to label L1 in the forwarding plane is Pop, before the second PE publishes the second BGP route to the first PE, the value of the Partial flag in the ELCA is set to 1. It should be noted that because the second node's forwarding plane does not support entropy labels, if the first PE sends an entropy label to the second PE according to the ELCA, it will lead to a traffic black hole. Therefore, setting the value of the Partial flag to 1 can serve as a basis for the first PE to determine that the second PE will cause a traffic black hole through the ELCA; similar situations will not be repeated.
[0129] S204000: When the first PE receives the second BGP route, and forwards data packet P2 according to the second BGP route, the first PE determines whether the second PE will hinder the addition of an entropy label to the P2 packet based on the Partial flag in the ELCA of the second BGP route, and decides whether to add the entropy label to the P2 packet based on whether the second PE will hinder the addition of the entropy label to the P2 packet; similar situations will not be described again.
[0130] Step S204000 further includes the following steps:
[0131] S204011: When the first PE receives the second BGP route, if the Partial flag in the ELCA of the second BGP route is 1, then when the first PE forwards the data packet P2 according to the second BGP route, it will not insert the entropy label into the P2 packet.
[0132] S204021: When the first PE receives the second BGP route, if the Partial flag in the ELCA of the second BGP route is 0, then when forwarding data packet P2 according to the second BGP route, the entropy label is inserted into the P2 packet.
[0133] Example 3
[0134] In this embodiment, in conjunction with the appendix Figure 8 The process of sending BGP routes will be explained. Figure 8 This is a flowchart (II) illustrating an optional BGP route transmission method according to an embodiment of this application. Figure 8 As shown, the specific steps include:
[0135] S301000: The third PE advertises the first BGP route to the second PE. The first BGP route carries a BGP attribute that cannot be recognized by the second PE: the EVPN Layer 2 Attr ibutes extended community attribute (i.e., Flow Label Capability (FLC) attribute, which carries a New-Transitive flag). Figure 8 The first BGP route is a Type I EVPN route, and the MPLS label is the MPLS label in the NLRI of the Type I EVPN route. (represented by NewT) and a Transitive flag with a value of 0.
[0136] S302000: The second PE receives the first BGP route. The second PE can recognize the first BGP route, but cannot recognize the ELCA.
[0137] S303000: The second PE modifies the next-hop address of the first BGP route to the IP address identifying the second PE. Simultaneously, the second PE changes the MPLS label of the first BGP route. Figure 8 The first PE modifies the MPLS label (denoted as RL1) allocated by the second PE to obtain the second BGP route. Then, the second PE advertises the second BGP route to the first PE so that the first PE can determine whether to send a flow label to the second PE.
[0138] Step S303000 further includes the following steps:
[0139] S303010: If the label operation corresponding to label RL1 in the forwarding plane is Swap, then before the second PE publishes the second BGP route to the first PE, in response to the value of the New-Transitive flag being 1, the Partial flag in the FLCA is not set to 1, and the New-Transitive flag is kept unchanged.
[0140] S303020: If the label operation corresponding to label RL1 in the forwarding plane is Pop, then before the second PE publishes the second BGP route to the first PE, the Partial flag in the FLCA is set to 1, while the New-Transitive flag remains unchanged.
[0141] S303011: When the first PE receives the second BGP route, if the Partial flag in the FLCA of the second BGP route is 1, then when forwarding data packet P3 according to the second BGP route, the flow label will not be inserted into the P3 packet.
[0142] S303021: When the first PE receives the second BGP route, if the Partial flag in the FLCA of the second BGP route is 0, then when forwarding the data packet P3 according to the second BGP route, the flow label is inserted into the P3 packet.
[0143] It should be noted that multiple extended community attributes can be packaged together for distribution. In this case, these extended community attributes share the same Attr.Flags and the same Attr.Type Code. When EVPN Layer 2 Attributes ExtendedCommunity needs to set the New-Transitive flag and / or Partial flag, while other extended community attributes do not, the two sets of extended community attributes should be packaged separately.
[0144] Example 4
[0145] S401000: The third PE advertises the first BGP route to the second PE. The first BGP route carries a BGP attribute that cannot be recognized by the second PE, which is the C flag (i.e., control word capability flag) in the EVPN Layer 2 Attributes Extend Community. The CWCA carries a New-Transitive flag and a Transitive flag with a value of 0. The first BGP route is a Type 1 EVPN route, and the MPLS label is the MPLS label in the NLRI of the Type 1 EVPN route.
[0146] S402000: The second PE receives the first BGP route. The second PE can recognize the first BGP route, but cannot recognize the ELCA.
[0147] S403000: The second PE modifies the next-hop address of the first BGP route to the IP address that identifies the second PE. At the same time, the second PE modifies the MPLS label of the first BGP route to the MPLS label allocated by the second PE (denoted as L1) to obtain the second BGP route. Then, the second PE advertises the second BGP route to the first PE so that the first PE can determine whether to send a control word to the second PE.
[0148] Step 403000 further includes the following steps:
[0149] S403010: If the label operation corresponding to label L1 in the forwarding plane is Swap, then before the second PE publishes the second BGP route to the first PE, in response to the value of the New-Transitive flag being 1, the Partial flag in the CWCA is not set to 1, and the New-Transitive flag is kept unchanged.
[0150] S403020: If the label operation corresponding to label L1 in the forwarding plane is Pop, then before the second PE publishes the second BGP route to the first PE, the Partial flag in the CWCA is set to 1, while the New-Transitive flag remains unchanged.
[0151] S403011: When the first PE receives the second BGP route, if the Partial flag in the CWCA of the second BGP route is 1, then when forwarding data packet P3 according to the second BGP route, the control word capability label will not be inserted into the P3 packet.
[0152] S403021: When the first PE receives the second BGP route, if the Partial flag in the CWCA of the second BGP route is 0, then when forwarding the data packet P3 according to the second BGP route, the control word capability label is inserted into the P3 packet.
[0153] Example 5
[0154] In this embodiment, in conjunction with the appendix Figure 9 The process of sending BGP routes will be explained. Figure 9 This is a flowchart (III) illustrating an optional BGP route transmission method according to an embodiment of this application. Figure 9 As shown, the specific steps include:
[0155] Unless otherwise specified, the steps in this embodiment are the same as those in Embodiment 1:
[0156] The difference is:
[0157] 1) In this embodiment, there are other nodes between the second PE and the third PE, such as the PE4 node shown in the figure. At this time, PE4 may modify the original first BGP route. For example, while PE4 node transparently transmits ELCA, it may remove the MPLS label from the original first BGP route. Figure 9 (represented by TL0 in the text). At this time, the first BGP route received by the second PE from PE4 is the same as the first BGP route received by the second PE from the third PE.
[0158] 2) In this embodiment, the new New-Partial flag is used ( Figure 9 The function of the Partial flag in Example 1 is replaced by NewP (represented by New-P). Here, New-Partial being 0 is equivalent to Partial being 0, and New-Partial being 1 is equivalent to Partial being 1.
[0159] It should be noted that since the first BGP route received by the second PE no longer carries an MPLS label, in this embodiment, "the second PE modifies the MPLS label of the first BGP route" refers to adding a route carrying the MPLS label. Figure 9 The routing attribute (represented by TL4 in Chinese).
[0160] Example 6
[0161] Unless otherwise specified, the steps in this embodiment are the same as those in Embodiment 5:
[0162] The difference is:
[0163] 1) In this embodiment, the new No-Partial flag field is replaced by a new No-Partial flag field. The No-Partial flag being 0 is equivalent to the Partial flag being 1 in embodiment 1, and the No-Partial flag being 1 is equivalent to the Partial flag being 0 in embodiment 1.
[0164] 2) When the New-Partial flag is set to 0 in Example 5, the No-Partial flag is set to 1 in this example. When the New-Partial flag is set to 1 in Example 5, the No-Partial flag is set to 0 in this example.
[0165] It should be noted that in this embodiment, when the third PE sends the first BGP route to PE4, No-Partial needs to be set to 1.
[0166] Example 7
[0167] In this embodiment, in conjunction with the appendix Figure 10 The process of sending BGP routes will be explained. Figure 10 This is a schematic diagram (II) of the ELCA structure of an optional BGP route transmission method according to an embodiment of this application. Figure 10 As shown, the specific steps include:
[0168] S701000: The third PE advertises the first BGP route to the second PE. The first BGP route carries the Entropy Label Capability (ELCA) attribute, which includes a Smart-Partial flag with a value of 1 and a Transitive flag with a value of 1, as shown in the attached diagram. Figure 11 As shown;
[0169] S702000: The second PE receives the first BGP route. The second PE can recognize the first BGP route, but cannot recognize the ELCA to which it belongs.
[0170] S703000: The second PE modifies the next hop of the first BGP route to the IP address that identifies the second PE. At the same time, the second PE modifies the MPLS label of the first BGP route to the MPLS label allocated by the second PE (denoted as L1) to obtain the second BGP route. Then, the second PE publishes the first BGP route to the first PE so that the second PE can determine whether to send an entropy label to the first PE.
[0171] Step S703000 further includes the following steps:
[0172] S703010: If the label operation corresponding to label L1 in the forwarding plane is Swap, before the second PE publishes the second BGP route to the first PE, in response to the value of the Smart-Partial flag being 1, the Partial flag in the ELCA is not set to 1, and the Smart-Partial flag remains unchanged.
[0173] S703020: If the label operation corresponding to label L1 in the forwarding plane is Pop, before the second PE publishes the second BGP route to the first PE, set the Partial flag in the ELCA to 1, while keeping the Smart-Partial flag unchanged.
[0174] S703011: When the first PE receives the second BGP route, if the Partial flag in the ELCA of the second BGP route is 1, then when forwarding the data packet P7 according to the second BGP route, the entropy label will not be inserted into the P7 packet.
[0175] S703021: When the first PE receives the second BGP route, if the Partial flag in the ELCA of the second BGP route is 0, then when forwarding the data packet P7 according to the second BGP route, the entropy label is inserted into the P7 packet.
[0176] Example 8
[0177] In this embodiment, in conjunction with the appendix Figure 11-12 The process of sending BGP routes will be explained. Figure 11 and 12 These are schematic flowcharts illustrating two optional BGP route transmission methods according to embodiments of this application, as follows: Figure 11-12 As shown, the specific steps include:
[0178] Unless otherwise specified, the steps in this embodiment are the same as those in Embodiment 7:
[0179] The difference is:
[0180] 1) As shown in the figure, in this embodiment, there is a legacy PE (corresponding to the fourth node) between the third PE and the first PE, and the legacy PE will not transmit the value of the Smart-Partial flag (corresponding to the fourth indication information);
[0181] 2) In step S703011 of this embodiment, if the Partial flag in the ELCA of the second BGP route is 1, then when forwarding data packet P1 according to the second BGP route, the entropy label is not inserted into the P1 packet;
[0182] 3) In step S703021 of this embodiment, if the Partial flag in the ELCA of the second BGP route is 0, then when forwarding data packet P1 according to the second BGP route, the entropy tag is inserted into the P1 packet.
[0183] It should be noted that the appendix Figure 11-12 The terms "exposed" and "unexposed" mentioned in the text include:
[0184] If the second PE modifies the second attribute, and the modification of the second attribute by the second PE does not cause the second forwarding plane entity to be removed from the second PE, then the second PE can be said to be a non-exposed node relative to the second attribute. Here, the second forwarding plane entity is the forwarding plane entity adjacent to the first forwarding plane entity in the outer layer of the first forwarding plane entity, and the first forwarding plane entity is the forwarding plane entity corresponding to the first attribute. Conversely, if the second PE modifies the second attribute, and the modification of the second attribute by the second PE causes the second forwarding plane entity to be removed from the second PE, then the second PE can be said to be an exposed node relative to the second attribute.
[0185] Furthermore, if the first attribute can have an exposed node relative to any other routing attribute, then the first attribute is called an exposed routing attribute; otherwise, the first attribute is called a non-exposed (i.e., impossible to be exposed) routing attribute. Routing attributes that have no corresponding entity in the forwarding plane are all non-exposed routing attributes. Only for exposed routing attributes do third-party PEs need to add the Smart-Partial tag; for non-exposed routing attributes (especially new non-exposed routing attributes that will appear in the future), the Smart-Partial tag does not need to be added.
[0186] It should be noted that, in this embodiment, if the first processing is a process that has no effect on the first attribute (i.e., it will not cause the first forwarding plane entity corresponding to the first attribute to be exposed on the second PE) (i.e., the second PE is a non-exposed PE), there is a legacy PE (corresponding to the fourth PE) between the first PE and the third PE. The legacy PE is a node that cannot recognize the New-Transitive flag, Smart-Partial flag, New-Partial flag, No-Partial flag, and the first attribute. The legacy PE will modify the next hop of the first BPG route to the IP address that identifies the fourth PE to obtain the fifth BGP route. The legacy PE sends the fifth BGP route to the first PE. Both the second PE and the legacy PE have modified the second attribute without affecting the first attribute. The method further includes:
[0187] The value of the corresponding field in the third indication information is different from that in the fifth BGP route.
[0188] Example 9
[0189] S901000: The third PE advertises the first BGP route to the second PE. The first BGP route carries the Entropy Label Capability Attribute (ELCA). The ELCA does not carry the New-Transitive flag, but carries the Transitive flag with a value of 1.
[0190] S902000: The second PE receives the first BGP route. The second PE can recognize the first BGP route, but cannot recognize the ELCA.
[0191] S903000: The second PE modifies the next hop of the first BGP route to the IP address that identifies the second PE. At the same time, the second PE modifies the MPLS label of the first BGP route to the MPLS label allocated by the second PE (denoted as L1). Then, the second BGP route is obtained. The second PE advertises the second BGP route to the first PE to indicate whether the first PE should encapsulate the entropy label for the second PE.
[0192] Step S903000 further includes the following steps:
[0193] S903010: If the label operation corresponding to label L1 in the forwarding plane is Swap, before the second PE publishes the second BGP route to the first PE, set the Partial flag in the ELCA to 1, and at the same time, set the Partial-Disabled flag in the ELCA to 1;
[0194] S903020: If the label operation corresponding to label L1 in the forwarding plane is Pop, before the second PE publishes the second BGP route to the first PE, set the Partial flag in the ELCA to 1, and do not set the Partial-Disabled flag in the ELCA to 1.
[0195] S903011: When the first PE receives the second BGP route, if the Partial flag in the ELCA of the second BGP route is 1 and the value of the Partial-Disabled flag in the ELCA is 0, then when the first PE forwards the data packet P9 according to the second BGP route, it will not insert the entropy label into the P9 packet.
[0196] S903021: When the first PE receives the second BGP route, if the Partial flag in the ELCA of the second BGP route is 1 and the value of the Partial-Disabled flag in the ELCA is 1, then when forwarding the data packet P9 according to the second BGP route, the entropy label is inserted into the P9 packet.
[0197] S903031: When the first PE receives the second BGP route, if the Partial flag in the ELCA of the second BGP route is 0 and the value of the Partial-Disabled flag in the ELCA is 0, then when forwarding the data packet P9 according to the second BGP route, the entropy label is inserted into the P9 packet.
[0198] It should be noted that in this embodiment, when there is a fifth PE between the second PE and the first PE, the fifth PE receives the first BGP route from the second PE and sends the modified first BGP route to the first PE. At this time, the fifth PE needs to modify the value of the Partial-Disabled flag according to its own situation, and cannot always pass through the received Partial-Disabled flag value. Since the Partial flag cannot be modified once it is set to 1, the property that the Partial-Disabled flag can be modified by each intermediate node can maximize the use of the entropy label capability of each intermediate node, rather than simply not encapsulating an entropy label on the ingress node if any intermediate node does not have entropy label capability.
[0199] The above embodiments propose a method for a third PE to send BGP routes with BGP routing attributes to a first PE through a second PE. This method enables the first PE to know whether the second PE will prevent the first PE from applying the BGP routing attribute to the forwarding plane of the corresponding BGP route, even if the second PE cannot recognize a certain BGP routing attribute. This solves the dilemma caused by the first PE's inability to recognize whether the second PE will prevent the first PE from applying the BGP routing attribute to the forwarding plane of the corresponding BGP route. It also ensures that new BGP routing attributes published by new nodes in the future can safely traverse nodes that implement the embodiments of this application but cannot recognize the new BGP routing attributes, thus shortening the scope of network node upgrades and reducing network maintenance costs.
[0200] In one embodiment, combined with append Figure 13 A flowchart illustrating an optional method for sending BGP routes with legacy PE is provided, as follows: Figure 13 As shown:
[0201] The legacy PE is an existing node that does not support Control Word Capability (CWC) negotiation. The second PE-a and the second PE-b are nodes that do not support CWC negotiation but support the embodiments of this application. After receiving the EVPN route, the legacy PE, the second PE-a, and the third PE-b all modify their EVPN label VL and next hop before forwarding the EVPN route to the first PE. Among them, VL3 is an EVPN label with control word destructiveness (i.e., CW destructiveness, meaning that the second PE-b is an exposed node relative to the EVPN label in terms of CWCA), VL2 is an EVPN label without control word destructiveness (i.e., CW compatibility, meaning that the second PE-a is a non-exposed node relative to the EVPN label in terms of CWCA), and VL1 is an EVPN label with chaos (may have CW destructiveness, may not have CW destructiveness, and lacks indication information to indicate whether it has CW destructiveness).
[0202] In this embodiment, when the first PE sends data to the second PE-a, it can add a control word (because the second PE-a indicates that the route it publishes is CW compatible), while when sending data packets to the second PE-b and the legacy PE, it can not add a control word, thereby making the most of the control word capability.
[0203] The BGP route sending method described in this application embodiment enables the third PE to publish BGP route attributes to the first PE through the second PE. That is, without upgrading the second PE, new BGP attributes can be securely extended between the first PE and the third PE. Furthermore, when the second PE would prevent the first PE from applying the new BGP attributes to the forwarding plane, the first PE can handle it differently than when the second PE cannot prevent it. This improves the applicability of the new BGP attributes and simplifies the complexity of network management.
[0204] When nodes implementing the embodiments of this application are networked together with legacy PEs, for newly added BGP route attributes, although these intermediate nodes cannot recognize these newly added BGP route attributes, these intermediate nodes can also instruct the head nodes (such as the first PE) whether their modifications to the first BGP route are CW compatible, so that the head nodes can process different intermediate nodes differently, and the response to these indications will not cause the ingress nodes to add control words to the legacy PEs (which all issue chaotic EVPN labels).
[0205] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0206] This embodiment also provides a BGP route transmission device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware implementations, or a combination of software and hardware, are also possible and contemplated.
[0207] Figure 14 This is a structural block diagram of a BGP route sending device according to an embodiment of this application. Figure 14 As shown, the BGP route sending device includes:
[0208] The receiving module 1402 is used to receive a first BGP route published by a third node, wherein the first BGP route carries a first attribute and a second attribute.
[0209] Processing module 1404 is used to perform a first processing on the second attribute to obtain a second BGP route; wherein, the second node is located between the third node and the first node, the second node cannot recognize the first attribute, the second node has the ability to recognize the second attribute, and the first processing is that the second node modifies the second attribute;
[0210] The sending module 1406 is configured to, in response to the second node's inability to recognize the first attribute, add first indication information to the second BGP route while retaining the first attribute, and send the second BGP route to the first node, wherein the first indication information is indication information indicating whether the first processing has an impact on the first attribute.
[0211] The above-described device receives a first BGP route from a third node via a second node. The first BGP route carries a first attribute and a second attribute. The second node performs a first processing on the second attribute to obtain a second BGP route. The second node is located between the third node and the first node. The second node cannot recognize the first attribute, but it has the ability to recognize the second attribute. The first processing involves the second node modifying the second attribute. In response to the second node's inability to recognize the first attribute, the second node adds first indication information to the second BGP route while retaining the first attribute, and then sends the second BGP route to the first node. The first indication information indicates whether the first processing affects the first attribute. This solves the technical problem in related technologies where, during the relay transmission of BGP routes through intermediate nodes, the receiving end cannot identify whether intermediate nodes will prevent certain BGP attributes in the BGP route from being applied to the forwarding plane, especially the problem of traffic black holes caused by intermediate nodes through obstructed BGP attributes. This achieves the technical effect of shortening the scope of network node upgrades and reducing network maintenance costs.
[0212] In an optional embodiment, the method further includes: when the first processing affects the first attribute, the first indication information further includes second indication information; when the first processing does not affect the first attribute, the first indication information further includes third indication information, and the second indication information is different from the third indication information, wherein the second indication information is an indication information for instructing the first node to perform the second processing, and the third indication information is an indication information for instructing the first node to perform the third processing, wherein the second processing is: when the second BGP route carries the second indication information, the first node does not add the first forwarding plane entity to the data packet corresponding to the second BGP route; wherein the first forwarding plane entity is the forwarding plane entity corresponding to the first attribute; the third processing includes: when the second BGP route carries the third indication information, instructing the first node to add the first forwarding plane entity to the data packet corresponding to the second BGP route; wherein the first forwarding plane entity is the forwarding plane entity corresponding to the first attribute.
[0213] In an optional embodiment, the first attribute, the first forwarding plane entity, and the second attribute satisfy one of three conditions: a third condition, a fourth condition, and a fifth condition. The third condition includes: the first attribute is an Entropy Label Capability Attribute (ELCA), the first forwarding plane entity is an Entropy Label Indicator (ELI) label corresponding to the ELCA, and the second attribute is an MPLS label attribute of the first BGP route. The fourth condition includes: the first attribute is a Flow Label Capability Attribute (FLCA), the first forwarding plane entity is a flow label corresponding to the FLCA, and the second attribute is an MPLS label attribute of the first BGP route. The fifth condition includes: the first attribute is a Control Word Capability Attribute (CWCA), the first forwarding plane entity is a control word corresponding to the CWCA, and the second attribute is an MPLS label attribute of the first BGP route.
[0214] In an optional embodiment, the method further includes: the first BGP route also carries fourth indication information, and the second node determines the third indication information as fifth indication information based on the fourth indication information, wherein: the fifth indication information includes a Partial flag with a value of 0.
[0215] In an optional embodiment, the method includes: the first BGP route further carries fourth indication information; the second node determines, based on the fourth indication information, that the second indication information includes either a sixth indication information or a seventh indication information, or determines that the third indication information includes an eighth indication information, wherein: the sixth indication information includes a No-Partial flag with a value of 0 and keeps the fourth indication information unchanged; the seventh indication information includes a New-Partial flag with a value of 1 and keeps the fourth indication information unchanged; the eighth indication information includes a Partial flag with a value of 0 and keeps the fourth indication information unchanged.
[0216] In an optional embodiment, before the second node receives the first BGP route published by the third node, the method further includes: the third node adding the fourth indication information to the first BGP route.
[0217] In an optional embodiment, the second node adds the third indication information to the second BGP route only when it sends the second BGP route to the first node, provided that any modifications made to the attributes other than the first attribute in the first BGP route do not affect the validity of the first attribute.
[0218] In an optional embodiment, the fourth indication information is the ninth indication information, wherein the ninth indication information consists of a value of 1 for the Transitive flag bit in the first attribute and a value of 1 for the Smart-Partial flag bit in the first attribute.
[0219] In an optional embodiment, the fourth indication information is the tenth indication information, wherein the tenth indication information consists of a value of 0 for the Transitive flag bit in the first attribute and a value of 1 for the New-Transitive flag bit in the first attribute.
[0220] In an optional embodiment, when the first condition is not met, it is determined that the first processing has an impact on the first attribute; or, when the first condition is met, it is determined that the first processing has no impact on the first attribute. The first condition includes one of the following: the second node does not modify the next hop of the first BGP route; the second node modifies the next hop address of the first BGP route to the IP address of the second node, and the second attribute carried by the second BGP route satisfies the second condition.
[0221] In one alternative embodiment, the second condition includes: the second attribute does not cause the first forwarding plane entity to be exposed on the second node.
[0222] In an optional embodiment, the second condition includes: the second attribute does not cause the second forwarding plane entity to be stripped on the second node, wherein the second forwarding plane entity is the forwarding plane entity adjacent to the first forwarding plane entity in the outer layer of the first forwarding plane entity.
[0223] In an optional embodiment, the second attribute is the first MPLS label of the first BGP route, and the first process is that the second node modifies the first MPLS label of the first BGP route to the second MPLS label allocated by the second node. The method further includes: if the label operation corresponding to the second MPLS label in the forwarding plane is Swap, adding the third indication information before the second node publishes the second BGP route to the first node; if the label operation corresponding to the second MPLS label in the forwarding plane is Pop, adding the second indication information before the second node publishes the second BGP route to the first node.
[0224] In an optional embodiment, the third indication information includes a Partial flag bit with a value of 0 in the first attribute.
[0225] In an optional embodiment, the fourth indication information is the New-Transitive flag bit in the first attribute, and the method further includes: the third node setting the No-Partial flag bit to 1 before publishing the first BGP route; in response to the value of the New-Transitive flag bit being 1, the second node determines that the third indication information includes the No-Partial flag bit with a value of 1 and the Transitive flag bit with a value of 0 in the first attribute.
[0226] In an optional embodiment, the fourth indication information is the Smart-Partial flag bit in the first attribute, and the method further includes: in response to the value of the Smart-Partial flag bit being 1, determining that the second indication information contains the Partial flag bit with a value of 1 in the first attribute.
[0227] In an optional embodiment, the first processing is a processing that has no effect on the first attribute. There is also a fourth node between the first node and the third node. The fourth node is a node that cannot recognize the New-Transitive flag, Smart-Partial flag, New-Partial flag, No-Partial flag, and the first attribute. The fourth node sends the fifth BGP route to the first node. Both the second node and the fourth node modify the second attribute in a way that has no effect on the first attribute. The third indication information is different from the value of the corresponding field in the fifth BGP route.
[0228] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0229] Optionally, in this embodiment, the storage medium can be configured to perform the following steps:
[0230] S1, the second node receives the first BGP route from the third node, wherein the first BGP route carries a first attribute and a second attribute.
[0231] S2, the second node performs a first process on the second attribute to obtain a second BGP route; wherein, the second node is located between the third node and the first node, the second node cannot recognize the first attribute, the second node has the ability to recognize the second attribute, and the first process is that the second node modifies the second attribute;
[0232] S3, in response to the second node's inability to recognize the first attribute, the second node adds first indication information to the second BGP route while retaining the first attribute, and sends the second BGP route to the first node, wherein the first indication information is indication information indicating whether the first processing has an impact on the first attribute.
[0233] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0234] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0235] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0236] S1, the second node receives the first BGP route from the third node, wherein the first BGP route carries a first attribute and a second attribute.
[0237] S2, the second node performs a first process on the second attribute to obtain a second BGP route; wherein, the second node is located between the third node and the first node, the second node cannot recognize the first attribute, the second node has the ability to recognize the second attribute, and the first process is that the second node modifies the second attribute;
[0238] S3, in response to the second node's inability to recognize the first attribute, the second node adds first indication information to the second BGP route while retaining the first attribute, and sends the second BGP route to the first node, wherein the first indication information is indication information indicating whether the first processing has an impact on the first attribute.
[0239] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0240] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0241] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0242] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method of sending BGP routes, characterized by, The method comprises: The second node receives a first BGP route of a third node, wherein the first BGP route carries a first attribute and a second attribute; The second node performs a first processing on the second attribute to obtain a second BGP route; wherein the second node is located between the third node and a first node, the second node cannot identify the first attribute, the second node has the capability of identifying the second attribute, and the first processing is a modification of the second attribute by the second node; In response to the second node being unable to identify the first attribute, the second node adds first indication information in the second BGP route while retaining the first attribute, and sends the second BGP route to the first node, wherein the first indication information is indication information indicating whether the first processing has an impact on the first attribute; The method further comprises: When the first processing has an impact on the first attribute, the first indication information further comprises second indication information, and when the first processing has no impact on the first attribute, the first indication information further comprises third indication information, and the second indication information is different from the third indication information, wherein the second indication information is indication information for instructing the first node to perform a second processing, and the third indication information is indication information for instructing the first node to perform a third processing, wherein the second processing comprises: In a case where the second BGP route carries the second indication information, the first node does not add a first forwarding plane entity to a data packet corresponding to the second BGP route; The first forwarding plane entity is a forwarding plane entity corresponding to the first attribute; The third processing comprises: In a case where the second BGP route carries the third indication information, the third processing instructs the first node to add the first forwarding plane entity to the data packet corresponding to the second BGP route.
2. The method of Claim 1, wherein, The first attribute, the first forwarding plane entity, and the second attribute satisfy one of a third condition, a fourth condition, and a fifth condition, wherein The third condition comprises that the first attribute is an entropy label capability attribute ELCA, the first forwarding plane entity is an entropy label indicator ELI label corresponding to the ELCA, and the second attribute is an MPLS label attribute of the first BGP route; The fourth condition comprises that the first attribute is a flow label capability attribute FLCA, the first forwarding plane entity is a flow label corresponding to the FLCA, and the second attribute is an MPLS label attribute of the first BGP route; The fifth condition comprises that the first attribute is a control word CW capability attribute CWCA, the first forwarding plane entity is a control word corresponding to the CWCA, and the second attribute is an MPLS label attribute of the first BGP route.
3. The method of Claim 1, wherein, The method further comprises: The first BGP route further carries fourth indication information, and the second node determines, according to the fourth indication information, that the third indication information is fifth indication information, wherein: The fifth indication information includes a Partial flag with a value of 0.
4. The method of Claim 1, wherein, The method comprises: The fourth indication information is carried in the first BGP route, and the second node determines, according to the fourth indication information, that the second indication information includes one of sixth indication information and seventh indication information, or that the third indication information includes eighth indication information, wherein: The sixth indication information includes a No-Partial flag with a value of 0 and keeps the fourth indication information unchanged; The seventh indication information includes a New-Partial flag with a value of 1 and keeps the fourth indication information unchanged; The eighth indication information includes a Partial flag with a value of 0 and keeps the fourth indication information unchanged.
5. The method of Claim 3 or 4, wherein, Before the second node receives the first BGP route published by the third node, the method further comprises: The third node adds the fourth indication information to the first BGP route.
6. The method of claim 4, wherein, The second node only adds the third indication information to the second BGP route when all modifications made by the second node to attributes in the first BGP route other than the first attribute do not affect the validity of the first attribute. The second node adds the third indication information to the second BGP route before sending the second BGP route to the first node.
7. The method of Claim 3 or 6, wherein, The fourth indication information is ninth indication information, wherein: The ninth indication information is composed of a value of 1 of a Transitive flag in the first attribute and a value of 1 of a Smart-Partial flag in the first attribute.
8. The method of claim 4, wherein the BGP route is a BGP-4 route. The fourth indication information is tenth indication information, wherein: The tenth indication information is composed of a value of 0 of a Transitive flag in the first attribute and a value of 1 of a New-Transitive flag in the first attribute.
9. The method of Claim 1, wherein, When the first condition is not met, it is determined that the first processing affects the first attribute, or when the first condition is met, it is determined that the first processing does not affect the first attribute, wherein the first condition comprises one of: The second node does not modify the next hop of the first BGP route; The second node modifies the next hop address of the first BGP route to the IP address of the second node, and a second attribute carried by the second BGP route satisfies a second condition.
10. The method of Claim 9, wherein, The method comprises: The second condition comprises that the second attribute does not cause the first forwarding plane entity to be exposed on the second node.
11. The method of Claim 9, wherein, The second condition comprises that the second attribute does not cause a second forwarding plane entity to be stripped on the second node, the second forwarding plane entity being a forwarding plane entity adjacent to the first forwarding plane entity in an outer layer of the first forwarding plane entity.
12. The method of Claim 1, wherein, The second attribute is a first MPLS label of the first BGP route, and the first processing is that the second node modifies the first MPLS label of the first BGP route to a second MPLS label allocated by the second node, and the method further comprises: If the second MPLS label corresponds to a Swap operation in a forwarding plane, the third indication information is added before the second node publishes the second BGP route to the first node. If the second MPLS label corresponds to a label operation of Pop at a forwarding plane, the second indication information is added before the second node publishes the second BGP route to the first node.
13. The method of Claim 12, wherein the third indication information comprises a Partial flag in the first attribute with a value of 0. The fourth indication information is a New-Transitive flag in the first attribute, and the method further comprises:
14. The method of Claim 4, wherein, The third node sets the No-Partial flag to 1 before publishing the first BGP route. In response to the value of the New-Transitive flag being 1, the second node determines that the third indication information comprises the No-Partial flag in the first attribute with a value of 1 and the Transitive flag in the first attribute with a value of 0. The fourth indication information is a Smart-Partial flag in the first attribute, and the method further comprises:
15. The method of Claim 3, wherein, In response to the value of the Smart-Partial flag being 1, it is determined that the second indication information comprises the Partial flag in the first attribute with a value of 1. The first processing is a processing that has no influence on the first attribute, and there is a fourth node between the first node and the third node, the fourth node is a node that cannot recognize the New-Transitive flag, the Smart-Partial flag, the New-Partial flag, the No-Partial flag and the first attribute, and the fourth node publishes a fifth BGP route to the first node, the second node and the fourth node both perform the first processing on the second attribute, and the third indication information is different from a value of a corresponding field in the fifth BGP route.
16. The method of Claim 3 or 4, wherein, The method is applied to a second node, and the method comprises:
17. A device for sending BGP routes, characterized in that receiving a first BGP route published by a third node, wherein the first BGP route carries a first attribute and a second attribute; performing a first processing on the second attribute to obtain a second BGP route, wherein the second node is located between the third node and a first node, the second node cannot recognize the first attribute, the second node has the ability to recognize the second attribute, and the first processing is a modification of the second attribute by the second node; sending the second BGP route to the first node in response to the second node being unable to recognize the first attribute, wherein the second BGP route carries first indication information and retains the first attribute, and the first indication information is indication information indicating whether the first processing has an influence on the first attribute; The apparatus is further configured to: When the first processing has an impact on the first attribute, the first indication information further comprises second indication information, when the first processing has no impact on the first attribute, the first indication information further comprises third indication information, and the second indication information is different from the third indication information, wherein the second indication information is indication information for instructing the first node to perform second processing, and the third indication information is indication information for instructing the first node to perform third processing, wherein the second processing is: In a case where the second BGP route carries the second indication information, the first node does not add a first forwarding plane entity to a data packet corresponding to the second BGP route; The first forwarding plane entity is a forwarding plane entity corresponding to the first attribute; The third processing comprises: In a case where the second BGP route carries the third indication information, the first node is instructed to add the first forwarding plane entity to a data packet corresponding to the second BGP route.
18. A computer readable storage medium, characterized in that, The storage medium has stored therein a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 16 when running.
19. An electronic device, comprising: The apparatus comprises a memory and a processor, the memory has stored therein a computer program, and the processor is configured to execute the method described in any one of claims 1 to 16 by using the computer program.