Route advertisement method, spe, network device, and storage medium

CN116170250BActive Publication Date: 2026-08-07BEIJING HUAWEI DIGITAL TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING HUAWEI DIGITAL TECH
Filing Date
2021-11-25
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0005]本申请提供了一种路由通告方法、SPE、网络设备及存储介质,可以解决相关技术中MAC路由不断跳变的问题

Benefits of technology

[0009]In this application, the SPE determines whether a loop fault has occurred in the H-EVPN network by measuring the number of MAC route transitions between the next hop in the first route advertisement message and the next hop in the second route advertisement message. If the number of MAC route transitions between the next hop in the first route advertisement message and the next hop in the second route advertisement message exceeds a reference transition count, the SPE can determine that a loop fault has occurred in the network. This differs from the UPE method, which requires learning the MAC addresses in locally received traffic and the MAC addresses in remotely sent route advertisement messages to determine if a loop fault has occurred.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116170250B_ABST
    Figure CN116170250B_ABST
Patent Text Reader

Abstract

Embodiments of the application disclose a route advertisement method, a SPE, network equipment and a storage medium, and belong to the technical field of communication. The method is executed by a service side operator edge device (SPE) in a hierarchical Ethernet virtual private network (H-EVPN) network. The method comprises: the SPE receiving a first route advertisement message, the first route advertisement message carrying a media access control (MAC) address and a next hop. If the MAC address in the first route advertisement message is the same as the MAC address in a second route advertisement message received before the current time, and the next hop in the first route advertisement message is different from the next hop in the second route advertisement message, the SPE determines that MAC route hopping occurs between the next hop in the first route advertisement message and the next hop in the second route advertisement message. Embodiments of the application can detect MAC route hopping in the H-EVPN network, so as to facilitate subsequent loop detection.
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 routing announcement method, SPE, network device, and storage medium. Background Technology

[0002] In a hierarchical-Ethernet Virtual Private Network (H-EVPN) network, the service provider edge (SPE) acts as a central node, establishing neighbor relationships with the user-end provider edge (UPE) and the network provider edge (NPE) to publish routes based on these neighbor relationships.

[0003] In related technologies, when a terminal device connected to a UPE sends traffic to the UPE, the UPE learns the source media access control (MAC) address of the traffic, then encapsulates a MAC route based on that source MAC address, and sends the MAC route to the SPE. This MAC route includes the terminal device's MAC address and the next hop; the MAC address is the terminal device's unique identifier, and the next hop is the UPE. The SPE receives the MAC route, modifies the next hop in the MAC route to the SPE, and continues to send the modified MAC route to other neighboring devices. In this way, the terminal device's MAC address can be transmitted between various devices.

[0004] However, during the aforementioned transmission process, if a loop failure occurs on the UPE side, after the UPE learns the MAC route published by the remote NPE based on the SPE, this MAC route may be transmitted through the loop and then returned to the UPE. This causes the UPE to re-encapsulate the MAC route based on this loop and then send the re-encapsulated MAC route to the SPE. The SPE, as the central node, will still modify the next hop in the MAC route to itself and then forward the modified MAC route to the NPE again. The NPE receives the modified MAC route and finds that the MAC address in the modified MAC route is the same as the MAC address in its locally published MAC route from a previous time. At this point, the NPE will determine that its locally published MAC route is optimal and will resend its local MAC route to the SPE. The SPE modifies the next hop of the received MAC route and sends it to the UPE, and the UPE will repeat the above operation, resulting in continuous hopping of the MAC route on the SPE, NPE, and UPE, causing a waste of network resources. Summary of the Invention

[0005] This application provides a route announcement method, a SPE (Service Provider Object), a network device, and a storage medium, which can solve the problem of constantly changing MAC routes in related technologies. The technical solution is as follows:

[0006] Firstly, a route advertisement method is provided, which is executed by the SPE in an H-EVPN network. In this method, the SPE receives a first route advertisement message carrying a MAC address and a next hop. If the MAC address in the first route advertisement message is the same as the MAC address in a second route advertisement message received previously, and the next hop in the first route advertisement message is different from the next hop in the second route advertisement message, then the SPE determines that a MAC route hop has occurred between the next hop in the first route advertisement message and the next hop in the second route advertisement message.

[0007] In this application, after receiving a first route advertisement message, the SPE determines whether the MAC address in the first route advertisement message is the same as the MAC address in a route advertisement message received before the current time, and whether the next hop in the first route advertisement message is the same as the next hop in a route advertisement message received before the current time. If a second route advertisement message contains a MAC address that is the same as the MAC address in the first route advertisement message, and the next hop in the second route advertisement message is different from the next hop in the first route advertisement message, then the SPE determines that a MAC route hop has occurred between the next hop in the second route advertisement message and the next hop in the first route advertisement message. That is, the SPE can detect MAC route hops in the H-EVPN network to facilitate subsequent loop detection.

[0008] Optionally, after determining that a MAC route change occurs between the next hop in the first route advertisement message and the next hop in the second route advertisement message, the SPE further determines the number of MAC route changes that have occurred between the next hop in the first route advertisement message and the next hop in the second route advertisement message from the start of the detection period to the current time, obtaining the hop count. If the hop count exceeds the reference hop count, the SPE determines that a loop exists between one or both of the next hops in the first route advertisement message and the next hop in the second route advertisement message.

[0009] In this application, the SPE determines whether a loop fault has occurred in the H-EVPN network by measuring the number of MAC route transitions between the next hop in the first route advertisement message and the next hop in the second route advertisement message. If the number of MAC route transitions between the next hop in the first route advertisement message and the next hop in the second route advertisement message exceeds a reference transition count, the SPE can determine that a loop fault has occurred in the network. This differs from the UPE method, which requires learning the MAC addresses in locally received traffic and the MAC addresses in remotely sent route advertisement messages to determine if a loop fault has occurred.

[0010] Optionally, after determining that a loop has occurred in either the next hop in the first route advertisement message or the next hop in the second route advertisement message, the SPE also reports an alarm message. The alarm message carries the information that a loop has occurred in either the next hop in the first route advertisement message or the next hop in the second route advertisement message.

[0011] In this application, the SPE can not only detect loop faults in the H-EVPN network, but also generate and report alarm messages when loop faults occur. For example, the SPE can report the alarm message to the network controller, allowing network controller maintenance personnel to promptly handle the PE experiencing a loop fault, thus achieving real-time protection of the H-EVPN network.

[0012] Optionally, the SPE determines the blocking priority of the next hop in the first route advertisement message and the blocking priority of the next hop in the second route advertisement message. The SPE also determines the next hop with the higher blocking priority between the next hop in the first route advertisement message and the next hop in the second route advertisement message, thus obtaining the blocking peer. The SPE then performs a blocking operation on this blocking peer.

[0013] In this application, after detecting a loop, the SPE determines the blocking peer based on the blocking priority among PEs and performs blocking operations on the blocking peer. This prevents service packets or route advertisement packets based on the blocking peer from being repeatedly transmitted in the H-EVPN network, thus avoiding waste of network resources.

[0014] Optionally, when a service packet is received from a node other than the blocking peer, if the destination MAC address of the service packet is a MAC address learned from the blocking peer, the operation of forwarding the service packet to the blocking peer is not performed.

[0015] When performing a blocking operation on a blocking peer, this application blocks traffic sent to the blocking peer at the forwarding layer.

[0016] Optionally, when a service message is received from a blocking peer, the operation of forwarding the service message to other nodes other than the blocking peer is not performed.

[0017] When performing a blocking operation on a blocking peer, this application blocks traffic from the blocking peer at the forwarding layer.

