Link state detection method and related device

By using routing tables and access control lists in the switches of the MLAG system to detect BFD messages returned by downlink network devices, the problem of the inability to determine the link status in the prior art is solved, and normal communication between devices in the MLAG system is achieved.

CN119996253APending Publication Date: 2025-05-13MAIPU COMM TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202311500402.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-10
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The prior art cannot determine the link status between each switch and downlink network device in the MLAG system, affecting the normal communication between devices in the MLAG application scenario.

Method used

By storing the routing table and access control list in the switch of the MLAG system, receiving the uplink BFD message returned by the downlink network device, determining whether it is a passive message, and determining the destination device based on the authentication identification and ACL rules, and then detecting the link status.

Benefits of technology

The link status between each switch and downlink network device in the MLAG system is detected, ensuring normal communication between devices in the MLAG application scenario.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996253A_ABST
    Figure CN119996253A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a link state detection method and a related device, and relates to the technical field of communication. Any switch in the MLAG system can determine target equipment corresponding to an uplink BFD message according to an identification identifier in the uplink BFD message and an access control list under the condition that the uplink BFD message returned by downlink network equipment is received and the uplink BFD message is determined to be a passing message according to a target IP address and a routing table in the uplink BFD message; if the target equipment is the switch, determining that the link state between the target equipment and the downlink network equipment is a normal state; and under the condition that the uplink BFD message returned by the downlink network equipment is still not received within the BFD session detection time, determining that the link state with the downlink network equipment is a fault state. Through the method, the link state between each switch and the downlink network equipment in the MLAG system can be detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a link status detection method and related devices. Background Art

[0002] With the development of virtualization and cloud computing technologies, the performance requirements for switches are getting higher and higher. Therefore, switches with larger throughput are needed to forward data to provide higher reliability. Therefore, the application of MLAG (Multi-chassis Link Aggregation Group) technology is gradually increasing.

[0003] MLAG technology is a high-availability technology used in technology center networks. Its principle is to connect multiple switches together to form a logical single switch to connect to other devices for application, and each switch in the MALG system can synchronize information in real time through the peer link. In the prior art, for the MLAG system formed by MLAG technology, it is often impossible to determine the link status between each switch in the system and the downstream network device, which will affect the normal communication between various devices in the MLAG application scenario. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide a link status detection method and related devices to solve the problem in the prior art that the link status between each switch and the downstream network device in the MLAG system cannot be determined.

[0005] In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0006] In a first aspect, the present invention provides a link status detection method, which is applied to any switch in an MLAG system, wherein the MLAG system is communicatively connected to at least one downstream network device, and a routing table and an access control list are stored in the switch, wherein the routing table stores a correspondence between a destination IP address and a message attribution identifier, and the access control list includes a correspondence between an identification identifier and an ACL rule, and the message attribution identifier indicates whether a BFD message carrying a corresponding destination IP address is a passing message; the method comprises:

[0007] When receiving an uplink BFD message returned by the downlink network device, determining whether the uplink BFD message is a passing message according to the destination IP address in the uplink BFD message and the routing table;

[0008] If the uplink BFD message is not a passing message, determining a destination device corresponding to the uplink BFD message according to the identification identifier in the uplink BFD message and the access control list;

[0009] If the destination device is the switch, determining that the link state between the switch and the downstream network device is normal;

[0010] If no uplink BFD message returned by the downstream network device is received within the BFD session detection time, it is determined that the link status between the downstream network device and the downstream network device is a faulty state; the detection time of the BFD session is the detection time negotiated by the switch and the downstream network device when establishing a BFD session.

[0011] In an optional implementation manner, the ACL rule includes a redirection rule, and determining, according to the identification identifier in the uplink BFD message and the access control list, a destination device corresponding to the uplink BFD message includes:

[0012] Searching the access control list for a redirection rule corresponding to the authentication identifier;

[0013] The destination device corresponding to the uplink BFD message is determined according to the redirection rule corresponding to the authentication identifier.

[0014] In an optional implementation manner, determining whether the uplink BFD message is a transit message according to the destination IP address in the uplink BFD message and the routing table includes:

[0015] Searching for a corresponding message attribution identifier in the routing table according to the destination IP address in the uplink BFD message;

[0016] If the corresponding message attribution identifier is found, it is determined that the uplink BFD message is not a passing message;

[0017] If the corresponding message attribution identifier is not found, it is determined that the uplink BFD message is a passing message.

