Message transmission method and device and electronic equipment

By using virtual tunnels to carry identification information in M-LAG, the problem of unicast packet discarding when network equipment is abnormal is solved, the layer 2 traffic convergence performance of M-LAG is improved, and the stability of data transmission is ensured.

CN119211110APending Publication Date: 2024-12-27HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310760870.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-26
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In M-LAG technology, when network equipment is abnormal or abnormally recovered, multiple packets or packet loss are prone to occur, resulting in low convergence performance of layer 2 traffic.

Method used

By using virtual tunnels to carry identification information when transmitting messages between network devices, we ensure that unicast messages can be forwarded in time in M-LAG, avoiding the impact of one-way isolation rules, and improving the convergence performance of layer 2 traffic.

Benefits of technology

It effectively prevents unicast packets from being discarded due to one-way isolation rules, improves the layer 2 traffic convergence performance of M-LAG, and ensures the stability of data transmission between network devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211110A_ABST
    Figure CN119211110A_ABST
Patent Text Reader

Abstract

The invention provides a message transmission method and device and electronic equipment, and relates to the field of communication. The method comprises the following steps: under the condition that a link for sending a message to a host by a first network device is abnormal, the first network device sends a first message to a second network device. Wherein the first message comprises first identification information, and the first identification information is used for indicating that the forwarding behavior of forwarding the first message by the first network equipment is unicast forwarding. The first identification information is also used for instructing the second network equipment to forward the first message. The first network equipment and the second network equipment belong to the same M-LAG. Therefore, under the condition that the first message cannot be forwarded through the first network equipment, the first identification information can be carried in the first message, so that the second network equipment can determine to forward the first message according to the first identification information, thereby preventing the condition that the message is discarded due to a one-way isolation rule; therefore, the two-layer flow convergence performance of the M-LAG is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to a message transmission method, device and electronic equipment. Background Art

[0002] Multichassis link aggregation group (M-LAG) technology is a technology that can provide cross-device link aggregation. M-LAG technology can connect two network devices (such as switch devices) through a peer-link and perform cross-device link aggregation with other devices (such as user-side devices or servers) in the same state, thereby improving the reliability of the link from the single-board level to the device level.

[0003] Typically, an M-LAG can be composed of two network devices, and the two network devices can transmit messages through a virtual tunnel (for example, a virtual extensible local area network (VXLAN) bypass tunnel). In order to avoid loops or multiple packets in M-LAG transmission messages, a unidirectional isolation rule can be set for the network devices in the M-LAG so that the network devices will not forward traffic (such as broadcast, unknown unicast and multicast (BUM) messages, unicast messages) transmitted by another network device (or called the peer network device) in the same M-LAG through the VXLAN bypass tunnel.

[0004] However, when a network device in the M-LAG experiences an abnormality or recovers abnormally, causing two network devices in the M-LAG to switch, the M-LAG is affected by the unidirectional isolation rule. When transmitting Layer 2 traffic (such as the above-mentioned unicast message), multiple packets or packet loss are likely to occur, resulting in low Layer 2 traffic convergence performance of the M-LAG. Summary of the invention

[0005] The embodiments of the present application provide a message transmission method, device and electronic device. According to the method, in a scenario where an M-LAG is abnormal or recovered, a unicast message is not affected by a unidirectional isolation rule of a network device in the M-LAG after bypassing the virtual tunnel. The network device in the M-LAG can forward the unicast message in a timely manner, thereby improving the Layer 2 traffic convergence performance of the M-LAG.

[0006] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0007] In a first aspect, a message transmission method is provided, which is applied to a first network device, and the method includes: when the link for the first network device to send a message to a host is abnormal, the first network device sends a first message to a second network device. The first message includes first identification information, and the first identification information is used to indicate that the forwarding behavior of the first network device forwarding the first message is unicast forwarding. In addition, the first identification information is also used to indicate that the second network device forwards the first message, and the first network device and the second network device belong to the same cross-device link aggregation group M-LAG.

[0008] In this method, when the link for the first network device to send a message to the host is abnormal, in the process of switching from the first network device forwarding a unicast message to the second network device forwarding a unicast message (also called tangent), the first network device can carry the first identification information in the first message to indicate that the forwarding behavior of the first network device forwarding the first message is unicast forwarding. Then, the first message is sent to the second network device. So that the second network device can quickly determine that the forwarding behavior of the first network device for the first message is unicast forwarding based on the first identification information, and thus forward the first message. In this way, it can effectively prevent the first message from being discarded due to the unidirectional isolation rule, thereby improving the Layer 2 traffic convergence performance of M-LAG.

[0009] In combination with the first aspect, in an optional implementation, the method further includes: when the link through which the first network device sends the message to the host returns to normal, the first network device sends a second message to the second network device. The second message includes first identification information, the first identification information is also used to indicate that the forwarding behavior of the first network device forwarding the second message is unicast forwarding, and the first identification information is also used to indicate that the second network device forwards the second message.

[0010] In this implementation, when the link through which the first network device sends messages to the host returns to normal, during the first network device switching back, since it takes a certain amount of time for the media access control (MAC) table to converge, the first network device does not refresh the MAC table in the initial stage of switching back, and the outbound port of the MAC table still points to the port of the second network device. The first network device can send the second message to the second network device, and forward the second message through the second network device. The second message includes first identification information, and the first identification information is also used to indicate that the forwarding behavior of the first network device forwarding the second message is unicast forwarding, and the first identification information is also used to indicate that the second network device forwards the second message. In this way, it is possible to prevent the second message from being discarded due to the unidirectional isolation rule, and further improve the Layer 2 traffic convergence performance of M-LAG.

[0011] In combination with the first aspect, in an optional implementation, the method further includes: when the link for the first network device to send a message to the host is abnormal, the first network device sends a third message to the second network device. The third message includes second identification information and abnormal information, the second identification information is used to indicate that the forwarding behavior of the first network device to forward the third message is BUM forwarding, and the abnormal information is used to indicate that the link for the first network device to send the message to the host is abnormal. In addition, the second identification information and the abnormal information are also used to instruct the second network device to forward the third message.

[0012] In this implementation, when the link for sending a message from the first network device to the host is abnormal, the first network device is in the process of cutting off. The first network device can carry the second identification information and the abnormal information in the third message and send it to the second network device. The second network device does not need to look up the one-way isolation table, and can determine to forward the third message based on the second identification information and the abnormal information. In this way, not only can the table entry resources of the second network device be saved, but also the situation that the BUM message is discarded due to the abnormality of the first network device or the link between the first network device and the host can be prevented, thereby improving the Layer 2 traffic convergence performance of M-LAG.

[0013] In combination with the first aspect, in an optional implementation, the method further includes: when the link through which the first network device sends messages to the host returns to normal, the first network device sends a fourth message to the second network device. The fourth message includes second identification information and recovery information, the second identification information is also used to indicate that the forwarding behavior of the first network device forwarding the fourth message is BUM forwarding, the recovery information is used to indicate that the link through which the first network device sends messages to the host returns to normal, and the second identification information and recovery information are also used to indicate that the second network device does not forward the fourth message.

[0014] In this implementation, when the link for the first network device to send messages to the host returns to normal, the first network device is in the process of switching back. After the second network device receives the fourth message, it does not need to look up the one-way isolation table, and can determine not to forward the third message based on the second identification information and the abnormal information. In this way, not only can the table entry resources of the second network device be saved, but also the situation of multiple packets or loops when the network devices in the M-LAG forward the BUM message can be prevented.

[0015] In combination with the first aspect, in an optional implementation, the first identification information is encapsulated in the VXLAN message header of the first message. In this way, the first identification information can be carried in the first message, so that the second network device can directly obtain the first identification information through the first message. Further, the second network device can quickly determine that the forwarding behavior of the first network device for the first message is unicast forwarding based on the first identification information, and then forward the first message, thereby improving the efficiency of message transmission.

[0016] In combination with the first aspect, in an optional implementation, the second identification information and the exception information are encapsulated in the VXLAN message header of the third message. In this way, the second identification information and the exception information can be carried in the third message, so that the second network device does not need to look up the one-way isolation table, and can determine to forward the third message according to the second identification information and the exception information. In this way, not only can the table entry resources of the second network device be saved, but also the efficiency of message transmission can be improved.

