Fault detection and repair method and device, electronic equipment, system and storage medium

By using BFD keep-alive message detection loop path in a multi-data center environment, the horizontal segmentation function is automatically turned off, and the BUM service interruption and traffic waste caused by horizontal segmentation are solved, and the automatic recovery and efficient transmission of BUM traffic is realized.

CN119052148APending Publication Date: 2024-11-29MAIPU COMM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411071306.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

In a multi-data center environment, horizontal segmentation technology is used to prevent layer 2 loops, but it will cause BUM service communication interruption when links are interrupted, requiring human intervention to recover, the fault processing time is low, and the network deployment method two leads to BUM Double the traffic and waste bandwidth.

Method used

By sending BFD keep-alive messages between leaf devices, the connectivity of the loop path is detected. If the redirected messages are not received, the horizontal segmentation function of the corresponding VXLAN tunnel is turned off to ensure that the BUM traffic is in the event of a link failure. It can still be flooded and interconnected.

Benefits of technology

It realizes BUM traffic interoperability in the event of link failure between data centers, avoids human intervention and bandwidth waste, and improves fault recovery efficiency and network reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119052148A_ABST
    Figure CN119052148A_ABST
Patent Text Reader

Abstract

The invention provides a fault detection and repair method and device, electronic equipment, a system and a storage medium, a first leaf device, a second leaf device and a third leaf device belong to different data centers respectively, any two leaf devices are in communication connection and establish a VXLAN tunnel, and the first leaf device is connected with the second leaf device and the third leaf device through a first interface and a second interface respectively. Compared with the prior art, the first leaf device sends the home terminal BFD keep-alive message at the first interface in a timing mode, and in the current keep-alive period, if the second interface does not receive the home terminal BFD keep-alive message, it is indicated that the message text should be looped back to the loopback path of the second interface from the first interface through the second leaf device and the third leaf device, and the loopback path fails. And at the moment, the first leaf device closes a horizontal segmentation function between VXLAN tunnels corresponding to the first interface and the second interface in time, and it is ensured that when a loopback path fault such as a link fault between the second leaf device and the third leaf device occurs, the BUM flow between the second leaf device and the third leaf device can still be subjected to flooding intercommunication through the first leaf device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communications, and in particular to a fault detection and repair method, device, electronic equipment, system and storage medium. Background Art

[0002] With the rapid development of big data, artificial intelligence and other businesses, the scale of data centers has increased dramatically, and the deployment of two-site three-data centers and multiple data centers has increased. Therefore, the demand for business deployment within and across regions has increased, and the huge amount of business data has placed increasing demands on the reliability of the basic network. VXLAN (Virtual Extensible LAN) technology is designed to solve the problem of Layer 2 intercommunication between businesses within and across domains. It achieves cross-domain Layer 2 communication by establishing a Layer 2 tunnel on a Layer 3 basic network.

[0003] At the same time, with the expansion of services and the enrichment of business models, the requirements for the simplicity of business deployment are becoming higher and higher. For example, hosts under VNI (VXLAN Network Identifier) ​​corresponding to different VXLAN networks across centers need to communicate at Layer 2. Technologies and mechanisms such as VNI mapping are created to meet the requirements for the simplicity of business deployment. They realize Layer 2 intercommunication of hosts under different VNIs across centers by mutually leaking the routes of different VNIs in other data centers with the local VNI on the edge leaf devices (i.e., edge leaf devices) of the data center.

[0004] In the deployment of three data centers or multiple data centers in two locations, the network between data centers will be deployed as a fully interconnected network for service backup and redundancy. In this networking model, although the deployment of technologies such as VXLAN and VNI mapping meets the Layer 2 communication requirements of hosts under the same VNI and different VNIs between data centers, it also brings about the problem of Layer 2 loops. Therefore, in order to avoid Layer 2 loops, the horizontal split technology must be used by default, so that the BUM (i.e. broadcast, unknown unicast, and multicast) traffic received from a certain data center can be terminated and prevented from flooding to other data centers, thereby preventing traffic from forming loops. After the edge leaf device performs VNI mapping, all hosts between data centers are already reachable by route, and the best can be selected through the attributes carried by the route. Therefore, known unicast traffic can be addressed and forwarded by finding the optimal path, and there is no loop. For example, the flooding of BUM messages in the three-data center network is as follows: Figure 1As shown, the edge leaf device of data center 3 will not flood the BUM message flooded from data center 1 to data center 2 again, so as to prevent data center 2 from receiving two BUM messages sent from data center 1 at the same time.

[0005] When the network interconnection is normal, the use of horizontal split technology can effectively prevent BUM traffic from other data centers from flooding to another data center on the edge leaf device of each data center, prevent loops from forming, and do not affect the normal forwarding of known unicast traffic. However, when the interconnection link between data centers is interrupted, due to different networking deployment methods, the BUM services between two non-directly connected data centers will be unable to communicate due to horizontal split, or the BUM service traffic bandwidth occupancy will double after the problem of communication caused by avoiding horizontal split occurs. Taking the three-data center network as an example, the two deployment methods are described as follows:

[0006] Network deployment method 1: The edge leaf devices between data centers 1, 2, and 3 establish EVPN neighbors through direct connection interfaces and open up VXLAN Layer 2 tunnels. Figure 2 , when the interconnection link between data center 1 and data center 2 is interrupted, the BUM traffic sent by data center 1 cannot be directly forwarded to data center 2 due to the link interruption, and the BUM traffic received from data center 1 cannot be flooded to data center 2 due to the existence of horizontal split on the edge leaf device of data center 3. Therefore, at this time, the BUM service communication between data centers 1 and 2 is interrupted, and only the known unicast service can be forwarded to data center 3 through the backup route on the edge leaf device of data center 1, and then forwarded to data center 2 through addressing;

[0007] Network deployment mode 2: The edge leaf devices between data centers 1, 2, and 3 establish EVPN neighbors through logical loopback interfaces and open up VXLAN Layer 2 tunnels. Figure 3, when the interconnection link between data center 1 and data center 2 is disconnected, the logical loopback interface between data center 1 and data center 2 will be reachable through data center 3 routing addressing, thereby establishing a VXLAN Layer 2 tunnel. At this time, there are still two Layer 2 tunnels on the edge leaf device of data center 1, which are the same as before the link failure, except that the tunnel exit to data center 2 points to data center 3. Therefore, the BUM traffic in data center 1 will be flooded to data center 2 and data center 3 through two tunnels. Of the two BUM traffic received by the edge leaf device of data center 3, one will no longer be flooded to data center 2 due to the existence of horizontal segmentation, and the other is a VXLAN encapsulated transit traffic, which is addressed and forwarded through the VXLAN outer address and is not controlled by horizontal segmentation, so it can be forwarded normally to data center 2. Although this networking deployment avoids the problem of BUM service disconnection between data centers 1 and 2 caused by horizontal segmentation, it will double the BUM traffic on the interconnection link between data centers 1 and 3, wasting bandwidth.

[0008] In summary, from the above networking deployment method 1, it can be seen that although horizontal segmentation can solve the loop problem, it will lead to the interruption of BUM business communication between non-direct data centers when the interconnection link is interrupted. Human intervention is required to restore the faulty link before the business can be restored. The fault handling and business recovery time is low.

[0009] In addition, although the above-mentioned networking deployment method 2 can avoid the BUM service interruption problem caused by horizontal segmentation in the above situation, it will cause the BUM traffic on the link between data centers to double, wasting bandwidth. Summary of the invention

[0010] The object of the present invention is to provide a fault detection and repair method, device, electronic device, system and storage medium to improve the problems existing in the prior art.

[0011] The embodiments of the present invention can be implemented as follows:

