Label allocation method, carrier edge device, routing exchange node and medium

By assigning independent labels to PE and SPE devices in EVPN technology and establishing a label exchange table in the SPE device, the problem of label resource shortage and conflict of SPE devices in the cross-domain scenario of Hub/Spoke networking Option B is solved, and efficient label management is achieved.

CN115514703BActive Publication Date: 2026-05-26ZTE CORP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZTE CORP
Filing Date
2021-06-23
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In the cross-domain scenario of Hub/Spoke networking Option B of EVPN technology, there is a problem of global MPLS label resource shortage and/or label conflict in SPE devices.

Method used

Assign a first downstream assignment tag and a first upstream assignment tag to the second PE device and pass them to the SPE device. The SPE device then assigns a second downstream assignment tag and a second upstream assignment tag to these tags, establishing a tag exchange table to ensure tag independence and avoid conflicts.

Benefits of technology

This effectively avoids the problems of tag resource shortage and conflict in SPE equipment, ensures the independence of tag allocation, and improves the efficiency of tag management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115514703B_ABST
    Figure CN115514703B_ABST
Patent Text Reader

Abstract

The label allocation method, operator edge device, routing switching node device, and storage medium provided in this application embodiment include: a first PE device allocating a first downstream allocation label and a first upstream allocation label to a second PE device, determining a first inbound label table for uplink and a first outbound label table for downlink of BUM packets, and transmitting the two allocated labels to an SPE device; the SPE device allocating a second downstream allocation label to the first downstream allocation label and a second upstream allocation label to the first upstream allocation label, determining a label switching table, and transmitting the two allocated labels to the second PE device; the second PE device determining a second outbound label table for uplink and a second inbound label table for downlink of BUM packets, and setting the packet forwarding mode of its corresponding second upstream allocation label to discard in the second inbound label table. Therefore, this application embodiment solves the limitations existing in conventional technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a tag allocation method, operator edge equipment, routing and switching node, and storage medium. Background Technology

[0002] EVPN (Ethernet Virtual Private Network) is a technology based on BGP (Border Gateway Protocol) and MPLS (Multi-Protocol Label Switching) protocols, and is widely used in scenarios such as private network operation and data centers.

[0003] Figure 1 This is an exemplary application scenario utilizing EVPN technology, which can be a Hub / Spoke network for an organization or company. Specifically, the headquarters and various branches located in different regions connect to PE (Provider Edge) devices through their respective CE (Customer Edge) devices. The PE device (denoted as PEh1) for access by the headquarters CE device (CEh1) is a Hub-type PE device, which can be referred to as the root node or Hub node, etc.; the PE devices (denoted as PEs1, 2, 3, 4) for access by the branch CE devices (CEs1, 2, 3, 4 respectively) are Spoke-type PE devices, which can be referred to as leaf nodes or Spoke nodes, etc. In a Hub / Spoke network, Spoke nodes and Hub nodes can communicate with each other, but Spoke nodes are not allowed to communicate directly with each other. Therefore, communication between Spoke nodes requires the use of a Hub node. For example, if PEs1 needs to broadcast a message to PEs2, it must first send the message to PEh1, which will then forward it to PEs2. Furthermore, PEh1 and PEs1 are BGP neighbors (also known as BPG peers), so they do not need to configure an SPE (Switching Provider Edge) device (also called an SPE node). However, PEh1 is not a BGP neighbor with PEs2, PEs3, or PEs4, so an SPE node is required between them. This scenario with an SPE node can be called an Option B cross-domain scenario.

[0004] In EVPN technology, P2MP (Point to Multi Point) tunnels can be used to carry BUM (Broadcast unknown-Unicast Multicast) traffic. Therefore, in Option B cross-domain scenarios of Hub / Spoke networking, Hub nodes can broadcast BUM messages to each Spoke node via P2MP tunnels. However, to avoid BUM traffic looping, the source Spoke node (i.e., the broadcast source of the BUM message) should discard the BUM message, for example, in... Figure 1 In the scenario shown, PEs2 can broadcast the BUM message to PEh1 through a unicast tunnel, and then PEh1 can broadcast the BUM message to each PE through a P2MP tunnel. However, PEs2 should discard the BUM message, otherwise it will cause a loop problem in the BUM traffic.

[0005] To address the aforementioned issues, traditional technologies typically encapsulate labels within BUM packets. However, in Option B cross-domain scenarios of Hub / Spoke networking, since SPE nodes are public nodes (e.g., SPE nodes are also connected to other root nodes besides PEh1), multiple services converge on the SPE nodes. Therefore, the label allocation method in traditional technologies may lead to a shortage of global MPLS label resources and / or label conflicts in the SPE nodes, indicating that traditional technologies have limitations. Summary of the Invention

[0006] Based on this, embodiments of this application provide a label allocation method, an operator edge device, a routing switching node, and a storage medium to solve the problems of global MPLS label resource shortage and / or label conflict in SPE devices in traditional technologies.

[0007] In a first aspect, embodiments of this application provide a label allocation method for a first PE device acting as a Hub node in an EVPN instance, wherein the EVPN instance further includes a PE device acting as a Spoke node, and the PE device acting as a Spoke node includes a second PE device connected to the first PE device via an SPE device, the method comprising:

[0008] Assign a first downstream assignment tag and a first upstream assignment tag to the second PE device;

[0009] The correspondence between the first downstream allocation label and the EVPN instance is used as the first inbound label table when the BUM packet is uplinked, and the correspondence between the first upstream allocation label and the first downstream allocation label is used as the first outbound label table when the BUM packet is downlinked.

[0010] The first downstream allocation label and the first upstream allocation label are passed to the SPE device, so that the SPE device allocates a second downstream allocation label for the first downstream allocation label and allocates a second upstream allocation label for the first upstream allocation label. The correspondence between the first downstream allocation label and the second downstream allocation label and the correspondence between the first upstream allocation label and the second upstream allocation label are used as a label exchange table. The second downstream allocation label and the second upstream allocation label are then passed to the second PE device. As a result, the second PE device uses the correspondence between the second downstream allocation label and the EVPN instance as the second outgoing label table for BUM packets when they are uplinked, and uses the correspondence between the second upstream allocation label and the EVPN instance as the second incoming label table for BUM packets when they are downlinked. In the second incoming label table, the packet forwarding mode of the second upstream allocation label corresponding to itself is set to discard.

[0011] The first downstream allocation label and the second downstream allocation label both include global MPLS labels, and the first upstream allocation label and the second upstream allocation label are both labels based on the P2MP tunnel context.

[0012] Secondly, embodiments of this application provide a label allocation method for an SPE device in an EVPN instance, wherein the EVPN instance further includes a first PE device as a Hub node and a second PE device as a Spoke node, the SPE device being disposed between the second PE device and the first PE device, the method comprising:

[0013] The system receives a first downstream allocation label and a first upstream allocation label transmitted by the first PE device. The first downstream allocation label and the first upstream allocation label are allocated by the first PE device to the second PE device. The first downstream allocation label is used to instruct the first PE device to use the correspondence between the first downstream allocation label and the EVPN instance as the first inbound label table when the BUM packet is uplinked. The first upstream allocation label is used to instruct the first PE device to use the correspondence between the first upstream allocation label and the first downstream allocation label as the first outbound label table when the BUM packet is downlinked.

[0014] Assign a second downstream allocation label to the first downstream allocation label, and assign a second upstream allocation label to the first upstream allocation label;

[0015] The correspondence between the first downstream allocation tag and the second downstream allocation tag, and the correspondence between the first upstream allocation tag and the second upstream allocation tag are used as a tag exchange table;

[0016] The second downstream allocation label and the second upstream allocation label are passed to the second PE device, so that the second PE device uses the correspondence between the second downstream allocation label and the EVPN instance as the second outgoing label table when the BUM packet is uplinked, and uses the correspondence between the second upstream allocation label and the EVPN instance as the second incoming label table when the BUM packet is downlinked, and sets the packet forwarding mode of its corresponding second upstream allocation label to drop in the second incoming label table;

[0017] The first downstream allocation label and the second downstream allocation label both include global MPLS labels, and the first upstream allocation label and the second upstream allocation label are both labels based on the P2MP tunnel context.

[0018] Thirdly, embodiments of this application provide a label allocation method for a PE device acting as a Spoke node in an EVPN instance, wherein the EVPN instance further includes a first PE device acting as a Hub node. When the PE device is a second PE device connected to the first PE device via the SPE device, the method includes:

[0019] Receive the second downstream allocation tag and the second upstream allocation tag transmitted by the SPE device;

[0020] The correspondence between the second downstream allocation label and the EVPN instance is used as the second outgoing label table when the BUM packet goes uplink, and the correspondence between the second upstream allocation label and the EVPN instance is used as the second incoming label table when the BUM packet goes downlink. In the second incoming label table, the packet forwarding mode of the second upstream allocation label corresponding to itself is set to discard.