[0017] In a second aspect, a message transmission method is provided, which is applied to a second network device, and the method includes: the second network device receives a first message sent by a first network device. The first message includes first identification information, and the first identification information is used to indicate that the forwarding behavior of the first network device forwarding the first message is unicast forwarding, and the first network device and the second network device belong to the same M-LAG. The second network device determines to forward the first message according to the first identification information.

[0018] In this method, when the link for the first network device to send a message to the host is abnormal or returns to normal, the second network device can quickly determine that the forwarding behavior of the first network device for the first message is unicast forwarding according to the first identification information, and thus forward the first message. In this way, it can effectively prevent the first message from being discarded due to the unidirectional isolation rule, thereby improving the Layer 2 traffic convergence performance of M-LAG.

[0019] In combination with the second aspect, in an optional implementation, the method further includes: the second network device receives a third message sent by the first network device, the third message includes second identification information and abnormal information, the second identification information is used to indicate that the forwarding behavior of the first network device forwarding the third message is BUM forwarding, and the abnormal information is used to indicate that the link of the first network device sending the message to the host is abnormal. The second network device determines to forward the third message based on the second identification information and the abnormal information.

[0020] In this implementation, the second network device does not need to search the unidirectional isolation table, and can determine to forward the third message according to the second identification information and the abnormal information. In this way, not only can the table entry resources of the second network device be saved, but also the situation that the BUM message is discarded due to the abnormality of the first network device or the link between the first network device and the host can be prevented, thereby improving the Layer 2 traffic convergence performance of M-LAG.

[0021] In combination with the second aspect, in an optional implementation, the method further includes: the second network device receives a fourth message sent by the first network device, the fourth message includes second identification information and recovery information, the second identification information is used to indicate that the forwarding behavior of the first network device forwarding the fourth message is BUM forwarding, and the recovery information is used to indicate that the link for the first network device to send messages to the host has returned to normal. The second network device determines not to forward the fourth message based on the second identification information and the recovery information.

[0022] In this implementation, after receiving the fourth message, the second network device can determine not to forward the third message based on the second identification information and the abnormal information without searching the one-way isolation table. In this way, not only can the table entry resources of the second network device be saved, but also the network devices in the M-LAG can be prevented from forwarding BUM messages with multiple packets or loops.

[0023] In a third aspect, a message transmission device is provided, which is deployed on a first network device of an M-LAG, and includes: a sending module. The sending module is used to send a first message to a second network device when a link for sending a message from the first network device to a host is abnormal; the first message includes first identification information, and the first identification information is used to indicate that the forwarding behavior of the first network device forwarding the first message is unicast forwarding, and the first identification information is also used to indicate that the second network device forwards the first message, wherein the first network device and the second network device belong to the same M-LAG.

[0024] In conjunction with the third aspect, in an optional implementation, the sending module is further used to send a second message to the second network device when the link for the first network device to send the message to the host returns to normal. The second message includes first identification information, and the first identification information is also used to indicate that the forwarding behavior of the first network device forwarding the second message is unicast forwarding, and the first identification information is also used to indicate that the second network device forwards the second message.

[0025] In conjunction with the third aspect, in an optional implementation, the sending module is further used to send a third message to the second network device when the link for sending the message from the first network device to the host is abnormal. The third message includes second identification information and abnormal information, the second identification information is used to indicate that the forwarding behavior of the first network device forwarding the third message is BUM forwarding, the abnormal information is used to indicate that the link for sending the message from the first network device to the host is abnormal, and the second identification information and the abnormal information are also used to instruct the second network device to forward the third message.

[0026] In conjunction with the third aspect, in an optional implementation, the sending module is further used to send a fourth message to the second network device when the link for sending messages from the first network device to the host is restored to normal. The fourth message includes second identification information and recovery information, the second identification information is also used to indicate that the forwarding behavior of the first network device forwarding the fourth message is BUM forwarding, the recovery information is used to indicate that the link for sending messages from the first network device to the host is restored to normal, and the second identification information and recovery information are also used to indicate that the second network device does not forward the fourth message.

[0027] In a fourth aspect, a message transmission device is provided, which is deployed on a second network device of an M-LAG, and includes: a receiving module and a processing module. The receiving module is used to receive a first message sent by a first network device, and the first message includes first identification information, and the first identification information is used to indicate that the forwarding behavior of the first network device forwarding the first message is unicast forwarding. The first network device and the second network device belong to the same M-LAG. The processing module is used to determine to forward the first message according to the first identification information.

[0028] In conjunction with the fourth aspect, in an optional implementation, the receiving module is further used to receive a third message sent by the first network device, the third message includes second identification information and exception information, the second identification information is used to indicate that the forwarding behavior of the first network device forwarding the third message is BUM forwarding, and the exception information is used to indicate that the link of the first network device sending the message to the host is abnormal. The processing module is also used to determine to forward the third message according to the second identification information and the exception information.

[0029] In conjunction with the fourth aspect, in an optional implementation, the receiving module is further used to receive a fourth message sent by the first network device, the fourth message including second identification information and recovery information, the second identification information is used to indicate that the forwarding behavior of the first network device forwarding the fourth message is BUM forwarding, and the recovery information is used to indicate that the link for the first network device to send messages to the host has returned to normal. The processing module is also used to determine not to forward the fourth message according to the second identification information and the recovery information.

[0030] In a fifth aspect, a chip is provided, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, the processor is used to run computer program code or instructions to implement the first aspect and any optional method thereof, and the communication interface is used to communicate with other modules outside the chip.

[0031] In a sixth aspect, an electronic device is provided, comprising: a memory, and one or more processors; the memory is coupled to the processor; wherein computer program code is stored in the memory, and the computer program code comprises computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method as described in the first aspect and any one of its optional methods, or the electronic device executes the method as described in the second aspect and any one of its optional methods.

[0032] In the seventh aspect, a computer-readable storage medium is provided, comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method according to the first aspect and any one of its optional methods, or the electronic device executes the method according to the second aspect and any one of its optional methods.

[0033] In an eighth aspect, a computer program product is provided. When the computer program product runs on a computer, it enables the computer to execute the method as described in the first aspect and any optional method thereof, or enables an electronic device to execute the method as described in the second aspect and any optional method thereof.

[0034] It can be understood that the beneficial effects that can be achieved by the message transmission device of the third aspect, the message transmission device of the fourth aspect, the chip of the fifth aspect, the electronic device of the sixth aspect, the computer-readable storage medium of the seventh aspect, and the computer program product of the eighth aspect can be referred to the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A schematic diagram of a network architecture provided for related technologies Figure 1 ;

[0036] Figure 2 A schematic diagram of a network architecture provided for related technologies Figure 2 ;

[0037] Figure 3 A schematic diagram of an application scenario provided in an embodiment of the present application;

[0038] Figure 4 A schematic diagram of the structure of a network device provided in an embodiment of the present application;

[0039] Figure 5 A schematic diagram of the structure of a main control board provided in an embodiment of the present application;

[0040] Figure 6 A schematic diagram of the structure of an interface board provided in an embodiment of the present application;

[0041] Figure 7 A schematic diagram of a message transmission method provided in an embodiment of the present application Figure 1 ;

[0042] Figure 8 A schematic diagram of the structure of a VXLAN encapsulated message provided in an embodiment of the present application;

[0043] Fig. 9 A schematic diagram of a flow chart of an outbound port query provided in an embodiment of the present application;

[0044] Fig.10 A schematic diagram of a message transmission method provided in an embodiment of the present application Figure 2 ;

[0045] Fig.11 A schematic diagram of a message transmission method provided in an embodiment of the present application Figure 3 ;

[0046] Fig.12 A schematic diagram of a message transmission method provided in an embodiment of the present application Figure 4 ;

[0047] Fig.13 A schematic diagram of a message transmission method provided in an embodiment of the present application Figure 5 ;

[0048] Fig.14 A schematic diagram of a message transmission method provided in an embodiment of the present application Figure 6 ;

[0049] Fig.15 A schematic diagram of the structure of the message transmission device provided in the embodiment of the present application Figure 1 ;

[0050] Fig.16 A schematic diagram of the structure of the message transmission device provided in the embodiment of the present application Figure 2 . DETAILED DESCRIPTION

[0051] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in the present application is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. And, in the description of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit the differences. At the same time, in the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.