[0012] In a first aspect, the present invention provides a fault detection and repair method, which is applied to a first leaf device, wherein the first leaf device, the second leaf device, and the third leaf device belong to different data centers respectively, and any two leaf devices are communicatively connected and a VXLAN tunnel is established; the first leaf device is connected to the second leaf device through a first interface, and is connected to the third leaf device through a second interface; the method comprises:

[0013] Periodically sending a local BFD keepalive message from the first interface, where the source IP address and the destination IP address of the local BFD keepalive message are both the IP address of the first interface, and the local BFD keepalive message is used to keep alive a BFD session whose outgoing interface is the first interface and whose incoming interface is the second interface;

[0014] During the current keep-alive period of the BFD session, if the second interface does not receive the local BFD keep-alive message after being redirected by the second leaf device and the third leaf device respectively, the state of the BFD session is set to down, and the horizontal split function between the VXLAN tunnels corresponding to the first interface and the second interface is closed.

[0015] Optionally, the method further includes:

[0016] During the current keep-alive period of the BFD session, if the second interface receives the local BFD keep-alive message redirected by the second leaf device and the third leaf device respectively, the state of the BFD session is kept up and the keep-alive period of the BFD session is re-timed.

[0017] Optionally, the method further includes:

[0018] If the first interface receives a first remote BFD keep-alive message, redirect the first remote BFD keep-alive message to the third leaf device through the second interface; and / or,

[0019] If the second interface receives a second remote BFD keep-alive message, the second remote BFD keep-alive message is redirected to the second leaf device through the first interface.

[0020] Optionally, before the step of receiving, by the first interface, a first remote BFD keep-alive message, the method further includes:

[0021] Obtain policy routing PBR configuration information corresponding to the second leaf device and the third leaf device respectively;

[0022] Based on the quintuple and the next hop in the PBR configuration information corresponding to the second leaf device, a first traffic matching rule and a corresponding first forwarding rule for the first interface are generated; wherein the first traffic matching rule is used to match packets whose source IP address and destination IP address are both the IP address of the interface of the second device used to connect to the first device; and the first forwarding rule is used to redirect to the third leaf device through the second interface;

[0023] Based on the quintuple and the next hop in the PBR configuration information corresponding to the third leaf device, generate a second traffic matching rule for the first interface and the corresponding second forwarding rule; wherein the second traffic matching rule is used to match the message whose source IP address and destination IP address are both the IP address of the interface of the third device for connecting to the second device; and the second forwarding rule is used to redirect to the third leaf device through the second interface;

[0024] or,

[0025] Before the step of receiving the second remote BFD keep-alive message by the second interface, the method further includes:

[0026] Obtaining PBR configuration information corresponding to the second leaf device and the third leaf device respectively;

[0027] Based on the quintuple and the next hop in the PBR configuration information corresponding to the second leaf device, generate a third traffic matching rule and a corresponding third forwarding rule for the second interface; wherein the third traffic matching rule is used to match a message whose source IP address and destination IP address are both the IP address of the interface of the second device for connecting to the third device; and the third forwarding rule is used to redirect to the second leaf device through the first interface;

[0028] Based on the quintuple and the next hop in the PBR configuration information corresponding to the third leaf device, generate a fourth traffic matching rule and the corresponding fourth forwarding rule for the second interface; wherein the fourth traffic matching rule is used to match the message whose source IP address and destination IP address are both the IP address of the interface of the third device for connecting to the first device; the fourth forwarding rule is used to redirect to the second leaf device through the first interface;

[0029] or,

[0030] Before the first interface receives the first remote BFD keep-alive message and the second interface receives the second remote BFD keep-alive message, the method further includes:

[0031] Obtaining PBR configuration information corresponding to the second leaf device and the third leaf device respectively;

[0032] Based on the quintuple and the next hop in the PBR configuration information corresponding to the second leaf device, generate a first traffic matching rule for the first interface and the corresponding first forwarding rule; wherein the first traffic matching rule is used to match the message whose source IP address and destination IP address are both the IP address of the interface of the second device for connecting to the first device; and the first forwarding rule is used to redirect to the third leaf device through the second interface;

[0033] Based on the quintuple and the next hop in the PBR configuration information corresponding to the third leaf device, generate a fourth traffic matching rule and the corresponding fourth forwarding rule for the second interface; wherein the fourth traffic matching rule is used to match the message whose source IP address and destination IP address are both the IP address of the interface of the third device used to connect to the first device; the fourth forwarding rule is used to redirect to the second leaf device through the first interface;

[0034] or,

[0035] Before the first interface receives the first remote BFD keep-alive message and the second interface receives the second remote BFD keep-alive message, the method further includes:

[0036] Obtaining PBR configuration information corresponding to the second leaf device and the third leaf device respectively;

[0037] Based on the quintuple and the next hop in the PBR configuration information corresponding to the second leaf device, generate a third traffic matching rule for the second interface and the corresponding third forwarding rule; wherein the third traffic matching rule is used to match the message whose source IP address and destination IP address are both the IP address of the interface of the second device for connecting to the third device; the third forwarding rule is used to redirect to the second leaf device through the first interface;

[0038] Based on the quintuple and the next hop in the PBR configuration information corresponding to the third leaf device, generate a second traffic matching rule for the first interface and the corresponding second forwarding rule; wherein the second traffic matching rule is used to match the message whose source IP address and destination IP address are both the IP address of the interface of the third device used to connect to the second device; the second forwarding rule is used to redirect to the third leaf device through the second interface.

[0039] In a second aspect, the present invention further provides a fault detection and repair method, which is applied to a networking system, wherein the networking system includes a first leaf device, a second leaf device, and a third leaf device respectively belonging to different data centers, and any two leaf devices are communicatively connected and a VXLAN tunnel is established; the first leaf device is connected to the second leaf device through a first interface, and is connected to the third leaf device through a second interface; the method includes:

[0040] The first leaf device periodically sends a local BFD keepalive message from the first interface, where the source IP address and the destination IP address of the local BFD keepalive message are both the IP address of the first interface, and the local BFD keepalive message is used to keep alive a BFD session whose outgoing interface is the first interface and whose incoming interface is the second interface;

[0041] When receiving the local BFD keep-alive message, the second leaf device redirects the local BFD keep-alive message to the third leaf device;

[0042] When receiving the local BFD keep-alive message, the third leaf device redirects the local BFD keep-alive message to the first leaf device;

[0043] During the current keep-alive period of the BFD session, if the second interface does not receive the local BFD keep-alive message redirected by the second leaf device and the third leaf device respectively, the first leaf device sets the state of the BFD session to down and disables the horizontal split function between the VXLAN tunnels corresponding to the first interface and the second interface respectively.

[0044] Optionally, a first remote traffic matching rule and a corresponding first remote forwarding rule for an interface connected to the first leaf device are pre-generated in the second leaf device;

[0045] When receiving the local BFD keep-alive message, the second leaf device redirects the local BFD keep-alive message to the third leaf device, including:

[0046] When the interface connecting the second leaf device to the first leaf device receives the local BFD keep-alive message, after determining that the local BFD keep-alive message matches the first remote traffic matching rule, the received local BFD keep-alive message is redirected to the third leaf device based on the first remote forwarding rule.

[0047] Optionally, the third leaf device pre-generates a first remote traffic matching rule for an interface connected to the second leaf device and a corresponding second remote forwarding rule;

[0048] The step of redirecting, by the third leaf device, the local BFD keep-alive message to the first leaf device upon receiving the local BFD keep-alive message, includes:

[0049] When the interface connecting the third leaf device and the second leaf device receives the local BFD keep-alive message, after determining that the local BFD keep-alive message matches the first remote traffic matching rule, the received local BFD keep-alive message is redirected to the first leaf device based on the second remote forwarding rule.