[0018] Optionally, a tagging information is added to the routing advertisement message sent by the blocked peer at the current time. The routing advertisement message sent by the blocked peer at the current time is either a first routing advertisement message or a second routing advertisement message. If a third routing advertisement message is received again from the blocked peer, and the third routing advertisement message and the routing advertisement message marked by the tagging information are the same routing advertisement message, then the operation of publishing a routing advertisement message based on the third routing advertisement message is not performed.

[0019] When this application performs a blocking operation on a blocking peer, it will perform corresponding processing at the control layer. When the SPE receives a route advertisement message sent from the blocking peer again, the SPE will not perform the operation of publishing a modified route advertisement message based on the route advertisement message.

[0020] Optionally, H-EVPN also includes UPE and NPE, with UPE having a higher blocking priority than NPE.

[0021] In this application, since the NPE is more important than the UPE, in order to achieve the effect of protecting the network, the blocking priority can be set according to the importance of the PE in the network. The higher the importance of the PE, the lower the corresponding blocking priority.

[0022] Optionally, different UPEs may have different blocking priorities.

[0023] This application sets blocking priorities for different UPEs in the network based on the importance of each UPE. In this way, when a blocking operation is performed, the UPE with the higher priority will be blocked first when there are multiple UPEs.

[0024] Optionally, different NPEs may have different blocking priorities.

[0025] This application sets blocking priorities for different NPEs in the network based on the importance of each NPE. In this way, when a blocking operation is performed, the NPE with the higher priority will be blocked first when there are multiple NPEs.

[0026] Optionally, when performing a blocking operation on a blocking peer, a timer is started from the current time, and the blocking operation is performed on the blocking peer before the timer reaches the blocking duration.

[0027] This application sets a blocking duration so that maintenance personnel can perform network maintenance within the blocking duration.

[0028] Optionally, if the SPE receives a blocking release command before the blocking duration is reached, it will no longer perform blocking operations on the blocking peer.

[0029] In this application, if the maintenance personnel have already dealt with the PE that experienced a loop fault before the blocking time has been reached, the network controller can, for example, send a blocking release command to the SPE. This blocking release command indicates that the fault in the network has been dealt with and the network can continue to operate.

[0030] Secondly, a Service Provider (SPE) for H-EVPN networking is provided, wherein the SPE has the function of implementing the route advertisement method behavior described in the first aspect above. The SPE includes at least one module, which is used to implement the route advertisement method provided in the first aspect above.

[0031] Thirdly, a network device is provided, the network device comprising a processor and a memory, the memory storing programs that support the network device in executing the routing announcement method provided in the first aspect, and storing data related to implementing the routing announcement method provided in the first aspect. The processor is configured to execute the programs stored in the memory.

[0032] Fourthly, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the routing announcement method described in the first aspect.

[0033] Fifthly, a computer program product containing instructions is provided that, when run on a computer, causes the computer to execute the routing announcement method described in the first aspect.

[0034] The technical effects achieved by the second, third, fourth, and fifth aspects mentioned above are similar to those achieved by the corresponding technical means in the first aspect, and will not be repeated here. Attached Figure Description

[0035] Figure 1 This is a schematic diagram of a system architecture provided in an embodiment of this application;

[0036] Figure 2 This is a schematic diagram of an SPE provided in an embodiment of this application;

[0037] Figure 3 This is a flowchart of a routing announcement method provided in an embodiment of this application;

[0038] Figure 4 This is a schematic diagram of traffic transmission in a network according to an embodiment of this application;

[0039] Figure 5 This is a flowchart of another route advertisement method provided in an embodiment of this application;

[0040] Figure 6 This is a flowchart of another route advertisement method provided in an embodiment of this application;

[0041] Figure 7 This is a flowchart of another route advertisement method provided in an embodiment of this application;

[0042] Figure 8 This is a schematic diagram of the structure of an SPE provided in an embodiment of this application;

[0043] Figure 9 This is a schematic diagram of the structure of a network device provided in an embodiment of this application. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0045] Before providing a detailed explanation of the routing announcement method provided in the embodiments of this application, the application scenarios and system architecture provided in the embodiments of this application will be introduced first.

[0046] In Hierarchical-Virtual Private LAN Service (H-VPLS) networking, signaling protocols are typically used to establish and maintain pseudowires (PWs) between provider edge (PE) nodes. Protocol frames are encapsulated and transmitted / switched on these PWs, integrating multiple LANs across a wide area into a single network at the data link layer, providing users with virtual Ethernet services. In other words, communication between different PEs in an H-VPLS network is based on these established PWs.

[0047] PW is a virtual bidirectional connection between two PEs, meaning that PW is directional. For any two PEs, the PW between them is essentially two unidirectional transmissions in opposite directions.

[0048] In H-VPLS networking, each PE learns its MAC address based on broadcast, unknown unicast, and multicast (BUM) traffic within the network. Specifically, when an NPE sends BUM traffic to the network side it faces, the NPE learns the MAC address of the terminal device sending the BUM traffic based on this BUM traffic. Furthermore, the NPE transmits this BUM traffic to the SPE via a PW from the NPE to the SPE, enabling the SPE to learn the MAC address of the terminal device. The SPE receives the BUM traffic and transmits it to the UPE via a PW from the SPE to the UPE, enabling the UPE to learn the MAC address of the terminal device.

[0049] In this scenario, when a loop occurs on the UPE side, after receiving the BUM traffic, due to the loop, the BUM traffic is transmitted within the loop on the UPE side and then sent back to the UPE, causing the BUM traffic to return to the UPE again. At this point, the UPE transmits the BUM traffic to the SPE through the PW from the UPE to the SPE. The SPE can detect the hopping of the BUM traffic on different PWs, thus determining that a loop exists at the UPE, and blocking the PW from the SPE to the UPE, thereby breaking the loop.

[0050] In an H-EVPN network, the SPE acts as an online route reflector (RR) and establishes neighbor relationships with other PEs. In this way, other PEs act as reflector clients and advertise MAC routes to the route reflector SPE. After receiving the MAC route, the route reflector SPE reflects other advertised MAC routes to its neighbors, thereby enabling each terminal device in the H-EVPN network to learn MAC addresses.

[0051] Specifically, the network side facing the NPE sends traffic to the NPE, which receives the traffic and learns its MAC address. Then, it encapsulates a MAC route based on this MAC address and sends it to the SPE. This MAC route includes the MAC address and the next hop, which is the NPE. The SPE receives the MAC route, modifies the next hop to the SPE, and then sends the modified MAC route to the UPE.

[0052] As discussed above, in H-EVPN networking, PEs no longer establish communication based on PWs (Programmable Wires). However, precisely because of the absence of PWs, in H-EVPN, SPEs can only receive MAC routes advertised by other PEs, modify the next hop of those MAC routes to themselves, and re-advertise the modified MAC routes. They cannot detect loop faults in a particular PE. In other words, SPEs in H-EVPN networking lack loop detection capabilities.

[0053] It's important to note that in H-EVPN networking, the UPE can implement loop detection using MAC flapping-based loop detection (MAC-flapping). In this scenario, if the UPE detects that the source MAC address of traffic sent by a connected terminal device is the same as the MAC address in the MAC route learned from the remote NPE, a loop can be identified on the UPE side. In this case, the UPE can directly block the traffic in the loop locally. The blocking process can be implemented by setting the source MAC address of the traffic as a black hole MAC address; subsequently, if traffic containing this black hole MAC address is received, no further MAC routes targeting that black hole MAC address will be advertised.

[0054] However, in many situations, UPE lacks loop detection capabilities. For example, UPE may lack the ability to discover black hole MAC addresses, or it may lack MAC drift loop detection technology, or its ability to block loop traffic may fail after a loop is detected. In these scenarios, UPE still learns the MAC addresses of traffic including the black hole MAC address, encapsulates MAC routes based on those MAC addresses, and then continues to send the MAC routes to other PEs.