[0052] M-LAG technology is a technology that can provide cross-device link aggregation. M-LAG technology can connect two network devices (such as switch devices) through peer-link, and perform cross-device link aggregation with other devices (such as user-side devices or servers) in the same state, thereby improving the reliability of the link from the single-board level to the device level. Among them, because the two network devices can be upgraded separately, the stability of business traffic is guaranteed, making M-LAG technology widely used in data center networks.

[0053] Exemplarily, in a data center network, a server can be dual-homed to a group (two independent) of network devices to form a data center network with an M-LAG structure. Specifically, the two network cards of the server can form a bundled port (or link aggregation group (LAG) port), and the LAG port can be connected to an M-LAG bundled port (or M-LAG aggregation port) composed of ports from two network devices. In this way, the two network devices can be upgraded separately, solving the problem of long network device upgrade time in a data center network with a stacked structure, thereby improving the security and stability of the data center network.

[0054] Specifically, an M-LAG can be composed of two network devices. According to the different ways of peer-link connection between the two network devices, M-LAG can be divided into: M-LAG with physical peer-link connection and M-LAG with virtual peer-link connection (i.e., virtual peer-link M-LAG). Among them, the two network devices in the M-LAG with physical peer-link connection are connected by a physical peer-link line. In contrast, there is no physical peer-link line between the two network devices in the M-LAG with virtual peer-link connection. In this way, the port resources of the network device can be saved, and no direct connection is required, and the deployment is more flexible.

[0055] In an M-LAG connected by a virtual peer-link, two network devices in the M-LAG can communicate (or transmit) messages (such as VXLAN messages and VLAN messages) through a virtual tunnel (the VXLAN bypass tunnel is used as an example below). In an M-LAG connected by a physical peer-link, two network devices in the M-LAG can also communicate VXLAN messages through a VXLANbypass tunnel.

[0056] For example, Figure 1 A schematic diagram of a network architecture provided for related technologies Figure 1 The network architecture is based on a leaf-spine network, which includes two layers: the spine and the leaf. The spine layer can include multiple spine node devices (hereinafter referred to as spine nodes), and the leaf layer can include multiple leaf node devices (hereinafter referred to as leaf nodes). The spine nodes and leaf nodes are fully connected.

[0057] like Figure 1As shown in (a), the network architecture includes: spine node 101, spine node 102, leaf node 103, leaf node 104 and server 105. Specifically, spine node 101 and spine node 102 are connected to leaf node 103 and leaf node 104 respectively. Leaf node 103 and leaf node 104 are connected through peer-link to form M-LAG, and the M-LAG (i.e., leaf node 103 and leaf node 104) is connected to server 105 through cross-device link aggregation. Among them, the port in leaf node 103 and leaf node 104 connected to server 105 is called the M-LAG member port of the leaf node, and the M-LAG member port can be an Ethernet link aggregation (Eth-Trunk) port. The M-LAG member port of leaf node 103 and the M-LAG member port of leaf node 104 can be aggregated into a link aggregation port (M-LAG aggregation port) connected to server 105. The peer-link between the leaf node 103 and the leaf node 104 may be a physical peer-link or a virtual peer-link. It should be noted that the leaf node 103 and the leaf node 104 may communicate with each other through VXLAN, for example, VXLAN packets may be transmitted through a VXLAN bypass tunnel.

[0058] For example, the transmitted VXLAN message is a BUM message. Figure 1 As shown in (a), during the uplink BUM message transmission process, the server 105 sends a BUM message to the leaf node 103. The leaf node 103 will copy a BUM message and send the BUM message to the leaf node 104 through the VXLAN bypass tunnel, causing the BUM message to be forwarded from the M-LAG aggregation port of the leaf node 104 to the server 105. At this time, the server 105 will receive the message it sent, thus forming a loop.

[0059] like Figure 1 As shown in (b), during the downlink BUM message transmission process, leaf node 103 can receive a BUM message from spine node 101 or spine node 102, and leaf node 103 then sends the BUM message to server 105. At the same time, leaf node 103 will send the BUM message to leaf node 104 through the VXLANbypass tunnel, and the BUM message sent to leaf node 104 will be forwarded from the local M-LAG aggregation port of leaf node 104, so that server 105 receives the BUM message again, thereby causing server 105 to receive two identical BUM messages, resulting in multiple packets.

[0060] Therefore, in order to avoid the above-mentioned loop or multiple packets, a unidirectional isolation rule can be set for the network devices in the M-LAG (such as the above-mentioned leaf node 103 and leaf node 104) so ​​that the network devices (such as leaf node 104) will not forward the traffic transmitted through the VXLAN bypass tunnel by another network device (such as leaf node 103) in the same M-LAG through the local M-LAG aggregation port.

[0061] However, when the link for the leaf node to send messages to the host (taking the server as an example below) is abnormal, or the link for the leaf node to send messages to the host returns to normal and causes the leaf node to be switched, the leaf node in the M-LAG is affected by the unidirectional isolation rule. When transmitting Layer 2 traffic (such as the above-mentioned VXLAN messages), it is easy to have multiple packets or packet loss, resulting in low Layer 2 traffic convergence performance of the M-LAG.

[0062] Specifically, when the link for the leaf node to send a message to the server is abnormal, the server switches from dual-homing access to M-LAG to single-homing access to M-LAG, and the M-LAG layer 2 traffic convergence process is taken as an example. For example, the local M-LAG aggregation port of a network device in M-LAG is abnormal, so it switches to another network device to forward the message. Figure 2 A schematic diagram of a network architecture provided for related technologies Figure 2 ,like Figure 2 As shown in (a) and (b), the network architecture includes: spine node 201, leaf node 202, leaf node 203 and server 204. Spine node 201 is connected to leaf node 202 and leaf node 203 respectively, and leaf node 202 and leaf node 203 are connected through peer-link to form M-LAG, and M-LAG is connected to server 204 through cross-device link aggregation. Among them, the M-LAG member port of leaf node 202 and the M-LAG member port of leaf node 203 can be aggregated into one M-LAG aggregation port to connect to server 204.

[0063] like Figure 2 As shown in (a), when M-LAG transmits north-to-south Layer 2 unicast traffic, for example, a unicast message from spine node 201 to server 204 transmitted by a VXLAN tunnel. Usually, after leaf node 202 receives the unicast message sent by spine node 201, it will be forwarded to server 204 by the local M-LAG aggregation port of leaf node 202 through the member port of M-LAG of leaf node 202.

[0064] like Figure 2As shown in (b), when the link for the leaf node 202 to send a message to the server is abnormal. For example, the local M-LAG aggregation port of the leaf node 202 is abnormal, resulting in the leaf node 202 being unable to transmit a message to the server 204. After the leaf node 202 senses the abnormality (for example, senses the shutdown (down) event of the local M-LAG aggregation port), it can clear the media access control (media access control, MAC) address table (hereinafter referred to as the MAC table) and forward the unicast message to the leaf node 203 through the VXLAN bypass tunnel carried on the peer-link in a flooding replication manner. Alternatively, the leaf node 202 can also forward the unicast message to the leaf node 203 through the VXLAN bypass tunnel by refreshing the outbound port of the MAC table to point to the peer-link port. However, due to the one-way isolation rule set in the leaf node 203. Therefore, the leaf node 203 cannot send the unicast message received by the VXLAN bypass tunnel to the server 204 through its local M-LAG aggregation port, and thus discards the unicast message. In this way, the server cannot receive the unicast message.

[0065] Correspondingly, when the link for the leaf node 202 to send the message to the server is restored to normal, that is, the server 204 switches from a single-home access M-LAG to a dual-home access M-LAG, and the Layer 2 traffic convergence process of the M-LAG is taken as an example. For example, after the abnormal recovery of the local M-LAG aggregation port of the leaf node 202, the leaf node 202 forwards the message to the server 204 again (that is, the leaf node 202 switches back). After the leaf node 203 perceives the abnormal recovery of the leaf node 202 (for example, the opening (up) event of the local M-LAG aggregation port of the leaf node 202 is perceived), the unidirectional isolation rule can be set in the leaf node 203 by sending a unidirectional isolation table, wherein the unidirectional isolation table includes information on ports that need to be isolated from each other. Specifically, when the leaf node can find the table entries of the source port and the egress port of the message in the port unidirectional isolation table, it means that the message needs to be discarded.