[0050] In a third aspect, the present invention provides a fault detection and repair device, which is applied to a first leaf device, wherein the first leaf device, the second leaf device, and the third leaf device belong to different data centers respectively, and any two leaf devices are communicatively connected and a VXLAN tunnel is established; the first leaf device is connected to the second leaf device through a first interface, and is connected to the third leaf device through a second interface; the device includes:

[0051] a message sending module, configured to periodically send a local BFD keepalive message from the first interface, wherein the source IP address and the destination IP address of the local BFD keepalive message are both the IP address of the first interface, and the local BFD keepalive message is used to keep alive a BFD session whose outgoing interface is the first interface and whose incoming interface is the second interface;

[0052] A receiving detection module is used to set the state of the BFD session to down and disable the horizontal split function between the VXLAN tunnels corresponding to the first interface and the second interface respectively if the second interface does not receive the local BFD keep-alive message after being redirected by the second leaf device and the third leaf device respectively during the current keep-alive period of the BFD session.

[0053] In a third aspect, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory stores a software program, and when the electronic device is running, the processor executes the software program to implement the fault detection and repair method as described in the first aspect above.

[0054] In a fourth aspect, the present invention provides a networking system, the networking system comprising a first leaf device, a second leaf device, and a third leaf device respectively belonging to different data centers, any two leaf devices are communicatively connected and a VXLAN tunnel is established; the first leaf device is connected to the second leaf device through a first interface, and is connected to the third leaf device through a second interface;

[0055] The first leaf device is used to periodically send a local BFD keepalive message from the first interface, where the source IP address and the destination IP address of the local BFD keepalive message are both the IP address of the first interface, and the local BFD keepalive message is used to keep alive a BFD session whose outgoing interface is the first interface and whose incoming interface is the second interface;

[0056] The second leaf device is used for redirecting the local BFD keep-alive message to the third leaf device when receiving the local BFD keep-alive message;

[0057] The third leaf device is used to redirect the local BFD keep-alive message to the first leaf device when receiving the local BFD keep-alive message;

[0058] The first leaf device is also used to set the state of the BFD session to down and disable the horizontal split function between the VXLAN tunnels corresponding to the first interface and the second interface respectively if the local BFD keep-alive message redirected by the second leaf device and the third leaf device is not received at the second interface during the current keep-alive period of the BFD session.

[0059] Compared with the prior art, the embodiments of the present invention provide a fault detection and repair method, apparatus, electronic device, system and storage medium. Compared with the prior art, the first leaf device of the present invention periodically sends a local BFD keep-alive message at the first interface. Within the current keep-alive period of the BFD session, if the second interface does not receive the local BFD keep-alive message, it indicates that the local BFD keep-alive message should be looped back from the first interface through the second and third leaf devices to the second interface. This loopback path failure, and the first leaf device promptly closes the horizontal split function between the two VXLAN tunnels corresponding to the first interface and the second interface, respectively, thereby ensuring that in the case of a loopback path failure such as a failure in the interconnection link between the second and third leaf devices, the BUM traffic between the two can still be flooded and interconnected through the first leaf device. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0061] Figure 1 The figure is a schematic diagram of the flooding of BUM messages when three data centers are networked in the prior art.

[0062] Figure 2 This is one of the schematic diagrams of an interconnection link interruption when three data centers are networked in the prior art.

[0063] Figure 3 This is the second schematic diagram of an interconnection link interruption when three data centers are networked in the prior art.

[0064] Figure 4 A schematic diagram of an application scenario provided by an embodiment of the present invention.

[0065] Figure 5 One of the flowcharts of a fault detection and repair method provided by an embodiment of the present invention.

[0066] Figure 6 A schematic diagram of repairing an interconnection link when it is interrupted is provided in an embodiment of the present invention.

[0067] Figure 7 Another schematic diagram of repairing an interconnection link when it is interrupted is provided in an embodiment of the present invention.

[0068] Figure 8 A schematic diagram of another repair method when an interconnection link is interrupted is provided in an embodiment of the present invention.

[0069] Fig. 9 A schematic diagram of a four-data center network provided in accordance with an embodiment of the present invention.

[0070] Fig.10 The present invention provides a second flowchart of a fault detection and repair method according to an embodiment of the present invention.

[0071] Fig.11 A schematic diagram of the structure of a fault detection and repair device provided in an embodiment of the present invention.

[0072] Fig.12 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0073] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0074] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.

[0075] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.

[0076] Here, the key words or key terms involved in the present invention are first introduced.

[0077] 1. PBR (Policy-Based Routing): PBR enables network devices to forward data not only based on the destination IP address of the message, but also based on other message features, such as source IP address, source MAC address, destination MAC address, source port number, destination port number, VLAN ID, etc. Because in some scenarios, the traffic of some specific users and specific services needs to follow a specified forwarding path.

[0078] 2. BFD Echo: The echo function of Bidirectional Forwarding Detection is a mechanism for detecting link connectivity in IP networks. It is mainly implemented by sending BFD Echo messages, which are sent by local devices and looped back by remote systems to detect link connectivity.

[0079] See also Figure 4 , Figure 4 A schematic diagram of an application scenario provided for an embodiment of the present invention. The application scenario of the present invention involves three leaf devices belonging to different data centers. Any two leaf devices are connected in communication and a VXLAN tunnel is established. At the same time, a VNI mapping function is configured on each leaf device to communicate with each other between the routes of each data center, so as to open up the basic network for Layer 2 business interconnection between each data center. And in order to avoid the generation of routing loops, the horizontal split function is enabled by default between the two VXLAN tunnels of each leaf device and the other two leaf devices. The following mainly takes one leaf device as the main example to introduce the fault detection and repair method provided by an embodiment of the present invention.

[0080] Please refer to Figure 5 , Figure 5 A flow chart of a fault detection and repair method provided in an embodiment of the present invention, wherein the executor of the fault detection and repair method is a first leaf device, wherein the first leaf device, the second leaf device, and the third leaf device belong to different data centers respectively, and any two leaf devices are connected in communication and a VXLAN tunnel is established. The first leaf device is connected to the second leaf device and the third leaf device through its first interface and second interface respectively, and the first leaf device has the horizontal split function enabled by default between the two VXLAN tunnels corresponding to the first interface and the second interface. The fault detection and repair method includes the following steps S101 to S102:

[0081] S101. Periodically send a local BFD keepalive message from a first interface.

[0082] In this embodiment, the type of the local BFD keepalive message is a BFD Echo message (the source IP address and the destination IP address are the same), so the source IP address and the destination IP address of the local BFD keepalive message are both the IP address of the first interface. The local BFD keepalive message is used by the first leaf device to keep alive a BFD session whose outgoing interface is the first interface and whose incoming interface is the second interface. The BFD session is configured and created on the first interface. If the second leaf device receives the local BFD keepalive message sent by the first leaf device, it will redirect it to the third leaf device, and if the third leaf device receives the local BFD keepalive message sent by the first leaf device, it will redirect it to the first leaf device. That is, the keepalive status of the BFD session can reflect the connectivity of the loopback path of the local BFD keepalive message from the first interface of the first leaf device through the second and third leaf devices in sequence to the second interface of the first leaf device.

[0083] It can be understood that the first leaf device periodically sends out the local BFD keep-alive message from the first interface in order to confirm the connectivity of the loopback path through the sequential redirection of the local BFD keep-alive message by the second leaf device and the third leaf device. If the local BFD keep-alive message sent by the first leaf device from the first interface can be received from the second interface later, that is, the local BFD keep-alive message completes a loopback, indicating that the loopback path is fault-free, that is, any two leaf devices can communicate normally.