[0018] In an optional implementation manner, the routing table further stores a correspondence between the destination IP address and the message forwarding rule, and the method further includes:

[0019] If the uplink BFD message is a passing message, determining a corresponding message forwarding rule in the routing table according to the destination IP address in the uplink BFD message;

[0020] The uplink BFD message is forwarded according to a message forwarding rule corresponding to the destination IP address in the uplink BFD message.

[0021] In an optional embodiment, the method further comprises:

[0022] If the destination device is another switch other than the switch in the MLAG system, the uplink BFD message is sent to the other switch so that the other switch detects the link status between the other switch and the downstream network device according to the uplink BFD message.

[0023] In an optional implementation manner, the switch further stores a BFD session table, and the BFD session table stores a correspondence between the identification identifier and the link state information; the method further includes:

[0024] Determine the corresponding target link state information in the BFD session table according to the identification identifier in the uplink BFD message;

[0025] If the target link state information is different from the currently determined link state, the target link state information is updated according to the link state.

[0026] In a second aspect, the present invention provides a link status detection device, which is applied to any switch in an MLAG system, wherein the MLAG system is communicatively connected to at least one downstream network device, and a routing table and an access control list are stored in the switch, wherein the routing table stores a correspondence between a destination IP address and a message attribution identifier, and the access control list includes a correspondence between an identification identifier and an ACL rule, and the message attribution identifier indicates whether a BFD message carrying a corresponding destination IP address is a passing message; the device comprises:

[0027] A determination module, configured to determine whether the uplink BFD message is a passing message according to the destination IP address in the uplink BFD message and the routing table when receiving the uplink BFD message returned by the downlink network device;

[0028] The determination module is further configured to determine, if the uplink BFD message is not a passing message, a destination device corresponding to the uplink BFD message according to an identification identifier in the uplink BFD message and the access control list;

[0029] A detection module, configured to determine that the link state between the destination device and the downstream network device is normal if the destination device is the switch;

[0030] The detection module is also used to determine that the link state between the downstream network device and the downstream network device is a fault state if the upstream BFD message returned by the downstream network device is not received within the BFD session detection time; the detection time of the BFD session is the detection time negotiated by the switch and the downstream network device when establishing the BFD session.

[0031] In a third aspect, the present invention provides a switch, comprising a processor and a memory, wherein the memory stores a computer program executable by the processor, and the processor can execute the computer program to implement the link status detection method described in the first aspect.

[0032] In a fourth aspect, the present invention provides an MLAG system, wherein the MLAG system is composed of at least two switches as described in the third aspect.

[0033] In a fifth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the link status detection method as described in the first aspect above.

[0034] The beneficial effect of the present application is that the link status detection method and related devices provided in the embodiments of the present application can detect the link status between each switch in the MLAG system and the downstream network device, thereby ensuring normal communication between various devices in the MLAG application scenario.

[0035] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application 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 paying creative work.

[0037] Figure 1 A block diagram of a link detection system is shown;

[0038] Figure 2 A block diagram of a switch provided in an embodiment of the present application is shown;

[0039] Figure 3 A schematic diagram of a process of link status detection method provided by an embodiment of the present application is shown;

[0040] Figure 4 A schematic diagram of a BFD message is shown;

[0041] Figure 5 A functional module diagram of a link status detection device provided in an embodiment of the present application is shown.

[0042] Icons: 1-link detection system; 10-MLAG system; 100-switch; 101-memory; 102-processor; 103-communication module; 20-downlink network device; 30-uplink network device; 300-determination module; 310-detection module. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0044] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0045] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0046] first, Figure 1 is a block diagram of the link detection system 1, see Figure 1 The link detection system 1 includes the MLAG system 10 provided in the embodiment of the present application and at least one downstream network device 20.

[0047] Optionally, the MLAG system 10 includes at least two switches 100 , and the MLAG system 10 is communicatively connected to at least one downstream network device 20 .

[0048] Optionally, the switch 100 may store a routing table and a control access list, wherein the routing table may store a correspondence between a destination IP address and a message attribution identifier, and the message attribution identifier may be used to characterize whether a BFD (Bidirectional Forwading Detection) message carrying the corresponding destination IP address is a passing message; the access control list may include a correspondence between an identification identifier and an ACL (Access Control List) rule.

[0049] In this embodiment, BFD is a network protocol used to detect faults between two forwarding points, which can provide millisecond-level detection. A BFD session is established on a device to achieve rapid detection of a link.