[0066] However, during the switchback process of leaf node 202, since it takes a certain amount of time for the MAC table to converge, if leaf node 203 sends the unidirectional isolation table earlier, and leaf node 202 does not refresh the MAC table in the initial stage of the switchback, and the outbound port of the MAC table still points to the port of leaf node 203, leaf node 203 will still discard the unicast message received by the VXLAN bypass tunnel, so that server 204 cannot receive the unicast message. Therefore, when the link for the leaf node 202 in M-LAG to send messages to the server returns to normal, there is also the problem of low convergence performance of Layer 2 traffic.

[0067] An embodiment of the present application provides a message transmission method, which can be applied in a scenario where a link through which a network device in an M-LAG sends a message to a host is abnormal or returns to normal, resulting in switching of network devices in the M-LAG. The method can ensure that a unicast message will not be affected by a unidirectional isolation rule of the network device in the M-LAG after bypassing through a virtual tunnel, and can be forwarded in time through the network device in the M-LAG, thereby improving the Layer 2 traffic convergence performance of the M-LAG.

[0068] The message transmission method provided in the embodiment of the present application can be applied to a network architecture including M-LAG. For example, Figure 3 A schematic diagram of an application scenario provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the application scenario may include: spine node 301, leaf node 302, leaf node 303 and server 304. Spine node 301 is connected to leaf node 302 and leaf node 303 respectively. Figure 3 As shown in (a), leaf node 302 and leaf node 303 can be connected via a physical peer-link to form an M-LAG connected by a physical peer-link. Figure 3 As shown in (b), leaf node 302 and leaf node 303 can also be connected via a virtual peer-link to form a virtual peer-link connected M-LAG. Leaf node 302 and leaf node 303 can be a first network device and a second network device, respectively, and the first network device and the second network device can communicate via a VXLANbypass tunnel.

[0069] by Figure 3 Taking the application scenario shown as an example, the message transmission method provided by the embodiment of the present application includes: when the link for the first network device to send a message to the host is abnormal, the first network device sends a first message to the second network device. The first message includes first identification information, and the first identification information is used to indicate that the forwarding behavior of the first network device forwarding the first message is unicast forwarding, and the first identification information is also used to indicate that the second network device forwards the first message. In this way, after the second network device receives the first message sent by the first network device, it can determine to forward the first message according to the first identification information.

[0070] In this method, the second network device can quickly determine whether the forwarding type of the message by the first network device is unicast forwarding based on the first identification information. When the second network device determines that the message is a unicast message, it forwards the unicast message to the host. In this way, when an abnormality occurs in M-LAG or the abnormality is restored to normal, resulting in the inability to forward the unicast message through the first network device, the unicast message can be sent to the second network device, and then forwarded through the second network device to prevent the occurrence of message discard or multiple packets, thereby improving the Layer 2 traffic convergence performance of M-LAG.

[0071] Among them, the above Figure 3 The server 304 in the example can also be replaced by a switch or other user-side equipment.

[0072] It should be noted that the second network device and the first network device may be network devices such as switches or routers. The network device may include a hardware structure and a software structure. The network device may implement various communication functions (such as the functions corresponding to the message transmission method in the following embodiment of the present application) in the form of a hardware structure, a software module, or a hardware structure plus a software module.

[0073] For example, Figure 4 A schematic diagram of the structure of a network device provided in an embodiment of the present application. Figure 4 As shown, the network device 200 may include: a main control board 201, and an interface board 202 connected to the main control board 201. The main control board 201 is used to implement the functions of the control plane, such as M-LAG member port negotiation master / slave, dual-master detection, and M-LAG information synchronization. The interface board 202 is used to implement the functions of the forwarding plane, such as initialization of Ethernet switching chips (e.g., LAN switch, LSW), service table entry delivery, protocol message transmission and reception, and various interrupt processing (including uplink and downlink interrupt processing).

[0074] Optionally, the main control board 201 and the interface board 202 may be provided separately or integrated together.

[0075] For example, Figure 5 The main control board 201 includes a processor 2011 , a memory 2012 connected to the processor 2011 , and an Ethernet interface chip 2013 .

[0076] Among them, the processor 2011 is the control unit of the main control board 201, and the memory 2012 stores computer programs or software codes or instructions. The processor 2011 can complete the data processing of the control plane by running or calling the computer programs or software codes or instructions in the memory 2012. The Ethernet interface chip 2013 can be used for communication with the interface board 202 or other communication devices.

[0077] Further, Figure 6 A schematic diagram of the structure of an interface board provided in an embodiment of the present application. The interface board 202 includes: a processor 2021, and a memory 2022, an Ethernet interface chip 2023, and an Ethernet switching chip 2024 connected to the processor 2021. The memory 2022 stores a computer program or software code or instruction, and the processor 2021 can complete data processing on the data plane by running or calling the computer program or software code or instruction in the memory 2022. The Ethernet interface chip 2023 is used to realize communication with the main control board, and the Ethernet switching chip 2024 can be used for data processing such as sending or searching table items and sending and receiving protocol messages.

[0078] Optionally, the Ethernet switching chip 2024 may also be connected to a memory 2025, and the memory 2025 may be used to store forwarding message content.

[0079] Optionally, the Ethernet switch chip 2024 may also be connected to an Ethernet physical layer (PHY) interface chip, and the Ethernet PHY interface chip may be used for communication with a server or other user equipment.

[0080] The processor 2011 and the processor 2021 may be a central processing unit (CPU), a general processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 2011 and the processor 2021 may also be other devices with processing functions, such as circuits, devices, or software modules, without limitation.

[0081] The memory 2012 and the memory 2022 may be a read-only memory (ROM) or other types of static storage devices that can store static information and / or instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and / or instructions, or may be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, etc., without limitation.

[0082] It is worth noting that the memory 2012 and / or the memory 2022 may include one or more of the above. For example, the memory 2022 includes RAM and EEPROM, wherein the RAM is used to store the code and data executed when the program is running, and the EEPROM is used to store the running program and static configuration parameters.

[0083] The above describes the architecture and network devices of the application scenarios provided by the embodiments of the present application. Figure 7-Figure 9 The message transmission method provided in the embodiment of the present application is described. Figure 7 A schematic diagram of a message transmission method provided in an embodiment of the present application Figure 1 .like Figure 7 As shown, in an application scenario where a unicast message is transmitted through a first network device in an M-LAG, an abnormality occurs in a link through which the first network device sends a message to a host, and the first network device switches from forwarding the unicast message to forwarding the unicast message (also called tangent), the message transmission method includes the following S101-S103:

[0084] S101. When a link through which a first network device sends a message to a host is abnormal, the first network device sends a first message to a second network device, where the first message includes first identification information.

[0085] In the embodiment of the present application, the first network device sends a message to the host (such as Figure 3 The link for sending the message to the server 304) is abnormal, that is, the first network device cannot send the message to the host. Specifically, the abnormality of the link for sending the message to the host by the first network device includes but is not limited to: the local M-LAG aggregation port of the first network device is abnormal, or the link between the first network device and the host is abnormal.

[0086] The first identification information is used to indicate that the forwarding behavior of the first message forwarded by the first network device is unicast forwarding, that is, the first message is a unicast message, which is equivalent to the first identification information also indicating that the first message is a unicast message. In addition, the first identification information is also used to indicate that the second network device forwards the first message.

[0087] In the embodiment of the present application, the first network device and the second network device belong to the same M-LAG, and the first network device can send the first message to the second network device through a virtual tunnel (for example, a VXLAN bypass tunnel). Figure 3 As shown, the first network device can be Figure 3 The leaf node 302 shown, the second network device may be Figure 3 The leaf node 303 shown in FIG. 1 is a leaf node 303. Accordingly, when the first network device can be a leaf node 302, the second network device can be a leaf node 303. The present application embodiment does not limit this, and the following is an example of the first network device being a leaf node 302 and the second network device being a leaf node 303. Figure 3 The spine node 301 shown obtains the first message.

[0088] In some embodiments, the first network device may encapsulate the first identification information in a VXLAN message header of the first message. Figure 8 A schematic diagram of the structure of a VXLAN encapsulated message provided in an embodiment of the present application, such as Figure 8 As shown, illustratively, the first network device can encapsulate a VXLAN message header, a user datagram protocol (UDP) message header, an outer Internet protocol (IP) message header (e.g., an outer IPv4 message header) and an outer MAC message header for the first message. It can be understood that the message that is not VXLAN encapsulated is an original layer 2 message, and the original layer 2 message has a corresponding inner message header, for example, the inner message header includes an inner MAC message header, which can be referred to the relevant prior art and will not be repeated here.