[0084] S102. During the current keep-alive period of the BFD session, if the second interface does not receive the BFD keep-alive message of the local end after being redirected by the second leaf device and the third leaf device respectively, the state of the BFD session is reset to the down state, and the horizontal split function between the VXLAN tunnels corresponding to the first interface and the second interface is disabled.

[0085] In this embodiment, during the current keep-alive period of the BFD session, if the second interface of the first leaf device does not receive the local BFD keep-alive message sent by the first interface, it indicates that the loopback path is faulty. The first leaf device will reset the state of the BFD session to the down state and turn off the horizontal split function between the two VXLAN tunnels corresponding to the first interface and the second interface respectively. In this way, it can be ensured that in the event of a loopback path failure such as a failure of the interconnection link between the second and third leaf devices, the BUM traffic between the two can still be flooded and interconnected through the first leaf device.

[0086] In an optional implementation, after the above step S101, the method may further include the following step S103:

[0087] S103. During the current keep-alive period of the BFD session, if the second interface receives the local BFD keep-alive message redirected by the second leaf device and the third leaf device, the BFD session is kept up and the keep-alive period of the BFD session is re-timed.

[0088] In this embodiment, within the current keep-alive period of the BFD session, if the second interface of the first leaf device receives the local BFD keep-alive message sent by the first interface, the BFD session is kept up and the keep-alive period of the BFD session is re-timed.

[0089] Optionally, the process of periodically sending a local BFD keep-alive message from the first interface in S101 may include the following sub-steps:

[0090] S1011, regularly generating a BFD keepalive message on the local end using the IP address of the first interface as the source IP address and the destination IP address;

[0091] S1012. Send a local BFD keep-alive message from the first interface.

[0092] In an optional implementation, in order to ensure that the local BFD keepalive message sent by the first leaf device can be looped back to the first leaf device through the second leaf device and the third leaf device in sequence, the network administrator will perform targeted PBR configuration on the second leaf device and the third leaf device respectively. When configuring PBR, the present invention uses the two fields of the source IP address and the destination IP address in the five-tuple to implement traffic matching, and the forwarding rule for redirection directly specifies the next hop, that is, the configuration adopted for the second leaf device and the third leaf device is as follows:

[0093] (1) For the second leaf device, when PBR is configured, the source IP address and destination IP address of the traffic matching rule are both the IP address of the first interface of the first leaf device, and the next hop specified for forwarding is the IP address of the third leaf device;

[0094] (2) For the third leaf device, when PBR is configured, the source IP address and destination IP address of the traffic match are both the IP address of the first interface of the first leaf device, and the next hop designated for forwarding is the IP address of the first leaf device.

[0095] After the above configuration, the first remote traffic matching rule and the corresponding first remote forwarding rule are generated on the interface of the second leaf device connected to the first leaf device, and the interface of the third leaf device connected to the second device can generate the first remote traffic matching rule and the corresponding second remote forwarding rule. The first remote traffic matching rule is used to match the packets whose source IP address and destination IP address are both the IP addresses of the first interface.

[0096] In this way, when the loopback path is connected normally, after the first leaf device sends a local BFD keep-alive message from the first interface, the second leaf device can redirect the local BFD keep-alive message sent by the first leaf device to the third leaf device based on the first remote traffic matching rule and the first remote forwarding rule; then the third leaf device can redirect the local BFD keep-alive message sent by the first leaf device to the first leaf device based on the first remote traffic matching rule and the second remote forwarding rule, thereby realizing the loopback of the local BFD keep-alive message.

[0097] In the optional example, please combine Figure 6 , Figure 6 The first leaf device, the second leaf device, and the third leaf device are leaf1, leaf2, and leaf3 respectively, and the first interface and the second interface of leaf1 are A1 and A2 respectively.

[0098] For leaf1, it generates local BFD keepalive messages regularly and sends them from the first interface A1. The source IP address and destination IP address of the local BFD keepalive messages are both the IP addresses of the first interface A1. When the loopback path connectivity is normal, when the interface B2 of leaf2 connected to leaf1 receives the local BFD keepalive message sent by leaf1, it should send it back to leaf1. However, since the first remote traffic matching rule and the corresponding first remote forwarding rule for interface B2 are generated after the PBR configuration is stored in leaf2, leaf1 will actually redirect the received local BFD keepalive message to leaf3 based on the first remote traffic matching rule and the first remote forwarding rule. When the interface C2 of leaf3 connected to leaf2 receives the local BFD keepalive message sent by leaf2, it will redirect the received local BFD keepalive message to leaf1 based on the first remote traffic matching rule and the corresponding second remote forwarding rule on interface C2.

[0099] For leaf1, within the current keep-alive period, if the second interface A2 does not receive the looped-back BFD keep-alive message of the local end, the state of the BFD session is reset to the down state, and the horizontal split function between the two VXLAN tunnels corresponding to the first interface A1 and the second interface A2 is closed. In the event of a loopback path failure such as a link failure between leaf2 and leaf3, leaf1 can allow the BUM traffic received from data center 2 to flood to data center 3, or allow the BUM traffic received from data center 3 to flood to data center 2.

[0100] The above examples are merely illustrative and are not intended to be limiting.

[0101] It should be noted that the loopback path for the first leaf device to send the BFD keepalive message on the local end is: first leaf device → second leaf device → third leaf device → first leaf device. However, the loopback path can also be configured as: first leaf device → third leaf device → second leaf device → first leaf device, which is similar to the above implementation logic and will not be repeated here.

[0102] The above content introduces the first leaf device sending the local BFD keepalive message regularly to detect the connectivity of the loopback path and the response methods in the two situations that the first leaf device receives or does not receive the loopback local BFD keepalive message within the current keepalive period.

[0103] There are three types of loopback path failures that can be automatically repaired in a timely manner:

[0104] 1. A fault occurs between the first leaf device and the third leaf device;

[0105] 2. A fault occurs between the first leaf device and the second leaf device;

[0106] 3. A fault occurs between the second leaf device and the third leaf device.

[0107] The first leaf device does not receive the looped BFD keepalive message from the local end during its current keepalive period, and the fault recovery measure taken is: timely shut down the horizontal split function between the two VXLAN tunnels corresponding to the first interface and the second interface. In essence, this can only ensure automatic fault recovery in the third fault situation mentioned above, that is, the BUM traffic between the second leaf device and the third leaf device is flooded and interconnected through the first leaf device.

[0108] In order to ensure that the first and second faults mentioned above can be repaired automatically and in time, similarly, the second leaf device needs to create a BFD session on the interface connected to the first leaf device or the third leaf device, and the third leaf device needs to create a BFD session on the interface connected to the first leaf device or the second leaf device, so that the second leaf device and the third leaf device can also send BFD keepalive messages regularly to detect the connectivity of the loopback path. For the first leaf device, the BFD keepalive messages regularly sent by the second leaf device or the third leaf device are remote BFD keepalive messages.

[0109] So, combined Figure 7 , Figure 7 The first leaf device, the second leaf device, and the third leaf device are leaf1, leaf2, and leaf3, respectively. For the second leaf device (i.e., leaf2), it can also periodically send out a local BFD keepalive message from interface B1 (the source IP address and the destination IP address are both the IP address of interface B1), so that the keepalive message can be looped back to interface B2 of leaf2 through leaf3 and leaf1 in sequence. Alternatively, leaf2 can also periodically send out a local BFD keepalive message from interface B2 (the source IP address and the destination IP address are both the IP address of interface B2), so that the keepalive message can be looped back to interface B1 of leaf2 through leaf1 and leaf3 in sequence.