[0050] Optionally, when performing link detection through a BFD session, a device at one end may send a BFD message to a device at the other end. The device at the other end that receives the BFD message does not process the BFD message, but returns the BFD message directly to the device at the one end that sent the BFD message, thereby achieving rapid detection of the link.

[0051] Optionally, the link may be a logical link, such as a tunnel.

[0052] In this embodiment, the ACL refers to a rule table in a network device for taking specific actions on messages corresponding to specific message features.

[0053] Optionally, the link detection system may further include at least one uplink network device 30 , and at least one switch in the MLAG system 10 may be communicatively connected to the uplink network device 30 .

[0054] In this embodiment, the link detection system may be a system in a VLAN scenario or a system in a VXLAN (Virtual eXtensible Local Area Network) scenario.

[0055] It can be understood that if the link detection system is a system in a VXLAN scenario, it is necessary to encapsulate and decapsulate the message when the message is sent and received.

[0056] Optionally, in Figure 1 On the basis of Figure 2 For a block diagram of a switch 100 provided in an embodiment of the present application, please refer to Figure 2The switch 100 includes a memory 101, a processor 102, and a communication module 103. The memory 101, the processor 102, and the communication module 103 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.

[0057] The memory 101 is used to store programs or data, and the memory 101 stores a computer program that can be executed by the processor. The memory 101 can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc.

[0058] The processor 102 is used to read / write data or programs stored in the memory and execute corresponding functions. The processor can execute a computer program to implement the link status detection method provided in the embodiment of the present application.

[0059] The communication module 103 is used to establish a communication connection between the switch 100 and other communication terminals through the network, and to send and receive data through the network.

[0060] It should be understood that Figure 2 The structure shown is only a schematic diagram of the structure of the switch 100. The switch 100 may also include Figure 2 More or fewer components as shown, or with Figure 2 Different configurations are shown. Figure 2 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0061] Next, the above Figure 1 Any switch in the MLAG system is the execution subject, and the link status detection method provided in the embodiment of the present application is exemplarily introduced in combination with the flowchart. Specifically, Figure 3 A flowchart of a link status detection method provided in an embodiment of the present application is shown in FIG. Figure 3 , the method comprising:

[0062] Step S20: When an uplink BFD message returned by a downlink network device is received, it is determined whether the uplink BFD message is a passing message according to the destination IP address in the uplink BFD message and the routing table.

[0063] Optionally, the uplink BFD message refers to a BFD message sent by a downstream network device to a switch.

[0064] In this embodiment, the switch may send a downlink BFD message to the downlink network device at intervals to detect the link between the switch and the downlink network device.

[0065] Optionally, if the uplink BFD message is a transit message, it means that the destination device to which the uplink BFD message should be sent is not any switch in the MLAG system.

[0066] Optionally, in the MLAG system, the switch may also be connected to an upstream network device, and the upstream network device may also establish a BFD session for link detection. Therefore, the upstream BFD message may be a message sent to a switch in the MLAG system, or it may be a message sent to the upstream network device.

[0067] On this basis, the switch needs to first determine whether the uplink BFD message should be sent to a switch in the MLAG system.

[0068] Step S21: If the uplink BFD message is not a passing message, a destination device corresponding to the uplink BFD message is determined according to the authentication identifier and the access control list in the uplink BFD message.

[0069] Optionally, if the uplink BFD message is not a transit message, it means that the uplink BFD message should be sent to a switch in the MLAG system.

[0070] Optionally, after determining that the uplink BFD message is not a transit message, the switch also needs to determine which switch in the MLAG system the corresponding destination device is according to the identification identifier and access control list in the uplink message.

[0071] Optionally, the identification identifier may be a message field in an uplink BFD message.

[0072] In one possible implementation, Figure 4 For a BFD packet diagram, see Figure 4 , the identification identifier can be the "Your Discreaminator" field.

[0073] Optionally, in a BFD message, the My Discreaminator field is a local identifier of the BFD session connection. The switch that sends the BFD message can generate a unique non-zero identification value to distinguish multiple BFD sessions of a system. The Your Discreaminator field is a remote identifier of the BFD session connection, which is an identification value returned by a downstream network device. This field directly returns the received "My Discriminator" and returns 0 if the value is unknown.

[0074] Step S22: If the destination device is a switch, determine that the link status between the destination device and the downstream network device is normal.

[0075] Step S23: If no uplink BFD message returned by the downlink network device is received within the BFD session detection time, it is determined that the link state between the downlink network device and the downlink network device is a fault state.