[0021] Wherein, the second downstream allocation tag is allocated by the SPE device when it receives the first downstream allocation tag transmitted by the first PE device, and the second upstream allocation tag is allocated by the SPE device when it receives the first upstream allocation tag transmitted by the first PE device. The second downstream allocation tag is used to instruct the SPE device to use the correspondence between the first downstream allocation tag and the second downstream allocation tag as part of the tag exchange table, and the second upstream allocation tag is used to instruct the SPE device to use the correspondence between the first upstream allocation tag and the second upstream allocation tag as another part of the tag exchange table;

[0022] Wherein, the first downstream allocation label and the first upstream allocation label are allocated by the first PE device to the second PE device. The first downstream allocation label is used to instruct the first PE device to use the correspondence between the first downstream allocation label and the EVPN instance as the first inbound label table when the BUM packet is uplinked. The first upstream allocation label is used to instruct the first PE device to use the correspondence between the first upstream allocation label and the first downstream allocation label as the first outbound label table when the BUM packet is downlinked.

[0023] The first downstream allocation label and the second downstream allocation label both include global MPLS labels, and the first upstream allocation label and the second upstream allocation label are both labels based on the P2MP tunnel context.

[0024] Fourthly, embodiments of this application provide an operator edge device, including a processor and a memory; the memory is used to store a computer program; the processor is used to execute the computer program and, when executing the computer program, implement the tag allocation method as described in the first aspect, or implement the tag allocation method as described in the third aspect.

[0025] Fifthly, embodiments of this application provide a routing and switching node device, including a processor and a memory; the memory is used to store a computer program; the processor is used to execute the computer program and, when executing the computer program, implement the label allocation method as described in the second aspect.

[0026] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the tag allocation method as described in the first, second, or third aspect.

[0027] This application provides a label allocation method, carrier edge device, routing switching node, and storage medium. The method includes: a first PE device allocating a first downstream allocation label and a first upstream allocation label to a second PE device; the first PE device using the correspondence between the first downstream allocation label and the EVPN instance as a first inbound label table for uplink BUM packets, and using the correspondence between the first upstream allocation label and the first downstream allocation label as a first outbound label table for downlink BUM packets; the first PE device transmitting the first downstream allocation label and the first upstream allocation label to an SPE device; and the SPE device allocating a second downstream allocation label and a first upstream allocation label to the first downstream allocation label. The SPE device assigns a second upstream allocation label. The SPE device uses the correspondence between the first and second downstream allocation labels, and the correspondence between the first and second upstream allocation labels, as a label exchange table. The SPE device then passes the second downstream and second upstream allocation labels to the second PE device. The second PE device uses the correspondence between the second downstream allocation label and the EVPN instance as the second outgoing label table for BUM packets uplink, and the correspondence between the second upstream allocation label and the EVPN instance as the second incoming label table for BUM packets downlink. In the second incoming label table, the forwarding mode of the packet corresponding to its own second upstream allocation label is set to discard. It is understood that the downstream allocation label and the upstream allocation label in this embodiment are two independent labels, and their values ​​do not need to be consistent. Therefore, when the SPE device requests and occupies labels, there will be no label conflict problem, nor will it cause a shortage of global MPLS label resources in the SPE device. Attached Figure Description

[0028] Figure 1 This is an example application scenario deployed using EVPN technology;

[0029] Figure 2 A schematic diagram of Option B cross-domain scenario for Hub / Spoke networking;

[0030] Figure 3 For is Figure 2 The diagram illustrates the uplink and downlink of BUM messages in the scenario shown.

[0031] Figure 4 This is an exemplary scenario to which the embodiments of this application can be applied;

[0032] Figure 5 A schematic flowchart of a tag allocation method provided in an embodiment of this application;

[0033] Figure 6 This is one specific scenario in which the embodiments of this application can be applied;

[0034] Figure 7 for Figure 6 A schematic diagram showing how PEh transmits tags through the downstream label attribute of PED in IMET routing;

[0035] Figure 8 for Figure 6 A schematic diagram illustrating the uplink and downlink of BUM messages between PEh and SPE-1;

[0036] Figure 9 for Figure 6 A schematic diagram illustrating how SPE-1 transmits tags via the PED downstream label attribute and the PED downstream label attribute in the IMET route;

[0037] Figure 10 for Figure 6 A schematic diagram illustrating the uplink and downlink of BUM messages between PEh, SPE-1 and PEs-1-1;

[0038] Figure 11 for Figure 6 A schematic diagram illustrating the uplink and downlink of BUM messages between SPE-1 and PEs-1-1;

[0039] Figure 12 This is a flowchart illustrating a BUM message multicast method under the tag allocation method in the embodiments of this application.

[0040] Figure 13 In order to be in Figure 6 A schematic diagram illustrating the broadcast of BUM messages between PEh, SPE-1 and PEs-1-1 in the scenario shown.

[0041] Figure 14 Another exemplary scenario to which the embodiments of this application can be applied;

[0042] Figure 15 A schematic block diagram of a carrier edge device provided in an embodiment of this application;

[0043] Figure 16 This is a schematic block diagram of a routing and switching node device provided in an embodiment of this application. Detailed Implementation

[0044] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments in this specification. All other embodiments obtained by those skilled in the art based on the embodiments in this specification without creative effort are within the scope of protection of this specification.

[0045] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0046] The following detailed description, in conjunction with the accompanying drawings, outlines some embodiments of this specification. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0047] The EVPN technology involved in this application can be found in the descriptions in Internet Engineering Task Force (IETF) Request For Comments (RFCs) 7432 and 6514, which are incorporated herein by reference in their entirety.

[0048] In traditional technologies, in Option B cross-domain scenarios of Hub / Spoke networking, in order for the source Spoke node to discard its broadcast BUM packets, the traditional label allocation method is usually as follows: The Hub node allocates a first label to each Spoke node. For the SPE node, the first label is the downstream allocation label for BUM packets when they are uplinked, and also the upstream allocation label for BUM packets when they are downlinked based on the P2MP tunnel context (used to identify the P2MP tunnel of this EVPN instance). After allocation, the first label is passed to each SPE node. Based on the first label, the SPE node requests and reserves a label. Specifically, it allocates a second label corresponding to the first label. For the Spoke node, the second label is the downstream allocation label for BUM packets when they are uplinked, and also the upstream allocation label for BUM packets when they are downlinked based on the P2MP tunnel context. After allocation, the second label is passed to each Spoke node connected to it. After this, during the broadcasting of BUM traffic by the Spoke node, SPE node, and Hub node, when the Spoke node receives a BUM message, it can determine whether it is a BUM message broadcast by itself based on the second label carried in the BUM message according to the P2MP tunnel context. If it is, it will discard it, thereby avoiding the formation of BUM traffic loops.

[0049] For example, in Figure 2 In the cross-domain scenario of the Hub / Spoke network shown in Option B, PEh1 assigns a first label to each Spoke node. For example, the first label assigned to PEs-1-1 is La-1-1 (for others, please refer to the documentation). Figure 2After allocation, each first label is passed to the SPE-1 and SPE-2 nodes. The SPE-1 node then assigns a second label to each first label, for example, assigning Lb-1-1-1 to La-1-1 (for others, please refer to [link to relevant documentation]). Figure 2 This process involves passing each second label to PEs-1-1 and PEs-1-2 nodes, and the same applies to SPE-2 nodes. However, it should be noted that the second label assigned to the first label by SPE-2 nodes can be different from the second label assigned to the first label by SPE-1 nodes. Based on this, as... Figure 3 As shown, during uplink, when the PEs-1-1 node sends a BUM message, it can first encapsulate the downstream allocation label Lb-1-1-1 allocated by SPE-1 into the BUM message, and then send the BUM message to SPE-1 through a unicast tunnel. After receiving the BUM message, SPE-1 performs label switching, replacing the downstream allocation label Lb-1-1-1 in the BUM message with the downstream allocation label La-1-1 allocated by PEh1, and then sends the BUM message to PEh1 through a unicast tunnel. During downlink, PEh1 re-encapsulates the BUM message with the upstream allocation label La-1-1 based on the P2MP tunnel context, according to the downstream allocation label La-1-1 carried in the BUM message, and broadcasts it to each SPE (i.e., to SPE-1 and SPE-2) through the P2MP tunnel. Upon receiving the BUM message, SPE-1 needs to perform label switching. Specifically, it first determines the label space based on the P2MP tunnel context (this label space corresponds to this EVPN instance), then finds the upstream allocation label Lb-1-1-1 in this label space using the upstream allocation label La-1-1, and then re-encapsulates it with the upstream allocation label Lb-1-1-1 based on the P2MP tunnel context. After the upstream allocation label Lb-1-1-1 of the tunnel context is encapsulated into the BUM message, it is broadcast to the PEs-1-1 and PEs-1-2 nodes. The same applies to SPE-2, so it will not be elaborated further. After receiving the BUM message, the PEs-1-1 node can also determine the label space based on the P2MP tunnel context, and then determine whether the upstream allocation label Lb-1-1-1 in this label space can correspond to the upstream allocation label pre-allocated by SPE-1. If it can, it is discarded. In this case, it can obviously correspond, so the BUM message is discarded to avoid the BUM traffic loop problem. The same applies to the PEs-1-2 node, so it will not be elaborated further.