[0110] If the second leaf device does not receive the looped BFD keepalive message within the current keepalive period of its own BFD session, the state of the BFD session is reset to the down state, and the horizontal split function between the two VXLAN tunnels corresponding to the outbound interface and the inbound interface of the BFD keepalive message is disabled. In this way, automatic fault recovery can be achieved in the event of the above-mentioned first fault situation, that is, the BUM traffic between the first leaf device and the third leaf device is flooded and interconnected through the second leaf device.

[0111] In the optional example, please continue to combine Figure 7 , assuming that leaf2 creates a BFD session on interface B1. For leaf2, it periodically generates BFD keepalive messages and sends them from interface B1. The source IP address and destination IP address of the BFD keepalive message are both the IP address of interface B1. When the loopback path connectivity is normal, when interface C2 of leaf3 receives the BFD keepalive message sent by leaf2, it will redirect it to leaf1 according to the traffic matching rules and corresponding forwarding rules on interface C2. When interface A2 of leaf1 receives the BFD keepalive message redirected from leaf3, it will redirect it to leaf2 according to the traffic matching rules and corresponding forwarding rules on interface A2.

[0112] For leaf2, within the current keep-alive period, if interface B2 does not receive the BFD keep-alive message sent by the loopback device, the state of the BFD session created on interface B1 is reset to the down state, and the horizontal split function between the two VXLAN tunnels corresponding to interfaces B1 and B2 is disabled. In this way, in leaf2, the BUM traffic received from data center 1 is allowed to flood to data center 3, or the BUM traffic received from data center 3 is allowed to flood to data center 1.

[0113] The above examples are merely illustrative and are not intended to be limiting.

[0114] Combined with Figure 8 , for the third leaf device (i.e., leaf3), it can periodically send out a local BFD keepalive message (the source IP address and the destination IP address are both the IP address of interface C1) from interface C1, so that the keepalive message can be looped back to interface C2 of leaf3 through leaf1 and leaf2 in sequence. Alternatively, leaf3 can also periodically send out a local BFD keepalive message (the source IP address and the destination IP address are both the IP address of interface C2) from interface C2, so that the keepalive message can be looped back to interface C1 of leaf3 through leaf2 and leaf1 in sequence.

[0115] If the third leaf device does not receive the BFD keepalive message sent by the looped-back device within the current keepalive period of its own BFD session, the BFD session status is reset to the down state, and the horizontal split function between the two VXLAN tunnels corresponding to the BFD keepalive message sending and receiving interface is disabled. In this way, automatic fault recovery can be achieved in the event of the above-mentioned second fault situation, that is, the BUM traffic between the first leaf device and the second leaf device is flooded and interconnected through the third leaf device.

[0116] The above analysis shows that for the second leaf device, there are two possibilities for its loopback path:

[0117] Loopback path (1): second leaf device → third leaf device → first leaf device → second leaf device;

[0118] Loopback path (2): second leaf device → first leaf device → third leaf device → second leaf device.

[0119] Similarly, for the third leaf device, the loopback path has the following two possibilities:

[0120] Loopback path (3): third leaf device → first leaf device → second leaf device → third leaf device;

[0121] Loopback path (4): third leaf device → second leaf device → first leaf device → third leaf device.

[0122] Then, comparing the above four loopback paths, for the first leaf device, in order to redirect the remote BFD keep-alive message (that is, the BFD keep-alive message generated and sent periodically by the second leaf device and the third leaf device), the network administrator performs PBR configuration in advance, and there are also the following four parallel situations.

[0123] Case 1: When the second leaf device uses the loopback path (2) and the third leaf device uses the loopback path (4), the network administrator pre-configures PBR for the first leaf device. The first leaf device needs to perform the following steps S001 to S003 to make it effective:

[0124] S001. Obtain policy routing PBR configuration information corresponding to the second leaf device and the third leaf device respectively;

[0125] S002. Based on the quintuple and the next hop in the PBR configuration information corresponding to the second leaf device, generate a first traffic matching rule and a corresponding first forwarding rule for the first interface; wherein the first traffic matching rule is used to match the message whose source IP address and destination IP address are both the IP address of the interface of the second device for connecting to the first device; and the first forwarding rule is used to redirect to the third leaf device through the second interface;

[0126] S003. Based on the quintuple and next hop in the PBR configuration information corresponding to the third leaf device, generate a second traffic matching rule and a corresponding second forwarding rule for the first interface; wherein the second traffic matching rule is used to match packets whose source IP address and destination IP address are both the IP address of the interface of the third device used to connect to the second device; and the second forwarding rule is used to redirect to the third leaf device through the second interface.

[0127] Case 2: When the second leaf device uses the loopback path (1) and the third leaf device uses the loopback path (3), the network administrator pre-configures PBR for the first leaf device. The first leaf device needs to perform the following steps S00A to S00C to make it effective:

[0128] S00A. Obtain PBR configuration information corresponding to the second leaf device and the third leaf device respectively;

[0129] S00B. Based on the quintuple and the next hop in the PBR configuration information corresponding to the second leaf device, generate a third traffic matching rule and a corresponding third forwarding rule for the second interface; wherein the third traffic matching rule is used to match the message whose source IP address and destination IP address are both the IP address of the interface of the second device for connecting to the third device; the third forwarding rule is used to redirect to the second leaf device through the first interface;

[0130] S00C. Based on the quintuple and next hop in the PBR configuration information corresponding to the third leaf device, generate a fourth traffic matching rule and a corresponding fourth forwarding rule for the second interface; wherein the fourth traffic matching rule is used to match packets whose source IP address and destination IP address are both the IP address of the interface of the third device used to connect to the first device; the fourth forwarding rule is used to redirect to the second leaf device through the first interface.

[0131] Case 3: When the second leaf device uses the loopback path (2) and the third leaf device uses the loopback path (3), the network administrator pre-configures PBR for the first leaf device. The first leaf device needs to perform the following steps S00a to S00c to make it effective:

[0132] S00a. Obtain PBR configuration information corresponding to the second leaf device and the third leaf device respectively;

[0133] S00b. Based on the quintuple and the next hop in the PBR configuration information corresponding to the second leaf device, generate a first traffic matching rule and a corresponding first forwarding rule for the first interface; wherein the first traffic matching rule is used to match the message whose source IP address and destination IP address are both the IP address of the interface of the second device for connecting to the first device; the first forwarding rule is used to redirect to the third leaf device through the second interface;

[0134] S00c. Based on the quintuple and next hop in the PBR configuration information corresponding to the third leaf device, generate a fourth traffic matching rule and a corresponding fourth forwarding rule for the second interface; wherein the fourth traffic matching rule is used to match packets whose source IP address and destination IP address are both the IP address of the interface of the third device used to connect to the first device; the fourth forwarding rule is used to redirect to the second leaf device through the first interface.

[0135] Case 4: When the second leaf device uses the loopback path (1) and the third leaf device uses the loopback path (4), the network administrator pre-configures PBR for the first leaf device. The first leaf device needs to perform the following steps S001′ to S003′ to make it effective:

[0136] S001′, obtaining PBR configuration information corresponding to the second leaf device and the third leaf device respectively;

[0137] S002′, based on the quintuple and the next hop in the PBR configuration information corresponding to the second leaf device, generate a third traffic matching rule and a corresponding third forwarding rule for the second interface; wherein the third traffic matching rule is used to match the message whose source IP address and destination IP address are both the IP address of the interface of the second device for connecting to the third device; the third forwarding rule is used to redirect to the second leaf device through the first interface;

[0138] S003′, based on the quintuple and next hop in the PBR configuration information corresponding to the third leaf device, generate a second traffic matching rule and a corresponding second forwarding rule for the first interface; wherein the second traffic matching rule is used to match the message whose source IP address and destination IP address are both the IP address of the interface of the third device used to connect to the second device; the second forwarding rule is used to redirect to the third leaf device through the second interface.