[0076] Optionally, the BFD session detection time is a detection time negotiated between the switch and the downstream network device when the switch and the downstream network device establish a BFD session.

[0077] In this embodiment, if the destination device is a switch that receives the uplink BFD message, it can be determined that the link status between the switch and the downlink network device is normal.

[0078] Optionally, the switch may start timing after sending a downstream BFD message. If no upstream BFD message returned by the downstream network device is received within the BFD session detection time, a link failure may be determined.

[0079] In the link status detection method provided by the embodiment of the present application, the switch in the MLAG system stores a routing table and an access control list. When the switch receives an uplink BFD message returned by a downstream network device, it can determine whether the uplink BFD message is a passing message based on the destination IP address and the routing table in the uplink BFD message. When the uplink BFD message is not a passing message, it can determine the destination device corresponding to the uplink BFD message based on the identification identifier in the uplink BFD message and the access control list. If the destination device is a switch, it can be determined that the link status between the switch and the downstream network device is normal. If the switch still does not receive the uplink BFD message returned by the downstream network device within the BFD session detection time, it can be determined that the link status between the switch and the downstream network device is a faulty state. Through this method, the link status between each switch and the downstream network device in the MLAG system can be detected, thereby ensuring that each device can communicate normally in the MLAG application scenario.

[0080] Optionally, in order to facilitate checking the link status between the switch and the downstream network device, the switch may also store a BFD session table to store the link status information of the switch.

[0081] It can be understood that the BFD session table may store a correspondence between the identification identifier and the link state information. On this basis, after determining the link state between the switch and the downstream network device, the switch may first determine the corresponding target link state information in the BFD session table according to the identification identifier in the upstream BFD message, and then update the target link state information according to the link state when the target link state information is different from the currently determined link state.

[0082] For example, if the target link status information is a normal state, and the currently determined link status is a fault state, the normal state may be updated to a fault state.

[0083] Optionally, if the link status information is updated to a fault state, the switch can restore the link status to a normal state by establishing a replacement channel or switching to other links, thereby ensuring normal communication between various devices in the MLAG application scenario.

[0084] Optionally, in order to facilitate determination of whether the uplink BFD message is a passing message, when each switch sends a downlink BFD message, a message attribution identifier may be set in the routing table and synchronized in the MLAG system.

[0085] On this basis, the switch can search the routing table for the corresponding message attribution identifier according to the destination IP address in the uplink BFD message.

[0086] It can be understood that if the corresponding message attribution identifier is found, it can be determined that the uplink BFD message is not a passing message, and if the corresponding message attribution identifier is not found, it can be determined that the uplink BFD message is a passing message.

[0087] Optionally, since the uplink BFD message is a transit message and needs to be sent to a corresponding uplink network device, in order to facilitate the sending of the transit message, the routing table may also store a correspondence between the destination IP address and the message forwarding rule.

[0088] Optionally, the message forwarding rule may include information of the next-hop device, port information, etc.

[0089] Optionally, the switch may determine a corresponding message forwarding rule in the routing table according to the destination IP address in the uplink BFD message, and then forward the uplink BFD message according to a target message forwarding rule corresponding to the destination IP in the uplink BFD message.

[0090] It can be understood that even if the uplink BFD message is not a passing message, it may not be a message to be sent to the switch, so the switch still needs to determine to which switch in the MLAG system the uplink BFD message should be sent.

[0091] Optionally, the ACL rule may include a redirection rule, and the switch may search the access control list for a redirection rule corresponding to the authentication identifier, and determine a destination device corresponding to the uplink BFD message according to the redirection rule corresponding to the authentication identifier.

[0092] Optionally, the redirection rule may define a correspondence between a feature and a destination device.

[0093] In one example, if the MLAG system is an MLAG active-active system including two switches, the redirection rule may be related to the odd or even value of the identification identifier. For example, if the identification value is an odd number, the destination device is the switch, and if the identification value is an even number, the destination device is another switch.

[0094] In another example, if the MLAG system includes more than two switches, the redirection rule may be associated with a specific identification identifier. For example, if the identification identifier is 100, the destination device is switch No. 1; if the identification identifier is 101, the destination device is switch No. 2, and so on.

[0095] Optionally, if it is determined that the destination device is another switch other than the switch in the MLAG system, the switch may send the uplink BFD message to the other switch.

[0096] In this case, the other switch can detect the link status between the other switch and the downstream network device according to the uplink BFD message.