[0050] In traditional technologies, the second label assigned to an SPE node is a downstream assignment label, thus requiring a space in the global MPLS label space. Simultaneously, the second label is also an upstream assignment label, requiring a space in the P2MP tunnel context label space. However, since SPE nodes are public nodes (e.g., SPE nodes are connected to other root nodes besides PEh1), multiple services converge on the SPE node (i.e., services other than those related to the P2MP tunnel of this EVPN instance). Therefore, traditional technologies may lead to a shortage of global MPLS label resources and / or label conflicts in the SPE node, indicating limitations in traditional technologies. Specifically, firstly, when the second label occupies space in the aforementioned two label spaces, since the second label is both a downstream allocation label and an upstream allocation label, it cannot be occupied by other services in the aforementioned two label spaces. If it has already been occupied, it will lead to label conflict issues. However, since multiple services converge on the SPE node, label conflict issues are very likely to occur when occupies space. For example, suppose the second label is Lb-1-1-1, and this label can occupy space in the global MPLS label space, but Lb-1-1-1 has already been occupied by other services in the P2MP tunnel context label space. This will lead to label conflict issues. Secondly, in order to ensure that traffic looping issues can be avoided, the SPE node must allocate a downstream allocation label and an upstream allocation label for each service. Upstream label allocation (i.e., the second label mentioned above needs to be allocated to each service) is affected by the first aspect, but the space that downstream labels can occupy in the global MPLS label space is small. Furthermore, since the global MPLS label space is limited but multiple services are aggregated on the SPE node, this will lead to a shortage of global MPLS label resources in the SPE node. For example, in the aforementioned example, since Lb-1-1-1 in the P2MP tunnel context label space has been occupied by other services, the second label can only be reallocated and occupied. Therefore, it is understandable that when the global MPLS label space is limited and multiple services are aggregated on the SPE node, this will lead to a shortage of global MPLS label resources in the SPE node.

[0051] Based on this, this application provides a label allocation method that can be applied to Option B cross-domain scenarios in Hub / Spoke networking. For ease of explanation, this embodiment is based on... Figure 4The scenario described is elaborated upon here. In this scenario, the first PE device acting as a Hub node in the EVPN instance is denoted as PEh, and there is one and only one such device. The PE devices acting as Spoke nodes in the EVPN instance include second PE devices, denoted as PEs-nm, and there can be one or more of them. Here, n indicates that the second PE device is connected to an SPE device numbered n (denoted as SPE-n), and m indicates that among the PE devices connected to SPE-n, the second PE device is the device numbered m. It is understood that the first PE device and the second PE device are not BGP neighbors, therefore they need to communicate through an SPE device (i.e., connect through an SPE device). However, it should be noted that multiple second PE devices can connect to the first PE device through the same SPE device; this embodiment does not impose any limitations. Furthermore, it should be noted that other devices, such as P (Provider, backbone core) devices, can also exist between the first PE device and the second PE device. For the sake of brevity, this embodiment does not elaborate on these details, but those skilled in the art should understand that other devices can exist between the first PE device and the second PE device.

[0052] like Figure 5 As shown, the method may include, but is not limited to, steps S110 to S170.

[0053] In step S110, the first PE device assigns a first downstream assignment tag and a first upstream assignment tag to the second PE device.

[0054] In this context, the downstream allocation label is the label assigned by the downstream node, also known as the downstream allocation method label. When a BUM message is sent upstream, the SPE device is downstream of the first PE device, and the first PE device is downstream of the SPE device; therefore, the first PE device needs to perform label allocation first. In this embodiment, the first PE device can allocate a first downstream allocation label to each of the second PE devices. Based on this, the BUM message sent by the SPE device to the first PE device needs to carry the first downstream allocation label. In one implementation, since there is only one first PE device (i.e., a single target), the upstream device can use unicast to broadcast the message to the first PE device. That is, when the broadcast message is sent upstream, it travels through a unicast tunnel; therefore, the first downstream allocation label can include a global MPLS label.

[0055] The upstream allocation label is the label assigned by the upstream node, also known as the upstream allocation method label. During the downlink of BUM packets, the first PE device is upstream of the SPE device, and the SPE device is upstream of the second PE device. Therefore, the first PE device needs to perform label allocation first. In this embodiment, the first PE device can assign a first upstream allocation label to each of the second PE devices. Based on this, the BUM packets sent by the first PE device to each SPE device must carry the first upstream allocation label. In one implementation, since there are usually multiple second PE devices, the first PE device can use multicast to broadcast the packets to each downstream device. Therefore, the first upstream allocation label can be a label based on the P2MP tunnel context, where the P2MP tunnel context identifies the P2MP tunnel of this EVPN instance (this EVPN instance refers to the EVPN instance with PEh as the source node). That is, the first upstream allocation label is a label based on the P2MP tunnel of this EVPN instance.

[0056] For example, in such Figure 6 In the scenario shown, the first PE device can assign tags to the three second PE devices one by one. After the assignment is completed, each second PE device has a corresponding first downstream assignment tag and a first upstream assignment tag, as shown in Table 1. It should be noted that ULa-1-1 (in P2MP context) represents the first upstream assignment tag ULa-1-1 based on the P2MP tunnel context. The rest are similar and will not be described in detail.

[0057] Table 1. Labels assigned by the first PE device to the second PE device.

[0058] Second PE equipment First downstream allocation tag First upstream allocation label PEs-1-1 DLa-1-1 ULa-1-1 (in P2MP context) PEs-2-1 DLa-2-1 ULa-2-1 (in P2MP context) PEs-2-2 DLa-2-2 ULa-2-2 (in P2MP context)

[0059] In step S120, the first PE device uses the correspondence between the first downstream allocation label and the current EVPN instance as the first inbound label table when the BUM packet is uplinked, and uses the correspondence between the first upstream allocation label and the first downstream allocation label as the first outbound label table when the BUM packet is downlinked.

[0060] In step S130, the first PE device transmits the first downstream allocation tag and the first upstream allocation tag to the SPE device.

[0061] Because the first PE device needs to receive and broadcast BUM messages, it needs to establish inbound and outbound label tables after label allocation is completed. Specifically, since the first PE device and the second PE device belong to the same EVPN instance, the first PE device can use the correspondence between the first downstream allocation label and its own EVPN instance as the first inbound label table when BUM messages are uploaded. Thus, when BUM messages are uploaded, when the SPE device forwards the BUM messages broadcast by the second PE device to the first PE device, since the BUM messages sent by the SPE device to the first PE device carry the first downstream allocation label, the first PE device can determine that the broadcast domain of the BUM message is its own EVPN instance based on the first inbound label table and the first downstream allocation label.

[0062] Simultaneously, since the first PE device needs to multicast the received BUM packets, it can also use the correspondence between the first upstream allocation label and the first downstream allocation label as the first outgoing label table when the BUM packet is downlinked. Thus, when the BUM packet is downlinked, if the first PE device needs to multicast the BUM packet to each SPE device, based on the established broadcast domain of the BUM packet being this EVPN instance, the first PE device can determine the first upstream allocation label corresponding to the first downstream allocation label carried by the BUM packet according to the first outgoing label table, and then replace the first downstream allocation label carried by the BUM packet with this first upstream allocation label before multicasting it to each SPE device.

[0063] In this embodiment, since the SPE device is downstream of the second PE device when the BUM packet is uplinked and upstream of the second PE device when the BUM packet is downlinked, the first PE device needs to pass each first downstream allocation label and each first upstream allocation label to the SPE device after completing label allocation, so that the SPE device can perform further label allocation. In one embodiment, the first PE device can pass the first downstream allocation label to the SPE device through the PED (PE Distinguisher) downstream label attribute in the IMET (Inclusive Multicast Ethernet Tag) route; at the same time, the first PE device can also pass the first upstream allocation label to the SPE device through the PED upstream label attribute in the IMET route. The PED downstream label attribute can include each first downstream allocation label; for example, the attribute value of the PED downstream label attribute is the set of each first downstream allocation label. Similarly, the PED upstream label attribute can include each first upstream allocation label; for example, the attribute value of the PED upstream label attribute is the set of each first upstream allocation label. Thus, the first PE device can use these two label attributes to transmit the first downstream allocation label and the first upstream allocation label to each SPE device, respectively. It should also be noted that since EVPN technology is based on the BGP protocol, the first PE device can transmit the data via IMET routing in BPG signaling; furthermore, the downstream and upstream label attributes of the PED are similar to those in traditional technologies, as detailed in RFC 6514.

[0064] For example, in Figure 6 In the scenario shown, the tag assigned by the first PE device to the second PE device can be as shown in Table 1. Therefore, on the one hand, as... Figure 7 As shown, the first PE device can transmit each first downstream allocation label and each first upstream allocation label to each SPE device through the PED downstream label attribute and PED upstream label attribute in the IMET route, respectively. On the other hand, the first PE device can use the correspondence between the first downstream allocation label and the EVPN instance as the first inbound label table, as shown in Table 2. It can be understood that each first downstream allocation label corresponds to the EVPN instance (identified as "EVPN1" in the figure). At the same time, the first PE device can also use the correspondence between the first downstream allocation label and the first upstream allocation label as the first outbound label table, as shown in Table 3. It can be understood that the first downstream allocation label and the first upstream allocation label assigned to the same second PE device correspond to each other.