[0055] Furthermore, since the UPE is a PE device relatively close to the users in the network, if the UPE is maliciously controlled and used to attack the SPE or NPE, it will cause damage or even paralysis to the entire network's services. Therefore, enabling loop detection capabilities on the UPE carries a significant risk.

[0056] Based on the above scenario, in this embodiment of the application, the SPE acting as the central node in the H-EVPN network can be enabled to detect loops and block loop traffic. The routing advertisement method provided in this embodiment of the application is used to implement this function.

[0057] The network architecture involved in the embodiments of this application will be explained below.

[0058] Figure 1 This is a network architecture diagram of an H-EVPN provided in an embodiment of this application. For example... Figure 1 As shown, the network deploys NPE, SPE, and n UPEs ( Figure 1 The example shows UPE1 and UPEn. The network between UPE and SPE is the access layer network, and the network between SPE and NPE is the aggregation layer network. The access layer network and the aggregation layer network each deploy an independent Interior Gateway Protocol (IGP) to achieve interoperability between their respective network layers.

[0059] In this context, the UPE (User Edge Equipment) directly connects to the user's PE (Peer Equipment). Users access the UPE through a customer edge (CE) device. This UPE primarily handles user access functions and can also be referred to as an under-layer PE or ultimate PE (backbone network edge device). The SPE (Service Provider Equipment) connects to the UPE. Figure 1 In this setup, the SPE connects to UPE1, ..., and UPEn. This SPE primarily manages and publishes VPN routes and can also be called a super-stratum PE or a switching PE. The NPE connects to the SPE and faces the network side; it can also be called a remote network device.

[0060] In addition, NPE and n UPEs establish neighbor relationships with SPE to advertise MAC routes based on these relationships. These neighbor relationships can be either Internet Protocol Version 4 (IPv4) or Internet Protocol Version 6 (IPv6) neighbor relationships. When NPE, UPE1, and UPEn all establish IPv4 neighbor relationships with SPE, Multiprotocol Label Switching / Virtual Extensible Local Area Network / Segment Routing (MPLS / VXLAN / SR) tunnels are deployed between the PE neighbors to carry services. When NPE, UPE1, and UPEn all establish IPv6 neighbor relationships with SPE, Segment Routing over IPv6 (SRv6) tunnels are deployed between the PE neighbors to carry services.

[0061] In this embodiment of the application, in order to enable the SPE, which acts as the central node in the H-EVPN network, to have the function of detecting loops and blocking loop traffic, such as Figure 2As shown, the SPE can include three parts: a detection module, a blocking module, and an alarm module. The detection module is used to detect loops. The blocking module is used to perform blocking operations when a loop is detected. The alarm module is used to report alarm messages to the network controller to notify maintenance personnel of the current loop. The detailed functions of these three modules will be described in subsequent embodiments and will not be elaborated here.

[0062] All modules involved in the above SPE are software modules, which can implement the corresponding functions through the methods provided in the embodiments of this application.

[0063] It should be noted that, Figure 1 This example uses one NPE, one SPE, and n UPEs for illustration. The embodiments of this application do not limit the number of NPEs, SPEs, and UPEs included in the H-EVPN network.

[0064] The routing announcement method provided in the embodiments of this application will be explained in detail below.

[0065] Figure 3 This is a flowchart illustrating a route announcement method provided in an embodiment of this application, which is applied to H-EVPN networking. Please refer to... Figure 3 The method includes the following steps.

[0066] Step 301: The SPE receives the first route advertisement message, which carries the MAC address and the next hop.

[0067] like Figure 1 As shown, the H-EVPN network also includes UPE and NPE.

[0068] The first route advertisement message is essentially a MAC route. This first route advertisement message can be sent by the NPE, in which case the MAC address in the message is the MAC address of CE1 connected to the NPE, and the next hop is the NPE. Alternatively, this first route advertisement message can be sent by the UPE1, in which case the MAC address in the message is the MAC address of CE2 connected to the UPE, and the next hop is UPE1.

[0069] If the first route advertisement message is sent by the NPE, then the transmission process of the first route advertisement message is as follows: Figure 4As shown, CE1 connected to NPE sends traffic to NPE. NPE receives the traffic and learns its source MAC address. Then, it encapsulates a first route advertisement message based on this MAC address. This first route advertisement message carries the MAC address and the next hop. The MAC address is the unique identifier of CE1, and the next hop is NPE. NPE sends this first route advertisement message to SPE. SPE receives the first route advertisement message and stores the mapping between the MAC address and the next hop in SPE's MAC forwarding table.

[0070] If the first routing advertisement message is sent by UPE1, the transmission process is as follows: CE2 connected to UPE1 sends traffic to UPE1. UPE1 receives the traffic and learns its source MAC address. Then, it encapsulates the first routing advertisement message based on this MAC address. The first routing advertisement message carries the MAC address and the next hop. This MAC address is the unique identifier of the terminal device CE2, and the next hop is UPE1. UPE1 then sends the first routing advertisement message to SPE. SPE receives the first routing advertisement message and stores the mapping between the MAC address and the next hop in its MAC forwarding table.

[0071] In this embodiment of the application, in order to avoid loop failures, after each receiving a routing advertisement message, the SPE will determine whether the MAC address in the routing advertisement message received at the current time is the same as the MAC address in the routing advertisement message received before the current time, and whether the next hop in the routing advertisement message received at the current time is the same as the next hop in the routing advertisement message received before the current time, so as to realize the MAC route hop detection function, and then realize the subsequent loop detection function.

[0072] For ease of explanation later, the routing advertisement message received before the current time will be referred to as the second routing advertisement message, which will enable MAC route hop detection through the following steps. That is, when the SPE receives the first routing advertisement message, it needs to compare the MAC address and next hop in the first and second routing advertisement messages to achieve MAC route hop detection, and then to achieve subsequent loop detection.

[0073] Step 302: If the MAC address in the first route advertisement message is the same as the MAC address in the second route advertisement message received before the current time, and the next hop in the first route advertisement message is different from the next hop in the second route advertisement message, then the SPE determines that a MAC route change has occurred between the next hop in the first route advertisement message and the next hop in the second route advertisement message.

[0074] Based on step 302, the SPE can detect a MAC route jump between two PEs in the H-EVPN network.

[0075] For example, if the MAC addresses in the first route advertisement message and the second route advertisement message are the same, and the next hop in the second route advertisement message is NPE, while the next hop in the first route advertisement message is UPE1, then it means that the next hop in the second route advertisement message and the next hop in the first route advertisement message are different. In this case, the SPE can determine that a MAC route change has occurred between the next hop NPE in the second route advertisement message and the next hop UPE1 in the first route advertisement message in the H-EVPN network.

[0076] For example, such as Figure 4 As shown, suppose a loop occurs between CE2 and UPE1. In this scenario, when NPE receives traffic from CE1, it learns the source MAC address of the traffic. Let's say the source MAC address is MAC address A. It then encapsulates MAC address A in a second route advertisement message and sends this message to SPE. SPE receives the second route advertisement message, compares the MAC address in the message, and finds that no other route advertisement message with the same MAC address existed before the current time. At this point, SPE modifies the next hop in the second route advertisement message to itself, obtains another route advertisement message, and sends this message to UPE. When UPE1 receives this other route advertisement message, because of the loop between CE2 and UPE1, the message is transmitted through the loop and then returns to UPE1. UPE1 mistakenly believes it has received traffic from CE2 and learns the MAC address from this traffic (i.e., the other route advertisement message), thus learning MAC address A. UPE1 then encapsulates the MAC address A in a first routing advertisement message and publishes the first routing advertisement message to SPE. SPE receives the first routing advertisement message, compares the MAC address in the first routing advertisement message, and finds that the same MAC address A exists in a second routing advertisement message received before the current time, and that the next hop in the second routing advertisement message is different from the next hop in the first routing advertisement message. At this point, SPE can determine that a MAC route change has occurred between NPE and UPE1.

[0077] In this embodiment, after receiving a first routing advertisement message, the SPE determines whether the MAC address in the first routing advertisement message is the same as the MAC address in a routing advertisement message received before the current time, and whether the next hop in the first routing advertisement message is the same as the next hop in a routing advertisement message received before the current time. If the MAC address of a second routing advertisement message is the same as the MAC address of the first routing advertisement message, and the next hop in the second routing advertisement message is different from the next hop in the first routing advertisement message, then the SPE determines that a MAC route change has occurred between the next hop in the second routing advertisement message and the next hop in the first routing advertisement message. That is, the SPE can detect MAC route changes in the H-EVPN network to facilitate subsequent loop detection.

[0078] Figure 3 In the routing advertisement method, the SPE can detect MAC route hopping in the H-EVPN network. In this embodiment, the SPE can also determine whether a loop exists in the H-EVPN network based on the number of MAC route hopping events. Please refer to... Figure 5 The method includes the following steps.

[0079] Step 301: The SPE receives the first route advertisement message, which carries the MAC address and the next hop.

[0080] As mentioned above Figure 3 As described in the embodiment, the first route advertisement message can be sent by UPE1 or by NPE.

[0081] In some scenarios, the entire process of the SPE receiving the first route advertisement message is as follows: Figure 4 As shown, CE1 connected to NPE sends traffic to NPE. NPE receives the traffic and learns its source MAC address. Then, it encapsulates a route advertisement message based on this MAC address. This route advertisement message carries the MAC address and the next hop. The MAC address is the unique identifier for CE1, and the next hop is NPE. NPE sends this route advertisement message to SPE. SPE receives the route advertisement message and stores the mapping between the MAC address and the next hop in SPE's MAC forwarding table. The route advertisement message received by SPE is designated as the second route advertisement message.

[0082] After receiving and storing the routing advertisement message, the SPE modifies the next hop in the message to itself and then sends the modified message to UPE1. UPE1 receives the modified message. In this way, CE1's MAC address can be propagated in the H-EVPN network. If a loop occurs with CE2 connected to UPE1, the modified message, after being transmitted through the loop, returns to UPE1. UPE1 mistakenly believes it has received traffic from CE2 and learns the MAC address from that traffic (i.e., the modified message). UPE1 then encapsulates this MAC address in a first routing advertisement message and publishes it to the SPE. The SPE receives this first message, which contains the MAC address of CE1 and the next hop of UPE1.

[0083] In other scenarios, the entire process of the SPE receiving the first route advertisement message is as follows: CE2 connected to UPE1 sends traffic to UPE1. UPE1 receives this traffic and learns its source MAC address. Then, it encapsulates a route advertisement message based on this MAC address. This route advertisement message carries the MAC address and the next hop. The MAC address is the unique identifier of CE2, and the next hop is UPE1. UPE1 sends this route advertisement message to the SPE. The SPE receives the route advertisement message and stores the mapping between the MAC address and the next hop in the route advertisement message in the SPE's MAC forwarding table. The route advertisement message received by the SPE is referred to as the second route advertisement message.

[0084] After receiving and storing the routing advertisement message, the SPE modifies the next hop in the message to itself and then sends the modified message to the NPE. The NPE receives the message. This allows CE2's MAC address to propagate within the H-EVPN network. If a loop occurs with CE1 connected to the NPE, the modified routing advertisement message, after being transmitted through the loop, returns to the NPE. The NPE mistakenly believes it has received traffic from CE1 and learns the MAC address from that traffic (i.e., the modified routing advertisement message). The NPE then encapsulates this MAC address in a first routing advertisement message and publishes it to the SPE. The SPE receives this first routing advertisement message, which contains the MAC address of CE2 and the next hop of the NPE.

[0085] Based on the above two scenarios, if a loop occurs in a PE, such as a UPE or NPE, the SPE will detect a MAC route change. Therefore, to achieve loop detection, the SPE needs to first check whether a MAC route change has occurred. Refer to step 302 below for the specific implementation method.

[0086] Step 302: If the MAC address in the first route advertisement message is the same as the MAC address in the second route advertisement message received before the current time, and the next hop in the first route advertisement message is different from the next hop in the second route advertisement message, then the SPE determines that a MAC route change has occurred between the next hop in the first route advertisement message and the next hop in the second route advertisement message.

[0087] The process by which the SPE determines a MAC route transition between the next hop in the first route advertisement message and the next hop in the second route advertisement message can be referred to the above. Figure 3 The relevant content in the embodiments.

[0088] Step 303: SPE determines the number of MAC route hops between the next hop in the first route advertisement message and the next hop in the second route advertisement message from the start of the detection period to the current time, and obtains the hop count.

[0089] The detection period is the pre-configured network detection period by the network controller. For example, the detection period can be set to 10 minutes. That is, the SPE determines the number of MAC route hops between the next hop in the first route advertisement message and the next hop in the second route advertisement message during the period from the start of the detection period to the current time, and obtains the hop count.

[0090] In this embodiment, if the MAC route change is caused by a normal MAC route update, the SPE will not detect multiple MAC route changes between two next hops within a short period of time. If the MAC route change is caused by a loop failure in the PE, the SPE will detect multiple MAC route changes between two next hops within a short period of time.

[0091] Based on the above considerations, the network controller pre-sets a reference hop count. The purpose of this pre-setting is to enable the SPE to distinguish between MAC route hops caused by normal MAC route updates and those caused by loop faults in the PE, thereby preventing the SPE from mistakenly interpreting normal MAC route updates as loop faults in the PE. This reference hop count is pre-set by the network controller, and this embodiment does not limit its implementation.

[0092] Specifically, if the number of hops exceeds the reference number of hops, a loop is determined by the following steps; if the number of hops does not exceed the reference number of hops, the MAC route continues to be published.

[0093] It should be noted that in the embodiments of this application, "exceeding" can mean greater than, or greater than or equal to. When "exceeding" means greater than, correspondingly, "not exceeding" means less than or equal to. When "exceeding" means greater than or equal to, correspondingly, "not exceeding" means less than.

[0094] For example, the reference jump count is 3, such as Figure 4 As shown, suppose a loop occurs on CE2 connected to UPE1. In this scenario, when the SPE receives the first route advertisement message sent by UPE1, it finds that the second route advertisement message received before the current time contains the same MAC address as the first route advertisement message, and the next hop in the second route advertisement message is different from the next hop in the first route advertisement message. At this time, the SPE can determine that a MAC route change has occurred between the NPE and UPE1 and records the change count as 1. Since the change count of 1 does not exceed the reference change count of 3, the SPE modifies the next hop in the first route advertisement message to itself and sends the modified first route advertisement message to the NPE. After receiving the modified first route advertisement message, the NPE finds that the MAC address in the modified first route advertisement message is the same as the MAC address in the route advertisement message sent locally before the current time. At this time, the NPE will determine that the locally published route advertisement message is optimal and resend the locally published route advertisement message to the SPE. After receiving the routing advertisement message, the SPE finds that the MAC address in this message is the same as that in the first routing advertisement message received earlier, and that the next hop in this message is different from that in the first message. The SPE then determines that a MAC route change has occurred between the NPE and UPE1 and updates the hop count to 2. Since the hop count of 2 does not exceed the reference hop count of 3, the SPE can modify the next hop in the routing advertisement message to itself and send the modified message to UPE1. However, due to a loop in CE2 connected to UPE1, the modified message is transmitted through the loop and then returns to UPE1. UPE1 mistakenly believes it has received traffic from CE2 again and continues to send routing advertisement messages encapsulated with the MAC address from that traffic to the SPE. Thus, two route advertisement messages with the same MAC address but different next hops hop back and forth on UPE1, SPE, and NPE in the H-EVPN network, and SPE updates the hop count every time it detects a hop.

[0095] Step 304: If the number of hops exceeds the reference number of hops, the SPE determines that a loop exists in one or both of the next hops in the first route advertisement message and the second route advertisement message.

[0096] In step 303 above, the number of hops is obtained. If this number of hops exceeds the reference number of hops, the SPE determines that a loop exists in one or both of the next hops in the first route advertisement message and the second route advertisement message. That is, the SPE determines that a loop exists in the UPE, or a loop exists in the NPE, or a loop exists in both the UPE and the NPE.

[0097] Furthermore, when a loop is detected, the UPE compares the MAC address in the currently received traffic with the MAC address in the routing advertisement message transmitted from the remote NPE. If the MAC addresses are the same, the UPE determines that a loop fault has occurred at the UPE. However, in this embodiment, the SPE determines a loop fault by directly comparing the received routing advertisement messages and detecting the number of next-hop transitions in routing advertisement messages with the same MAC address within the H-EVPN network, thereby determining whether a loop fault has occurred in the PE of that H-EVPN network.

[0098] In this embodiment, the SPE determines whether a loop fault has occurred in the H-EVPN network by counting the number of MAC route transitions between the next hop in the first route advertisement message and the next hop in the second route advertisement message. If the number of MAC route transitions between the next hop in the first route advertisement message and the next hop in the second route advertisement message exceeds a reference transition count, the SPE can determine that a loop fault has occurred. Unlike the UPE, which needs to learn the MAC addresses in locally received traffic and the MAC addresses in remotely sent route advertisement messages to determine the occurrence of loop faults, this embodiment uses the central node SPE to determine loop faults in the network, eliminating the possibility that manual operation of the UPE might damage the H-EVPN network.

[0099] Figure 5 In the routing advertisement method, the SPE can detect loop faults in the H-EVPN network and determine which PEs may be affected by the loop fault. In this embodiment, after detecting a loop fault in the network, the SPE can also report the possible PEs affected by the loop fault to the network controller, enabling maintenance personnel to perform timely network maintenance. Please refer to... Figure 6 The method includes the following steps.

[0100] Step 301: The SPE receives the first route advertisement message, which carries the MAC address and the next hop.

[0101] Specifically, the process by which the SPE receives the first route advertisement message can be referred to the above. Figure 5 The relevant content in the embodiments.

[0102] Step 302: If the MAC address in the first route advertisement message is the same as the MAC address in the second route advertisement message received before the current time, and the next hop in the first route advertisement message is different from the next hop in the second route advertisement message, then the SPE determines that a MAC route change has occurred between the next hop in the first route advertisement message and the next hop in the second route advertisement message.

[0103] Specifically, the process by which the SPE determines a MAC route transition between the next hop in the first route advertisement message and the next hop in the second route advertisement message can be referred to the above. Figure 3 The relevant content in the embodiments.

[0104] Step 303: SPE determines the number of MAC route hops between the next hop in the first route advertisement message and the next hop in the second route advertisement message from the start of the detection period to the current time, and obtains the hop count.

[0105] Specifically, the process by which SPE obtains the number of transitions can be referred to the above. Figure 5 The relevant content in the embodiments.

[0106] Step 304: If the number of hops exceeds the reference number of hops, the SPE determines that a loop exists in one or both of the next hops in the first route advertisement message and the second route advertisement message.

[0107] Specifically, the process by which SPE determines the occurrence of a loop can be referred to the above. Figure 5 The relevant content in the embodiments.

[0108] Step 305: The SPE reports an alarm message, which carries the next hop in the first route advertisement message and the next hop in the second route advertisement message. The alarm message indicates that a loop has occurred in one or both of the next hops in the first route advertisement message and the next hop in the second route advertisement message.

[0109] As described in step 304, when the SPE detects a loop in one or both of the next hops in the first routing advertisement message and the second routing advertisement message, it generates an alarm message and reports the alarm message to the network controller, which then promptly handles any loops in the network.

[0110] For example, if the SPE determines that a loop fault has occurred in the next-hop UPE of the received first route advertisement message and the next-hop NPE of the second route advertisement message, it generates an alarm message and reports the alarm message to the network controller. The alarm message indicates that a loop fault has occurred in the next-hop UPE of the first route advertisement message and / or the next-hop NPE of the second route advertisement message.

[0111] In this embodiment, the SPE can not only detect loop faults in the H-EVPN network, but also generate alarm messages for loop faults and report the alarm messages to the network controller. The maintenance personnel at the network controller can then promptly handle the PEs with loop faults in the network, achieving the effect of real-time protection of the H-EVPN network.

[0112] Figure 6 In the routing advertisement method, the SPE reports loop failures to the network controller. In this embodiment, after detecting a loop failure, the SPE can directly block the PE with the loop failure, ensuring that the PE with the loop failure will not propagate routing advertisement messages or traffic within the network again, thus preventing further waste of resources. Please refer to... Figure 7 The method includes the following steps.

[0113] Step 301: The SPE receives the first route advertisement message, which carries the MAC address and the next hop.

[0114] Specifically, the process by which the SPE receives the first route advertisement message can be referred to the above. Figure 5 The relevant content in the embodiments.

[0115] Step 302: If the MAC address in the first route advertisement message is the same as the MAC address in the second route advertisement message received before the current time, and the next hop in the first route advertisement message is different from the next hop in the second route advertisement message, then the SPE determines that a MAC route change has occurred between the next hop in the first route advertisement message and the next hop in the second route advertisement message.

[0116] Specifically, the process by which the SPE determines a MAC route transition between the next hop in the first route advertisement message and the next hop in the second route advertisement message can be referred to the above. Figure 3 The relevant content in the embodiments.

[0117] Step 303: SPE determines the number of MAC route hops between the next hop in the first route advertisement message and the next hop in the second route advertisement message from the start of the detection period to the current time, and obtains the hop count.

[0118] Specifically, the process by which SPE obtains the number of transitions can be referred to the above. Figure 5 The relevant content in the embodiments.

[0119] Step 304: If the number of hops exceeds the reference number of hops, the SPE determines that a loop exists in one or both of the next hops in the first route advertisement message and the second route advertisement message.

[0120] Specifically, the process by which SPE determines the occurrence of a loop can be referred to the above. Figure 5 The relevant content in the embodiments.

[0121] Step 305: The SPE determines the blocking priority of the next hop in the first route advertisement message and the blocking priority of the next hop in the second route advertisement message.

[0122] It should be noted that the above embodiments are all based on a single NPE. In H-EVPN networking, multiple NPEs may exist simultaneously. In this case, the processing method for route advertisement messages on multiple NPEs is the same as the processing method for route advertisement messages on a single NPE.

[0123] Once the SPE determines that a loop exists between the next hop of the first route advertisement message and the next hop of the second route advertisement message, it can determine the blocking priority of each of the two next hop PEs in the first and second route advertisement messages.

[0124] In H-EVPN networks, since the importance of each PE (Prerequisite Provider) varies, when the SPE blocks a PE, it prioritizes blocking PEs with lower importance. Therefore, the blocking priority of PEs can be set based on their importance in the network. For example, the higher the importance of a PE, the lower its blocking priority.

[0125] For example, the blocking priority of the UPE is higher than that of the NPE. The higher blocking priority of the UPE means that when the SPE blocks a PE with a loop fault, it will prioritize blocking the UPE. For example, the SPE may also never block the NPE.

[0126] Furthermore, different UPEs have different blocking priorities, and different NPEs have different blocking priorities.

[0127] When multiple UPEs exist, each UPE has a different blocking priority. The blocking priority of each UPE is set by the network controller according to the importance of each UPE in the H-EVPN network. UPEs with lower importance have higher blocking priority, and SPEs also prioritize blocking these UPEs.

[0128] Similarly, when multiple NPEs are present, the blocking priority of each NPE is different. In this case, the blocking priority of each NPE is also set by the network controller according to the importance of each NPE in the H-EVPN network. NPEs with lower importance have higher blocking priority, and SPEs also prioritize blocking the NPEs.

[0129] For example, if there are 3 UPEs and 2 NPEs in an H-EVPN network, namely UPE1, UPE2, UPE3, NPE1, and NPE2, and the 3 UPEs are ordered from highest to lowest importance as UPE1, UPE2, and UPE3, and the 2 NPEs are ordered from highest to lowest importance as NPE1 and NPE2, then the 5 PEs are ordered from highest to lowest blocking priority as UPE3, UPE2, UPE1, NPE2, and NPE1.

[0130] Step 306: The SPE determines the next hop with the higher blocking priority among the next hops in the first route advertisement message and the next hops in the second route advertisement message, and obtains the blocking peer.

[0131] As described in step 305, the SPE will block the PE with the higher blocking priority. Therefore, the SPE compares the blocking priorities of the next-hop PE1 in the first route advertisement message and the next-hop PE2 in the second route advertisement message to determine the PE with the higher blocking priority and records the PE as the blocking peer.

[0132] For example, for Figure 4 In the network topology shown, the next hop in the first route advertisement message is UPE1, and the next hop in the second route advertisement message is NPE. Since the blocking priority of UPE is higher than that of NPE, SPE will identify UPE1 as the blocking peer.

[0133] For example, for Figure 4 The network topology shown assumes that the next hop in the first route advertisement message is UPE3. Figure 4 (Not shown in the image), the next hop in the second route advertisement message is UPE1. As described in step 305, UPE3 and UPE1 are in the order of blocking priority from high to low: UPE3, UPE1. According to the principle that the SPE will block the PE with the higher blocking priority, the SPE will determine UPE3 as the blocking peer.

[0134] Additionally, after the SPE determines that a loop exists in one or both of the next hops in the first route advertisement message and the second route advertisement message, the SPE can generate a first alarm message and send it to the network controller. This first alarm message carries information about which PEs may be experiencing the loop fault.

[0135] In addition, after the SPE identifies and blocks the peer, it can send a second alarm message to the network controller. This second alarm message carries the specific PE that the SPE has blocked, that is, it carries the information about the blocked peer.

[0136] Step 307: SPE performs a blocking operation on the blocking peer.

[0137] After identifying the blocking peer, SPE will perform corresponding processing at both the forwarding layer and the control layer to execute the blocking operation on the blocking peer.

[0138] In some embodiments, the SPE's implementation of blocking operations at the forwarding layer can be as follows: upon receiving a service packet from a node other than the blocking peer, if the destination MAC address of the service packet is a MAC address learned from the blocking peer, then the operation of forwarding the service packet to the blocking peer is not performed. Alternatively, upon receiving a service packet from the blocking peer, the operation of forwarding the service packet to other nodes other than the blocking peer is not performed. That is, after the SPE determines the blocking peer, the SPE will block traffic from or sent to the blocking peer.

[0139] The service message carries a destination address and a source address. The destination address is the MAC address of the target location to which the payload of the service message needs to be sent, and the source address is the MAC address of the node that sends the service message to the SPE. Therefore, when the SPE receives the service message, it can determine whether the service message is sent by the blocking peer based on the source address carried in the service message. Based on the destination address carried in the service message and the local forwarding table, it can determine whether the service message is sent to the blocking peer.

[0140] For example, when an SPE receives a service packet sent by another PE other than the blocking peer, it will check the destination MAC address in the service packet. If the destination MAC address in the service packet was learned from the blocking peer, the SPE can determine that the next hop of the service packet is the blocking peer based on the correspondence between MAC address and next hop in the forwarding table stored locally. That is, the service packet is a service packet that needs to be sent to the blocking peer. Therefore, the SPE will not forward the service packet to the blocking peer.

[0141] For example, corresponding Figure 4 In the network shown, if the blocking peer is UPE1, when SPE receives a service packet sent from NPE, and the destination MAC address in the service packet is a MAC address learned from UPE1, SPE will not send the service packet to UPE1.

[0142] For example, when the SPE receives a service message from the blocking peer, the SPE will not forward the service message to the corresponding PE according to the destination MAC address in the service message.

[0143] For example, corresponding Figure 4 In the network shown, if the blocking peer is UPE1, UPE1 sends a service message to SPE. The source MAC address of the service message is the MAC address of UPE1. After receiving the service message, SPE will not forward the service message to NPE.

[0144] In other embodiments, the SPE's implementation of the blocking operation at the control layer can be as follows: Marking information is added to the routing advertisement message sent by the blocking peer at the current time. The routing advertisement message sent by the blocking peer at the current time is either a first routing advertisement message or a second routing advertisement message. If a third routing advertisement message is received again from the blocking peer, and the third routing advertisement message and the routing advertisement message marked by the marking information are the same routing advertisement message, then the operation of publishing a routing advertisement message based on the third routing advertisement message is not performed.

[0145] For example, when an SPE detects a loop, it adds a tag to the route advertisement message sent by the blocked peer, indicating that the route advertisement message was sent by the blocked peer. If the SPE receives a third route advertisement message from the blocked peer again, and the MAC address and next hop in the third route advertisement message are the same as those in the route advertisement message marked by the tag, it means that the third route advertisement message and the route advertisement message marked by the tag are the same route advertisement message. In this case, the SPE does not perform the operation of publishing route advertisement messages based on the third route advertisement message. That is, the SPE will not modify the next hop in the third route advertisement message and will send the modified third route advertisement message to other PEs.

[0146] For example, for Figure 4 In the network topology shown, if the blocked peer is UPE1, UPE1 sends a first route advertisement message to the SPE. The MAC address in this first route advertisement message is the MAC address of CE2, which is connected to UPE1, and the next hop is UPE1. The SPE receives this first route advertisement message and adds a tag to it when detecting loops. If the SPE subsequently receives a third route advertisement message from UPE1, and the MAC address in this third route advertisement message is the MAC address of CE2, and the next hop is UPE1 (meaning the MAC address and next hop in this third route advertisement message are the same as those in the route advertisement message marked by the tag), the SPE will not modify the next hop in the third route advertisement message to itself, and will instead send the modified third route advertisement message to the NPE.

[0147] In addition, when performing a blocking operation on a blocking peer, a timer can be started from the current time, and the blocking operation can be performed on the blocking peer before the timer reaches the blocking duration.

[0148] The current time is the start time of the blocking operation set by the SPE on the blocking peer, that is, the moment the SPE detects the loop. The blocking duration is preset by the network controller. For example, the blocking duration can be the default duration required for maintenance personnel to maintain the network. In this scenario, when the timer reaches the blocking duration, the SPE assumes that the network has been maintained, i.e., the loop has been broken, so the SPE can abandon the blocking operation at this time. That is, the SPE continues to forward traffic from or sent to the blocking peer at the forwarding layer, and continues to forward route advertisement messages from or sent to the blocking peer at the control layer.

[0149] Of course, the blocking duration can be infinite, meaning the SPE permanently blocks the blocked peer. In this case, the network controller's maintenance personnel need to manually remove the loop fault in the network and then manually release the block.

[0150] Additionally, if the network controller's maintenance personnel have already resolved the loop fault in the PE before the blocking duration is reached, the network controller can send a blocking release command to the SPE. This command indicates that the fault in the network has been resolved and the network can continue operating. In this scenario, in some embodiments, after the SPE performs the blocking operation on the blocking peer, if the SPE receives a blocking release command before the blocking duration is reached, the SPE will no longer perform the blocking operation on the blocking peer.

[0151] For example, for Figure 4 In the network topology shown, if the blocked peer is UPE1, when the SPE receives a first route advertisement message from UPE1, the SPE does not send the first route advertisement message during loop detection and starts timing from the current time. If the blocking duration is 5 minutes, when the timing reaches 4 minutes, the SPE receives a blocking release command from the network controller. At this point, the SPE abandons the blocking operation. After abandoning the blocking operation, if the SPE receives another route advertisement message from UPE1, the SPE modifies the next hop in the route advertisement message to itself and sends the modified route advertisement message to the NPE.

[0152] Furthermore, the above method determines the blocking peer based on the blocking priority between PEs. Optionally, in this embodiment, both PEs in the event of a loop fault can be set as blocking peers, meaning that the relevant traffic and MAC routes of both PEs are blocked simultaneously. For example, if the SPE detects a loop between the UPE and NPE, it can set both the UPE and NPE as blocking peers and simultaneously block traffic and MAC routes from or sent to the UPE and NPE.

[0153] It should be noted that in the H-EVPN network of this application embodiment, loop detection is performed by the SPE. Compared to loop detection by the UPE, the SPE is farther from the user, thus reducing the likelihood of it being manually controlled and modified, thereby improving the success rate of loop detection. Furthermore, H-EVPN networks have a large number and variety of UPEs. Enabling loop detection on each UPE would require enabling loop detection on numerous different types of UPEs, easily leading to insufficient loop detection functionality across the entire network. This application embodiment simplifies network complexity by enabling loop detection on the central node SPE, thereby avoiding waste of network resources. Moreover, when a loop occurs, the central node SPE has a higher success rate in blocking traffic coming from the loop compared to the UPE attempting to block traffic from the loop.

[0154] In this embodiment, the SPE detects the next hop of the received first routing advertisement message and the next hop of the second routing advertisement message. Once a loop is identified in either the next hop or the next hop of the second routing advertisement message, the SPE determines the blocking peer based on the blocking priority among the PEs and performs blocking operations on the blocking peer. This prevents service packets or routing advertisement messages based on the blocking peer from being repeatedly transmitted in the H-EVPN network, thus avoiding waste of network resources. Furthermore, the SPE reports the PE experiencing a loop failure, i.e., the blocking peer, to the network controller, allowing network controller maintenance personnel to promptly handle the PE experiencing the loop failure, achieving timely network protection.

[0155] Figure 8 This is a schematic diagram of the SPE structure in an H-EVPN network provided in this application embodiment. Please refer to... Figure 8 The SPE includes a transceiver module 801 and a processing module 802.

[0156] The transceiver module 801 is used to receive a first route advertisement message, which carries the MAC address and next hop. For a detailed implementation of the transceiver module, please refer to [reference needed]. Figure 3 Step 301 in the embodiment.

[0157] Processing module 802 is configured to determine that a MAC route hop has occurred between the next hop in the first route advertisement message and the next hop in the second route advertisement message if the MAC address in the first route advertisement message is the same as the MAC address in the second route advertisement message received before the current time, and the next hop in the first route advertisement message is different from the next hop in the second route advertisement message. For a specific implementation of the processing module, please refer to [reference needed]. Figure 3 Step 302 in the embodiment.

[0158] Optionally, the processing module 802 is also used for:

[0159] Determine the number of MAC route hops between the next hop in the first route advertisement message and the next hop in the second route advertisement message from the start of the detection period to the current time, and obtain the hop count;

[0160] If the number of hops exceeds the reference number of hops, then a loop is determined to exist between the next hop in the first route advertisement message and the next hop in the second route advertisement message.

[0161] Optionally, the processing module 802 is also used for:

[0162] The alarm message is reported. The alarm message carries the next hop in the first route advertisement message and the next hop in the second route advertisement message. The alarm message indicates that a loop has occurred in one or both of the next hops in the first route advertisement message and the next hop in the second route advertisement message.

[0163] Optionally, the processing module 802 is also used for:

[0164] Determine the blocking priority of the next hop in the first route advertisement message and the blocking priority of the next hop in the second route advertisement message;

[0165] Determine the next hop with the higher blocking priority among the next hops in the first route advertisement message and the second route advertisement message to obtain the blocking peer;

[0166] Perform a blocking operation on the blocking peer.

[0167] Optionally, the processing module 802 is also used for:

[0168] When a service packet is received from a node other than the blocking peer, if the destination MAC address of the service packet is a MAC address learned from the blocking peer, the operation of forwarding the service packet to the blocking peer is not performed.

[0169] Optionally, the processing module 802 is also used for:

[0170] When a service message is received from a blocking peer, no operation is performed to forward the service message to other nodes except the blocking peer.

[0171] Optionally, the processing module 802 is also used for:

[0172] Add marking information to the routing advertisement message sent by the peer at the current time, and the routing advertisement message sent by the peer at the current time is either the first routing advertisement message or the second routing advertisement message;

[0173] If a third route advertisement message is received again from the blocking peer, and the third route advertisement message and the route advertisement message marked by the tagging information are the same route advertisement message, then the operation of publishing a route advertisement message based on the third route advertisement message will not be performed.

[0174] Optionally, H-EVPN also includes UPE and NPE, with UPE having a higher blocking priority than NPE.

[0175] Optionally, different UPEs may have different blocking priorities.

[0176] Optionally, different NPEs may have different blocking priorities.

[0177] Optionally, the processing module 802 is also used for:

[0178] Start timing from the current time;

[0179] Before the timeout period reaches the blocking duration, the blocking operation is performed on the blocking peer.

[0180] Optionally, the processing module 802 is also used for:

[0181] If a release command is received before the blocking duration is reached, the blocking operation will no longer be performed on the blocking peer.

[0182] In this embodiment, after receiving a first routing advertisement message, the SPE determines whether the MAC address in the first routing advertisement message is the same as the MAC address in a routing advertisement message received before the current time, and whether the next hop in the first routing advertisement message is the same as the next hop in a routing advertisement message received before the current time. If a second routing advertisement message contains a MAC address that is the same as the MAC address in the first routing advertisement message, and the next hop in the second routing advertisement message is different from the next hop in the first routing advertisement message, then the SPE determines that a MAC route change has occurred between the next hop in the second routing advertisement message and the next hop in the first routing advertisement message. That is, the SPE can detect MAC route changes in the H-EVPN network to facilitate subsequent loop detection.

[0183] It should be noted that the SPE provided in the above embodiments is only illustrated by the division of the above functional modules when performing route advertisement. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the SPE provided in the above embodiments and the route advertisement method embodiments belong to the same concept, and its specific implementation process can be found in the method embodiments, which will not be repeated here.

[0184] Figure 9 This is a schematic diagram of a network device provided in this application embodiment. This network device is used to implement the function of the SPE in the aforementioned embodiments. See also... Figure 9 The network device includes at least one processor 901, a communication bus 902, a memory 903, and at least one communication interface 904.

[0185] The processor 901 may be a general-purpose central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present application.

[0186] The communication bus 902 may include a path for transmitting information between the aforementioned components.

[0187] The memory 903 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.), magnetic disks or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 903 may exist independently and be connected to the processor 901 via a communication bus 902. The memory 903 may also be integrated with the processor 901.