[0139] It should be noted that the substantive contents of the "PBR configuration information corresponding to the second leaf device and the third leaf device respectively" in the above steps S001, S00A, S00a, and S001' are different, which can be clearly seen from the steps for generating traffic matching rules and forwarding rules that are subsequently executed after each of the four steps.

[0140] Any of the above four situations can enable the first leaf device to have the ability to redirect the messages generated and sent by the second leaf device and the third leaf device. When the first leaf device redirects, the following steps S104 and S105 are involved.

[0141] S104: If the first interface receives the first remote BFD keep-alive message, redirect the first remote BFD keep-alive message to the third leaf device through the second interface;

[0142] S105: If the second interface receives the second remote BFD keep-alive message, redirect the second remote BFD keep-alive message to the second leaf device through the first interface.

[0143] Based on the above situation one, the first leaf device executes step S104, where the first remote BFD keep-alive message is a BFD keep-alive message periodically sent by the second leaf device through the interface connected to the first leaf device, or the first remote BFD keep-alive message is a BFD keep-alive message periodically sent by the third leaf device through the interface connected to the second leaf device, and is redirected to the first leaf device through the second leaf device.

[0144] Based on the above situation 2, the first leaf device executes step S105, where the second remote BFD keep-alive message is a BFD keep-alive message regularly sent by the third leaf device through the interface connected to the first leaf device, or the second remote BFD keep-alive message is a BFD keep-alive message regularly sent by the second leaf device through the interface connected to the third leaf device, and is redirected to the first leaf device through the third leaf device.

[0145] Based on the above situation three, the first leaf device executes step S104 to redirect the first remote BFD keep-alive message generated by the second leaf device and sent through the interface connected to the first leaf device; at the same time, the first leaf device executes step S105 to redirect the second remote BFD keep-alive message generated by the third leaf device and sent through the interface connected to the first leaf device.

[0146] Based on the above situation four, the first leaf device executes step S105 to redirect the BFD keep-alive message generated and sent by the second leaf device. In step S105, the second remote BFD keep-alive message refers to the BFD keep-alive message sent by the second leaf device through the interface connected to the third leaf device, and is redirected to the second interface of the first leaf device through the third leaf device; at the same time, the first leaf device executes step S104 to redirect the BFD keep-alive message generated and sent by the third leaf device. In step S104, the first remote BFD keep-alive message refers to the BFD keep-alive message sent by the third leaf device through the interface connected to the second leaf device, and is redirected to the first interface of the first leaf device through the second leaf device.

[0147] It should be noted that the traffic matching rule mentioned above is the ACL (Access Control List) rule.

[0148] Based on the above three data center networking situation, if N data centers are networked (N ≥ 4, for example, Fig. 9 ), after the fully interconnected VXLAN basic network is connected, a BFD session is created in each data center edge leaf device according to the above idea, and each data center edge leaf device binds the state of its own BFD session to the horizontal split function switch between the VXLAN tunnels corresponding to the two interfaces that send and receive BFD keep-alive messages, so that each leaf device can close / open the horizontal split function between the two VXLAN tunnels corresponding to the two interfaces that send and receive BFD keep-alive messages according to the keep-alive state of its own BFD session, so as to solve the problem of BUM service failure between non-direct data centers after any link in the path passed by the BFD keep-alive message is interrupted.

[0149] See also Fig.10 , an embodiment of the present invention also provides a fault detection and repair method, the execution subject of which is a networking system, the networking system includes a first leaf device, a second leaf device, and a third leaf device respectively belonging to different data centers, any two leaf devices are communicatively connected and a VXLAN tunnel is established; the first leaf device is connected to the second leaf device via a first interface, and is connected to the third leaf device via a second interface. It should be noted that the fault detection and repair method applied to the networking system is consistent with the logic of the steps executed by the first leaf device in the fault detection and repair method applied to the first leaf device, and will not be repeated here. Fig.10The fault detection and repair method includes the following steps S201 to S204.

[0150] S201. A first leaf device periodically sends a local BFD keepalive message from a first interface.

[0151] The source IP address and the destination IP address of the local BFD keepalive message are both the IP address of the first interface, and the local BFD keepalive message is used to keep alive a BFD session whose outgoing interface is the first interface and whose incoming interface is the second interface.

[0152] S202: When receiving the local BFD keep-alive message, the second leaf device redirects the local BFD keep-alive message to the third leaf device.

[0153] S203: When receiving the local BFD keep-alive message, the third leaf device redirects the local BFD keep-alive message to the first leaf device.

[0154] S204. During the current keep-alive period of the BFD session, if the first leaf device does not receive the local BFD keep-alive message redirected by the second leaf device and the third leaf device at the second interface, the state of the BFD session is set to down, and the horizontal split function between the VXLAN tunnels corresponding to the first interface and the second interface is disabled.

[0155] In the fault detection and repair method provided by the embodiment of the present invention, the first leaf device periodically sends a local BFD keepalive message at the first interface; when the second leaf device receives the local BFD keepalive message, it redirects it to the third leaf device; when the third leaf device receives the local BFD keepalive message, it redirects it to the first leaf device. If the second interface of the first leaf device does not receive the local BFD keepalive message during the current keepalive period, it indicates that the loopback path failure of the message that should be looped back from the first interface to the second interface through the second and third leaf devices is faulty. At this time, the first leaf device promptly closes the horizontal split function between the VXLAN tunnels corresponding to the first and second interfaces, respectively, to ensure that when a loopback path failure such as a link failure between the second and third leaf devices occurs, the BUM traffic between the two can still be flooded and interconnected through the first leaf device.

[0156] In an optional implementation, the second leaf device may pre-generate a first remote traffic matching rule for an interface connected to the first leaf device and a corresponding first remote forwarding rule.

[0157] Correspondingly, the sub-steps of step S202 may include S2021:

[0158] S2021. When the interface connecting the second leaf device to the first leaf device receives a local BFD keep-alive message, after determining that the local BFD keep-alive message matches the first remote traffic matching rule, the received local BFD keep-alive message is redirected to the third leaf device based on the first remote forwarding rule.

[0159] In an optional implementation, the third leaf device pre-generates a first remote traffic matching rule for an interface connected to the second leaf device and a corresponding second remote forwarding rule. Correspondingly, the sub-steps of step S203 may include S2031:

[0160] S2031. When the interface connecting the third leaf device and the second leaf device receives a local BFD keepalive message, after determining that the local BFD keepalive message matches the first remote traffic matching rule, the received local BFD keepalive message is redirected to the first leaf device based on the second remote forwarding rule.

[0161] In order to execute the corresponding steps in the above method embodiment and each possible implementation mode, an implementation mode of a fault detection and repair device is given below.

[0162] See also Fig.11 , Fig.11 The structural schematic diagram of the fault detection and repair device provided by an embodiment of the present invention is shown. The fault detection and repair device 200 is applied to a first leaf device, the first leaf device, the second leaf device and the third leaf device belong to different data centers respectively, and any two leaf devices are connected in communication and a VXLAN tunnel is established; the first leaf device is connected to the second leaf device through a first interface, and is connected to the third leaf device through a second interface. The fault detection and repair device 200 includes: a message sending module 210 and a receiving detection module 220.

[0163] The message sending module 210 is used to periodically send a local BFD keep-alive message from the first interface, the source IP address and the destination IP address of the local BFD keep-alive message are both the IP address of the first interface, and the local BFD keep-alive message is used to keep alive a BFD session whose outgoing interface is the first interface and whose incoming interface is the second interface;