[0065] Table 2 First Input Label Table

[0066]

[0067] Table 3 First Label Table

[0068]

[0069] Based on this label allocation method, let's take PEh and SPE-1 as examples to illustrate the uplink and downlink of BUM messages. Figure 8 As shown, when SPE-1 receives a BUM message sent by PEs-1-1 through a unicast tunnel, it needs to encapsulate the first downstream allocation label DLa-1-1 corresponding to PEs-1-1 in the BUM message and send the BUM message to PEh through the unicast tunnel. Thus, when PEh receives the BUM message, it can determine that the broadcast domain of the BUM message is this EVPN instance based on the first downstream allocation label DLa-1-1 and the first ingress label table. Simultaneously, it can determine that the first upstream allocation label corresponding to DLa-1-1 is ULa-1-1 (in P2MP context) based on the first downstream allocation label DLa-1-1 and the first egress label table. Therefore, the first PE device can encapsulate ULa-1-1 (in P2MP context) in the BUM message and multicast the message to SPE-1 and SPE-2 through the P2MP tunnel of this EVPN instance.

[0070] In step S140, the SPE device assigns a second downstream assignment label to the first downstream assignment label and assigns a second upstream assignment label to the first upstream assignment label.

[0071] In step S150, the SPE device uses the correspondence between the first downstream allocation tag and the second downstream allocation tag, and the correspondence between the first upstream allocation tag and the second upstream allocation tag as a tag exchange table.

[0072] In step S160, the SPE device transmits the second downstream assignment tag and the second upstream assignment tag to the second PE device.

[0073] When the SPE device receives the first downstream allocation label and the first upstream allocation label from the first PE device, as discussed above, the SPE device needs to continue label allocation, that is, to request and reserve labels. Specifically, the SPE device can allocate a second downstream allocation label to each first downstream allocation label, and simultaneously allocate a second upstream allocation label to each first upstream allocation label. In fact, this can also be regarded as the SPE device allocating a second downstream allocation label and a second upstream allocation label to each second PE device. Based on this, when the BUM message is sent uplink, the BUM message sent by the second PE device to the SPE device must carry the second downstream allocation label; when the BUM message is sent downlink, the BUM message sent by the SPE device to the second PE device must carry the second upstream allocation label. In one embodiment, as discussed above, the second downstream allocation label may include a global MPLS label, which needs to occupy a space in the global MPLS label space of the SPE device; while the second upstream allocation label may be a label based on the P2MP tunnel context, which needs to occupy a space in the P2MP tunnel context label space of the SPE device.

[0074] In this embodiment, the SPE device acts as an intermediate node between the first PE device and the second PE device, and therefore needs to have label switching functionality. Thus, the SPE device can use the correspondence between the first downstream allocation label and the second downstream allocation label, and the correspondence between the first upstream allocation label and the second upstream allocation label, as a label switching table. When the SPE device receives a BUM message sent by the second PE device through a unicast tunnel, it can determine the first downstream allocation label corresponding to the second downstream allocation label based on the second downstream allocation label carried in the BUM message and the label switching table, replace the label carried in the BUM message with this first downstream allocation label, and then send it to the first PE device through the unicast tunnel. Conversely, when the SPE device receives a BUM message sent by the first PE device through the P2MP tunnel of this EVPN instance, it determines the second upstream allocation label corresponding to the first upstream allocation label from all labels based on the P2MP tunnel context based on the first upstream allocation label carried in the BUM message and the label switching table, replace the label carried in the BUM message with this second upstream allocation label, and then send it to each connected second PE device through the P2MP tunnel of this EVPN instance.

[0075] After completing tag allocation, the SPE device needs to pass each second downstream allocation tag and each second upstream allocation tag to the connected second PE devices for further processing. In one embodiment, as discussed above, the SPE device can pass the second downstream allocation tags to the connected second PE devices through the PED downstream tag attribute in the IMET route; simultaneously, the SPE device can also pass the first upstream allocation tag to the connected second PE devices through the PED upstream tag attribute in the IMET route.

[0076] For example, in Figure 6 In the scenario shown, the tags assigned by the first PE device to the second PE device are as shown in Table 1. Each SPE device can then assign tags based on the first downstream and first upstream assigned tags. However, it should be noted that the specific tags assigned by each SPE device can be different. For example, SPE-1 may assign a second downstream assigned tag DLb-1-1-1 to the first downstream assigned tag DLa-1-1, while SPE-2 may assign a second downstream assigned tag DLb-2-1-1 to the first downstream assigned tag DLa-1-1. This example uses SPE-1 as an example, where SPE-1 assigns second downstream assigned tags to each of the first downstream assigned tags, as detailed in Table 4; similarly, SPE-1 also assigns second upstream assigned tags to each of the first upstream assigned tags, as detailed in Table 5.

[0077] Table 4. Second downstream allocation tags assigned by the SPE equipment to the first downstream allocation tag.

[0078] First downstream allocation tag Second downstream distribution label DLa-1-1 DLb-1-1-1 DLa-2-1 DLb-1-2-1 DLa-2-2 DLb-1-2-2

[0079] Table 5. Second upstream allocation tags assigned by SPE equipment to the first upstream allocation tag.

[0080] First upstream allocation label Second upstream allocation label ULa-1-1 (in P2MP context) ULb-1-1-1 (in P2MP context) ULa-2-1 (in P2MP context) ULb-1-2-1 (in P2MP context) ULa-2-2 (in P2MP context) ULb-1-2-2 (in P2MP context)

[0081] Based on this, after the SPE-1 device completes the allocation, on the one hand, it can use the correspondence between the first downstream allocation tag and the second downstream allocation tag, and the correspondence between the first upstream allocation tag and the second upstream allocation tag, as a tag exchange table, as shown in Table 6; on the other hand, as... Figure 9As shown, SPE-1 can pass each second downstream allocation label to each second PE device connected to it through the PED downstream label attribute in the IMET route, and pass each second upstream allocation label to each second PE device connected to it through the PED upstream label attribute in the IMET route. However, it should be noted that since there is only one second PE device connected to SPE-1, SPE-1 only needs to pass it to PEs-1-1. If there are multiple second PE devices connected to SPE-1, then SPE-1 needs to pass it to each second PE device.

[0082] Table 6 Tag Exchange Table

[0083]

[0084] Based on this tag allocation method, such as Figure 10 As shown, when SPE-1 receives the BUM message sent by PEs-1-1 through the unicast tunnel, it determines the first downstream allocation label corresponding to DLb-1-1-1 as DLa-1-1 based on the second downstream allocation label DLb-1-1-1 carried in the BUM message and the label exchange table. Then, it replaces the label carried in the BUM message with DLa-1-1 and sends it to PEh through the unicast tunnel. Thus, when PEh receives the BUM message, it can determine that the broadcast domain of the BUM message is this EVPN instance based on the first downstream allocation label DLa-1-1 and the first ingress label table. At the same time, based on the first downstream allocation label DLa-1-1 and the first egress label table, it can determine that the first upstream allocation label corresponding to DLa-1-1 is ULa-1-1 (in P2MP context). The first PE device can then encapsulate ULa-1-1 (in P2MP context) in the BUM message and multicast the message to SPE-1 and SPE-2 through the P2MP tunnel of this EVPN instance. Thus, when SPE-1 receives the BUM message, since the first upstream allocation label ULa-1-1 carried in the BUM message is based on the P2MP tunnel context, SPE-1 needs to determine the second upstream allocation label ULb-1-1-1 (in P2MP context) corresponding to the first upstream allocation label ULa-1-1 from all labels based on the P2MP tunnel context in the label exchange table (such as the labels shown in the last three rows of Table 6). After replacing the label carried in the BUM message with ULb-1-1-1 (in P2MP context), it sends the message to PEs-1-1 through the P2MP tunnel of this EVPN instance.

[0085] In step S170, the second PE device uses the correspondence between the second downstream allocation label and the EVPN instance as the second outgoing label table when the BUM packet is uplinked, and uses the correspondence between the second upstream allocation label and the EVPN instance as the second incoming label table when the BUM packet is downlinked, and sets the packet forwarding mode of its corresponding second upstream allocation label to drop in the second incoming label table.