[0097] In this embodiment, in order to ensure that no errors occur, other switches can determine whether the destination device of the uplink BFD message is the current device through the above-mentioned judgment process when receiving the uplink BFD message sent by the current switch. When it is determined that the destination device is the current device, it is determined that the link status between the other switches and the downstream network device is normal.

[0098] In order to execute the corresponding steps in the above embodiments and various possible methods, a link status detection device implementation is provided below. Figure 5 , Figure 5A functional module diagram of a link state detection device provided in an embodiment of the present application. It should be noted that the basic principle and technical effects of the link state detection device provided in this embodiment are the same as those of the above-mentioned embodiments. For the sake of brief description, for parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above-mentioned embodiments. The link state detection device includes: a determination module 300 and a detection module 310.

[0099] The determination module 300 is used to determine whether the uplink BFD message is a passing message according to the destination IP address and the routing table in the uplink BFD message when receiving the uplink BFD message returned by the downlink network device.

[0100] It can be understood that the determination module 300 can also be used to execute the above step S20.

[0101] The determination module 300 is further configured to determine a destination device corresponding to the uplink BFD message according to an identification identifier and an access control list in the uplink BFD message if the uplink BFD message is not a transit message.

[0102] It can be understood that the determination module 300 can also be used to execute the above step S21.

[0103] The detection module 310 is used to determine that the link status between the destination device and the downstream network device is normal if the destination device is a switch.

[0104] It can be understood that the detection module 310 can also be used to execute the above step S22.

[0105] The detection module 310 is also used to determine that the link status between the downstream network device and the downstream network device is a faulty state if no upstream BFD message returned by the downstream network device is received within the BFD session detection time; the BFD session detection time is the detection time negotiated by the switch and the downstream network device when establishing the BFD session.

[0106] It can be understood that the detection module 310 can also be used to execute the above step S23.

[0107] Optionally, the determination module 300 is further configured to search the access control list for a target redirection rule corresponding to the authentication identifier; and determine a destination device corresponding to the uplink BFD message according to the redirection rule corresponding to the authentication identifier.

[0108] Optionally, the determination module 300 is also used to search for a corresponding message attribution identifier in the routing table according to the destination IP address in the uplink BFD message; if the corresponding message attribution identifier is found, it is determined that the uplink BFD message is not a passing message; if the corresponding message attribution identifier is not found, it is determined that the uplink BFD message is a passing message.

[0109] Optionally, the determination module 300 is also used to determine a corresponding message forwarding rule in the routing table according to the destination IP address in the uplink BFD message if the uplink BFD message is a passing message; and forward the uplink BFD message according to the message forwarding rule corresponding to the destination IP address in the uplink BFD message.

[0110] Optionally, the detection module 310 is further configured to send the uplink BFD message to other switches if the destination device is other switches other than the switch in the MLAG system, so that other switches can detect the link status between other switches and the downstream network device according to the uplink BFD message.

[0111] Optionally, the detection module 310 is further used to determine the corresponding target link status information in the BFD session table according to the identification identifier in the uplink BFD message; if the target link status information is different from the currently determined link status, the target link status information is updated according to the link status.

[0112] The link status detection device provided in the embodiment of the present application determines whether the uplink BFD message is a passing message according to the destination IP address and routing table in the uplink BFD message when the determination module receives the uplink BFD message returned by the downlink network device. If the uplink BFD message is not a passing message, the destination device corresponding to the uplink BFD message is determined according to the identification identifier and access control list in the uplink BFD message; when the destination device is a switch, the detection module determines that the link status between the downlink network device is a normal state, and when the uplink BFD message returned by the downlink network device is not received within the BFD session detection time, the link status between the downlink network device is determined to be a fault state; the detection time of the BFD session is the detection time negotiated by both parties when the switch and the downlink network device establish a BFD session. Through this device, the switch can detect the link status between each switch and the downlink network device in the MLAG system, thereby ensuring that each device can communicate normally in the MLAG application scenario.

[0113] Optionally, the above modules can be stored in the form of software or firmware. Figure 2 The memory shown in FIG. 1 is stored in the operating system (OS) of the switch and can be used by Figure 2 Meanwhile, the data and program codes required for executing the above modules can be stored in the memory.

[0114] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the link status detection method provided in the embodiment of the present application can be implemented.