[0188] The memory 903 stores program code for executing the scheme of this application, and its execution is controlled by the processor 901. The processor 901 executes the program code stored in the memory 903. The program code may include one or more software modules.

[0189] The communication interface 904 uses any transceiver-like device to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.

[0190] In a specific implementation, as one example, a network device may include multiple processors, for example... Figure 9 The processors 901 and 905 are shown. Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor here can refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).

[0191] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital versatile discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).

[0192] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0193] The above descriptions are embodiments provided in this application and are not intended to limit the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of the embodiments of this application.

Claims

1. A route announcement method, characterized in that, The method is performed by the service-side operator edge device (SPE) in a hierarchical Ethernet virtual private network (H-EVPN) network, which also includes network-side operator edge devices (NPE) and multiple user-side operator edge devices (UPE). The method includes: The SPE receives a first route advertisement message, which carries the Media Access Control MAC address and next hop in the MAC route to be advertised. The next hop in the first route advertisement message is the sender of the first route advertisement message, and the sender of the first route advertisement message is any other PE in the H-EVPN network besides the SPE. If the MAC address in the first routing advertisement message is the same as the MAC address in the second routing advertisement message received before the current time, and the next hop in the first routing advertisement message is different from the next hop in the second routing advertisement message, then the SPE determines that a MAC routing transition has occurred between the next hop in the first routing advertisement message and the next hop in the second routing advertisement message. The next hop in the second routing advertisement message is the sender of the second routing advertisement message, and the sender of the second routing advertisement message is another PE in the H-EVPN network besides the SPE.