[0086] Since the second PE device also needs to receive and broadcast BUM messages, when it receives the second upstream allocation label and the second downstream allocation label, it needs to establish an ingress and egress label table based on these. Specifically, since the second PE device belongs to this EVPN instance, on the one hand, the second PE device can use the correspondence between the second downstream allocation label and this EVPN instance as the second egress label table when broadcasting BUM messages. Thus, when broadcasting BUM messages, the second PE device can encapsulate its own second downstream allocation label into the BUM message based on the label corresponding to this EVPN instance in the second egress label table, and then send it to the connected SPE device through the unicast tunnel. On the other hand, the second PE device can use the correspondence between the second upstream allocation label and this EVPN instance as the ingress and egress label table. When an M-message is sent downlink, a second incoming label table is created. Furthermore, the forwarding mode for the corresponding second upstream allocation label is set to discard in this second incoming label table. Thus, when the second PE device receives a BUM message sent by the SPE device through the P2MP tunnel of this EVPN instance, it can determine whether the forwarding mode corresponding to the second upstream allocation label is discard from all labels based on the P2MP tunnel context in the second incoming label table, based on the second upstream allocation label carried in the BUM message. If it is, it indicates that the BUM message was broadcast by itself and should be discarded; otherwise, the BUM message is broadcast.

[0087] For example, in Figure 6 In the scenario shown, the second downstream allocation tags and second upstream allocation tags passed from SPE-1 to PEs-1-1 can be as follows: Figure 9 As shown, on the one hand, PEs-1-1 can use the correspondence between each first downstream allocation label and this EVPN instance as the second outgoing label table, as shown in Table 7 (in the table, "EVPN1" identifies this EVPN instance); on the other hand, PEs-1-1 can use the correspondence between each second upstream allocation label and this EVPN instance as the second incoming label table, and set the packet forwarding mode of the corresponding second upstream allocation label ULb-1-1-1 (in P2MPcontext) to discard (in the table, the packet forwarding mode corresponding to "discard" is discard, and the packet forwarding mode corresponding to "EVPN1" is broadcast), as shown in Table 8.

[0088] Table 7 Second Label Table

[0089]

[0090] Table 8 Second Input Label Table

[0091]

[0092] Based on this, such as Figure 11 As shown, when PEs-1-1 broadcasts a BUM message, it can encapsulate its own second downstream allocation label DLb-1-1-1 into the BUM message according to the second outgoing label table, and then send it to SPE-1 through the unicast tunnel. The processing performed by SPE-1 after receiving the message is as described above and will not be repeated here. When PEs-1-1 receives a BUM packet sent by SPE-1 through the P2MP tunnel of this EVPN instance, it determines whether the BUM packet is a packet it broadcasts, based on the second upstream allocation label and the second ingress label table carried in the BUM packet. If so, it discards the packet; otherwise, it broadcasts the BUM packet. Specifically, if the second upstream allocation label carried in the BUM packet is ULb-1-1-1 (in P2MP context), then based on the second ingress label table, it can be determined that the BUM packet is a packet it broadcasts, and the BUM packet is discarded. This can prevent BUM traffic from forming a loop. If the second upstream allocation label carried in the BUM packet is not ULb-1-1-1 (in P2MP context), then based on the second ingress label table, it can be determined that the BUM packet should be broadcast.

[0093] In summary, the first downstream allocation label and the first upstream allocation label assigned by the first PE device are independent of each other. Similarly, the first downstream allocation label and the first upstream allocation label assigned by the SPE device are also independent of each other. Therefore, it can be understood that the embodiments of this application decouple the constraint relationship between the downstream allocation label and the upstream allocation label, making the downstream allocation label and the upstream allocation label independent of each other. That is, the downstream allocation label and the upstream allocation label are two independent labels, and their values ​​do not need to be consistent. In this way, there will be no label conflict problem when the SPE device applies for and occupies labels, and there will be no problem of global MPLS label resource shortage in the SPE device. For example, suppose the second downstream allocation label assigned by the SPE device is DLb-1-1-1, and the label value DLb-1-1-1 has been occupied by other services in the P2MP tunnel context label space. Since the downstream allocation label and the upstream allocation label are independent of each other, their values ​​do not need to be consistent. Therefore, there will be no label conflict when this label occupies space in the global MPLS label space. In addition, in the traditional technology, since DLb-1-1-1 is no longer available in the global MPLS space, the second downstream allocation label needs to occupy other resources in the global MPLS space. This may lead to a shortage of global MPLS label resources when there are many services. However, based on the embodiments of this application, DLb-1-1-1 is still available in the global MPLS space, so it will not cause a shortage of global MPLS label resources.

[0094] Furthermore, this application embodiment introduces PED upstream label attributes and PED downstream label attributes in IMET routing, so that downstream allocation labels can be transmitted independently through PED upstream label attributes, and upstream allocation labels can be transmitted independently through PED upstream label attributes. That is, this allows the first PE device and the SPE device to allocate mutually independent downstream allocation labels and upstream allocation labels.

[0095] In one embodiment, after step S170, as Figure 12 As shown, the method in this application embodiment may further include steps S210 to S250, that is, steps S210 to S250 are BUM message broadcasting methods based on the tag allocation method in this application embodiment.

[0096] In step S210, when the second PE device broadcasts a BUM message, it encapsulates its own second downstream allocation tag into the BUM message according to the second output tag table to obtain a third BUM message, and sends the third BUM message to the SPE device through a unicast tunnel.

[0097] In step S220, when the SPE device receives the third BUM message, it replaces the second downstream allocation label carried in the third BUM message with the corresponding first downstream allocation label according to the label exchange table to obtain the first BUM message, and sends the first BUM message to the first PE device through the unicast tunnel.

[0098] In step S230, when the first PE device receives the first BUM message, it determines that the broadcast domain of the first BUM message is the current EVPN instance based on the first downstream allocation label and the first ingress label table carried in the first BUM message, and replaces the first downstream allocation label carried in the first BUM message with the corresponding first upstream allocation label based on the first egress label table to obtain the second BUM message, and sends the second BUM message to the SPE device through the P2MP tunnel of the current EVPN instance.

[0099] In step S240, when the SPE device receives the second BUM message, it replaces the first upstream allocation label carried in the second BUM message with the corresponding second upstream allocation label according to the label switching table to obtain the fourth BUM message, and sends the fourth BUM message to the second PE device through the P2MP tunnel of this EVPN instance.

[0100] In step S250, when the second PE device receives the fourth BUM message, it determines whether the fourth BUM message is a message broadcast by itself based on the second upstream allocation tag and the second incoming tag table carried in the fourth BUM message, and discards the fourth BUM message if the determination result is yes.

[0101] The specific implementation of the above scheme can be found in the preceding discussion, and will not be repeated here.