[0164] The receiving detection module 220 is used to set the state of the BFD session to down and disable the horizontal split function between the VXLAN tunnels corresponding to the first interface and the second interface respectively, if the second interface does not receive the BFD keep-alive message of the local end after being redirected by the second leaf device and the third leaf device respectively during the current keep-alive period of the BFD session.

[0165] Optionally, the message sending module 210 may be specifically configured to periodically generate a local BFD keepalive message using the IP address of the first interface as the source IP address and the destination IP address; and send the local BFD keepalive message from the first interface.

[0166] Optionally, the receiving detection module 220 can also be used to keep the BFD session in an up state and re-time the keep-alive period of the BFD session if the second interface receives a local BFD keep-alive message redirected by the second leaf device and the third leaf device respectively during the current keep-alive period of the BFD session.

[0167] Optionally, the fault detection and repair device 200 may also include a redirection module 230, which is used to: if the first interface receives a first remote BFD keep-alive message, redirect the first remote BFD keep-alive message to the third leaf device through the second interface; and / or, if the second interface receives a second remote BFD keep-alive message, redirect the second remote BFD keep-alive message to the second leaf device through the first interface.

[0168] Optionally, the fault detection and repair device 200 may also include a configuration effectiveness module 240, which is used to: obtain the policy routing PBR configuration information corresponding to the second leaf device and the third leaf device respectively; based on the five-tuple and the next hop in the PBR configuration information corresponding to the second leaf device, generate a first traffic matching rule and a corresponding first forwarding rule for the first interface; wherein the first traffic matching rule is used to match the message whose source IP address and destination IP address are both the IP address of the interface of the second device for connecting to the first device; the first forwarding rule is used to redirect to the third leaf device through the second interface; based on the five-tuple and the next hop in the PBR configuration information corresponding to the third leaf device, generate a second traffic matching rule and a corresponding second forwarding rule for the first interface; wherein the second traffic matching rule is used to match the message whose source IP address and destination IP address are both the IP address of the interface of the third device for connecting to the second device; the second forwarding rule is used to redirect to the third leaf device through the second interface;

[0169] Alternatively, obtain the PBR configuration information corresponding to the second leaf device and the third leaf device respectively; based on the quintuple and the next hop in the PBR configuration information corresponding to the second leaf device, generate a third traffic matching rule and a corresponding third forwarding rule for the second interface; wherein the third traffic matching rule is used to match the message whose source IP address and destination IP address are both the IP address of the interface of the second device for connecting to the third device; the third forwarding rule is used to redirect to the second leaf device through the first interface; based on the quintuple and the next hop in the PBR configuration information corresponding to the third leaf device, generate a fourth traffic matching rule and a corresponding fourth forwarding rule for the second interface; wherein the fourth traffic matching rule is used to match the message whose source IP address and destination IP address are both the IP address of the interface of the third device for connecting to the first device; the fourth forwarding rule is used to redirect to the second leaf device through the first interface;

[0170] Alternatively, obtaining PBR configuration information corresponding to each of the second leaf device and the third leaf device; generating a first traffic matching rule and a corresponding first forwarding rule for the first interface based on the five-tuple and the next hop in the PBR configuration information corresponding to the second leaf device; generating a fourth traffic matching rule and a corresponding fourth forwarding rule for the second interface based on the five-tuple and the next hop in the PBR configuration information corresponding to the third leaf device;

[0171] Alternatively, obtain the PBR configuration information corresponding to the second leaf device and the third leaf device respectively; based on the quintuple and the next hop in the PBR configuration information corresponding to the second leaf device, generate a third traffic matching rule and a corresponding third forwarding rule for the second interface; based on the quintuple and the next hop in the PBR configuration information corresponding to the third leaf device, generate a second traffic matching rule and a corresponding second forwarding rule for the first interface.

[0172] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the fault detection and repair device 200 described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0173] See also Fig.12 , Fig.12 The electronic device 300 includes a processor 310 , a memory 320 , and a bus 330 , wherein the processor 310 is connected to the memory 320 via the bus 330 .

[0174] The memory 320 may be used to store software programs, for example, software programs corresponding to the fault detection and repair device 200 provided in the embodiment of the present invention. The processor 310 executes various functional applications and data processing to implement the fault detection and repair method provided in the embodiment of the present invention by running the software programs stored in the memory 320.

[0175] Among them, the memory 320 can be but is not limited to: RAM (Random Access Memory), ROM (Read Only Memory), FLASH (Flash Memory), PROM (Programmable Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electric Erasable Programmable Read-Only Memory), etc.

[0176] The processor 310 may be an integrated circuit chip with signal processing capability. The processor 310 may be a general-purpose processor, including: CPU (Central Processing Unit), NP (Network Processor), etc.; it may also be: DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0177] Understandably, Fig.12 The structure shown is for illustration only. The electronic device 300 may also include Fig.12 More or fewer components as shown, or with Fig.12 Different configurations shown. Fig.12 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0178] An embodiment of the present invention also provides a networking system, which includes a first leaf device, a second leaf device, and a third leaf device, which belong to different data centers respectively. Any two leaf devices are communicatively connected and a VXLAN tunnel is established; the first leaf device is connected to the second leaf device through a first interface, and is connected to the third leaf device through a second interface.

[0179] The first leaf device is used to periodically send a local BFD keepalive message from the first interface. The source IP address and the destination IP address of the local BFD keepalive message are both the IP address of the first interface. The local BFD keepalive message is used to keep alive a BFD session whose outgoing interface is the first interface and whose incoming interface is the second interface.

[0180] The second leaf device is used to redirect the BFD keep-alive message of the local end to the third leaf device when receiving the BFD keep-alive message of the local end;

[0181] The third leaf device is used to redirect the BFD keep-alive message of the local end to the first leaf device when receiving the BFD keep-alive message of the local end;

[0182] The first leaf device is also used to set the state of the BFD session to down and disable the horizontal split function between the VXLAN tunnels corresponding to the first interface and the second interface respectively if the local BFD keep-alive message redirected by the second leaf device and the third leaf device is not received at the second interface during the current keep-alive period of the BFD session.

[0183] In summary, the embodiments of the present invention provide a fault detection and repair method, apparatus, electronic device, system and storage medium. Compared with the prior art, the first leaf device of the present invention periodically sends a local BFD keep-alive message at the first interface. Within the current keep-alive period of the BFD session, if the second interface does not receive the local BFD keep-alive message, it indicates that the local BFD keep-alive message should be looped back from the first interface through the second and third leaf devices to the second interface. This loopback path failure, and the first leaf device promptly closes the horizontal split function between the two VXLAN tunnels corresponding to the first interface and the second interface, respectively, thereby ensuring that in the case of a loopback path failure such as a failure in the interconnection link between the second and third leaf devices, the BUM traffic between the two can still be flooded and interconnected through the first leaf device.

Claims

1. A fault detection and repair method, characterized in that: Applied to a first leaf device, the first leaf device, the second leaf device, and the third leaf device belong to different data centers, and any two leaf devices are communicatively connected and a VXLAN tunnel is established between them; the first leaf device is connected to the second leaf device through a first interface and is connected to the third leaf device through a second interface; the method includes: Periodically sending a local BFD keepalive message from the first interface, where the source IP address and destination IP address of the local BFD keepalive message are both the IP address of the first interface, and the local BFD keepalive message is used to keep alive a BFD session whose outgoing interface is the first interface and whose incoming interface is the second interface; During the current keep-alive period of the BFD session, if the second interface does not receive the local BFD keep-alive message after being redirected by the second leaf device and the third leaf device respectively, the state of the BFD session is set to down, and the horizontal split function between the VXLAN tunnels corresponding to the first interface and the second interface is disabled.