2. The method as described in claim 1, characterized in that, After the SPE determines that a MAC route hop occurs between the next hop in the first route advertisement message and the next hop in the second route advertisement message, the method further includes: The SPE determines the number of MAC route hops between the next hop in the first route advertisement message and the next hop in the second route advertisement message from the start of the detection period to the current time, and obtains the hop count; If the number of hops exceeds the reference number of hops, the SPE determines that a loop exists in one or both of the next hops in the first route advertisement message and the next hops in the second route advertisement message.

3. The method as described in claim 2, characterized in that, After the SPE determines that a loop occurs in either the next hop in the first route advertisement message or the next hop in the second route advertisement message, the method further includes: The SPE reports an alarm message, which carries the next hop in the first route advertisement message and the next hop in the second route advertisement message. The alarm message indicates that a loop has occurred in one or both of the next hops in the first route advertisement message and the next hop in the second route advertisement message.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The SPE determines the blocking priority of the next hop in the first route advertisement message and the blocking priority of the next hop in the second route advertisement message; The SPE determines the next hop with the higher blocking priority among the next hops in the first route advertisement message and the second route advertisement message, and obtains the blocking peer; The SPE performs a blocking operation on the blocking peer.

5. The method as described in claim 4, characterized in that, The blocking operation performed on the blocking peer includes: When a service packet is received from a node other than the blocking peer, if the destination MAC address of the service packet is a MAC address learned from the blocking peer, then the operation of forwarding the service packet to the blocking peer is not performed.