[0102] For example, in Figure 6 In the scenario shown, PEh assigns first downstream and first upstream allocation tags to each second PE device as shown in Table 1, and the first inbound and first outbound tag tables established by PEh are shown in Tables 2 and 3, respectively; SPE-1 assigns second upstream allocation tags to the first downstream allocation tags as shown in Table 4, and assigns second upstream allocation tags to the first upstream allocation tags as shown in Table 5, and the tag exchange table established by SPE-1 is shown in Table 6; the second outbound and second inbound tag tables established by PEs-1-1 are shown in Tables 7 and 8, respectively; it should be noted that the specific implementation of SPE-2, PEs-2-1, and PEs-2-2 is the same as that of SPE-1 and PEs-1-1 in principle, and will not be discussed in this example. Based on this, as Figure 13As shown, when PEs-1-1 broadcasts a BUM message, it can encapsulate its own second downstream allocation label into the message according to the second outgoing label table. Specifically, among all the labels corresponding to this EVPN instance in the outgoing label table, DLb-1-1-1 is the label assigned by SPE-1 to PEs-1-1. Therefore, this label is its own label, so PEs-1-1 can encapsulate DLb-1-1-1 into the message, obtain the third BUM message, and send it to SPE-1 through the unicast tunnel. When SPE-1 receives the third BUM message, it can replace the second downstream allocation label carried in the message with the corresponding first downstream allocation label according to the label exchange table. Specifically, the label carried in the message is DLb-1-1-1, and the label corresponding to DLb-1-1-1 in the label exchange table is DLa-1-1. Therefore, SPE-1 can encapsulate DLb-1-1-1 into the message. Replace 1-1 with DLa-1-1 to obtain the first BUM message, and then send it to PEh via a unicast tunnel. When PEh receives the first BUM message, on the one hand, it can determine that the broadcast domain of the first BUM message is this EVPN instance based on the first downstream allocation label and the first ingress label table carried in the first BUM message. Specifically, the label carried in the message is DLa-1-1, and DLa-1-1 in the ingress label table corresponds to EVPN1, thus determining that the broadcast domain of the message is this EVPN instance. On the other hand, PEh can replace the first downstream allocation label carried in the first BUM message with the corresponding first upstream allocation label based on the first egress label table. Specifically, the label carried in the message is DLa-1-1, and the broadcast domain of the message is this EVPN instance, while the label in the egress label table based on this P2MP tunnel context and corresponding to DLa-1-1 is ULa-1-1 (in In the P2MP context, PEh can replace DLa-1-1 carried in the message with ULa-1-1 (in P2MP context), obtain the second BUM message, and send it to each SPE device (i.e., multicast to SPE-1 and SPE-2) through the P2MP tunnel of this EVPN instance.When SPE-1 receives the second BUM message, it can replace the first upstream allocation label carried in the second BUM message with the corresponding second upstream allocation label according to the label switching table. Specifically, the message carries ULa-1-1 based on the current P2MP tunnel context, while the label in the label switching table that is also based on the current P2MP tunnel context and corresponds to ULa-1-1 is ULb-1-1-1 (in P2MP context). Therefore, SPE-1 can replace ULa-1-1 (in P2MP context) carried in the message with ULb-1-1-1 (in P2MP context). Upon receiving the fourth BUM message, PEs-1-1 receives the message and sends it through the P2MP tunnel of this EVPN instance to each connected second PE device, i.e., multicasts it to PEs-1-1. It should be noted that SPE-2 will multicast it to PEs-2-1 and PEs-2-2. When PEs-1-1 receives the fourth BUM message, it can determine whether the fourth BUM message is a message broadcast by itself based on the second upstream allocation label and the second ingress label table carried in the message. Specifically, if the label carried in the message is ULb-1-1-1 (in P2MP context), and ULb-1-1-1 (in P2MP context) corresponds to discard in the ingress label table, then the fourth BUM message is determined to be a message broadcast by itself, and the message is discarded, thus avoiding the BUM traffic loop problem. However, it should be noted that if the label carried in the message is not ULb-1-1-1 (in P2MP context), for example, ULb-1-2-1 (in P2MP context), then the message will be discarded. If the context is specified, then ULb-1-2-1 (inP2MP context) in the ingress label table corresponds to EVPN1. This indicates that the message was not broadcast by itself, and the message should continue to be broadcast.

[0103] In one embodiment, in the cross-domain scenario of Option B in Hub / Spoke networking applied in this application embodiment, such as Figure 14 As shown, the PE device acting as a Spoke node can also include a third PE device, denoted as PEs-n, and the number of these third PE devices can be one or more, where n indicates that the third PE device is the device numbered n. In this scenario, the third PE device and the first PE device are BGP neighbors, therefore there is no SPE device between the third PE device and the first PE device.

[0104] Based on this, the tag allocation method in the embodiments of this application may further include the following: the first PE device allocates a first downstream allocation tag to the third PE device and transmits the first downstream allocation tag to the third PE device.

[0105] In this embodiment, when the first PE device performs label allocation, it needs to allocate labels not only to the second PE device but also to the third PE device. Based on this, since the third PE device and the first PE device are BGP neighbors, they can send BUM messages to each other via unicast. That is, the third PE device can send BUM messages to the first PE device through a unicast tunnel, and the first PE device can also send BUM messages to the third PE device through a unicast tunnel. Therefore, the first PE device can allocate first downstream allocation labels to each third PE device individually, and after allocation, pass these first downstream allocation labels to each third PE device. As mentioned above, the first downstream allocation labels can include global MPLS labels.

[0106] Thus, when the third PE device broadcasts a BUM message, it can encapsulate its own first downstream allocation label into the BUM message and send the BUM message to the first PE device through a unicast tunnel. When the first PE device receives the BUM message, it can broadcast the BUM message to BGP neighbor devices other than the third PE device according to the first downstream allocation label carried in the BUM message.

[0107] For example, in Figure 14 In the scenario shown, PEh can assign first downstream allocation labels to each third PE device, as detailed in Table 9. After allocation, these first downstream allocation labels are passed to each third PE device via the PED downstream label attribute in the IMET route. It should be noted that PEh also needs to assign labels to each second PE device, but this will not be discussed in this example. Based on this, taking PEs-1 as an example, the uplink and downlink of BUM packets are explained. Specifically, when PEs-1 broadcasts a BUM packet, it can encapsulate its own first downstream allocation label DLa-1 into the BUM packet and send it to PEh through a unicast tunnel. When PEh receives a BUM packet, it can know from the DLa-1 carried in the BUM packet that the BUM packet was broadcast by PEs-1. Therefore, PEh can broadcast the BUM packet to BGP neighbor devices other than PEs-1, that is, to each SPE device and each third PE device other than PEs-1. This can avoid the BUM traffic loop problem.

[0108] Table 9. First downstream allocation label assigned by the first PE equipment to the third PE equipment.

[0109] Third PE equipment First downstream allocation tag PEs-1 DLa-1 ... ... PEs-n DLa-n

[0110] In summary, the tag allocation method in this application embodiment, when applied to a first PE device, may include the following:

[0111] Assign a first downstream assignment tag and a first upstream assignment tag to the second PE device;

[0112] The correspondence between the first downstream allocation label and this EVPN instance is used as the first inbound label table when the BUM packet is uplinked, and the correspondence between the first upstream allocation label and the first downstream allocation label is used as the first outbound label table when the BUM packet is downlinked.

[0113] The first downstream allocation label and the first upstream allocation label are passed to the SPE device, so that the SPE device allocates a second downstream allocation label to the first downstream allocation label and allocates a second upstream allocation label to the first upstream allocation label. The correspondence between the first downstream allocation label and the second downstream allocation label and the correspondence between the first upstream allocation label and the second upstream allocation label are used as a label exchange table. The second downstream allocation label and the second upstream allocation label are then passed to the second PE device. As a result, the second PE device uses the correspondence between the second downstream allocation label and this EVPN instance as the second outgoing label table for BUM packets when they are uplinked, and uses the correspondence between the second upstream allocation label and this EVPN instance as the second incoming label table for BUM packets when they are downlinked. In the second incoming label table, the packet forwarding mode corresponding to the second upstream allocation label is set to discard.

[0114] The first downstream allocation label and the second downstream allocation label both include global MPLS labels, while the first upstream allocation label and the second upstream allocation label are both labels based on the P2MP tunnel context.

[0115] In one embodiment, the first PE device can pass a first downstream allocation label to the SPE device through the PED downstream label attribute in the IMET route; similarly, the first PE device can pass a first upstream allocation label to the SPE device through the PED upstream label attribute in the IMET route.

[0116] In one embodiment, after the first PE device transmits the first downstream allocation tag and the first upstream allocation tag to the SPE device, the method may further include the following:

[0117] When the first BUM message sent by the SPE device through the unicast tunnel is received, the broadcast domain of the first BUM message is determined to be this EVPN instance based on the first downstream allocation label and the first inbound label table carried in the first BUM message.

[0118] The first downstream allocation label carried in the first BUM message is replaced with the corresponding first upstream allocation label according to the first outgoing label table to obtain the second BUM message; wherein, the first BUM message is obtained by the SPE device after receiving the third BUM message sent by the second PE device through the unicast tunnel, and replacing the second downstream allocation label carried in the third BUM message with the first downstream allocation label according to the label exchange table; the third BUM message is obtained by the second PE device when broadcasting the BUM message, after encapsulating its own second downstream allocation label into the BUM message according to the second outgoing label table;

[0119] The second BUM packet is sent to the SPE device through the P2MP tunnel of this EVPN instance. The SPE device then replaces the first upstream label carried in the second BUM packet with the corresponding second upstream allocation label according to the label exchange table to obtain the fourth BUM packet. The fourth BUM packet is then sent to the second PE device through the P2MP tunnel of this EVPN instance. This allows the second PE device to determine whether the fourth BUM packet is a packet broadcast by itself based on the second upstream allocation label carried in the fourth BUM packet and the second incoming label table. If the determination result is yes, the fourth BUM packet is discarded.

[0120] In one embodiment, the method may further include the following:

[0121] Assign a first downstream allocation tag to the third PE device and transmit the first downstream allocation tag to the third PE device;

[0122] When a BUM message is received from a third PE device via a unicast tunnel, the BUM message is broadcast to BGP neighbor devices other than the third PE device according to the first downstream allocation tag carried in the BUM message.

[0123] The specific implementation of the above scheme can be found in the preceding discussion, and will not be repeated here.

[0124] In summary, the tag allocation method in this application embodiment, when applied to an SPE device, may include the following:

[0125] Receive the first downstream allocation label and the first upstream allocation label transmitted by the first PE device; wherein, the first downstream allocation label and the first upstream allocation label are allocated by the first PE device to the second PE device, the first downstream allocation label is used to instruct the first PE device to use the correspondence between the first downstream allocation label and this EVPN instance as the first inbound label table when the BUM packet is uplinked, and the first upstream allocation label is used to instruct the first PE device to use the correspondence between the first upstream allocation label and the first downstream label as the first outbound label table when the BUM packet is downlinked;

[0126] Assign a second downstream assignment label to the first downstream assignment label, and assign a second upstream assignment label to the first upstream assignment label;

[0127] The correspondence between the first downstream allocation label and the second downstream allocation label, and the correspondence between the first upstream allocation label and the second upstream allocation label are used as a label exchange table;

[0128] The second downstream allocation label and the second upstream allocation label are passed to the second PE device so that the second PE device uses the correspondence between the second downstream allocation label and this EVPN instance as the second outgoing label table when the BUM packet is uplinked, and uses the correspondence between the second upstream allocation label and this EVPN instance as the second incoming label table when the BUM packet is downlinked, and sets the packet forwarding mode of its corresponding second upstream allocation label to drop in the second incoming label table.

[0129] The first downstream allocation label and the second downstream allocation label both include global MPLS labels, while the first upstream allocation label and the second upstream allocation label are both labels based on the P2MP tunnel context.

[0130] In one embodiment, the SPE device can pass the second downstream allocation label to the second PE device through the PED downstream label attribute in the IMET route; similarly, the SPE device can pass the second upstream allocation label to the second PE device through the PED upstream label attribute in the IMET route.

[0131] In one embodiment, after the SPE device transmits the second downstream allocation tag and the second upstream allocation tag to the second PE device, the method may further include the following:

[0132] When the third BUM message sent by the second PE device through the unicast tunnel is received, the second downstream allocation label carried in the third BUM message is replaced with the corresponding first downstream allocation label according to the label exchange table to obtain the first BUM message.

[0133] The first BUM message is sent to the first PE device via a unicast tunnel, so that the first PE device determines the broadcast domain of the first BUM message as the local EVPN instance based on the first downstream allocation label and the first ingress label table carried in the first BUM message, and replaces the first downstream allocation label carried in the first BUM message with the corresponding first upstream allocation label according to the first egress label table to obtain the second BUM message; wherein, the third BUM message is obtained by the second PE device encapsulating its own second downstream allocation label into the BUM message according to the second egress label table when broadcasting the BUM message;

[0134] When the first PE device sends the second BUM message through the P2MP tunnel of this EVPN instance, the first upstream allocation carried in the second BUM message is replaced with the corresponding second upstream allocation label according to the label switching table to obtain the fourth BUM message.

[0135] The fourth BUM packet is sent to the second PE device through the P2MP tunnel of this EVPN instance, so that the second PE device can determine whether the fourth BUM packet is a packet broadcast by itself based on the second upstream allocation label and the second inbound label table carried in the fourth BUM packet, and discard the fourth BUM packet if the determination result is yes.

[0136] The specific implementation of the above scheme can be found in the preceding discussion, and will not be repeated here.

[0137] In summary, when the tag allocation method in this application embodiment is applied to the second PE device in the PE device that serves as a Spoke node, the method may include the following:

[0138] Receive the second downstream allocation tag and the second upstream allocation tag transmitted by the SPE device;

[0139] The correspondence between the second downstream allocation label and this EVPN instance is used as the second outgoing label table when the BUM packet goes uplink, and the correspondence between the second upstream allocation label and this EVPN instance is used as the second incoming label table when the BUM packet goes downlink. In the second incoming label table, the packet forwarding mode corresponding to the second upstream allocation label is set to drop.

[0140] The second downstream allocation tag is assigned by the SPE device when it receives the first downstream allocation tag transmitted by the first PE device, and the second upstream allocation tag is assigned by the SPE device when it receives the first upstream allocation tag transmitted by the first PE device. The second downstream allocation tag is used to instruct the SPE device to use the correspondence between the first downstream allocation tag and the second downstream allocation tag as part of the tag exchange table, and the second upstream allocation tag is used to instruct the SPE device to use the correspondence between the first upstream allocation tag and the second upstream allocation tag as another part of the tag exchange table.

[0141] The first downstream allocation label and the first upstream allocation label are allocated by the first PE device to the second PE device. The first downstream allocation label is used to instruct the first PE device to use the correspondence between the first downstream allocation label and this EVPN instance as the first inbound label table when the BUM packet is sent up. The first upstream allocation label is used to instruct the first PE device to use the correspondence between the first upstream allocation label and the first downstream allocation label as the first outbound label table when the BUM packet is sent down.

[0142] The first downstream allocation label and the second downstream allocation label both include global MPLS labels, while the first upstream allocation label and the second upstream allocation label are both labels based on the P2MP tunnel context.

[0143] In one embodiment, after the second PE device sets the packet forwarding mode of its corresponding second upstream assigned tag to discard in the second incoming tag table, the method may further include the following:

[0144] When broadcasting a BUM message, the second downstream allocation tag corresponding to itself is encapsulated into the BUM message according to the second output tag table to obtain the third BUM message;

[0145] The third BUM message is sent to the SPE device through a unicast tunnel. The SPE device replaces the second downstream allocation label carried in the third BUM message with the corresponding first downstream allocation label according to the label exchange table to obtain the first BUM message. The first BUM message is then sent to the first PE device through the unicast tunnel. The first PE device determines the broadcast domain of the first BUM message as this EVPN instance according to the first downstream allocation label carried in the first BUM message and the first ingress label table. The first PE device replaces the first downstream allocation label carried in the first BUM message with the corresponding first upstream allocation label according to the first egress label table to obtain the second BUM message. The second BUM message is then sent to the SPE device through the P2MP tunnel of this EVPN instance.

[0146] When the fourth BUM message is received from the SPE device through the P2MP tunnel of this EVPN instance, it is determined whether the fourth BUM message is a message broadcast by itself based on the second upstream allocation label and the second ingress label table carried in the fourth BUM message.

[0147] If the judgment result is yes, the fourth BUM message is discarded; the fourth BUM message is obtained by the SPE device after receiving the second BUM message and replacing the first upstream allocation label carried in the second BUM message with the second upstream allocation label according to the label exchange table.

[0148] In one embodiment, when the tag allocation method of this application is applied to a third PE device among PE devices that act as Spoke nodes, the method may include the following:

[0149] When broadcasting a BUM message, the first downstream allocation tag corresponding to itself is encapsulated into the BUM message;

[0150] The BUM message is sent to the first PE device via a unicast tunnel, so that the first PE device can broadcast the BUM message to BGP neighbor devices other than the third PE device according to the first downstream allocation label carried in the BUM message; wherein, the first downstream allocation label is allocated by the first PE device to the third PE device and passed to the third PE device.

[0151] The specific implementation of the above scheme can be found in the preceding discussion, and will not be repeated here.

[0152] This application also provides an operator edge device (i.e., PE device), such as Figure 15 As shown, it includes a processor and a memory, the memory being used to store a computer program; the processor being used to execute the computer program and, when executing the computer program, to implement any of the tag allocation methods provided in the embodiments of this application.

[0153] This application also provides a routing switching node device (i.e., an SPE device), such as Figure 16 As shown, it includes a processor and a memory, the memory being used to store a computer program; the processor being used to execute the computer program and, when executing the computer program, to implement any of the tag allocation methods provided in the embodiments of this application.

[0154] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.

[0155] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement any of the tag allocation methods provided in this application.

[0156] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer-readable storage media (or non-transitory media) and communication media (or transient media).

[0157] As is known to those skilled in the art, the term computer-readable storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer-readable storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0158] For example, the computer-readable storage medium can be an internal storage unit of the operator edge device or routing switching node device described in the foregoing embodiments, such as a hard drive or memory of the operator edge device or routing switching node device. The computer-readable storage medium can also be an external storage device of the operator edge device or routing switching node device, such as a pluggable hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the operator edge device or routing switching node device.