2. The method according to claim 1, characterized in that The method further comprises: During the current keep-alive period of the BFD session, if the second interface receives the local BFD keep-alive message redirected by the second leaf device and the third leaf device respectively, the state of the BFD session is kept up and the keep-alive period of the BFD session is reset.

3. The method according to claim 1, characterized in that The method further comprises: If the first interface receives a first remote BFD keepalive message, redirect the first remote BFD keepalive message to the third leaf device through the second interface; and / or, If the second interface receives a second remote BFD keepalive message, the second remote BFD keepalive message is redirected to the second leaf device through the first interface.

4. The method according to claim 3, characterized in that Before the step of the first interface receiving the first remote BFD keepalive message, the method further includes: Obtaining policy routing (PBR) configuration information corresponding to each of the second leaf device and the third leaf device; Based on the quintuple and next hop in the PBR configuration information corresponding to the second leaf device, generating a first traffic matching rule and a corresponding first forwarding rule for the first interface; wherein the first traffic matching rule is used to match packets whose source IP address and destination IP address are both the IP address of the interface of the second device used to connect to the first device; and the first forwarding rule is used to redirect packets to the third leaf device through the second interface. Based on the quintuple and next hop in the PBR configuration information corresponding to the third leaf device, generating a second traffic matching rule and a corresponding second forwarding rule for the first interface; wherein the second traffic matching rule is used to match packets whose source IP address and destination IP address are both the IP address of the interface of the third device used to connect to the second device; and the second forwarding rule is used to redirect packets to the third leaf device through the second interface. or, Before the step of the second interface receiving the second remote BFD keepalive message, the method further includes: Obtaining PBR configuration information corresponding to the second leaf device and the third leaf device respectively; Based on the quintuple and next hop in the PBR configuration information corresponding to the second leaf device, generating a third traffic matching rule and a corresponding third forwarding rule for the second interface; wherein the third traffic matching rule is used to match packets whose source IP address and destination IP address are both the IP address of the interface of the second device used to connect to the third device; and the third forwarding rule is used to redirect packets to the second leaf device through the first interface. Based on the quintuple and the next hop in the PBR configuration information corresponding to the third leaf device, generating a fourth traffic matching rule and a corresponding fourth forwarding rule for the second interface; wherein the fourth traffic matching rule is used to match packets whose source IP address and destination IP address are both the IP address of the interface of the third device used to connect to the first device; and the fourth forwarding rule is used to redirect packets to the second leaf device through the first interface. or, Before the steps of the first interface receiving the first remote BFD keep-alive message and the second interface receiving the second remote BFD keep-alive message, the method further includes: Obtaining PBR configuration information corresponding to the second leaf device and the third leaf device respectively; Generate a first traffic matching rule and a corresponding first forwarding rule for the first interface based on the quintuple and the next hop in the PBR configuration information corresponding to the second leaf device; Generate a fourth traffic matching rule and a corresponding fourth forwarding rule for the second interface based on the quintuple and the next hop in the PBR configuration information corresponding to the third leaf device; or, Before the steps of the first interface receiving the first remote BFD keep-alive message and the second interface receiving the second remote BFD keep-alive message, the method further includes: Obtaining PBR configuration information corresponding to the second leaf device and the third leaf device respectively; Generate a third traffic matching rule and a corresponding third forwarding rule for the second interface based on the quintuple and the next hop in the PBR configuration information corresponding to the second leaf device; Based on the quintuple and the next hop in the PBR configuration information corresponding to the third leaf device, a second traffic matching rule for the first interface and the corresponding second forwarding rule are generated.

5. A fault detection and repair method, characterized in that: Applied to a networking system, the networking system includes a first leaf device, a second leaf device, and a third leaf device, each belonging to a different data center, wherein any two leaf devices are communicatively connected and a VXLAN tunnel is established between them; the first leaf device is connected to the second leaf device via a first interface and is connected to the third leaf device via a second interface; the method includes: The first leaf device periodically sends a local BFD keepalive message from the first interface, where the source IP address and destination IP address of the local BFD keepalive message are both the IP address of the first interface. The local BFD keepalive message is used to keep alive a BFD session whose outgoing interface is the first interface and whose incoming interface is the second interface. When the second leaf device receives the local BFD keepalive message, it redirects the local BFD keepalive message to the third leaf device; When the third leaf device receives the local BFD keepalive message, it redirects the local BFD keepalive message to the first leaf device; During the current keep-alive period of the BFD session, if the second interface does not receive the local BFD keep-alive message redirected by the second leaf device and the third leaf device, the first leaf device sets the state of the BFD session to down and disables the horizontal split function between the VXLAN tunnels corresponding to the first interface and the second interface respectively.

6. The method according to claim 5, characterized in that A first remote traffic matching rule and a corresponding first remote forwarding rule for an interface connected to the first leaf device are pre-generated in the second leaf device; When receiving the local BFD keepalive message, the second leaf device redirects the local BFD keepalive message to the third leaf device, including: When the interface connecting the second leaf device and the first leaf device receives the local BFD keepalive message, after determining that the local BFD keepalive message matches the first remote traffic matching rule, the received local BFD keepalive message is redirected to the third leaf device based on the first remote forwarding rule.

7. The method according to claim 5, characterized in that The third leaf device pre-generates a first remote traffic matching rule for an interface connected to the second leaf device and a corresponding second remote forwarding rule; The step of redirecting, upon receiving the local BFD keepalive message, the local BFD keepalive message to the first leaf device includes: When the interface connecting the third leaf device and the second leaf device receives the local BFD keep-alive message, after determining that the local BFD keep-alive message matches the first remote traffic matching rule, the received local BFD keep-alive message is redirected to the first leaf device based on the second remote forwarding rule.

8. A fault detection and repair device, characterized in that: Applied to a first leaf device, the first leaf device, the second leaf device, and the third leaf device belong to different data centers, and any two leaf devices are communicatively connected and a VXLAN tunnel is established between them; the first leaf device is connected to the second leaf device through a first interface and is connected to the third leaf device through a second interface; the apparatus includes: a message sending module, configured to periodically send a local BFD keepalive message from the first interface, wherein the source IP address and destination IP address of the local BFD keepalive message are both the IP address of the first interface, and the local BFD keepalive message is used to keep alive a BFD session whose outgoing interface is the first interface and whose incoming interface is the second interface; A receiving detection module is used to set the state of the BFD session to down and disable the horizontal split function between the VXLAN tunnels corresponding to the first interface and the second interface respectively if the second interface does not receive the local BFD keep-alive message after being redirected by the second leaf device and the third leaf device respectively during the current keep-alive period of the BFD session.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a software program, and when the electronic device is running, the processor executes the software program to implement the fault detection and repair method according to any one of claims 1 to 4.

10. A networking system, characterized in that: The networking system includes a first leaf device, a second leaf device, and a third leaf device, each belonging to a different data center. Any two leaf devices are communicatively connected and a VXLAN tunnel is established between them. The first leaf device is connected to the second leaf device through a first interface and is connected to the third leaf device through a second interface. The first leaf device is configured to periodically send a local BFD keepalive message from the first interface, where the source IP address and destination IP address of the local BFD keepalive message are both the IP address of the first interface, and the local BFD keepalive message is used to keep alive a BFD session whose outgoing interface is the first interface and whose incoming interface is the second interface; The second leaf device is configured to redirect the local BFD keepalive message to the third leaf device upon receiving the local BFD keepalive message; The third leaf device is configured to redirect the local BFD keepalive message to the first leaf device upon receiving the local BFD keepalive message; The first leaf device is also used to set the state of the BFD session to down and disable the horizontal split function between the VXLAN tunnels corresponding to the first interface and the second interface respectively if the local BFD keepalive message after redirection by the second leaf device and the third leaf device is not received on the second interface during the current keepalive period of the BFD session.