[0089] Specifically, the VXLAN message header includes a virtual network identifier (VNI) and a reserved field (Reserved), wherein VNI is used to identify the VXLAN network. The UDP message header includes a UDP source port number (UDP source port) and a UDP destination port number (UDP destination port). Among them, the UDP source port is the value calculated by the hash algorithm of the original Ethernet frame, and the UDP destination port is usually 4789. The UDP destination port number is used to indicate that the inner encapsulated message is a VXLAN message. The outer IP message header includes an outer source IP address, an outer destination IP address and a protocol number, wherein the outer source IP address corresponds to the first network device, and the outer destination IP address corresponds to the second network device. The protocol number is usually 11, which is used to indicate that the inner encapsulation is a UDP message. The outer MAC message header includes an outer source MAC address and an outer destination MAC address, wherein the outer source MAC address corresponds to the first network device, and the outer destination MAC address corresponds to the second network device.

[0090] In some embodiments, the first network device may encapsulate the first identification information in a reserved field of the VXLAN header of the first message. In this way, the first identification information may be carried in the first message, so that the second network device can quickly determine that the forwarding type of the message by the first network device is unicast forwarding.

[0091] Exemplarily, the first identification information may be a first field (e.g., a vBumFlag field) set to a first value (e.g., 0), that is, the first identification information may be vBumFlag=0, to indicate that the forwarding behavior of the first network device for the first message is unicast forwarding. Specifically, the vBumFlag field may be carried in a reserved field of the VXLAN message header of the first message, and the specific position of the first identification information in the reserved field of the VXLAN message header may be set according to actual needs, and this application does not make specific limitations on this.

[0092] Furthermore, the first network device may send a first message encapsulated with the first identification information to the second network device to instruct the second network device to forward the first message. In this way, the first identification information may be carried in the first message, so that the second network device may directly obtain the forwarding behavior of the first network device on the first message through the first message, and then the second network device may quickly determine to forward the first message, thereby preventing the first message from being discarded.

[0093] In one implementation, the first network device may use a processor (such as a processor) in the first network device interface board to Figure 6The processor 2021 in the first network device performs VXLAN encapsulation on the first message, such as encapsulating the first identification information in a reserved field of the VXLAN message header of the first message, and can send the encapsulated first message to the second network device through the Ethernet switching chip in the first network device interface board.

[0094] S102: The second network device receives a first message sent by the first network device.

[0095] In an embodiment of the present application, the second network device may receive the first message sent by the first network device through a virtual tunnel (eg, a VXLAN bypass tunnel).

