Link detection method and device
By receiving notification of Layer 2 network topology change in the VXLAN network and sending linked VXLAN loop detection messages, the problem of VXLAN network loop detection cannot be restored in time is solved, and the success of forwarding of data packets in the VXLAN network is achieved.
Patent Information
- Application Number
- CN202211121195.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-15
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2042-09-15
AI Technical Summary
The loop detection of the VXLAN network and the loop detection of the second-layer network are performed separately. When the topology of the layer two network eliminates the VXLAN network loop, VTEP cannot recover the blocked AC in time, resulting in the failure of forwarding of data packets.
By receiving layer 2 network topology change notification messages, the VXLAN instance belongs to be identified, and each AC sends a VXLAN loop detection message with local loop detection priority. When no message with the peer loop detection priority identification is received within the specified waiting time interval, the blocked AC is set to release to allow MAC address learning.
The linkage processing between VXLAN network loop detection and layer 2 network topology changes is realized. When the layer 2 network topology changes eliminate the VXLAN network loop, VTEP can timely release the blocking AC to ensure the successful forwarding of data packets.
Smart Images

Figure CN115604173B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to communication technology, in particular to virtual extensible local area network technology, and specifically to a link detection method and device. Background Art
[0002] VXLAN (Virtual eXtensible LAN) is a Layer 2 VPN (Virtual Private Network) technology that is used to encapsulate Layer 2 data packets in UDP packets (User Datagram Protocol) and transmit them in a Layer 3 network.
[0003] In VXLAN networking, terminals at different sites can communicate with each other through VTEP (VXLAN Tunnel End Point, EVPN protocol channel endpoint) and enter the VXLAN network. They can also communicate with each other through directly connected Layer 2 networks. VXLAN networks and Layer 2 networks may form loops, causing broadcast storms. After the VTEPs at both ends enable the loop detection function of the VXLAN network, they send loop detection messages on all ACs belonging to the VSI according to the specified loop detection interval, and then detect whether the AC that sent the loop detection message receives the loop detection message with the same VXLAN ID. If so, it is considered that there is a loop in the VXLAN network. The VTEP at the lower priority end prohibits the MAC address learning of the AC where the loop occurs and blocks data packet forwarding. After detecting a VXLAN loop, the VTEP will continue to send loop detection messages with the same VXLAN ID according to the loop detection interval. When no loop detection message with the same VXLAN ID is received through the blocked AC within a specified time greater than the loop detection interval, it is considered that the loop of the VXLAN network has been restored.
[0004] However, the problem is that the loop detection of the VXLAN network and the Layer 2 network are performed separately. When the Layer 2 network topology changes to eliminate the VXLAN network loop, the VTEP still detects the loop at a fixed loop detection interval and cannot restore the blocked AC in time, resulting in data packet forwarding failure. Summary of the invention
[0005] The purpose of the present application is to provide a link detection method and device, and to link the loop detection of the VXLAN network with the topology change of the Layer 2 network.
[0006] To achieve the above-mentioned purpose, the present application provides a link detection method, which includes receiving a Layer 2 network topology change notification message, identifying a virtual extensible local area network VXLAN instance to which an access control circuit AC that receives the Layer 2 network topology change notification message belongs; sending a VXLAN loop detection message with a local loop detection priority through each AC of the VXLAN instance; when any AC of the VXLAN instance does not receive a VXLAN loop detection message with a peer loop detection priority identifier within a specified waiting time interval, setting the AC that has blocked data message forwarding to be released and allowing MAC address learning.
[0007] To achieve the above-mentioned purpose, the present application also provides a link detection device, which includes a processor and a memory; the memory is used to store processor executable instructions; wherein the processor performs the following operations by running the processor executable instructions in the memory: identifying the virtual extensible local area network VXLAN instance to which the access control circuit AC that receives the Layer 2 network topology change notification message belongs; sending a VXLAN loop detection message with a local loop detection priority through each AC of the VXLAN instance; when any AC of the VXLAN instance does not receive the VXLAN loop detection message with a peer loop detection priority identifier within a specified waiting time interval, the AC that has blocked data message forwarding is set to be released and MAC address learning is allowed.
[0008] The beneficial effect of the present application is that the loop detection of the VXLAN network is executed in conjunction with the loop detection of the Layer 2 network. When the Layer 2 network topology changes to eliminate the VXLAN network loop, the VTEP will promptly release the blocked AC that does not cause the VXLAN network loop, thereby ensuring successful forwarding of data packets within the VXLAN network. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 A flowchart of an embodiment of a link detection method provided by the present application;
[0010] Figure 2 Application scenarios for VXLAN network loop detection provided in this application;
[0011] Figure 3 Schematic diagram of VXLAN network loop detection provided for this application;
[0012] Figure 4 A schematic diagram of an embodiment of a link detection device provided in the present application. DETAILED DESCRIPTION
[0013] The present invention will be described in detail with multiple examples shown in multiple figures. In the following detailed description, multiple specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components and circuits are not described in detail in the examples to avoid making these examples difficult to understand.
[0014] Among the terms used, the term "include" means including but not limited to; the term "contain" means including but not limited to; the terms "above", "within" and "below" are inclusive of the number; the terms "greater than" and "less than" are exclusive of the number. The term "based on" means based on at least a part thereof.
[0015] Figure 1 The link detection method embodiment provided by the present application includes:
[0016] Step 101, receiving a Layer 2 network topology change notification message;
[0017] Step 102, identifying the virtual extensible local area network VXLAN instance to which the access control circuit AC that receives the Layer 2 network topology change notification message belongs;
[0018] Step 103: Send a VXLAN loop detection message with a local loop detection priority through each AC of the VXLAN instance;
[0019] Step 104: When any AC of the VXLAN instance does not receive a VXLAN loop detection message with a peer loop detection priority identifier within a specified waiting time interval, the AC that has blocked data message forwarding is set to be released and allow MAC address learning.
[0020] Figure 1 The beneficial effect of the illustrated embodiment is that the loop detection of the VXLAN network is executed in conjunction with the Layer 2 network loop detection. When the Layer 2 network topology changes to eliminate the VXLAN network loop, the VTEP will promptly release the blocked AC that does not cause the VXLAN network loop, thereby ensuring successful forwarding of data packets within the VXLAN network. Figure 2 In the VXLAN network shown, Layer 2 network access switches 21-25 access the VXLAN network through VTEP11 and VTEP12; wherein terminals 1-3 are connected to access switch 24; terminals 4-6 are connected to switch 25, and terminals 7 and 8 are connected to switch 21.
[0021] VTEP11 and VTEP12 send VXLAN loop detection messages 211 and 212 with VXLAN instances on all ACs belonging to the VSI according to the specified loop detection interval; the loop detection priority flag bit of the TLV field carries the respective local loop detection priorities.
[0022] The VXLAN loop detection message 211 sent by VETP11 reaches VTEP12 through access switch 22 -> access switch 25 -> access switch 23.
[0023] The VXLAN loop detection message 212 sent by VETP12 reaches VTEP11 through access switch 23 -> access switch 25 -> access switch 22.
[0024] VTEP11 receives VXLAN loop detection message 212 and determines that it carries the same VXLAN ID and has a low loop detection priority. Therefore, it does not block the AC.
[0025] VTEP12 receives VXLAN loop detection message 211 and determines that it carries the same VXLAN ID and has a high loop detection priority. Figure 2 As shown, VETP11 blocks the AC connected to access switch 23 and sets MAC address learning to be prohibited.
[0026] The ARP request message broadcasted or the ARP message or the Layer 2 data message sent by terminal 1-terminal 3 in the VXLAN instance reaches VTEP12 through the AC connected to access switch 24; VTEP12 learns the MAC address table entry and the ARP table entry based on the AC connected to access switch 24.
[0027] The ARP request message broadcasted or the ARP message or the Layer 2 data message sent by the terminal 4 to the terminal 8 in the VXLAN instance reaches the VTEP 11 through the AC connected to the access switch 22 ; the VTEP 11 learns the MAC address table entry and the ARP table entry based on the AC connected to the access switch 24 .
[0028] VTEP11 sends the learned MAC address table entries and ARP table entries of Terminal 4 to Terminal 8 to VTEP12 via VXLAN IS-IS message 213 which is an address synchronization message.
[0029] VTEP12 learns the ARP entry and the MAC address entry based on the received VXLAN IS-IS message 213, and records the outbound interface of the entry as the EVPN protocol channel connected to VTEP11.
[0030] VTEP 12 sends the learned MAC address table entries and ARP table entries of terminal 1 to terminal 3 to VTEP 11 via VXLAN IS-IS message 214 which is an address synchronization message.
[0031] VTEP11 learns the ARP entry and the MAC address entry based on the received VXLAN IS-IS message 214, and records the outbound interface of the entry as the EVPN protocol channel connected to VTEP12.
[0032] like Figure 3 As shown, the link between the Layer 2 network access switches 22 and 25 fails, the topology change notification message of the access switch 22 reaches VTEP11, and the topology change notification message of the access switch 25 reaches VTEP12.
[0033] VETP11 and VETP12 immediately send VXLAN loop detection messages 311 and 312.
[0034] VETP11 and VTEP12 each delete all MAC address entries of the VXLAN instance and immediately start ARP entry resolution, that is, sending ARP request packets according to the IP addresses of the learned ARP entries.
[0035] VTEP11 does not receive the VXLAN loop detection message within a specified time interval (for example, three times the sending interval of the periodically sent VXLAN loop detection message), and does not trigger blocking processing for the AC connected to the access switch 22.
[0036] VTEP12 does not receive a VXLAN loop detection message within the specified time interval, sets the AC connected to access switch 23 to be open and allows MAC address learning, and does not trigger blocking processing for the AC connected to access switch 24.
[0037] Since the link between access switch 22 and access switch 25 is disconnected, terminal 4-8 cannot receive the ARP request message from VTEP 11. If VTEP 11 does not receive the ARP response message from terminal 4-terminal 8 within the specified aging time, it deletes the ARP table entry of terminal 4-terminal 8 that reaches the aging time, and deletes the ARP table entry of terminal 1-terminal 3.
[0038] Terminal 1-3 and terminal 4-8 receive the ARP request message from VTEP12 and send an ARP response message. According to the received ARP response message, VTEP12 updates the aging time of the ARP table entry of the IP address of terminal 1-terminal 3, updates the egress port of the ARP table entry of terminal 4-8 from the tunnel interface connected to VTEP11 to the AC connected to access switch 23, and updates the aging time.
[0039] VTEP12 sends the learned MAC address table entries and ARP table entries of terminal 4 to terminal 8 to VTEP11 via VXLAN IS-IS message 313 .
[0040] VTEP11 learns the ARP entry and the MAC address entry based on the received VXLAN IS-IS message 313, and records the outbound interface of the entry as the EVPN protocol channel connected to VTEP12.
[0041] Depend on Figure 3 It can be seen from the embodiment that when the link between access switches 22 and 25 is disconnected, there is no need to wait for VTEP11 and 12 to send VXLAN loop detection messages according to the established loop detection cycle. Instead, through the linkage between the Layer 2 network change and the VXLAN loop detection, the VXLAN loop detection is immediately started, and the blocked AC is turned on to quickly switch the traffic of the disconnected link, thereby avoiding traffic forwarding failure.
[0042] when Figure 3 When the disconnected link between access switch 22 and access switch 25 is restored, the topology change notification message of access switch 22 reaches VTEP11, and the topology change notification message of access switch 25 reaches VTEP12.
[0043] VETP11 and VETP12 immediately send VXLAN loop detection packets.
[0044] VETP11 and VTEP12 delete all MAC address entries of the VXLAN instance and immediately start ARP entry resolution.
[0045] VTEP11 receives the loop detection message from VTEP12 and determines that it carries the same VXLANID and has a lower loop detection priority. Therefore, it does not block the AC.
[0046] VTEP12 receives VXLAN loop detection message 211 and determines that it carries the same VXLAN ID and has a high loop detection priority. Figure 2 In the embodiment, VETP 11 blocks the AC connected to access switch 23 and sets MAC address learning to be prohibited.
[0047] Since the link between access switch 22 and access switch 25 is restored, terminal 4-terminal 8 receives the ARP request message from VTEP 11 and sends an ARP response message. Based on the ARP response message sent by terminal 4-terminal 8 and the MAC address table entry learned by the AC connected to access switch 22, VTEP 11 refreshes the egress port of the ARP table entry of terminal 4-terminal 8 to the AC connected to access switch 22.
[0048] Terminal 1-3 receives the ARP request message from VTEP 12 and sends an ARP response message. VTEP 12 updates the ARP aging time of the IP address of Terminal 1-Terminal 3 according to the received ARP response message.
[0049] Since VTEP12 blocks the AC connected to access switch 23 and cannot receive the ARP response message of terminal 4-terminal 8, it deletes the ARP table entry of terminal 4-terminal 8 that reaches the aging time.
[0050] Afterwards, VTEP11 sends the learned MAC address table entries and ARP table entries of Terminal 4 to Terminal 8 to VTEP12 via a VXLAN IS-IS message serving as an address synchronization message.
[0051] VTEP12 relearns the ARP table entries and MAC address table entries of terminal 4 to terminal 8 based on the received VXLAN IS-IS message, and records the outbound interface of the table entry as the EVPN protocol channel connected to VTEP11.
[0052] It can be seen that the embodiments of the present application can also quickly block the VXLAN loop caused by the change in the Layer 2 network topology through the linkage between the Layer 2 network change and the VXLAN loop detection, thereby avoiding the VXLAN broadcast storm caused by the VXLAN network loop.
[0053] Although Figure 2 and Figure 3 The embodiment is described by taking the ARP protocol of the IPv4 address as an example. The present application can also be applied to the ND protocol of the IPv6 address, and the specific process will not be repeated here.
[0054] Figure 4 A schematic diagram of a device for modifying interface cache parameters provided in the present application, wherein the device 40 at least includes: a network interface, a switching chip, a CPU, and a memory. The memory is used to store processor executable instructions; wherein the processor performs the following operations by running the processor executable instructions in the memory to identify the virtual extensible local area network VXLAN instance to which the access control circuit AC that receives the Layer 2 network topology change notification message belongs; send a VXLAN loop detection message with a local loop detection priority through each AC of the VXLAN instance; when any AC of the VXLAN instance does not receive the VXLAN loop detection message with the opposite end loop detection priority identifier within a specified waiting time interval, set the AC that has blocked data message forwarding to be released and allow MAC address learning; delete the MAC address table entry of the VXLAN instance; send a hardware address request message to the IP address belonging to the VXLAN instance; learn a new MAC address table entry according to the received hardware address response message, and update the new address mapping table entry of the IP address belonging to the VXLAN instance; delete the unupdated address mapping table entry of the VXLAN instance; send a MAC address synchronization message through an EVPN protocol channel connected to the opposite end tunnel endpoint; wherein the MAC address synchronization message carries the MAC address of the new MAC address table entry.
[0055] The processor further performs the following operations by running the processor executable instructions in the memory: receiving a new Layer 2 network topology change notification message; identifying that the AC receiving the new Layer 2 network topology change notification message belongs to the VXLAN instance; setting the AC that receives the new VXLAN loop detection message to be blocked and prohibiting MAC address learning; deleting the MAC address table entry of the VXLAN instance; sending a hardware address request message to the IP address belonging to the VXLAN instance; learning a new MAC address table entry based on the received hardware address response message, and updating the new address mapping table entry of the IP address belonging to the VXLAN instance; deleting the unupdated address mapping table entry of the VXLAN instance; and learning the MAC address table entry whose output interface is the EVPN protocol channel based on the MAC address synchronization message arriving from the EVPN protocol channel connected to the peer tunnel endpoint.
[0056] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A link detection method, characterized in that: The method comprises, Receive Layer 2 network topology change notification messages; Identify the virtual extensible local area network VXLAN instance to which the access control circuit AC that receives the layer 2 network topology change notification message belongs; Sending a VXLAN loop detection message with a local loop detection priority through each AC of the VXLAN instance; When any AC of the VXLAN instance does not receive a VXLAN loop detection message with a peer loop detection priority identifier within a specified waiting time interval, the AC that has blocked data message forwarding is set to be released and MAC address learning is allowed.
2. The method according to claim 1, characterized in that The method further comprises, Deleting the MAC address entry of the VXLAN instance; Sending a hardware address request message to the IP address belonging to the VXLAN instance; Learning a new MAC address table entry according to the received hardware address response message, and updating a new address mapping table entry of the IP address belonging to the VXLAN instance; Delete the unupdated address mapping table entries of the VXLAN instance.
3. The method according to claim 2, characterized in that The method further comprises, A MAC address synchronization message is sent through an EVPN protocol channel connected to a peer tunnel endpoint; wherein the MAC address synchronization message carries the MAC address of the new MAC address table entry.
4. The method according to claim 1, characterized in that: The method further comprises, Receive new Layer 2 network topology change notification messages; Identify that the AC receiving the new Layer 2 network topology change notification message belongs to the VXLAN instance; The AC that receives the new VXLAN loop detection message is set to block and prohibit MAC address learning.
5. The method according to claim 4, characterized in that The method further comprises, Deleting the MAC address entry of the VXLAN instance; Sending a hardware address request message to the IP address belonging to the VXLAN instance; Learning a new MAC address table entry according to the received hardware address response message, and updating a new address mapping table entry of the IP address belonging to the VXLAN instance; Deleting the unupdated address mapping table entries of the VXLAN instance; Based on a MAC address synchronization message arriving at an EVPN protocol channel connected to a peer tunnel endpoint, a MAC address table entry whose outgoing interface is the EVPN protocol channel is learned.
6. A loop detection device, characterized in that: The device includes a processor and a memory; the memory is used to store processor-executable instructions; wherein the processor executes the processor-executable instructions in the memory to perform the following operations: Identify the virtual extensible local area network VXLAN instance to which the access control circuit AC that receives the Layer 2 network topology change notification message belongs; Sending a VXLAN loop detection message with a local loop detection priority through each AC of the VXLAN instance; When any AC of the VXLAN instance does not receive a VXLAN loop detection message with a peer loop detection priority identifier within a specified waiting time interval, the AC that has blocked data message forwarding is set to be released and MAC address learning is allowed.
7. The device according to claim 6, characterized in that The processor further performs the following operations by executing the processor executable instructions in the memory: Deleting the MAC address entry of the VXLAN instance; Sending a hardware address request message to the IP address belonging to the VXLAN instance; Learning a new MAC address table entry according to the received hardware address response message, and updating a new address mapping table entry of the IP address belonging to the VXLAN instance; Delete the unupdated address mapping table entries of the VXLAN instance.
8. The device according to claim 7, characterized in that The processor further performs the following operations by executing the processor executable instructions in the memory: A MAC address synchronization message is sent through an EVPN protocol channel connected to a peer tunnel endpoint; wherein the MAC address synchronization message carries the MAC address of the new MAC address table entry.
9. The device according to claim 6, characterized in that The processor further performs the following operations by executing the processor executable instructions in the memory: Receive new Layer 2 network topology change notification messages; Identify that the AC receiving the new Layer 2 network topology change notification message belongs to the VXLAN instance; The AC that receives the new VXLAN loop detection message is set to block and prohibit MAC address learning.
10. The device according to claim 9, characterized in that The processor further performs the following operations by executing the processor executable instructions in the memory: Deleting the MAC address entry of the VXLAN instance; Sending a hardware address request message to the IP address belonging to the VXLAN instance; Learning a new MAC address table entry according to the received hardware address response message, and updating a new address mapping table entry of the IP address belonging to the VXLAN instance; Deleting the unupdated address mapping table entries of the VXLAN instance; Based on a MAC address synchronization message arriving at an EVPN protocol channel connected to a peer tunnel endpoint, a MAC address table entry whose outgoing interface is the EVPN protocol channel is learned.
Citation Information
Patent Citations
Loop fault processing method, and switch
CN108156014A
Loop detection method and device and readable storage medium
CN112491688A