[0159] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A tag allocation method, characterized in that, The method includes: a first PE device used as a Hub node in an EVPN instance, the EVPN instance also including a PE device as a Spoke node, the PE device as a Spoke node including a second PE device connected to the first PE device via an SPE device; and the method comprising: Assign a first downstream assignment tag and a first upstream assignment tag to the second PE device; The correspondence between the first downstream allocation label and the EVPN instance is used as the first inbound label table when the BUM packet is uplinked, and the correspondence between the first upstream allocation label and the first downstream allocation label is used as the first outbound label table when the BUM packet is downlinked. The first downstream allocation label and the first upstream allocation label are passed to the SPE device, so that the SPE device allocates a second downstream allocation label for the first downstream allocation label and allocates a second upstream allocation label for the first upstream allocation label. The correspondence between the first downstream allocation label and the second downstream allocation label and the correspondence between the first upstream allocation label and the second upstream allocation label are used as a label exchange table. The second downstream allocation label and the second upstream allocation label are then passed to the second PE device. As a result, the second PE device uses the correspondence between the second downstream allocation label and the EVPN instance as the second outgoing label table for BUM packets when they are uplinked, and uses the correspondence between the second upstream allocation label and the EVPN instance as the second incoming label table for BUM packets when they are downlinked. In the second incoming label table, the packet forwarding mode of the second upstream allocation label corresponding to itself is set to discard. The first downstream allocation label and the second downstream allocation label both include global MPLS labels, and the first upstream allocation label and the second upstream allocation label are both labels based on the P2MP tunnel context.

2. The method according to claim 1, characterized in that, The step of transmitting the first downstream allocation tag and the first upstream allocation tag to the SPE device includes: The first downstream allocation label is passed to the SPE device through the PED downstream label attribute in the IMET route; The first upstream allocation label is passed to the SPE device via the PED upstream label attribute in the IMET route.