6. The method as described in claim 4, characterized in that, The blocking operation performed on the blocking peer includes: When a service message is received from the blocking peer, the operation of forwarding the service message to other nodes other than the blocking peer is not performed.

7. The method as described in claim 4, characterized in that, The blocking operation performed on the blocking peer includes: Add a tag to the routing advertisement message sent by the blocked peer at the current time, wherein the routing advertisement message sent by the blocked peer at the current time is either the first routing advertisement message or the second routing advertisement message; If a third route advertisement message is received again from the blocking peer, and the third route advertisement message and the route advertisement message marked by the marking information are the same route advertisement message, then the operation of publishing a route advertisement message based on the third route advertisement message will not be performed.

8. The method as described in claim 4, characterized in that, The blocking priority of the UPE is higher than that of the NPE.

9. The method as described in claim 8, characterized in that, Different UPEs have different blocking priorities.

10. The method as described in claim 8, characterized in that, Different NPEs have different blocking priorities.

11. The method as described in claim 4, characterized in that, The blocking operation performed on the blocking peer includes: Start timing from the current time; Before the timeout period reaches the blocking duration, a blocking operation is performed on the blocking peer.

12. The method as described in claim 11, characterized in that, The method further includes: If the SPE receives a blocking release command before the blocking duration is reached, it will no longer perform blocking operations on the blocking peer.

