Link fault processing method and device, Leaf equipment and storage medium
By the DOWN logic of the DOWN logic on the Leaf device as Pre_DOWN and DOWN, ensure that the traffic is switched first and then DOWN, which solves the problem of losing the packet when the peer-link link failure in the MLAG system, and realizes the maximum of the largest packet loss. Keep system stability limit.
Patent Information
- Application Number
- CN202310938303.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-27
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2043-07-27
AI Technical Summary
In the MLAG dual active system, when the peer-link link between the Leaf1 device and the Leaf2 device fails, packet loss in the uplink and downlink is caused. It is difficult for the prior art to maintain the system stability to the maximum extent without packet loss.
By the logic of the DOWN DOWN on the Leaf device, the logic of the port is Pre_down and DOWN, first exit the port from the distribution logic, and then DOWN from the chip level to ensure that the flow is switched first and then DOWN to avoid packet loss. At the same time, first process the port of Spine devices and CE devices, and then process the port of the LeAF device to avoid packet loss due to the existence of time difference.
Effectively avoid the packet loss when the Peer-Link link failure, significantly enhances the performance of the MLAG dual-return access to the link failure in the link in the vxlan network scene, and ensure the stability of the system under the fault.
Smart Images

Figure CN119383130A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a link failure processing method, apparatus, Leaf device, and storage medium. Background Art
[0002] With the development of computer networks, data traffic in data center networks is increasing, and the requirements for data reliability are also getting higher and higher. Active-active systems have become an increasingly common technology, and MLAG (Multi-chassis Link Aggregation) is one of the protocols that combines two devices into an active-active system.
[0003] like Figure 1 As shown in the figure, MLAG is deployed between Leaf1 and Leaf2 to improve the service reliability of CE (Customer Edge) devices to the device level. CE devices can be switches or servers. That is, Leaf1 and Leaf2 are two devices that make up MLAG, which are interconnected through peer-link. CE devices, as pure Layer 2 access devices, access the two MLAG devices through AP (Aggregate Port). The northbound direction of MLAG is connected to the Spine device through VXLAN (Virtual eXtensible Local Area Network).
[0004] In the above scenario, when the peer-link between Leaf1 and Leaf2 fails, the user hopes to maintain system stability to the greatest extent possible, that is, to reduce or even eliminate packet loss in the uplink and downlink. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a link failure processing method, apparatus, Leaf device and storage medium, so as to solve the problem of uplink and downlink packet loss when the peer-link between Leaf1 device and Leaf2 device fails.
[0006] In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0007] In a first aspect, an embodiment of the present application provides a link failure processing method, which is applied to a slave Leaf device in a cross-device link aggregation group MLAG, wherein the MLAG also includes a master Leaf device, wherein the master Leaf device and the slave Leaf device are connected via a peer-link peer-link, wherein the slave Leaf device is connected to a third port of a Spine device via a first port, and is connected to a fourth port of a CE device via a second port; the method includes:
[0008] When a peer-link fails, a port pre-notification message is sent to the Spine device and the CE device respectively, wherein the port pre-notification message is used to instruct the third port and the fourth port to exit from the packet sending logic;
[0009] Respectively receive response messages returned by the Spine device and the CE device, and withdraw the first port and the second port from the packet sending logic;
[0010] Sending a port negotiation message to the Spine device and the CE device respectively, wherein the port negotiation message is used to instruct to set the third port and the fourth port to a DOWN state;
[0011] The first port and the second port are set to a DOWN state.
[0012] Optionally, after the step of respectively receiving response messages returned by the Spine device and the CE device and exiting the first port and the second port from the packet sending logic and before the step of respectively sending port negotiation messages to the Spine device and the CE device, the method further includes:
[0013] Confirm that both the first port and the second port exit the packet sending logic.
[0014] Optionally, the first port of the slave Leaf device is connected to the third port of the Spine device through a VXLAN tunnel, and both the slave Leaf device and the Spine device include a convergence module and a VXLAN module;
[0015] When a peer-link fails, the step of sending a port pre-notification message to the spine device includes:
[0016] When the peer-link fails, the aggregation module of the Leaf device sends the port pre-notification message to the aggregation module of the Spine device, so that the aggregation module of the Spine device notifies the VXLAN module of the Spine device to withdraw the third port from the packet sending logic;
[0017] The step of receiving a response message returned by the Spine device and withdrawing the first port from the packet sending logic includes:
[0018] The aggregation module of the slave Leaf device receives the response message returned by the aggregation module of the Spine device, and notifies the VXLAN module of the slave Leaf device to withdraw the first port from the packet sending logic;
[0019] The step of sending a port negotiation message to the Spine device includes:
[0020] The aggregation module of the slave Leaf device sends the port negotiation message to the aggregation module of the Spine device, so that the aggregation module of the Spine device sets the third port to a DOWN state;
[0021] The step of setting the first port to a DOWN state comprises:
[0022] The aggregation module of the slave Leaf device sets the first port to a DOWN state.
[0023] Optionally, both the slave Leaf device and the CE device include a convergence module;
[0024] When a peer-link fails, the step of sending a port pre-notification message to the CE device includes:
[0025] When the peer-link fails, the aggregation module of the slave Leaf device sends the port pre-notification message to the aggregation module of the CE device, so that the aggregation module of the CE device withdraws the fourth port from the packet sending logic;
[0026] The step of receiving a response message returned by the CE device and withdrawing the second port from the packet sending logic includes:
[0027] The aggregation module of the slave Leaf device receives the response message returned by the aggregation module of the CE device, and withdraws the second port from the packet sending logic;
[0028] The step of sending a port negotiation message to the CE device includes:
[0029] The aggregation module of the slave Leaf device sends the port negotiation message to the aggregation module of the CE device, so that the aggregation module of the CE device sets the fourth port to a DOWN state;
[0030] The step of setting the second port to a DOWN state comprises:
[0031] The aggregation module of the slave Leaf device sets the second port to a DOWN state.
[0032] Optionally, there are multiple CE devices, there are multiple second ports, and the multiple second ports of the slave Leaf device are connected to the fourth ports of the multiple CE devices in a one-to-one correspondence;
[0033] The step of receiving a response message returned by the CE device and withdrawing the second port from the packet sending logic includes:
[0034] After receiving the response message returned by each of the CE devices, the second port associated with the fourth port of each of the CE devices is simultaneously withdrawn from the packet sending logic.
[0035] Optionally, after the step of sending a port pre-notification message to the Spine device and the CE device respectively when the peer-link fails, the method further includes:
[0036] Triggering a timeout mechanism after sending the port pre-notification message to the Spine device and the CE device;
[0037] If the response message returned by the Spine device is not received within the set time, directly executing the step of sending the port negotiation message to the Spine device;
[0038] If the response message returned by the CE device is not received within the set time period, the step of directly sending the port negotiation message to the CE device is performed.
[0039] In a second aspect, an embodiment of the present application further provides a link fault processing device, which is applied to a slave Leaf device in a cross-device link aggregation group MLAG, wherein the MLAG also includes a master Leaf device, wherein the master Leaf device and the slave Leaf device are connected via a peer-link, wherein the slave Leaf device is connected to a third port of a Spine device via a first port, and is connected to a fourth port of a CE device via a second port; the device includes an aggregation module;
[0040] The aggregation module is used to send a port pre-notification message to the Spine device and the CE device respectively when a peer-link link fails, and the port pre-notification message is used to instruct the third port and the fourth port to exit from the packet sending logic;
[0041] The aggregation module is further used to receive response messages returned by the Spine device and the CE device respectively, and withdraw the first port and the second port from the packet sending logic;
[0042] The aggregation module is further used to send a port negotiation message to the Spine device and the CE device respectively, wherein the port negotiation message is used to instruct to set the third port and the fourth port to a DOWN state;
[0043] The aggregation module is further configured to set the first port and the second port to a DOWN state.
[0044] Optionally, the aggregation module is further used to confirm that both the first port and the second port exit the packet sending logic.
[0045] In a third aspect, an embodiment of the present application further provides a Leaf device, including a processor and a memory, wherein the memory is used to store a program, and the processor is used to implement the link failure handling method in the first aspect when executing the program.
[0046] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the link failure handling method in the first aspect described above is implemented.
[0047] Compared with the prior art, the embodiments of the present application provide a link fault processing method, apparatus, Leaf device and storage medium. When a slave Leaf device in MLAG senses a peer-link link failure, it first sends a port pre-notification message to the Spine device and the CE device respectively, instructing the third port and the fourth port to withdraw from the packet sending logic. After that, when receiving the response messages returned by the Spine device and the CE device respectively, the first port and the second port are withdrawn from the packet sending logic. Then, a port negotiation message is sent to the Spine device and the CE device respectively, instructing the third port and the fourth port to be set to the DOWN state, and then the first port and the second port are set to the DOWN state. That is, on the one hand, the port DOWN (disconnection) logic is split into PRE_DOWN and DOWN parts. The port is first withdrawn from the packet sending logic, and then the port is DOWNed at the chip level, so that the traffic is switched to the port first and then DOWNed, which can effectively avoid packet loss. On the other hand, the ports of the Spine device and CE device are processed first, and then the ports of the Leaf device are processed, avoiding packet loss due to time difference in the uplink and downlink links. This significantly improves the performance of packet loss when the peer-link fails in the MLAG dual-homing access VXLAN network scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A schematic diagram of an MLAG application scenario provided by an embodiment of the present application is shown Figure 1 .
[0049] Figure 2 A schematic diagram showing a process of a link failure processing method provided by an embodiment of the present application Figure 1 .
[0050] Figure 3 A schematic diagram showing a process of a link failure processing method provided by an embodiment of the present application Figure 2 .
[0051] Figure 4 A signaling interaction diagram of a link failure processing method provided in an embodiment of the present application is shown.
[0052] Figure 5 A schematic diagram of an MLAG application scenario provided by an embodiment of the present application is shown Figure 2 .
[0053] Figure 6 A block diagram of a link failure processing device provided in an embodiment of the present application is shown.
[0054] Figure 7 A block diagram of a Leaf device provided in an embodiment of the present application is shown.
[0055] Icon: 100 - link fault processing device; 101 - aggregation module; 102 - VXLAN module; 10 - Leaf device; 11 - processor; 12 - memory; 13 - bus. DETAILED DESCRIPTION
[0056] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present application.
[0057] like Figure 1 As shown in the figure, in the MLAG dual-homing VXLAN network scenario, Leaf1 is the master Leaf device in MLAG, and Leaf2 is the slave Leaf device in MLAG. Leaf1 and Leaf2 are connected through a peer-link link, and Leaf2 is connected to the third port (port 3) of the Spine device through the first port (port 1), and to the fourth port (port 4) of the CE device through the second port (port 2).
[0058] When the peer-link between Leaf1 and Leaf2 fails, Leaf1 and Leaf2 cannot forward traffic at the same time. If they do, broadcast storms and MAC drift may occur. Therefore, Leaf2 needs to set all physical interfaces except the peer-link port, stack port, and management network port to DOWN state so that traffic is forwarded only from Leaf1.
[0059] That is, when the peer-link fails, the MLAG protocol on the Leaf2 device needs to DOWN port 1 and port 2 according to the existing mechanism.
[0060] However, if port 1 of Leaf2 is DOWN, the Spine device may still send packets to Leaf2 through port 3, causing packet loss on port 1 of Leaf2. Similarly, if port 2 of Leaf2 is DOWN, the CE device may still send packets to Leaf2 through port 4, causing packet loss on port 2 of Leaf2.
[0061] In general, since there is a time difference from port 1 DOWN to port 3 DOWN, and similarly there is a time difference from port 2 DOWN to port 4 DOWN, there is a small amount of packet loss in the upstream traffic (port 4 → port 2) and a small amount of packet loss in the downstream traffic (port 3 → port 1).
[0062] In the prior art, a fast port DOWN mechanism is adopted. Taking port 1 and port 3 as an example, when port 1 of Leaf2 device goes down, LACP (Link Aggregation Control Protocol) is immediately sent to trigger port 3 DOWN of the opposite device SPNE1, so that the time interval between ports 3 and 1 DOWN is short, thereby reducing packet loss to within 50ms. However, packet loss still exists from port 3 to port 1 and from port 4 to port 2.
[0063] Therefore, in order to address the packet loss problem caused by the time difference from port 1 DOWN to port 3 DOWN and the time difference from port 2 DOWN to port 4 DOWN, the embodiment of the present application splits the port DOWN logic into two parts, PRE_DOWN and DOWN. The port is first withdrawn from the packet sending logic, and then the port is DOWNed at the chip level. In this way, the traffic is first switched to the port and then DOWNed, which can effectively avoid packet loss. At the same time, the ports of the Spine device and the CE device are processed first, and then the ports of the Leaf device are processed, avoiding packet loss in the uplink and downlink links due to the time difference, thereby significantly improving the performance problem of packet loss when the peer-link fails in the MLAG dual-homing access VXLAN network scenario.
[0064] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0065] The CE device in this embodiment may be a switch or a server. The following embodiment is described by taking a switch as an example.
[0066] Please refer to Figure 2 , Figure 2A schematic diagram of a link fault processing method provided in an embodiment of the present application is shown. The link fault processing method is applied to Figure 1 The Leaf2 device in the example may include the following steps:
[0067] S101, when the peer_link fails, a port pre-notification message is sent to the Spine device and the CE device, and the port pre-notification message is used to instruct the third port and the fourth port to withdraw from the packet sending logic.
[0068] In this embodiment, when the peer_link fails, the Leaf2 device sends port pre-notification messages to the Spine device and the CE device through port 1 and port 2 respectively. The port pre-notification message sent to the Spine device is used to instruct the Spine device to withdraw port 3 from the packet sending logic, and the port pre-notification message sent to the CE device is used to instruct the CE device to withdraw port 4 from the packet sending logic.
[0069] S103, receiving response messages returned by the Spine device and the CE device respectively, and withdrawing the first port and the second port from the packet sending logic.
[0070] In this embodiment, the Leaf2 device receives the response message returned by the Spine device and withdraws port 1 from the packet sending logic; the Leaf2 device receives the response message returned by the CE device and withdraws port 2 from the packet sending logic.
[0071] S105 , sending a port negotiation message to the Spine device and the CE device respectively, where the port negotiation message is used to instruct to set the third port and the fourth port to a DOWN state.
[0072] In this embodiment, the Leaf2 device receives the response message returned by the Spine device, and after withdrawing port 1 from the packet sending logic, the Leaf2 device sends a port negotiation message to the Spine device, and the port negotiation message is used to instruct the Spine device to set port 3 to the DOWN state. The Leaf2 device receives the response message returned by the CE device, and after withdrawing port 2 from the packet sending logic, it sends a port negotiation message to the CE device, and the port negotiation message is used to instruct the CE device to set port 4 to the DOWN state.
[0073] S107, setting the first port and the second port to a DOWN state.
[0074] In this embodiment, after the Spine device receives the port pre-notification message sent by the Leaf2 device, it withdraws port 3 from the packet sending logic, and then returns a response message to the Leaf2 device. After receiving the response message, the Leaf2 device withdraws port 1 from the packet sending logic.
[0075] After port 1 exits the packet sending logic, Leaf 2 sends a port negotiation message to the Spine device. After receiving the port negotiation message, the Spine device DOWNs port 3 and then returns a response message to Leaf 2. After receiving the response message, Leaf 2 DOWNs port 1.
[0076] In this embodiment, when the peer_link fails, the Leaf2 device first notifies the Spine device to withdraw port 3 from the packet sending logic, and then withdraws its own port 1 from the packet sending logic. After that, the Leaf2 device first notifies the Spine device to DOWN port 3, and then DOWN its own port 1. In this way, the port 3 of the Spine device is processed first, and then the port 1 of the Leaf2 device is processed, and the traffic is switched first and then the port is DOWNed, which can avoid the problem of packet loss of downstream traffic (port 3→port 1).
[0077] In this embodiment, after the CE device receives the port pre-notification message sent by the Leaf2 device, it withdraws port 4 from the packet sending logic, and then returns a response message to the Leaf2 device. After receiving the response message, the Leaf2 device withdraws port 2 from the packet sending logic.
[0078] After port 2 exits the packet sending logic, Leaf2 sends a port negotiation message to the CE. After receiving the port negotiation message, the CE turns port 4 DOWN and then returns a response message to Leaf2. After receiving the response message, Leaf2 turns port 2 DOWN.
[0079] In this embodiment, when the peer_link fails, the Leaf2 device first notifies the CE device to withdraw port 4 from the packet sending logic, and then withdraws its own port 2 from the packet sending logic. After that, the Leaf2 device first notifies the CE device to DOWN port 4, and then DOWN its own port 2. In this way, the port 4 of the CE device is processed first, and then the port 2 of the Leaf2 device is processed, and the traffic is switched first and then the port is DOWNed, which can avoid the problem of upstream traffic (port 4→port 2) packet loss.
[0080] As can be seen from the above content, when the peer_link link fails, for downstream traffic (port 3→port 1), the Leaf2 device first notifies the Spine device to withdraw port 3 from the packet sending logic, and then withdraws its own port 1 from the packet sending logic. After completing the port switching of the traffic, the Leaf2 device first notifies the Spine device to DOWN port 3, and then DOWN its own port 1, which can effectively avoid the loss of downstream traffic. For upstream traffic (port 4→port 2), the Leaf2 device first notifies the CE device to withdraw port 4 from the packet sending logic, and then withdraws its own port 2 from the packet sending logic. After completing the port switching of the traffic, the Leaf2 device first notifies the CE device to DOWN port 4, and then DOWN its own port 2, which can effectively avoid the loss of upstream traffic.
[0081] In one possible scenario, Figure 1 As shown in the figure, in addition to the time difference between port 1 DOWN and port 3 DOWN, and the time difference between port 2 DOWN and port 4 DOWN, there may also be a time difference between port 3 and port 4 DOWN due to equipment differences, resulting in a small amount of packet loss in the upstream traffic (port 4 → port 2 → port 1 → port 3) and the downstream traffic (port 3 → port 1 → port 2 → port 4). Obviously, the existing port fast DOWN mechanism cannot improve the packet loss caused by the time difference between port 3 and port 4 DOWN.
[0082] In order to address the packet loss problem caused by the time difference between port 3 and port 4 being DOWN, the embodiment of the present application can, after confirming that port 3 of the Spine device and port 4 of the CE device have exited the packet sending logic, instruct the Spine device to set port 3 to the DOWN state and instruct the CE device to set port 4 to the DOWN state. In this way, when port 3 of the Spine device and port 4 of the CE device no longer send packets, the ports are DOWNed, which can effectively avoid packet loss caused by the time difference between port 3 and port 4 being DOWN.
[0083] Therefore, in Figure 2 Based on Figure 3 , after step S103 and before step S105, the link failure processing method applied to the Leaf2 device provided in the embodiment of the present application may further include step S104.
[0084] S104, confirming that both the first port and the second port exit the packet sending logic.
[0085] In this embodiment, when the peer_link link fails, the Leaf2 device sends port pre-notification messages to the Spine device and the CE device through port 1 and port 2 respectively to instruct the Spine device to withdraw port 3 from the packet sending logic and to instruct the CE device to withdraw port 4 from the packet sending logic. Afterwards, after receiving the response message returned by the Spine device, port 1 is withdrawn from the packet sending logic, and after receiving the response message returned by the CE device, port 2 is withdrawn from the packet sending logic.
[0086] After port 1 and port 2 exit the packet sending logic, it is confirmed that port 3 of the Spine device and port 4 of the CE device are no longer sending packets. At this time, the port negotiation message is sent to the Spine device and the CE device. After receiving the port negotiation message, the Spine device DOWNs port 3 and returns a response message to the Leaf2 device; after receiving the port negotiation message, the CE device DOWNs port 4 and returns a response message to the Leaf2 device. After receiving the response messages returned by the Spine device and the CE device, the Leaf2 device confirms that the Spine device and the CE device have both DOWNed their ports, and then DOWNs its own port 1 and port 2.
[0087] In this way, when the peer_link fails, the Leaf2 device first notifies the Spine device to withdraw port 3 from the packet sending logic, the CE device to withdraw port 4 from the packet sending logic, and then withdraws its own port 1 and port 2 from the packet sending logic. After confirming that the Spine device and the CE device have completed the port switching of the traffic and will no longer send packets, the Leaf2 device first notifies the Spine device to DOWN port 3 and the CE device to DOWN port 4, and then DOWN its own port 1 and port 2. This can not only avoid packet loss for downstream traffic (port 3 → port 1) and upstream traffic (port 4 → port 2), but also avoid packet loss for upstream traffic (port 4 → port 2 → port 1 → port 3) and downstream traffic (port 3 → port 1 → port 2 → port 4).
[0088] From the above content, it can be seen that compared with the existing port fast DOWN mechanism, the embodiment of the present application splits the port DOWN logic into two parts: PRE_DOWN and DOWN. For the PRE_DOWN part, it is necessary to set up a convergence module (also called LAC module) on the Leaf2 device, Spine device and CE device. At the same time, by modifying the tail 2-bit reserved field of the LAC protocol, the port pre-notification message and the response message are added to realize the port switching of the traffic. The convergence module provides an interface sent by the designated convergence port, which can receive and process the port pre-notification message and the response message. The following is a detailed description.
[0089] In one possible implementation, Figure 1As shown in the figure, for the Spine device, the first port (port 1) of the Leaf2 device is connected to the third port (port 3) of the Spine device through a VXLAN tunnel. Both the Spine device and the Leaf2 device include a convergence module and a VXLAN module. Figure 4 , the link failure processing process is as follows:
[0090] S1. When the aggregation module of Leaf2 detects a peer_link failure, it sends a port pre-notification message to the aggregation module of Spine device.
[0091] S21. After receiving the port pre-notification message, the aggregation module of the Spine device notifies the notification event of port 3. The VXLAN module of the Spine device responds to the notification event and withdraws port 3 from the packet sending logic. After that, the aggregation module of the Spine device returns a response message to the aggregation module of the Leaf2 device.
[0092] S22. After receiving the response message, the aggregation module of Leaf2 device notifies the notification event of port 1. The VXLAN module of Leaf2 device responds to the notification event and withdraws port 1 from the packet sending logic.
[0093] S23, the aggregation module of Leaf2 device sends the port negotiation message to the aggregation module of Spine device;
[0094] S24, after receiving the port negotiation message, the aggregation module of the Spine device DOWNs port 3 and then returns a response message to the aggregation module of the Leaf2 device;
[0095] After receiving the response message, the aggregation module of S4 and Leaf2 switches port 1 to DOWN.
[0096] In another possible implementation, Figure 1 As shown in FIG. 1 , for the CE device, the second port (port 2) of the Leaf2 device is connected to the fourth port (port 4) of the CE device, and both the CE device and the Leaf2 device include a convergence module. Therefore, please continue to refer to Figure 4 , the link failure processing process is as follows:
[0097] S1. When the aggregation module of the Leaf2 device senses a peer_link failure, it sends a port pre-notification message to the aggregation module of the CE device;
[0098] S31, after receiving the port pre-notification message, the aggregation module of the CE device withdraws port 4 from the packet sending logic, and then returns a response message to the aggregation module of the Leaf2 device;
[0099] After receiving the response message, the aggregation module of S32 and Leaf2 devices withdraws port 2 from the packet sending logic;
[0100] S33, the aggregation module of the Leaf2 device sends a port negotiation message to the aggregation module of the CE device;
[0101] S34. After receiving the port negotiation message, the aggregation module of the CE device sets port 4 to DOWN, and then returns a DOWN response message to the aggregation module of the Leaf2 device.
[0102] After receiving the response message, the aggregation module of S4 and Leaf2 switches port 2 to DOWN.
[0103] The above process is Figure 2 The underlying implementation of the link fault handling method shown is for Figure 3 The underlying implementation of the link fault handling method shown in Figure 4 As shown, Sa is also included after S22 and S32, that is, after confirming that port 1 and port 2 have exited the packet sending logic, the aggregation module of the Leaf2 device sends the port negotiation message to the aggregation module of the Spine device and the aggregation module of the CE device, and then the aggregation module of the Leaf2 device DOWNs port 1 and port 2.
[0104] In practice, Figure 5 As shown, there may be multiple CE devices, and multiple second ports (port 2) of Leaf2 devices are connected to the fourth ports (port 4) of multiple CE devices in a one-to-one correspondence. In this case, the multiple second ports can be managed as a group.
[0105] Therefore, for this scenario, the process of receiving the response message returned by the CE device in step S103 and withdrawing the second port from the packet sending logic may include:
[0106] After receiving the response message returned by each CE device, the second port associated with the fourth port of each CE device is simultaneously withdrawn from the packet sending logic.
[0107] That is, if Figure 5 As shown, when the peer_link fails, the Leaf2 device simultaneously sends a port pre-notification message to each CE device through each port 2, instructing each CE device to withdraw its respective port 4 from the packet sending logic. After that, the Leaf2 device will successively receive the response message returned by each CE device. After confirming the receipt of the response message returned by each CE device, all ports 4 will be withdrawn from the packet sending logic at the same time, thereby realizing unified management of multiple second ports.
[0108] In this embodiment, for the scenario of DOWNing the port when port 3 of the Spine device and port 4 of the CE device no longer send packets, and unified management of multiple second ports, the Leaf2 device may also include a registration module (also called an MLAG module).
[0109] In the scenario where port 3 of the spine device and port 4 of the CE device are no longer sending packets and then the ports are down, Figure 4 After receiving the response message returned by the Spine device or CE device, the aggregation module of the Leaf2 device will notify the registration module of the response message. After confirming that it has received the response message from the Spine device and the CE device, the registration module will trigger the aggregation module of the Leaf2 device to send a port negotiation message to the Spine device and the CE device.
[0110] For the scenario of unified management of multiple second ports, combined with Figure 4 After receiving the response message returned by the CE device, the aggregation module of the Leaf2 device will notify the registration module of the response message. After confirming that the registration module has received the response message returned by each CE device, it triggers the aggregation module to exit all ports 4 from the packet sending logic at the same time.
[0111] In one possible scenario, the Spine device and CE device may not support the PRE_DOWN function, causing the Leaf2 device to be in a state of waiting for a response message. Based on this, this embodiment adds a timeout mechanism for sending port pre-notification messages to the Spine device and CE device. If the Spine device or CE device does not support the PRE_DOWN function, the Leaf2 device will directly execute the subsequent DOWN process.
[0112] Therefore, after step S101, the link failure processing method provided in the embodiment of the present application further includes steps S10A to S10B.
[0113] S10A, triggers the timeout mechanism after sending the port pre-notification message to the spine device and CE device.
[0114] S10B: Check whether the response messages returned by the Spine device and the CE device are received within the set time.
[0115] If a response message is received from the Spine device within the set time, the first port is withdrawn from the packet sending logic, and then a port negotiation message is sent to the Spine device to instruct the Spine device to set the third port to the DOWN state, and then the first port is set to the DOWN state. If a response message is not received from the Spine device within the set time, a port negotiation message is directly sent to the Spine device to instruct the Spine device to set the third port to the DOWN state, and then the first port is set to the DOWN state.
[0116] If a response message returned by the CE device is received within the set time, the second port is withdrawn from the packet sending logic, and then a port negotiation message is sent to the CE device to instruct the CE device to set the fourth port to the DOWN state, and then set the second port to the DOWN state. If a response message returned by the CE device is not received within the set time, a port negotiation message is directly sent to the CE device to instruct the CE device to set the fourth port to the DOWN state, and then set the second port to the DOWN state.
[0117] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0118] First, to address the packet loss problem caused by the time difference from port 1 DOWN to port 3 DOWN and from port 2 DOWN to port 4 DOWN, the port DOWN logic is split into PRE_DOWN and DOWN parts. First, the port is withdrawn from the packet sending logic, and then the port is DOWNed at the chip level. In this way, the traffic is switched to the port first and then DOWNed, which can effectively avoid packet loss. At the same time, the ports of the Spine device and the CE device are processed first, and then the ports of the Leaf2 device are processed, avoiding packet loss in the uplink and downlink due to the time difference.
[0119] Secondly, to address the packet loss problem caused by the time difference between port 3 and port 4 being DOWN, after confirming that port 3 of the Spine device and port 4 of the CE device have exited the packet sending logic, instruct the Spine device to set port 3 and the CE device to set port 4 to DOWN state. In this way, when port 3 of the Spine device and port 4 of the CE device no longer send packets, DOWN the ports, which can effectively avoid packet loss caused by the time difference between port 3 and port 4 being DOWN.
[0120] Third, for a scenario with multiple CE devices, after confirming receipt of a response message returned by each CE device, all ports 4 are simultaneously withdrawn from the packet sending logic, thereby achieving unified management of multiple second ports.
[0121] Fourth, add a timeout mechanism for sending port pre-notification messages to Spine devices and CE devices. If the Spine device or CE device does not support the PRE_DOWN function, the Leaf2 device will directly execute the subsequent DOWN process to avoid waiting.
[0122] Fifth, by extending the LAC protocol message, new message types are added, namely, port pre-notification message and response message, so as to associate the unrelated states "DOWN" and "outbound forwarding" of the ports in the system, and combine the two into two linked states through the newly added LAC message type.
[0123] Sixth, to adapt to the differences between north and south devices in the MLAG scenario, the forwarding logic of the SPINE device and the CE device is indirectly associated through the upper and lower ports of the MLAG device. When port 3 of the Spine device and port 4 of the CE device no longer send packets, the ports are DOWNed, thereby achieving zero packet loss when the peer-link fails.
[0124] In order to execute the corresponding steps in the above method embodiment and various possible implementation modes, an implementation mode of a link failure processing device is provided below.
[0125] Please refer to Figure 6 , Figure 6 FIG. 1 is a block diagram of a link fault processing device 100 provided in an embodiment of the present application. The link fault processing device 100 is applied to Figure 1 The Leaf2 device includes a convergence module 101.
[0126] The aggregation module 101 is used to send a port pre-notification message to the Spine device and the CE device respectively when the peer_link link fails. The port pre-notification message is used to instruct the third port and the fourth port to withdraw from the packet sending logic.
[0127] The aggregation module 101 is also used to receive response messages returned by the Spine device and the CE device respectively, and withdraw the first port and the second port from the packet sending logic.
[0128] The aggregation module 101 is further used to send port negotiation messages to the Spine device and the CE device respectively, where the port negotiation messages are used to instruct to set the third port and the fourth port to the DOWN state.
[0129] The aggregation module 101 is further configured to set the first port and the second port to a DOWN state.
[0130] Optionally, the aggregation module 101 is further configured to confirm that both the first port and the second port exit the packet sending logic.
[0131] Optionally, the first port of the Leaf2 device is connected to the second port of the Spine device through a VXLAN tunnel, and the link failure processing apparatus 100 further includes a VXLAN module 102;
[0132] The aggregation module 101 is also used for:
[0133] When the peer-link fails, a port pre-notification message is sent to the aggregation module of the Spine device, so that the aggregation module of the Spine device notifies the VXLAN module 102 of the Spine device to withdraw the third port from the packet sending logic;
[0134] Receive a response message returned by the aggregation module of the Spine device, and notify the VXLAN module 102 to withdraw the first port from the packet sending logic;
[0135] Send a port negotiation message to the aggregation module of the Spine device, so that the aggregation module of the Spine device sets the third port to the DOWN state;
[0136] Set the first port to the DOWN state.
[0137] Optionally, the aggregation module 101 is further configured to:
[0138] When the peer-link fails, a port pre-notification message is sent to the aggregation module of the CE device, so that the aggregation module of the CE device withdraws the fourth port from the packet sending logic;
[0139] Receive a response message returned by the aggregation module of the CE device, and withdraw the second port from the packet sending logic;
[0140] Sending a port negotiation message to the aggregation module of the CE device, so that the aggregation module of the CE device sets the fourth port to a DOWN state;
[0141] Set the second port to the DOWN state.
[0142] Optionally, there are multiple CE devices, and multiple second ports of the Leaf2 device are connected to the fourth ports of the multiple CE devices in a one-to-one correspondence;
[0143] The aggregation module 101 executes the receiving of the response message returned by the CE device and withdraws the second port from the packet sending logic, including:
[0144] After receiving the response message returned by each CE device, the second port associated with the fourth port of each CE device is simultaneously withdrawn from the packet sending logic.
[0145] Optionally, the aggregation module 101 is further configured to:
[0146] The timeout mechanism is triggered after sending the port pre-notification message to the Spine device and CE device;
[0147] If the response message returned by the Spine device is not received within the set time, the step of sending the port negotiation message to the Spine device is directly executed;
[0148] If no response message returned by the CE device is received within the set time, the step of directly sending the port negotiation message to the CE device is performed.
[0149] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the link fault processing device 100 described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0150] Please refer to Figure 7 , Figure 7 A block diagram of a Leaf device 10 provided in an embodiment of the present application is shown. The Leaf device 10 is Figure 1 The Leaf2 device in the figure. The Leaf device 10 includes a processor 11, a memory 12 and a bus 13, and the processor 11 is connected to the memory 12 via the bus 13.
[0151] The memory 12 is used to store programs. After receiving the execution instruction, the processor 11 executes the program to implement the link failure processing method disclosed in the above embodiment.
[0152] The memory 12 may include a high-speed random access memory (RAM) and may also include a non-volatile memory (NVM).
[0153] The processor 11 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 11 or an instruction in the form of software. The above processor 11 may be a general processor, including a central processing unit (CPU), a microcontroller unit (MCU), a complex programmable logic device (CPLD), a field programmable gate array (FPGA), an embedded ARM and other chips.
[0154] The embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by the processor 11, the link failure processing method disclosed in the above embodiment is implemented.
[0155] To summarize, the link fault handling method, apparatus, Leaf device and storage medium provided in the embodiments of the present application split the logic of port DOWN into two parts: PRE_DOWN and DOWN. The port is first withdrawn from the packet sending logic, and then the port is DOWNed at the chip level. In this way, the traffic is first switched to the port and then DOWNed, which can effectively avoid packet loss. At the same time, the ports of the Spine device and the CE device are processed first, and then the ports of the Leaf device are processed, thereby avoiding packet loss due to the time difference between the uplink and downlink links, thereby significantly improving the performance problem of packet loss when the peer-link link fails in the MLAG dual-homing access VXLAN network scenario.
[0156] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A link failure processing method, characterized in that: The method is applied to a slave Leaf device in a cross-device link aggregation group MLAG, wherein the MLAG further includes a master Leaf device, the master Leaf device and the slave Leaf device are connected via a peer-link, the slave Leaf device is connected to a third port of a Spine device via a first port, and is connected to a fourth port of a CE device via a second port; the method includes: When a peer-link fails, a port pre-notification message is sent to the Spine device and the CE device respectively, wherein the port pre-notification message is used to instruct the third port and the fourth port to exit from the packet sending logic; Respectively receive response messages returned by the Spine device and the CE device, and withdraw the first port and the second port from the packet sending logic; Sending a port negotiation message to the Spine device and the CE device respectively, wherein the port negotiation message is used to instruct to set the third port and the fourth port to a DOWN state; The first port and the second port are set to a DOWN state.
2. The method according to claim 1, characterized in that After receiving the response messages returned by the Spine device and the CE device respectively, and exiting the first port and the second port from the packet sending logic and before sending the port negotiation messages to the Spine device and the CE device respectively, the method further includes: Confirm that both the first port and the second port exit the packet sending logic.
3. The method according to claim 1, characterized in that The first port of the slave Leaf device is connected to the third port of the Spine device through a VXLAN tunnel, and both the slave Leaf device and the Spine device include a convergence module and a VXLAN module; When a peer-link fails, the step of sending a port pre-notification message to the spine device includes: When the peer-link fails, the aggregation module of the Leaf device sends the port pre-notification message to the aggregation module of the Spine device, so that the aggregation module of the Spine device notifies the VXLAN module of the Spine device to withdraw the third port from the packet sending logic; The step of receiving a response message returned by the Spine device and withdrawing the first port from the packet sending logic includes: The aggregation module of the slave Leaf device receives the response message returned by the aggregation module of the Spine device, and notifies the VXLAN module of the slave Leaf device to withdraw the first port from the packet sending logic; The step of sending a port negotiation message to the Spine device includes: The aggregation module of the slave Leaf device sends the port negotiation message to the aggregation module of the Spine device, so that the aggregation module of the Spine device sets the third port to a DOWN state; The step of setting the first port to a DOWN state comprises: The aggregation module of the slave Leaf device sets the first port to a DOWN state.
4. The method according to claim 1, characterized in that The slave Leaf device and the CE device both include a convergence module; When a peer-link fails, the step of sending a port pre-notification message to the CE device includes: When the peer-link fails, the aggregation module of the slave Leaf device sends the port pre-notification message to the aggregation module of the CE device, so that the aggregation module of the CE device withdraws the fourth port from the packet sending logic; The step of receiving a response message returned by the CE device and withdrawing the second port from the packet sending logic includes: The aggregation module of the slave Leaf device receives the response message returned by the aggregation module of the CE device, and withdraws the second port from the packet sending logic; The step of sending a port negotiation message to the CE device includes: The aggregation module of the slave Leaf device sends the port negotiation message to the aggregation module of the CE device, so that the aggregation module of the CE device sets the fourth port to a DOWN state; The step of setting the second port to a DOWN state comprises: The aggregation module of the slave Leaf device sets the second port to a DOWN state.
5. The method according to claim 4, characterized in that There are multiple CE devices, there are multiple second ports, and the multiple second ports of the slave Leaf device are connected to the fourth ports of the multiple CE devices in a one-to-one correspondence; The step of receiving a response message returned by the CE device and withdrawing the second port from the packet sending logic includes: After receiving the response message returned by each of the CE devices, the second port associated with the fourth port of each of the CE devices is simultaneously withdrawn from the packet sending logic.
6. The method according to claim 1, characterized in that After the step of sending a port pre-notification message to the Spine device and the CE device respectively when the peer-link fails, the method further includes: Triggering a timeout mechanism after sending the port pre-notification message to the Spine device and the CE device; If the response message returned by the Spine device is not received within the set time, directly executing the step of sending the port negotiation message to the Spine device; If the response message returned by the CE device is not received within the set time period, the step of directly sending the port negotiation message to the CE device is performed.
7. A link failure processing device, characterized in that: The device is applied to a slave Leaf device in a cross-device link aggregation group MLAG, wherein the MLAG further includes a master Leaf device, wherein the master Leaf device and the slave Leaf device are connected via a peer-link, wherein the slave Leaf device is connected to a third port of a Spine device via a first port, and is connected to a fourth port of a CE device via a second port; the device includes an aggregation module; The aggregation module is used to send a port pre-notification message to the Spine device and the CE device respectively when a peer-link link fails, and the port pre-notification message is used to instruct the third port and the fourth port to exit from the packet sending logic; The aggregation module is further used to receive response messages returned by the Spine device and the CE device respectively, and withdraw the first port and the second port from the packet sending logic; The aggregation module is further used to send a port negotiation message to the Spine device and the CE device respectively, wherein the port negotiation message is used to instruct to set the third port and the fourth port to a DOWN state; The aggregation module is further configured to set the first port and the second port to a DOWN state.
8. The device according to claim 7, characterized in that The aggregation module is further configured to confirm that both the first port and the second port exit the packet sending logic.
9. A Leaf device, characterized in that: It comprises a processor and a memory, wherein the memory is used to store a program, and the processor is used to implement the link failure processing method according to any one of claims 1 to 6 when executing the program.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the link failure processing method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
MLAG link fault switching method and device
CN114338512A
Message suppression method and device for MLAG in VXLAN network, and medium
CN115022120A
Data processing method and device based on MLAG and medium
CN115766579A
RoCE-SAN lossless storage network fault convergence method in MLAG environment
CN115883492A
Link aggregation split-brain detection and recovery
US20170163473A1
Cited By
Fault processing method and device, network equipment and program product
CN121418343A