[0096] Specifically, in one implementation, the second network device can use an Ethernet switching chip (such as Figure 6 The Ethernet switching chip 2024 in the device receives a first message sent by a first network device.

[0097] S103: The second network device determines to forward the first message according to the first identification information.

[0098] In an embodiment of the present application, when the link for the first network device to send a message to the host is abnormal, after receiving the first message, the second network device can determine the forwarding behavior of the first network device for the first message based on the received first message. Specifically, the second network device can determine that the forwarding behavior of the first network device for the first message is unicast forwarding based on the first identification information in the first message, and then determine to forward the first message to the host.

[0099] Specifically, take the example that the first network device encapsulates the first identification information in the VXLAN header of the first message. The second network device decapsulates the first message after VXLAN encapsulation to obtain the header information of the first message, which may include the information in the outer MAC header, outer IP header, UDP header and VXLAN header. Furthermore, the second network device can obtain the value of the vBumFlag field in the reserved field of the VXLAN header, and then determine the forwarding behavior of the first network device for the first message according to the value of the vBumFlag field.

[0100] For example, when the value of the vBumFlag field is the first value (eg, 0), the second network device may determine that the forwarding behavior of the first network device for the first message is unicast forwarding.

[0101] In one implementation, the second network device may decapsulate the first message by a processor in the second network device interface board. Exemplarily, after receiving the first message sent by the first network device, the Ethernet switching chip in the second network device interface board may send the first message to the processor in the second network device interface board, and then the processor in the second network device interface board determines the forwarding behavior of the first network device for the first message according to the first identification information.

[0102] Further, when the second network device determines, according to the first identification information, that the forwarding behavior of the first network device for the first message is unicast forwarding, that is, when the first message is a unicast message, the second network device can forward the first message to the host (such as the local M-LAG aggregation port of the second network device) according to the egress port of the first message. Figure 3 The server 304 in forwards the first message.

[0103] In some embodiments, after the second network device unpacks the first message, the outer MAC message header, outer IP message header, UDP message header and VXLAN message header of the first message are removed, so that the outbound port of the first message can be determined based on the VNI and the inner destination MAC.

[0104] For example, Fig. 9 A schematic diagram of a flow chart of an outbound port query is shown, such as Fig. 9 As shown, first, the second network device can search the VNI mapping virtual switching instance (VSI) table according to the VNI to obtain the VSI identification number (identity, ID). Then, the second network device can search the VSI table according to the VSI ID to obtain the MAC address of the bridge domain interface (BDIF). If the BDIF MAC address found is different from the inner destination MAC address of the first message, it is determined that the first message is forwarded at the second layer. The second network device then searches the second layer forwarding MAC table according to the VSI ID and the inner destination MAC address to obtain the index number (DvpIndex) of the destination virtual port (VP), and finally determines the outbound port information of the first message according to the index number of the destination VP.

[0105] Among them, in the process of the second network device determining the egress port information of the message according to the index number of the destination VP, first, the second network device can search the egress port information (for example, the M-LAG member port of the second network device) in the VP table according to the index number of the destination VP. Then, the second network device determines whether the first message includes the first identification information, that is, whether vBumFlag is 0, according to the identification information in the VXLAN message header (for example, vBumFlag). When it is determined that the first message includes the first identification information, that is, when the first message is a unicast message (that is, vBumFlag=0), the second network device directly forwards the first message according to the egress port information, for example, forwarding the first message from the local M-LAG aggregation port of the second network device.

[0106] In one implementation, when the second network device decapsulates the first message by a processor in the second network device interface board, after determining that the forwarding behavior of the first message is unicast forwarding, the processor in the second network device interface board may send a first control instruction to the Ethernet switch chip in the second network device interface board, so that the Ethernet switch chip in the second network device interface board forwards the first message in response to the first control instruction.

[0107] It can be seen that through the message transmission method S101-S103 shown in the above embodiment, when an abnormality occurs in M-LAG, the first network device can carry the first identification information in the first message, for example, encapsulate it in the VXLAN message header of the first message, to indicate that the forwarding behavior of the first network device forwarding the first message is unicast forwarding. Then, the first message is sent to the second network device. After receiving the first message, the second network device can quickly determine that the forwarding behavior of the first network device for the first message is unicast forwarding based on the first identification information, thereby forwarding the first message.

[0108] In this way, when an abnormality occurs in the link through which the first network device in the M-LAG sends a message to the host, resulting in the inability to forward the first message through the first network device, the first message can be sent to the second network device and forwarded through the second network device to prevent the first message from being discarded due to the unidirectional isolation rule, preventing the host from being unable to receive the first message, thereby improving the Layer 2 traffic convergence performance of the M-LAG.

[0109] In some embodiments, the message transmission method provided by the present application can also be applied to the application scenario where a unicast message is transmitted through the first network device in the M-LAG, the link for the first network device to send messages to the host is restored to normal, and the second network device forwards the unicast message and switches to the first network device forwarding the unicast message (also called switching back). Specifically, Fig.10 A schematic diagram of a message transmission method provided in an embodiment of the present application Figure 2 .like Fig.10 As shown, the message transmission method provided in the present application also includes the following S201-S203:

[0110] S201. When a link through which a first network device sends a message to a host returns to normal, the first network device sends a second message to a second network device, where the second message includes first identification information.

[0111] In the embodiment of the present application, the link through which the first network device sends messages to the host is restored to normal, that is, the first network device can send messages to the host. Specifically, the situation in which the link through which the first network device sends messages to the host is restored to normal includes but is not limited to: the local M-LAG aggregation port of the first network device is restored to normal, or the link between the first network device and the host is restored to normal, etc.

[0112] The first identification information is also used to indicate that the forwarding behavior of the first network device forwarding the second message is unicast forwarding, that is, the second message is a unicast message, which is equivalent to the first identification information also indicating that the second message is a unicast message. In addition, the first identification information is also used to indicate that the second network device forwards the second message.

[0113] In some embodiments, the first network device may encapsulate the first identification information in a VXLAN header of the second message. The specific encapsulation method may refer to the method in S101 above where the first network device encapsulates the first identification information in a VXLAN header of the first message, which will not be described in detail here.

[0114] Furthermore, the first network device may send a second message encapsulated with the first identification information to the second network device to instruct the second network device to forward the second message, so as to prevent the first message from being discarded.

[0115] In some embodiments, the first network device may send the first message to the second network device through a virtual tunnel (eg, a VXLAN bypass tunnel).

[0116] S202: The second network device receives a second message sent by the first network device.

[0117] In some embodiments, the second network device may receive the second message sent by the first network device through a virtual tunnel (eg, a VXLAN bypass tunnel).

[0118] S203: The second network device determines to forward the second message according to the first identification information.

[0119] In the embodiment of the present application, the second network device can determine that the forwarding behavior of the first network device for the first message is unicast forwarding based on the first identification information in the second message, and then determine to forward the second message to the host. Specifically, the method of the second network device decapsulating the second message to obtain the first identification information and forwarding the second message can refer to the method of the second network device decapsulating the first message and forwarding the first message in S103 above, which will not be repeated here.

[0120] It can be seen that through the message transmission method S201-S203 shown in the above embodiment, after the link for the first network device to send messages to the host returns to normal, that is, in the process of switching from the second network device forwarding unicast messages to the first network device forwarding unicast messages (also called switching back), the first network device can carry the first identification information in the second message, for example, encapsulate it in the VXLAN message header of the second message, to indicate that the forwarding behavior of the first network device forwarding the first message is unicast forwarding. Then, the first message is sent to the second network device. After receiving the first message, the second network device can quickly determine that the forwarding behavior of the first network device for the second message is unicast forwarding based on the first identification information, thereby forwarding the second message.

[0121] In this way, when the link through which the first network device sends messages to the host returns to normal, during the first network device's switchback process, since it takes a certain amount of time for the MAC table to converge, the first network device does not refresh the MAC table in the initial stage of the switchback, and the outbound port of the MAC table still points to the port of the second network device. The first network device can send the second message to the second network device, and forward the second message through the second network device. The second message includes the first identification information, and the first identification information is also used to indicate that the forwarding behavior of the first network device forwarding the second message is unicast forwarding, and the first identification information is also used to indicate that the second network device forwards the second message. In this way, the second message can be prevented from being discarded due to the unidirectional isolation rule, further improving the Layer 2 traffic convergence performance of M-LAG.

[0122] In some embodiments, the message transmission method provided in the present application can also be applied to the application scenario where a BUM message is transmitted through the first network device in the M-LAG, and an abnormality occurs in the link through which the first network device sends the message to the host, and the message forwarding is switched from the first network device to the second network device (i.e., tangent). Specifically, Fig.11 A schematic diagram of a message transmission method provided in an embodiment of the present application Figure 3 ,like Fig.11 As shown, the message transmission method provided by the present application also includes the following S301-S303:

[0123] S301. When a link through which a first network device sends a message to a host is abnormal, the first network device sends a third message to a second network device, where the third message includes second identification information.

[0124] Among them, the second identification information indicates that the forwarding behavior of the first network device in forwarding the third message is BUM forwarding, that is, the third message is a BUM message, which is equivalent to the second identification information indicating that the third message is a BUM message. Alternatively, when the third message is a unicast message, but an abnormal situation occurs when the first network device forwards the third message (for example, the MAC table of the third message cannot be found), resulting in the third message being forwarded in an unknown unicast (i.e., BUM) manner, the second identification information can also be used to indicate that the third message is a BUM message.

[0125] In some embodiments, the first network device may encapsulate the second identification information in the VXLAN header of the third message. The specific encapsulation method may refer to the method in S101 above where the first network device encapsulates the first identification information in the VXLAN header of the first message, which will not be described in detail here.

[0126] Exemplarily, the second identification information may be a first field (e.g., a vBumFlag field) set to a second value (e.g., 1), that is, the second identification information may be vBumFlag=1, to indicate that the forwarding behavior of the first network device for the third message is BUM forwarding. Specifically, the vBumFlag field may be carried in a reserved field of the VXLAN message header of the third message, and the specific position of the second identification information in the reserved field of the VXLAN message header may be set according to actual needs, and this application does not make specific limitations on this.

[0127] In some embodiments, the first network device may send a third message to the second network device through a virtual tunnel (eg, a VXLAN bypass tunnel).

[0128] S302: The second network device receives a third message sent by the first network device.

[0129] In some embodiments, the second network device may receive the second message sent by the first network device through a virtual tunnel (eg, a VXLAN bypass tunnel).

[0130] S303: The second network device determines whether to forward the third message according to the second identification information.

[0131] In an embodiment of the present application, when the link in which the first network device sends a message to the host is abnormal, the second network device can determine, based on the second identification information in the third message, that the forwarding behavior of the first network device for the third message is BUM forwarding, and can then determine whether to forward the third message to the host by searching the one-way isolation table.

[0132] Specifically, when an abnormality occurs in M-LAG and the forwarding of BUM messages by the first network device is switched to the forwarding of BUM messages by the second network device, the second network device can achieve the switch by deleting the one-way isolation table. Therefore, before the second network device deletes the one-way isolation table, the second network device can determine whether to forward the third message to the host by searching the one-way isolation table. After the second network device deletes the one-way isolation table, the second network device can forward the third message to the host.

[0133] In an example, if the second network device finds an entry including the source port and the egress port of the third message in the unidirectional isolation table, the second network device does not forward the third message, that is, discards the third message.

[0134] In another example, if the second network device does not find an entry including the source port and the egress port of the third message in the one-way isolation table, or the second network device does not find the one-way isolation table, that is, the one-way isolation table has been deleted, the second network device can forward the third message to the host.

[0135] In this way, when the link for the first network device to send a message to the host is abnormal, the first network device is in the process of switching. Before the second network device deletes the unidirectional isolation table, it can effectively prevent the M-LAG from forwarding multiple BUM messages or transmission loops. After the second network device deletes the unidirectional isolation table, it can effectively prevent the BUM message from being discarded, thereby improving the Layer 2 traffic convergence performance of the M-LAG.

[0136] In some embodiments, when a BUM message is transmitted through the first network device in the M-LAG, an abnormality occurs in the link through which the first network device sends the message to the host, and the forwarding of the message by the first network device is switched to the forwarding of the message by the second network device (i.e., tangent). The first network device may also carry its abnormal information in the message and send it to the second network device, so that the second network device can quickly determine to forward the message. Specifically, Fig.12 A schematic diagram of a message transmission method provided in an embodiment of the present application Figure 4 ,like Fig.12 As shown, the message transmission method provided in the present application also includes the following S401-S403:

[0137] S401. When a link for sending a message from a first network device to a host is abnormal, the first network device sends a third message to a second network device, where the third message includes second identification information and abnormal information.

[0138] The second identification information is used to indicate that the forwarding behavior of the first network device in forwarding the third message is BUM forwarding, that is, the third message is a BUM message, which is equivalent to the second identification information indicating that the third message is a BUM message. Alternatively, when the third message is a unicast message, but an abnormality occurs when the first network device forwards the third message, resulting in the third message being forwarded in an unknown unicast (i.e., BUM) manner, the second identification information can also be used to indicate that the third message is a BUM message.

[0139] The abnormal information is used to indicate that the link for the first network device to send a message to the host is abnormal. Specifically, the abnormal information can be used to indicate an abnormal M-LAG aggregation port in the first network device. In addition, the second identification information and the abnormal information are also used to instruct the second network device to forward the third message.

[0140] In some embodiments, the first network device may encapsulate the second identification information and the exception information in the VXLAN header of the third message. The encapsulation method of the second identification information may refer to the method in S101 above where the first network device encapsulates the first identification information in the VXLAN header of the first message, which is not described in detail here.

[0141] In one implementation, the first network device may encapsulate the exception information in a reserved field of the VXLAN header of the third message. Specifically, the first network device may identify the status (Mlagstatus) of the M-LAG aggregation port through a bit in the reserved field of the VXLAN header. Exemplarily, the reserved field of the VXLAN header includes 24 bits, each of which may correspond to the status of an M-LAG aggregation port, that is, 24 bits correspond to the status of 24 M-LAG aggregation ports. The value of the bit may indicate whether the status of the M-LAG aggregation port is abnormal or normal. Among them, if the value of the bit is a first value (for example, 0), it indicates that the status of the M-LAG aggregation port corresponding to the bit is abnormal (down), that is, the exception information may be bit=0.

[0142] Furthermore, the first network device may send a third message encapsulating the second identification information and the abnormal information to the second network device to instruct the second network device to forward the third message to prevent the third message from being discarded.

[0143] S402: The second network device receives a third message sent by the first network device.

[0144] S403: The second network device determines to forward the third message according to the second identification information and the abnormal information.

[0145] In the embodiment of the present application, the second network device can determine that the forwarding behavior of the first network device for the first message is BUM forwarding based on the second identification information and abnormal information in the third message, and that the link for the first network device to send the message to the host is abnormal. Furthermore, the second network device can determine to forward the third message to the host.

[0146] In some embodiments, after the second network device unpacks the third message, the outer MAC message header, outer IP message header, UDP message header and VXLAN message header of the third message are removed, so that the outbound port of the third message can be determined based on the VNI and the inner destination MAC.

[0147] For example, see Fig. 9 In the process of the second network device determining the egress port information of the message according to the index number of the destination VP, first, the second network device can search the egress port information (for example, the M-LAG member port of the second network device) in the VP table according to the index number of the destination VP. Then, the second network device determines whether the third message includes abnormal information, that is, whether the bit value is 0, according to the M-LAG aggregation port information (Mlagstatus) in the VXLAN message header. And according to the identification information (for example, vBumFlag) in the VXLAN message header, determine whether the first message includes the second identification information, that is, whether vBumFlag is 1. When the second network device determines that the third message includes the second identification information and abnormal information (that is, bit=0, and vBumFlag=1), the second network device directly forwards the third message according to the egress port information, for example, forwarding the third message from the local M-LAG aggregation port of the second network device.

[0148] In this way, when the link for sending a message from the first network device to the host is abnormal, the first network device is in the process of switching. The first network device can carry the second identification information and the abnormal information in the third message and send it to the second network device. The second network device does not need to look up the one-way isolation table, and can determine to forward the third message based on the second identification information and the abnormal information. In this way, not only can the table entry resources of the second network device be saved, but also the situation that the BUM message is discarded due to the abnormality of the first network device or the link between the first network device and the host can be prevented, thereby improving the Layer 2 traffic convergence performance of M-LAG.

[0149] In some embodiments, the message transmission method provided in the present application can also be applied to the application scenario where a BUM message is transmitted through the first network device in the M-LAG, the link for the first network device to send messages to the host is restored to normal, and the message forwarding is switched from the second network device to the first network device (i.e., switching back). Fig.13 A schematic diagram of a message transmission method provided in an embodiment of the present application Figure 5 ,like Fig.13 As shown, the message transmission method provided in the present application also includes the following S501-S503:

[0150] S501. When a link through which a first network device sends messages to a host returns to normal, the first network device sends a fourth message to a second network device, where the fourth message includes second identification information.

[0151] The second identification information is also used to indicate that the forwarding behavior of the first network device forwarding the fourth message is BUM forwarding, that is, the fourth message is a BUM message, which is equivalent to the second identification information indicating that the fourth message is a BUM message. Alternatively, when the fourth message is a unicast message, but an abnormality occurs when the first network device forwards the fourth message, resulting in the fourth message being forwarded in an unknown unicast (i.e., BUM) manner, the second identification information can also be used to indicate that the fourth message is a BUM message.

[0152] In some embodiments, the first network device may encapsulate the second identification information in the VXLAN header of the fourth message. The specific encapsulation method may refer to the method in S101 above where the first network device encapsulates the first identification information in the VXLAN header of the first message, which will not be described in detail here.

[0153] S502: The second network device receives a fourth message sent by the first network device.

[0154] S503: The second network device determines whether to forward the fourth message according to the second identification information.

[0155] In an embodiment of the present application, when the link through which the first network device sends messages to the host returns to normal, the second network device can determine, based on the second identification information in the fourth message, that the forwarding behavior of the first network device for the fourth message is BUM forwarding, and can then determine whether to forward the fourth message to the host by searching the one-way isolation table. Specifically, when the M-LAG returns to normal and the forwarding of BUM messages by the second network device is switched to the forwarding of BUM messages by the first network device, the second network device can achieve the switch by issuing a one-way isolation table. Therefore, after the second network device issues the one-way isolation table, the second network device can determine whether to forward the fourth message to the host by searching the one-way isolation table. Before the second network device issues the one-way isolation table, the second network device can forward the fourth message to the host.

[0156] In one example, after the second network device sends the unidirectional isolation table, if the second network device finds an entry including the source port and the egress port of the fourth message in the unidirectional isolation table, the second network device does not forward the fourth message, that is, discards the fourth message.

[0157] In another example, after the second network device sends down the unidirectional isolation table, if no entry including the source port and egress port of the fourth message is found in the unidirectional isolation table, or before the second network device sends down the unidirectional isolation table, that is, when there is no unidirectional isolation table, the second network device can forward the fourth message to the host.

[0158] In this way, the link for the first network device in the M-LAG to send messages to the host is restored to normal, and the first network device is in the process of switching back. Before the second network device sends the unidirectional isolation table, it can effectively prevent the BUM message from being discarded. After the second network device sends the unidirectional isolation table, it can effectively prevent the network devices in the M-LAG from forwarding BUM messages with multiple packets or loops, thereby improving the Layer 2 traffic convergence performance of the M-LAG.

[0159] In some embodiments, when a BUM message is transmitted through the first network device in the M-LAG, the link through which the first network device sends the message to the host returns to normal, and the message forwarding by the second network device is switched to the first network device forwarding the message (i.e., switching back). The first network device may also carry its restoration information in the message and send it to the second network device, so that the second network device can quickly determine not to forward the message. Specifically, Fig.14 A schematic diagram of a message transmission method provided in an embodiment of the present application Figure 6 ,like Fig.14 As shown, the message transmission method provided by the present application also includes the following S601-S603:

[0160] S601. When a link through which a first network device sends messages to a host is restored to normal, the first network device sends a fourth message to a second network device, where the fourth message includes second identification information and recovery information.

[0161] The second identification information is used to indicate that the forwarding behavior of the first network device in forwarding the fourth message is BUM forwarding, that is, the fourth message is a BUM message, which is equivalent to the second identification information indicating that the fourth message is a BUM message. Alternatively, when the fourth message is a unicast message, but an abnormality occurs when the first network device forwards the fourth message, resulting in the fourth message being forwarded in an unknown unicast (i.e., BUM) manner, the second identification information can also be used to indicate that the fourth message is a BUM message.

[0162] The recovery information is used to indicate that the link through which the first network device sends messages to the host has returned to normal. Specifically, the recovery information can be used to indicate that the M-LAG aggregation port in the first network device has returned to normal. In addition, the second identification information and the recovery information are also used to indicate that the second network device does not forward the fourth message.

[0163] In some embodiments, the first network device may encapsulate the second identification information and the recovery information in the VXLAN header of the fourth message. The encapsulation method of the second identification information may refer to the method in S101 above where the first network device encapsulates the first identification information in the VXLAN header of the first message, which is not described in detail here.

[0164] In one implementation, the first network device may encapsulate the recovery information in a reserved field of the VXLAN header of the fourth message. Specifically, the first network device may identify the state of the M-LAG aggregation port through a bit in the reserved field of the VXLAN header. Exemplarily, if the value of the bit is the second value (e.g., 1), it indicates that the state of the M-LAG aggregation port corresponding to the bit is normal (up), that is, the recovery information may be bit=1.

[0165] Further, the first network device may send a fourth message encapsulated with the second identification information and the recovery information to the second network device to instruct the second network device not to forward the fourth message, so as to prevent the M-LAG from forwarding multiple fourth messages.

[0166] S602: The second network device receives a fourth message sent by the first network device.

[0167] S603: The second network device determines not to forward the fourth message according to the second identification information and the recovery information.

[0168] In the embodiment of the present application, the second network device can determine that the forwarding behavior of the first network device for the first message is BUM forwarding based on the second identification information and recovery information in the fourth message, and the link for the first network device to send messages to the host has recovered to normal. Furthermore, the second network device can determine not to forward the third message to the host.

[0169] In this way, the link for the first network device in the M-LAG to send a message to the host is restored to normal, and the first network device is in the process of switching back. After the second network device receives the fourth message, it does not need to look up the unidirectional isolation table, and can determine not to forward the third message based on the second identification information and the abnormal information. In this way, not only can the table entry resources of the second network device be saved, but also the situation of multiple packets or loops when the network device in the M-LAG forwards the BUM message can be prevented.

[0170] In some embodiments, the message transmission method provided in the embodiment of the present application can also be applied in the application scenario where a link for sending a message from the first network device to the host is abnormal or returns to normal when a unicast message or a BUM message is transmitted through the first network device in the M-LAG. That is, the message transmission method provided in the embodiment of the present application can also include at least one of the above-mentioned S101-S103, S201-S203, S301-S303, S401-S403, S501-S503 and S601-S603.

[0171] It is understandable that the above-mentioned electronic device (such as the above-mentioned first network device, the second network device) includes a hardware structure and / or software module corresponding to each function in order to realize the above-mentioned functions. Those skilled in the art should easily realize that, in combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0172] The embodiment of the present application can group the functional modules of the electronic device according to the above method example. For example, each functional module can be grouped according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the grouping of modules in the embodiment of the present application is schematic and is only a logical functional grouping. There may be other grouping methods in actual implementation.