13. A service-side operator edge device (SPE) in a hierarchical Ethernet virtual private network (H-EVPN) network, wherein the H-EVPN network further includes a network-side operator edge device (NPE) and multiple user-side operator edge devices (UPEs); The SPE includes: The transceiver module is used to receive a first routing announcement message. The first routing announcement message carries the media access control MAC address and next hop in the MAC route to be announced. The next hop in the first routing announcement message is the sender of the first routing announcement message. The sender of the first routing announcement message is any PE in the H-EVPN network other than the SPE. The processing module is configured to determine that a MAC route change has occurred between the next hop in the first route advertisement message and the next hop in the second route advertisement message if the MAC address in the first route advertisement message is the same as the MAC address in the second route advertisement message received before the current time, and the next hop in the first route advertisement message is different from the next hop in the second route advertisement message. The next hop in the second route advertisement message is the sender of the second route advertisement message, and the sender of the second route advertisement message is another PE in the H-EVPN network other than the SPE.

14. The SPE as claimed in claim 13, characterized in that, The processing module is also used for: Determine the number of MAC route hops between the next hop in the first route advertisement message and the next hop in the second route advertisement message from the start of the detection period to the current time, and obtain the hop count; If the number of hops exceeds the reference number of hops, then it is determined that a loop exists in one or both of the next hops in the first routing advertisement message and the next hops in the second routing advertisement message.