3. The method according to claim 1 or 2, characterized in that, After transmitting the first downstream assignment tag and the first upstream assignment tag to the SPE device, the method further includes: When the SPE device receives the first BUM message sent through the unicast tunnel, the broadcast domain of the first BUM message is determined to be the EVPN instance based on the first downstream allocation label and the first ingress label table carried in the first BUM message. The first downstream allocation label carried in the first BUM message is replaced with the corresponding first upstream allocation label according to the first outgoing label table to obtain the second BUM message; wherein, the first BUM message is obtained by the SPE device after receiving the third BUM message sent by the second PE device through the unicast tunnel, and replacing the second downstream allocation label carried in the third BUM message with the first downstream allocation label according to the label exchange table; the third BUM message is obtained by the second PE device when broadcasting the BUM message, after encapsulating its own second downstream allocation label into the BUM message according to the second outgoing label table; The second BUM packet is sent to the SPE device through the P2MP tunnel of the EVPN instance. The SPE device then replaces the first upstream label carried in the second BUM packet with the corresponding second upstream allocation label according to the label exchange table to obtain the fourth BUM packet. The SPE device then sends the fourth BUM packet to the second PE device through the P2MP tunnel of the EVPN instance. This allows the second PE device to determine whether the fourth BUM packet is a packet broadcast by itself based on the second upstream allocation label carried in the fourth BUM packet and the second ingress label table. If the determination result is yes, the fourth BUM packet is discarded.

4. The method according to claim 1, characterized in that, The PE device serving as the Spoke node further includes a third PE device, wherein there is no SPE device between the third PE device and the first PE device, and the method further includes: Assign a first downstream allocation tag to the third PE device and transmit the first downstream allocation tag to the third PE device; When a BUM message is received from the third PE device via a unicast tunnel, the BUM message is broadcast to BGP neighbor devices other than the third PE device according to the first downstream allocation tag carried in the BUM message.

5. A tag allocation method, characterized in that, An SPE device for use in an EVPN instance, the EVPN instance further including a first PE device as a Hub node and a second PE device as a Spoke node, the SPE device being disposed between the second PE device and the first PE device, the method comprising: The system receives a first downstream allocation label and a first upstream allocation label transmitted by the first PE device. The first downstream allocation label and the first upstream allocation label are allocated by the first PE device to the second PE device. The first downstream allocation label is used to instruct the first PE device to use the correspondence between the first downstream allocation label and the EVPN instance as the first inbound label table when the BUM packet is uplinked. The first upstream allocation label is used to instruct the first PE device to use the correspondence between the first upstream allocation label and the first downstream allocation label as the first outbound label table when the BUM packet is downlinked. Assign a second downstream allocation label to the first downstream allocation label, and assign a second upstream allocation label to the first upstream allocation label; The correspondence between the first downstream allocation tag and the second downstream allocation tag, and the correspondence between the first upstream allocation tag and the second upstream allocation tag are used as a tag exchange table; The second downstream allocation label and the second upstream allocation label are passed to the second PE device, so that the second PE device uses the correspondence between the second downstream allocation label and the EVPN instance as the second outgoing label table when the BUM packet is uplinked, and uses the correspondence between the second upstream allocation label and the EVPN instance as the second incoming label table when the BUM packet is downlinked, and sets the packet forwarding mode of its corresponding second upstream allocation label to drop in the second incoming label table; The first downstream allocation label and the second downstream allocation label both include global MPLS labels, and the first upstream allocation label and the second upstream allocation label are both labels based on the P2MP tunnel context.

6. The method according to claim 5, characterized in that, The step of transmitting the second downstream allocation tag and the second upstream allocation tag to the second PE device includes: The second downstream allocation label is passed to the second PE device through the PED downstream label attribute in the IMET route; The second upstream allocation label is passed to the second PE device through the PED upstream label attribute in the IMET route.

7. The method according to claim 5 or 6, characterized in that, After transmitting the second downstream allocation tag and the second upstream allocation tag to the second PE device, the method further includes: When the third BUM message sent by the second PE device through the unicast tunnel is received, the second downstream allocation label carried in the third BUM message is replaced with the corresponding first downstream allocation label according to the label exchange table to obtain the first BUM message. The first BUM message is sent to the first PE device via a unicast tunnel, so that the first PE device determines the broadcast domain of the first BUM message as the EVPN instance based on the first downstream allocation label carried in the first BUM message and the first ingress label table, and replaces the first downstream allocation label carried in the first BUM message with the corresponding first upstream allocation label according to the first egress label table to obtain the second BUM message; wherein, the third BUM message is obtained by the second PE device encapsulating its own second downstream allocation label into the BUM message according to the second egress label table when broadcasting the BUM message; When the first PE device receives the second BUM message sent through the P2MP tunnel of the EVPN instance, the first upstream allocation carried in the second BUM message is replaced with the corresponding second upstream allocation label according to the label exchange table to obtain the fourth BUM message. The fourth BUM packet is sent to the second PE device through the P2MP tunnel of the EVPN instance, so that the second PE device can determine whether the fourth BUM packet is a packet broadcast by itself based on the second upstream allocation label and the second ingress label table carried in the fourth BUM packet, and discard the fourth BUM packet if the determination result is yes.

8. A tag allocation method, characterized in that, The method includes a PE device used as a Spoke node in an EVPN instance, the EVPN instance also including a first PE device as a Hub node, and when the PE device is a second PE device connected to the first PE device via an SPE device, the method includes: Receive the second downstream allocation tag and the second upstream allocation tag transmitted by the SPE device; The correspondence between the second downstream allocation label and the EVPN instance is used as the second outgoing label table when the BUM packet goes uplink, and the correspondence between the second upstream allocation label and the EVPN instance is used as the second incoming label table when the BUM packet goes downlink. In the second incoming label table, the packet forwarding mode of the second upstream allocation label corresponding to itself is set to discard. Wherein, the second downstream allocation tag is allocated by the SPE device when it receives the first downstream allocation tag transmitted by the first PE device, and the second upstream allocation tag is allocated by the SPE device when it receives the first upstream allocation tag transmitted by the first PE device. The second downstream allocation tag is used to instruct the SPE device to use the correspondence between the first downstream allocation tag and the second downstream allocation tag as part of the tag exchange table, and the second upstream allocation tag is used to instruct the SPE device to use the correspondence between the first upstream allocation tag and the second upstream allocation tag as another part of the tag exchange table; Wherein, the first downstream allocation label and the first upstream allocation label are allocated by the first PE device to the second PE device. The first downstream allocation label is used to instruct the first PE device to use the correspondence between the first downstream allocation label and the EVPN instance as the first inbound label table when the BUM packet is uplinked. The first upstream allocation label is used to instruct the first PE device to use the correspondence between the first upstream allocation label and the first downstream allocation label as the first outbound label table when the BUM packet is downlinked. The first downstream allocation label and the second downstream allocation label both include global MPLS labels, and the first upstream allocation label and the second upstream allocation label are both labels based on the P2MP tunnel context.

9. The method according to claim 8, characterized in that, After setting the packet forwarding mode of the corresponding second upstream assigned label to discard in the second incoming label table, the method further includes: When broadcasting a BUM message, according to the second outgoing tag table, the corresponding second downstream allocation tag is encapsulated into the BUM message to obtain a third BUM message; The third BUM message is sent to the SPE device via a unicast tunnel, so that the SPE device replaces the second downstream allocation label carried in the third BUM message with the corresponding first downstream allocation label according to the label exchange table to obtain the first BUM message. The first BUM message is then sent to the first PE device via a unicast tunnel, so that the first PE device determines the broadcast domain of the first BUM message as the EVPN instance according to the first downstream allocation label carried in the first BUM message and the first ingress label table, and replaces the first downstream allocation label carried in the first BUM message with the corresponding first upstream allocation label according to the first egress label table to obtain the second BUM message. The second BUM message is then sent to the SPE device via the P2MP tunnel of the EVPN instance. When the SPE device receives the fourth BUM message sent through the P2MP tunnel of the EVPN instance, it determines whether the fourth BUM message is a message broadcast by itself based on the second upstream allocation label and the second ingress label table carried in the fourth BUM message. If the determination result is yes, the fourth BUM message is discarded; wherein, the fourth BUM message is obtained by the SPE device after receiving the second BUM message and replacing the first upstream allocation label carried in the second BUM message with the second upstream allocation label according to the label exchange table.

10. The method according to claim 8, characterized in that, The PE device further includes a third PE device, and there is no SPE device between the third PE device and the first PE device. When the PE device is the third PE device, the method includes: When broadcasting a BUM message, the first downstream allocation tag corresponding to itself is encapsulated into the BUM message; The BUM message is sent to the first PE device via a unicast tunnel, so that the first PE device broadcasts the BUM message to BGP neighbor devices other than the third PE device according to the first downstream allocation label carried in the BUM message; wherein, the first downstream allocation label is allocated by the first PE device to the third PE device and passed to the third PE device.

11. A carrier edge device, characterized in that, Including processor and memory; The memory is used to store computer programs; The processor is configured to execute the computer program and, when executing the computer program, implement the tag allocation method as described in any one of claims 1 to 4, or implement the tag allocation method as described in any one of claims 8 to 10.

12. A routing and switching node device, characterized in that, Including processor and memory; The memory is used to store computer programs; The processor is configured to execute the computer program and, in executing the computer program, implement the tag allocation method as described in any one of claims 5 to 7.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to implement the tag allocation method as described in any one of claims 1 to 4, any one of claims 5 to 7, or any one of claims 8 to 10.