[0173] An embodiment of the present application also provides a message transmission device, which can be deployed in the above-mentioned first network device, or a chip in the first network device, or a system on chip, and the message transmission device can be used to perform the functions of the first network device involved in the above-mentioned embodiment.

[0174] As a feasible method, Fig.15 As shown, the message transmission device 300 may include: a sending module 301. Specifically, the sending module 301 is used to send a first message to a second network device when a link for sending a message from a first network device to a host is abnormal; the first message includes first identification information, and the first identification information is used to indicate that the forwarding behavior of the first network device forwarding the first message is unicast forwarding, and the first identification information is also used to indicate that the second network device forwards the first message, wherein the first network device and the second network device belong to the same cross-device link aggregation group M-LAG.

[0175] In some implementations, the message transmission device 300 may further include: a processing module 302, and the processing module 302 is used to encapsulate the first identification information in a VXLAN message header of the first message.

[0176] In addition, the technical effects of the message transmission device 300 can refer to the technical effects of the first network device in the above-mentioned message transmission method, which will not be repeated here.

[0177] An embodiment of the present application also provides a message transmission device, which can be deployed in the above-mentioned second network device, or a chip in the second network device, or a system on chip, and the message transmission device can be used to perform the functions of the second network device involved in the above-mentioned embodiment.