15. The SPE as claimed in claim 14, characterized in that, The processing module is also used for: The alarm message is reported, and the alarm message carries the next hop in the first route advertisement message and the next hop in the second route advertisement message. The alarm message indicates that a loop has occurred in one or both of the next hops in the first route advertisement message and the next hop in the second route advertisement message.

16. The SPE as described in any one of claims 13 to 15, characterized in that, The processing module is also used for: Determine the blocking priority of the next hop in the first route advertisement message and the blocking priority of the next hop in the second route advertisement message; The next hop with the higher blocking priority among the next hops in the first route advertisement message and the second route advertisement message is determined to obtain the blocking peer; A blocking operation is performed on the blocking peer.

17. The SPE as claimed in claim 16, characterized in that, The processing module is used for: When a service packet is received from a node other than the blocking peer, if the destination MAC address of the service packet is a MAC address learned from the blocking peer, then the operation of forwarding the service packet to the blocking peer is not performed.

18. The SPE as claimed in claim 16, characterized in that, The processing module is used for: When a service message is received from the blocking peer, the operation of forwarding the service message to other nodes other than the blocking peer is not performed.

19. The SPE as claimed in claim 16, characterized in that, The processing module is used for: Add a tag to the routing advertisement message sent by the blocked peer at the current time, wherein the routing advertisement message sent by the blocked peer at the current time is either the first routing advertisement message or the second routing advertisement message; If a third route advertisement message is received again from the blocking peer, and the third route advertisement message and the route advertisement message marked by the marking information are the same route advertisement message, then the operation of publishing a route advertisement message based on the third route advertisement message will not be performed.

20. The SPE as claimed in claim 16, characterized in that, The blocking priority of the UPE is higher than that of the NPE.

21. The SPE as claimed in claim 20, characterized in that, Different UPEs have different blocking priorities.

22. The SPE as claimed in claim 20, characterized in that, Different NPEs have different blocking priorities.

23. The SPE as claimed in claim 16, characterized in that, The processing module is used for: Start timing from the current time; Before the timeout period reaches the blocking duration, a blocking operation is performed on the blocking peer.

24. The SPE as claimed in claim 23, characterized in that, The processing module is also used for: If a blocking release command is received before the blocking duration is reached, the blocking operation will no longer be performed on the blocking peer.

25. A network device, characterized in that, The network device includes a memory and a processor; The memory is used to store a program that supports the network device in performing the method according to any one of claims 1-12, and to store data related to implementing the method according to any one of claims 1-12; The processor is configured to execute programs stored in the memory.

26. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the method described in any one of claims 1-12.

Citation Information

Patent Citations

  • Method, device and network equipment for processing loops in two layer network

    CN102625986A

  • Method and device for eliminating media access control withdrawal message concussion in VPLS (virtual private LAN service)

    CN102833157A