[0115] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a part of the module, program segment or code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0116] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0117] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0118] 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 status detection method, characterized in that: Applied to any switch in an MLAG system, the MLAG system is communicatively connected to at least one downstream network device, the switch stores a routing table and an access control list, wherein the routing table stores a correspondence between a destination IP address and a message attribution identifier, the access control list includes a correspondence between an identification identifier and an ACL rule, and the message attribution identifier indicates whether a BFD message carrying a corresponding destination IP address is a passing message; the method comprises: When receiving an uplink BFD message returned by the downlink network device, determining whether the uplink BFD message is a passing message according to the destination IP address in the uplink BFD message and the routing table; If the uplink BFD message is not a passing message, determining the destination device corresponding to the uplink BFD message according to the identification identifier in the uplink BFD message and the access control list; if the destination device is the switch, determining that the link state between the switch and the downlink network device is normal; If no uplink BFD message returned by the downstream network device is received within the BFD session detection time, it is determined that the link status between the downstream network device is a faulty state; the detection time of the BFD session is the detection time negotiated by the switch and the downstream network device when establishing the BFD session.

2. The method according to claim 1, characterized in that The ACL rule includes a redirection rule, and the determining, according to the identification identifier in the uplink BFD message and the access control list, a destination device corresponding to the uplink BFD message includes: Searching the access control list for a redirection rule corresponding to the authentication identifier; The destination device corresponding to the uplink BFD message is determined according to the redirection rule corresponding to the authentication identifier.

3. The method according to claim 1, characterized in that: Determining whether the uplink BFD message is a passing message according to the destination IP address in the uplink BFD message and the routing table includes: Searching for a corresponding message attribution identifier in the routing table according to the destination IP address in the uplink BFD message; If the corresponding message attribution identifier is found, it is determined that the uplink BFD message is not a passing message; If the corresponding message attribution identifier is not found, it is determined that the uplink BFD message is a passing message.

4. The method according to claim 1, characterized in that: The routing table also stores a correspondence between the destination IP address and the message forwarding rule, and the method further includes: If the uplink BFD message is a passing message, determining a corresponding message forwarding rule in the routing table according to the destination IP address in the uplink BFD message; The uplink BFD message is forwarded according to a message forwarding rule corresponding to the destination IP address in the uplink BFD message.

5. The method according to claim 1, characterized in that The method further comprises: If the destination device is another switch other than the switch in the MLAG system, the uplink BFD message is sent to the other switch so that the other switch detects the link status between the other switch and the downstream network device according to the uplink BFD message.

6. The method according to claim 1, characterized in that The switch also stores a BFD session table, and the BFD session table stores a correspondence between the identification identifier and the link state information; the method further includes: Determine the corresponding target link state information in the BFD session table according to the identification identifier in the uplink BFD message; If the target link state information is different from the currently determined link state, the target link state information is updated according to the link state.

7. A link status detection device, characterized in that: Applied to any switch in an MLAG system, the MLAG system is communicatively connected to at least one downstream network device, the switch stores a routing table and an access control list, wherein the routing table stores a correspondence between a destination IP address and a message attribution identifier, the access control list includes a correspondence between an identification identifier and an ACL rule, and the message attribution identifier indicates whether a BFD message carrying a corresponding destination IP address is a passing message; the device comprises: A determination module, configured to determine whether the uplink BFD message is a passing message according to the destination IP address in the uplink BFD message and the routing table when receiving the uplink BFD message returned by the downlink network device; The determination module is further configured to determine, if the uplink BFD message is not a passing message, a destination device corresponding to the uplink BFD message according to an identification identifier in the uplink BFD message and the access control list; A detection module, configured to determine that the link state between the destination device and the downstream network device is normal if the destination device is the switch; The detection module is also used to determine that the link state between the downstream network device and the downstream network device is a fault state if the upstream BFD message returned by the downstream network device is not received within the BFD session detection time; the detection time of the BFD session is the detection time negotiated by the switch and the downstream network device when the switch and the downstream network device establish a BFD session.

8. A switch, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program executable by the processor, and the processor can execute the computer program to implement any one of the methods described in claims 1-6.

9. An MLAG system, characterized in that: The MLAG system is composed of at least two switches as claimed in claim 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the link status detection method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Bidirectional forwarding detection method and device of aggregation link

    CN104506546A

  • Link detecting method and link detecting device

    CN106998258A

  • Message processing method and device

    CN112968839A

  • Data processing method and device

    CN113938405A

  • Protocol calculation method, switch, cross-device link aggregation system and storage medium

    CN115514698A