[0178] As a feasible method, Fig.16 As shown, the message transmission device 400 may include: a receiving module 401 and a processing module 402. Specifically, the receiving module 401 is used to receive a first message sent by a first network device, the first message including first identification information, the first identification information is used to indicate that the forwarding behavior of the first network device forwarding the first message is unicast forwarding, wherein the first network device and the second network device belong to the same M-LAG. The processing module 402 is used to determine to forward the first message according to the first identification information.

[0179] In addition, the technical effects of the message transmission device 400 can refer to the technical effects of the second network device in the above-mentioned message transmission method, which will not be repeated here.

[0180] The embodiment of the present application provides a communication system, which includes one or more network devices, such as the first network device and the second network device mentioned above.

[0181] The embodiment of the present application also provides a chip system, the chip includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run computer program codes or instructions to implement the following Figure 7 In the message transmission method shown in , the communication interface is used to communicate with other modules outside the chip.

[0182] The embodiment of the present application also provides a computer-readable storage medium for storing computer instructions executed by the above-mentioned network device (such as the first network device or the second network device).

[0183] An embodiment of the present application also provides a computer program product, including computer instructions executed by the above-mentioned network device (such as the first network device or the second network device).

[0184] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0185] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0186] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0187] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0188] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0189] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0190] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A message transmission method, characterized in that: Applied to a first network device, the method comprises: When a link for sending a message from the first network device to the host is abnormal, sending a first message to a second network device; The first message includes first identification information, and the first identification information is used to indicate that the forwarding behavior of the first network device forwarding the first message is unicast forwarding, and the first identification information is also used to indicate that the second network device forwards the first message, wherein the first network device and the second network device belong to the same cross-device link aggregation group M-LAG.

2. The method according to claim 1, characterized in that The method further comprises: When the link through which the first network device sends the message to the host returns to normal, sending a second message to the second network device; The second message includes the first identification information, and the first identification information is further used to indicate that the forwarding behavior of the first network device forwarding the second message is unicast forwarding, and the first identification information is further used to indicate that the second network device forwards the second message.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: When a link for sending a message from the first network device to the host is abnormal, sending a third message to the second network device; The third message includes second identification information and exception information, the second identification information is used to indicate that the forwarding behavior of the first network device in forwarding the third message is broadcast, unknown unicast and multicast BUM forwarding, the exception information is used to indicate that the link of the first network device sending the message to the host is abnormal, and the second identification information and the exception information are also used to indicate that the second network device forwards the third message.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: When the link through which the first network device sends the message to the host returns to normal, sending a fourth message to the second network device; The fourth message includes the second identification information and recovery information, the second identification information is also used to indicate that the forwarding behavior of the first network device in forwarding the fourth message is BUM forwarding, the recovery information is used to indicate that the link for the first network device to send messages to the host has returned to normal, and the second identification information and the recovery information are also used to indicate that the second network device does not forward the fourth message.

5. The method according to any one of claims 1 to 4, characterized in that: The first identification information is encapsulated in the VXLAN message header of the first message.

6. The method according to claim 3, characterized in that The second identification information and the exception information are encapsulated in the VXLAN message header of the third message.

7. A message transmission method, characterized in that: Applied to the second network device, the method comprises: receiving a first message sent by a first network device, where the first message includes first identification information, where the first identification information is used to indicate that a forwarding behavior of the first message forwarded by the first network device is unicast forwarding, wherein the first network device and the second network device belong to the same M-LAG; Determine to forward the first message according to the first identification information.

8. The method according to claim 7, characterized in that The method further comprises: Receive a third message sent by the first network device, the third message including second identification information and exception information, the second identification information is used to indicate that the forwarding behavior of the first network device forwarding the third message is BUM forwarding, and the exception information is used to indicate that a link for the first network device to send a message to a host is abnormal; Determine, according to the second identification information and the exception information, whether to forward the third message.

9. The method according to claim 7 or 8, characterized in that: The method further comprises: receiving a fourth message sent by the first network device, the fourth message including second identification information and recovery information, the second identification information being used to indicate that a forwarding behavior of the first network device forwarding the fourth message is BUM forwarding, and the recovery information being used to indicate that a link for the first network device to send messages to a host has returned to normal; Determine not to forward the fourth message according to the second identification information and the recovery information.

10. A message transmission device, characterized in that: The device is deployed on a first network device of the M-LAG, and includes: a sending module; The sending module is used to send a first message to a second network device when a link for the first network device to send a message to a host is abnormal; the first message includes first identification information, and the first identification information is used to indicate that the forwarding behavior of the first network device forwarding the first message is unicast forwarding, and the first identification information is also used to indicate that the second network device forwards the first message, wherein the first network device and the second network device belong to the same M-LAG.

11. A message transmission device, characterized in that: The device is deployed on a second network device of the M-LAG, and includes: a receiving module and a processing module; The receiving module is used to receive a first message sent by a first network device, where the first message includes first identification information, where the first identification information is used to indicate that a forwarding behavior of the first message forwarded by the first network device is unicast forwarding, wherein the first network device and the second network device belong to the same M-LAG; The processing module is used to determine whether to forward the first message according to the first identification information.

12. A chip, characterized in that: The chip includes a processor and a communication interface, the communication interface is coupled to the processor, the processor is used to run computer program code or instructions to implement the method as described in any one of claims 1-6, or to implement the method as described in any one of claims 7-9, and the communication interface is used to communicate with other modules outside the chip.

13. An electronic device, characterized in that: include: A memory and one or more processors; the memory is coupled to the processor; wherein the memory stores computer program code, the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1 to 6, or the electronic device executes the method as described in any one of claims 7 to 9.

14. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 6, or cause the electronic device to execute the method as claimed in any one of claims 7 to 9.

15. A computer program product, characterized in that When the computer program product is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 6, or the computer is enabled to execute the method according to any one of claims 7 to 9.