Table item synchronization method and device, electronic equipment and computer readable storage medium

By generating UDP messages in the MLAG-Lite networking system and forwarding them to the peer leaf node, it can learn the ARP table entries of the lower-connected device, which solves the problem that the Leaf switch cannot learn the ARP table entries of the server, and realizes synchronization and active forwarding of the ARP table entries.

CN119966944APending Publication Date: 2025-05-09MAIPU COMM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311499290.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-09
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

In the MLAG-Lite networking system, the peer link between devices is removed, and the Leaf switch cannot learn the ARP table entries of the server, resulting in the inability to realize dual-active forwarding.

Method used

When the local leaf node receives the ARP message sent by the downlink device, an ARP table entry is generated and a UDP message is generated, and forwarded to the peer leaf node through the first backbone node or the second backbone node, the peer leaf node can learn the ARP table entry of the downlink device.

Benefits of technology

The ARP table entries synchronization between the native leaf node and the peer leaf node in the MLAG-Lite networking system is realized, and there is no need to configure the server to send dual ARP packets, which reduces the complexity and cost of network deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119966944A_ABST
    Figure CN119966944A_ABST
Patent Text Reader

Abstract

The invention provides a table item synchronization method and apparatus, an electronic device and a computer readable storage medium, in an MLAP-Lite networking system, when a home terminal leaf node receives an ARP message sent by a downlink device, when an ARP table item of the downlink device is generated based on the ARP message, a UDP message is generated based on the ARP message. Due to the fact that the route between the home terminal leaf node and the opposite terminal leaf node is reachable, the home terminal leaf node can forward the UDP message to the opposite terminal leaf node through the first backbone node or the second backbone node, and therefore the opposite terminal leaf node can learn the ARP table item of the downlink device based on the UDP message. Compared with the prior art in which double network cards of a server need to be configured to send ARP messages at regular time, the method does not need to configure the server to send the ARP messages at double times, but depends on the routing of the home terminal leaf node and the opposite terminal leaf node, so that the home terminal leaf node can forward the UDP message obtained based on the ARP messages to the opposite terminal leaf node, and the user experience is improved. Therefore, ARP table item synchronization between the two ends is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communications, and in particular to a table entry synchronization method, device, electronic device and computer-readable storage medium. Background Art

[0002] Traditional data center networks use equipment and link redundancy to ensure high network reliability. However, due to their low link utilization and high network maintenance costs, data center switches have proposed stacking technology. Stacking technology virtualizes multiple switches into one switch to simplify network deployment and reduce network maintenance.

[0003] Furthermore, in order to meet the requirements of increased business volume and higher network reliability, the current data center network adopts MLAG (Multi-chassis Link Aggregation Group) virtualization technology, which can improve the reliability of links from the single board level to the device level by aggregating links between multiple devices. Figure 1 In M-LAG technology, a peer-link is configured between two devices, so that the two devices can synchronize protocol messages to achieve the purpose of active-active forwarding.

[0004] MLAG-Lite technology was born because users want to achieve device independence at the access layer, control plane isolation, device fault isolation, and active-active forwarding processing without affecting each other during version upgrades. Figure 1 For the M-LAG networking shown in Figure 2 The typical networking diagram of MLAG-Lite shown in the figure removes the peer links between devices, which simplifies deployment and saves costs. In addition, during the upgrade process, the service is not interrupted. In addition, MLAGLite can ensure the decoupling of the control planes between multiple devices, and there is no need to configure peer links between devices to synchronize protocol messages to achieve the purpose of active-active forwarding.

[0005] exist Figure 2In the example, the same gateway is configured for server1 and server2 on leaf1 and leaf2. For servers connected to the leaf switch in load balancing, ARP packets (reply packets or request packets) are sent to leaf1 or leaf2 through HASH routing. Since the peer link between leaf1 and leaf2 is removed, if the ARP packet sent by the server is sent to leaf1 after HASH routing, leaf2 cannot receive the ARP packet sent by the server. In this case, only leaf1 can learn the ARP table entry of the server, while leaf2 cannot learn the ARP table entry of the server, resulting in the inability of leaf2 and the server to communicate at layer 3.

[0006] The current solution to this problem is to configure the server to periodically send ARP messages to both Leaf1 and Leaf2 through dual network cards so that both Leaf1 and Leaf2 can receive ARP messages and learn the server's ARP table entries. However, some vendors' servers do not support active sending of ARP messages, so the consistency of ARP entries maintained between Leaf1 and Leaf2 cannot be guaranteed. Even if the server supports active sending of ARP messages, by default, the server will not send ARP messages to both servers, so it is necessary to configure the server to allow dual network cards to send ARP messages to both servers. This method adds additional configuration work to the server during network deployment. Summary of the invention

[0007] The object of the present invention is to provide a table entry synchronization method, device, electronic device and computer-readable storage medium to improve the problems existing in the prior art.

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

[0009] In a first aspect, the present invention provides a table entry synchronization method, which is applied to a local leaf node in an MLAG-Lite networking system, wherein the MLAG-Lite networking system further includes a peer leaf node, a first backbone node, and a second backbone node, wherein the local leaf node and the peer leaf node are both communicatively connected to the first backbone node and the second backbone node, and the local leaf node and the peer leaf node are reachable by routing and are commonly connected to a downlink device; the method includes:

[0010] When receiving an ARP message sent by the downstream device, generating an ARP table entry of the downstream device based on the ARP message, and generating a UDP message based on the ARP message;

[0011] The UDP message is forwarded to the opposite leaf node through the first backbone node or the second backbone node, so that the opposite leaf node learns the ARP table entry of the downstream device based on the UDP message.

[0012] In an optional implementation, a BGP session is established between the local leaf node and the first backbone node and the second backbone node, and a BGP session is established between the opposite leaf node and the first backbone node and the second backbone node;

[0013] The specific implementation method of the route between the local leaf node and the opposite leaf node being reachable includes:

[0014] Get the local loopback address;

[0015] Based on the BGP session, the local loopback address is respectively notified to the first backbone node and the second backbone node, so that the first backbone node and the second backbone node respectively notify the local loopback address to the opposite leaf node based on the BGP session;

[0016] Receiving the peer loopback address announced by the first backbone node and the second backbone node based on the BGP session;

[0017] Adding a routing table entry to the dynamic routing table based on the received two opposite-end loopback addresses, the respective IP addresses of the first backbone node and the second backbone node, and the packet receiving interfaces of the two opposite-end loopback addresses;

[0018] The local loopback address and the opposite loopback address are respectively set as the source address and the destination address of the ARP message layer 3 network forwarding function.

[0019] In an optional implementation manner, the step of generating a UDP message based on the ARP message includes:

[0020] Parsing the ARP message to obtain ARP message information in the ARP message;

[0021] Based on the source address and destination address of the three-layer network forwarding function of the ARP message, the ARP message information is encapsulated according to the UDP protocol to obtain the UDP message.

[0022] In an optional implementation, the step of forwarding the UDP message to the opposite leaf node through the first backbone node or the second backbone node so that the opposite leaf node learns the ARP table entry of the downstream device based on the UDP message includes:

[0023] Searching the dynamic routing table for a routing table entry with the opposite end loopback address as the destination address;

[0024] Determine a next hop node of the UDP message based on the routing table entry; the next hop node is the first backbone node or the second backbone node;

[0025] The UDP message is forwarded to the opposite leaf node through the determined next hop node, so that the opposite leaf node obtains the ARP table entry of the downstream device after parsing the UDP message.

[0026] In a second aspect, the present invention provides a table entry synchronization method, which is applied to a peer leaf node in an MLAG-Lite networking system, wherein the MLAG-Lite networking system further includes a local leaf node, a first backbone node, and a second backbone node, wherein the local leaf node and the peer leaf node are both communicatively connected to the first backbone node and the second backbone node, and the local leaf node and the peer leaf node are reachable by routing and are commonly connected to a downlink device; the method includes:

[0027] Receiving a UDP message sent by the local leaf node through the first backbone node or the second backbone node; the UDP message is generated by the local leaf node based on the ARP message when receiving the ARP message sent by the downstream device;

[0028] Based on the UDP message, an ARP table entry of the downstream device is obtained.

[0029] In an optional implementation, a BGP session is established between the local leaf node and the first backbone node and the second backbone node, and a BGP session is established between the opposite leaf node and the first backbone node and the second backbone node;

[0030] The specific implementation method of the route between the opposite end leaf node and the local end leaf node is reachable, including:

[0031] Get the peer loopback address;

[0032] Based on the BGP session, the peer loopback address is respectively notified to the first backbone node and the second backbone node, so that the first backbone node and the second backbone node respectively notify the peer loopback address to the local leaf node based on the BGP session;

[0033] Receiving a local loopback address announced by the first backbone node and the second backbone node based on the BGP session;

[0034] Adding a routing table entry to the dynamic routing table based on the two received local loopback addresses, the IP addresses of the first backbone node and the second backbone node, and the packet receiving interfaces of the two local loopback addresses;

[0035] The opposite end loopback address and the local end loopback address are respectively set as the source address and the destination address of the ARP message layer 3 network forwarding function.

[0036] In an optional implementation manner, the step of obtaining the ARP table entry of the downstream device based on the UDP message includes:

[0037] Obtain the source address and destination address of the UDP message;

[0038] If the source address and the destination address of the UDP message are consistent with the source address and the destination address of the layer 3 network forwarding function of the ARP message, an ARP table entry of the downstream device is generated based on the ARP message information in the UDP message.

[0039] In a third aspect, the present invention provides a table entry synchronization device, which is applied to a local leaf node in an MLAG-Lite networking system, wherein the MLAG-Lite networking system further includes a peer leaf node, a first backbone node, and a second backbone node, wherein the local leaf node and the peer leaf node are both communicatively connected to the first backbone node and the second backbone node, and the local leaf node and the peer leaf node are reachable by routing and are commonly connected to a downlink device; the device includes:

[0040] A conversion module, configured to generate an ARP table entry of the downstream device based on the ARP message when receiving the ARP message sent by the downstream device, and generate a UDP message based on the ARP message;

[0041] A synchronization module is used to forward the UDP message to the opposite leaf node through the first backbone node or the second backbone node, so that the opposite leaf node learns the ARP table entry of the downstream device based on the UDP message.

[0042] In a fourth aspect, the present invention provides a table entry synchronization device, which is applied to a peer leaf node in an MLAG-Lite networking system, wherein the MLAG-Lite networking system further includes a local leaf node, a first backbone node, and a second backbone node, wherein the local leaf node and the peer leaf node are both communicatively connected to the first backbone node and the second backbone node, and the local leaf node and the peer leaf node are reachable by routing and are commonly connected to a downlink device; the device includes:

[0043] A receiving module, used for receiving a UDP message sent by the local leaf node through the first backbone node or the second backbone node; the UDP message is generated by the local leaf node based on the ARP message when receiving the ARP message sent by the downstream device;

[0044] The parsing module is used to obtain the ARP table entry of the downstream device based on the UDP message.

[0045] In a fifth aspect, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory stores a software program, and when the electronic device is running, the processor executes the software program to implement the table entry synchronization method as described in the first aspect or the second aspect above.

[0046] In a sixth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the table entry synchronization method described in the first aspect or the second aspect is implemented.

[0047] Compared with the prior art, the embodiments of the present invention provide a table entry synchronization method, device, electronic device and computer-readable storage medium. For the local leaf node and the opposite leaf node in the MLAG-Lite networking system, when the local leaf node receives the ARP message sent by the downstream device, it can generate the ARP table entry of the downstream device based on the ARP message, and at the same time generate the UDP message based on the ARP message. Since the route between the local leaf node and the opposite leaf node is reachable, the local leaf node can then forward the UDP message to the opposite leaf node through the first backbone node or the second backbone node, so that the opposite leaf node can learn the ARP table entry of the downstream device based on the UDP message. Compared with the prior art that requires the configuration of the server's dual network card to periodically send two ARP messages, the present invention does not need to configure the server to send two, but relies on the reachable route between the local leaf node and the opposite leaf node, and then the local leaf node can forward the UDP message obtained based on the ARP message to the opposite leaf node, so as to achieve ARP table entry synchronization between the two ends. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0049] Figure 1 The figure is a schematic diagram of the networking principle of M-LAG technology.

[0050] Figure 2 The following is a typical networking diagram of MLAG-Lite.

[0051] Figure 3 One of the flowcharts of a table entry synchronization method provided by an embodiment of the present invention.

[0052] Figure 4 A schematic diagram of the structure of an MLAG-Lite networking system provided in an embodiment of the present invention.

[0053] Figure 5 The second flowchart of a table entry synchronization method provided by an embodiment of the present invention.

[0054] Figure 6 This is one of the structural schematic diagrams of a table entry synchronization device provided by an embodiment of the present invention.

[0055] Figure 7 The second structural diagram of a table entry synchronization device provided by an embodiment of the present invention.

[0056] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

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

[0058] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

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

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

[0062] Here, the application scenarios of the present invention are first introduced. Figure 2 , Figure 2 This is a schematic diagram of the structure of a classic MLAG-Lite networking system. The MLAG-Lite networking system is based on the Spine-Leaf architecture. The Spine layer is the backbone of the network, including a pair of Spine switches (Spine1 and Spine2), and the Leaf layer includes a pair of Leaf switches (Leaf1 and Leaf2) for accessing servers. The two Leaf switches in the Leaf layer are connected to the two Spine switches in the Spine layer, and the two physical servers (Sever1 and Sever2) are connected to the two Leaf switches using cross-device link aggregation (MLAG-Lite).

[0063] The local leaf node and the opposite leaf node referred to in the present invention are Figure 2 The two Leaf switches shown in the figure are the first backbone node and the second backbone node. Figure 2 The two Spine switches shown in the figure have the server (Sever1 or Sever2) connected to the Leaf layer as the downstream device. The following describes in detail the table entry synchronization method provided by the present invention from the perspectives of the local leaf node (assuming Leaf1) and the opposite leaf node (assuming Leaf2).

[0064] First, please refer to Figure 3 , Figure 3 One of the flow diagrams of a table item synchronization method provided in an embodiment of the present invention, the table item synchronization method is applied to the local leaf node (Leaf1) in the MLAG-Lite networking system, the MLAG-Lite networking system also includes the opposite leaf node (Leaf2), the first backbone node (Spine1) and the second backbone node (Spine2), the local leaf node and the opposite leaf node are both connected to the first backbone node and the second backbone node, and the local leaf node and the opposite leaf node are pre-configured to be route-reachable and commonly connected to a downlink device (Sever1 or Sever2). The table item synchronization method may include steps S102 to S103:

[0065] S102: When an ARP message sent by a downstream device is received, an ARP table entry of the downstream device is generated based on the ARP message, and a UDP (User Datagram Protocol) message is generated based on the ARP message.

[0066] In this embodiment, the downstream device can send an ARP message to the local leaf node after HASH routing. The ARP message can be an ARP request message or an ARP reply message, which is not limited in this embodiment of the present invention. When the local leaf node receives the ARP message sent by the downstream device, it can learn the ARP table entry of the downstream device (the corresponding relationship between the IP address and the MAC address of the downstream device) based on the ARP message, and generate a UDP message based on the ARP message.

[0067] S103: forward the UDP message to the opposite leaf node through the first backbone node or the second backbone node, so that the opposite leaf node learns the ARP table entry of the downstream device based on the UDP message.

[0068] In this embodiment, since the local leaf node and the opposite leaf node are pre-configured to be route-reachable, the local leaf node can forward the UDP message to the opposite leaf node through the upper-layer first backbone node or second backbone node, so that the opposite leaf node can learn the ARP table entry of the downstream device based on the UDP message.

[0069] The table entry synchronization method provided in the embodiment of the present invention does not need to configure the server to send ARP messages twice, but relies on the reachable route between the local leaf node and the opposite leaf node. Then, the local leaf node can forward the UDP message obtained based on the ARP message to the opposite leaf node, thereby realizing ARP table entry synchronization between the two ends.

[0070] In an optional implementation, before the above step S102, S101 may also be included:

[0071] S101. Configure a reachable route between the leaf node at the local end and the leaf node at the opposite end.

[0072] It can be understood that in the MLAG-Lite networking system, a BGP session is established between the local leaf node and the first backbone node and the second backbone node, and a BGP session is established between the opposite leaf node and the first backbone node and the second backbone node. Correspondingly, the following steps S1011 to S1015 can be performed in advance to achieve reachable routing between the local leaf node and the opposite leaf node:

[0073] S1011. Obtain the local loopback address.

[0074] In this embodiment, the local leaf node can obtain its own local loopback address (Loopback address). The local loopback address of the local leaf node can be configured by the operation and maintenance personnel on the switch configuration page, or it can be allocated and issued by the SDN controller in the network.

[0075] S101. Notify the local loopback address to the first backbone node and the second backbone node respectively based on the BGP session, so that the first backbone node and the second backbone node respectively notify the local loopback address to the opposite leaf node based on the BGP session.

[0076] In this embodiment, after the local leaf node obtains the local loopback address, it can announce the local loopback address to the first backbone node and the second backbone node based on the BGP session respectively, so that the first backbone node and the second backbone node can both announce the local loopback address to the other leaf node based on the BGP session.

[0077] S1013: Receive the peer loopback addresses announced by the first backbone node and the second backbone node based on the BGP session.

[0078] In this embodiment, after the peer leaf node obtains the peer loopback address, it can announce the peer loopback address to the first backbone node and the second backbone node based on the BGP session respectively, so that the first backbone node and the second backbone node can both announce the peer loopback address to the local leaf node based on the BGP session.

[0079] S1014: Add a new routing table entry to the dynamic routing table based on the two received peer loopback addresses, the respective IP addresses of the first backbone node and the second backbone node, and the packet receiving interfaces of the two peer loopback addresses.

[0080] In this embodiment, for the leaf node at this end, when receiving the peer loopback address announced by the first backbone node and the second backbone node respectively, a new routing table entry can be added to the dynamic routing table maintained by itself. In the routing table entry: the destination address is the peer loopback address, the next hop is the IP address of the first backbone node or the IP address of the second backbone node, and the outgoing interface is the packet receiving interface of the two peer loopback addresses.

[0081] For example, Figure 4 For example, assuming that the downstream device Sever1 sends an ARP packet to the local leaf node Leaf1, then for the local leaf node Leaf1, the newly added routing table entry can be as follows:

[0082]

[0083] This example is only an example and is not intended to be limiting.

[0084] S1015. Set the local loopback address and the peer loopback address as the source address and the destination address of the ARP message layer 3 network forwarding function respectively.

[0085] In this embodiment, if the function provided by the table entry synchronization method of the present invention is named ARP message three-layer network forwarding function, then for the local leaf node, the source address and destination address of this function can be configured as the local loopback address and the remote loopback address respectively.

[0086] It can be understood that when the operation and maintenance personnel enable the three-layer network forwarding function of the ARP message of the local leaf node and the opposite leaf node during network deployment, the local leaf node will initialize the function through the above steps S1011 to S1015 so that the route between the local leaf node and the opposite leaf node is reachable. Subsequently, the local leaf node can execute steps S102 to S103 to synchronize the ARP table entries with the opposite leaf node.

[0087] In an optional implementation, the information in the UDP message is the key information in the ARP message. Correspondingly, the process of generating a UDP message based on the ARP message in the above step S102 may include the following sub-steps S1021 to S1022:

[0088] S1021. Parse the ARP message to obtain ARP message information in the ARP message.

[0089] In this embodiment, the ARP message information may include the ARP message type, source MAC address, destination MAC address, sender MAC address, target MAC address, sender IP address, target IP address, aggregation ID to which the message is sent, and VLAN (Virtual Local Area Network) information, etc.

[0090] S1022. Based on the source address and destination address of the ARP message layer 3 network forwarding function, encapsulate the ARP message information according to the UDP protocol to obtain a UDP message.

[0091] In this embodiment, for the local leaf node, the source address and destination address of the three-layer network forwarding function of the ARP message can be used as the source address and destination address of the UDP message.

[0092] In an optional implementation, the local leaf node forwards the UDP message and needs to search the dynamic routing table for layer-3 forwarding. Correspondingly, the sub-steps of step S103 may include S1031 to S1033:

[0093] S1031. Search the dynamic routing table for a routing entry with the peer loopback address as the destination address.

[0094] S1032. Determine the next hop node of the UDP message based on the routing table entry.

[0095] In this embodiment, the destination address of the UDP message is the loopback address of the other end, so the local leaf node can find the routing table entry with the loopback address of the other end as the destination address from the dynamic routing table. The routing table entry is the routing table entry newly added when the local leaf node executes the above step S1014, so the next hop node of the UDP message can be the first backbone node or the second backbone node.

[0096] S1033. Forward the UDP message to the opposite leaf node through the first backbone node or the second backbone node, so that the opposite leaf node obtains the ARP table entry of the downstream device after parsing the UDP message.

[0097] Optionally, the local leaf node can select the actual next hop node from the first backbone node or the second backbone node based on the HASH routing method, and then forward the UDP message to the opposite leaf node through the selected next hop node. After receiving the UDP message, the opposite leaf node can parse the ARP message information, and then learn the ARP table entry of the downstream device from the ARP message information.

[0098] The above-mentioned embodiment of the table entry synchronization method is mainly based on the local leaf node, and introduces the table entry synchronization process between the local leaf node and the opposite leaf node.

[0099] In combination with the above content, the following mainly introduces the table item synchronization process between the leaf node of the local end and the leaf node of the opposite end. It should be noted that its basic principle and the technical effect produced are the same or similar to those of the above embodiment. For the sake of brief description, the parts not mentioned in this embodiment can refer to the corresponding content in the above embodiment.

[0100] See also Figure 5 , Figure 5 The second flow chart of a table item synchronization method provided by an embodiment of the present invention is applied to the opposite leaf node (Leaf2) in the MLAG-Lite networking system, and the MLAG-Lite networking system also includes the local leaf node (Leaf1), the first backbone node (Spine1) and the second backbone node (Spine2), the local leaf node and the opposite leaf node are both connected to the first backbone node and the second backbone node, and the local leaf node and the opposite leaf node are pre-configured to be route-reachable and connected to a downlink device (Sever1 or Sever2) in common. The table item synchronization method includes the following steps S202 to S203:

[0101] S202: Receive a UDP message sent by the local leaf node through the first backbone node or the second backbone node.

[0102] In this embodiment, the UDP message is generated by the local leaf node based on the ARP message when the local leaf node receives the ARP message sent by the downstream device.

[0103] S2023. Based on the UDP message, obtain the ARP table entry of the downstream device.

[0104] In this embodiment, the peer leaf node can learn the ARP table entry of the downstream device from the UDP message.

[0105] The table entry synchronization method provided in the embodiment of the present invention does not need to configure the server to send ARP messages twice, but relies on the reachable route between the local leaf node and the opposite leaf node. Then, the local leaf node can forward the UDP message obtained based on the ARP message to the opposite leaf node through the first backbone node or the second backbone node, so that the opposite leaf node can learn the ARP table entry of the downstream device from the UDP message, thereby realizing ARP table entry synchronization between the two ends.

[0106] In an optional implementation, before the above step S202, S201 may also be included:

[0107] S102: Configure a reachable route between the leaf node at the other end and the leaf node at the local end.

[0108] It can be understood that in the MLAG-Lite networking system, a BGP session is established between the local leaf node and the first backbone node and the second backbone node, and a BGP session is established between the opposite leaf node and the first backbone node and the second backbone node. Correspondingly, the following steps S2011 to S2015 can be performed in advance to achieve reachable routing between the local leaf node and the opposite leaf node:

[0109] S2011. Obtain the peer loopback address.

[0110] Similarly, in this embodiment, the peer leaf node can obtain its own peer loopback address (Loopback address). The peer loopback address of the peer leaf node can be configured by the operation and maintenance personnel on the switch configuration page, or it can be allocated and issued by the SDN controller in the network.

[0111] S2012. Notify the opposite end loopback address to the first backbone node and the second backbone node respectively based on the BGP session, so that the first backbone node and the second backbone node respectively notify the opposite end loopback address to the local leaf node based on the BGP session.

[0112] S2013: Receive the local loopback addresses announced by the first backbone node and the second backbone node based on the BGP session.

[0113] In this embodiment, after the leaf node at the opposite end and the local end obtain their respective loopback addresses, they can notify each other of their respective loopback addresses based on the BGP session.

[0114] S2014. Add a new routing table entry to the dynamic routing table based on the two received local loopback addresses, the IP addresses of the first backbone node and the second backbone node, and the packet receiving interfaces of the two local loopback addresses.

[0115] In this embodiment, for the leaf node at the opposite end, when receiving the local loopback address announced by the first backbone node and the second backbone node respectively, a new routing table entry can be added to the dynamic routing table maintained by itself. In the routing table entry: the destination address is the local loopback address, the next hop is the IP address of the first backbone node or the IP address of the second backbone node, and the outgoing interface is the packet receiving interface of the two local loopback addresses.

[0116] For example, Figure 4 For example, assuming that the downstream device Sever1 sends an ARP packet to the local leaf node Leaf1, then for the peer leaf node Leaf2, the newly added routing table entry can be as follows:

[0117]

[0118] This example is only an example and is not intended to be limiting.

[0119] S2015. Set the opposite end loopback address and the local end loopback address as the source address and the destination address of the ARP message layer 3 network forwarding function respectively.

[0120] In this embodiment, if the function provided by the table entry synchronization method of the present invention is named ARP message three-layer network forwarding function, then for the opposite leaf node, the source address and destination address of this function can be configured as the opposite loopback address and the local loopback address respectively.

[0121] It can be understood that when the operation and maintenance personnel enable the three-layer network forwarding function of the ARP message of the local leaf node and the opposite leaf node during network deployment, the opposite leaf node will initialize the function through the above steps S2011~S2015 so that the route between the local leaf node and the opposite leaf node is reachable. Subsequently, the opposite leaf node can execute steps S202~S203 to synchronize the ARP table entries with the local leaf node.

[0122] In an optional implementation, the sub-steps of step S203 above may include:

[0123] S2031, obtaining the source address and destination address of the UDP message;

[0124] S2032. If the source address and the destination address of the UDP message are consistent with the source address and the destination address of the layer 3 network forwarding function of the ARP message, an ARP table entry of the downstream device is generated based on the ARP message information in the UDP message.

[0125] In this embodiment, when the opposite leaf node receives a UDP message, it can check whether the source address and destination address of the UDP message are consistent with the source address and destination address of the three-layer network forwarding function of the ARP message. If they are consistent, the opposite leaf node can parse the ARP message information from the UDP message, thereby learning the ARP table entry of the downstream device from the ARP message information.

[0126] It should be noted that in the above two method embodiments, the leaf nodes of the local end and the leaf nodes of the opposite end are respectively Figure 2 The leaf nodes of the local end and the leaf nodes of the opposite end are described as Leaf1 and Leaf2, and it can be understood that the leaf nodes of the local end and the leaf nodes of the opposite end are only a relative description, and the leaf nodes of the local end and the leaf nodes of the opposite end can also be Figure 2 The principle of table entry synchronization for Leaf2 and Leaf1 shown in the figure is consistent with the above process and will not be described in detail here.

[0127] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0128] The present invention does not need to configure the server to send two ARP messages, but relies on configuring the route between the local leaf node and the opposite leaf node to be reachable, so that the local leaf node can forward the UDP message obtained based on the ARP message to the opposite leaf node through the first backbone node or the second backbone node, so that the opposite leaf node can learn the ARP table entry of the downstream device from the UDP message, thereby realizing the synchronization of the ARP table entries between the two ends. In the process of service deployment, the deployment on the server side is omitted, making the service deployment more convenient and simple;

[0129] In the prior art, MLAG-Lite needs to use a server with multiple network ports to connect to two Leaf switches in order to configure the server to send dual ARP messages through dual network ports. Since server resources are expensive, the testing cost of MLAG-Lite during the R&D testing phase is also high. In the present invention, in addition to using the server as an access device for testing during the R&D testing phase, other communication devices (such as personal computers) can also be used as access devices for testing to reduce the cost of testing MLAG-Lite.

[0130] In order to execute the corresponding steps in the above method embodiment and each possible implementation mode, two implementation modes of the table entry synchronization device respectively applied to the local leaf node and the opposite leaf node are given below.

[0131] See also Figure 6 , Figure 6 One of the structural schematic diagrams of the table item synchronization device provided by an embodiment of the present invention is shown. The table item synchronization device 200 is applied to the local leaf node in the MLAG-Lite networking system. The MLAG-Lite networking system also includes the opposite leaf node, the first backbone node and the second backbone node. The local leaf node and the opposite leaf node are both communicatively connected with the first backbone node and the second backbone node. The local leaf node and the opposite leaf node are reachable by routing and are commonly connected to a downlink device. The table item synchronization device 200 includes: a conversion module 220 and a synchronization module 230.

[0132] The conversion module 220 is used to generate an ARP table entry of the downstream device based on the ARP message when receiving the ARP message sent by the downstream device, and generate a UDP message based on the ARP message;

[0133] The synchronization module 230 is used to forward the UDP message to the opposite leaf node through the first backbone node or the second backbone node, so that the opposite leaf node learns the ARP table entry of the downstream device based on the UDP message.

[0134] Optionally, the table entry synchronization device 200 may further include a local configuration module 210 for executing the above steps S1011 to S1015. The conversion module 220 may be used to execute the above step S102 and its sub-steps, and the synchronization module 230 may be used to execute the above step S103 and its sub-steps.

[0135] See also Figure 7 , Figure 7 The second structural schematic diagram of the table item synchronization device provided by the embodiment of the present invention is shown. The table item synchronization device 400 is applied to the opposite leaf node in the MLAG-Lite networking system. The MLAG-Lite networking system also includes the local leaf node, the first backbone node and the second backbone node. The local leaf node and the opposite leaf node are both communicatively connected with the first backbone node and the second backbone node. The local leaf node and the opposite leaf node are reachable by routing and are commonly connected to a downlink device. The table item synchronization device 400 may include: a receiving module 420 and a parsing module 430.

[0136] The receiving module 420 is used to receive the UDP message sent by the local leaf node through the first backbone node or the second backbone node; the UDP message is generated based on the ARP message when the local leaf node receives the ARP message sent by the downstream device.

[0137] The parsing module 430 is used to obtain the ARP table entry of the downstream device based on the UDP message.

[0138] Optionally, the table entry synchronization device 400 may further include a peer configuration module 410, which is used to execute the above steps S2011 to S2015. The parsing module 430 may be used to execute the above step S203 and its sub-steps.

[0139] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the table entry synchronization device 200 and the table entry synchronization device 400 described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

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

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

[0142] Among them, the memory 320 can be, but is not limited to, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), flash memory (Flash), programmable read-only memory (Programmable Read-Only Memory, PROM), erasable read-only memory (Erasable ProgrammableRead-Only Memory, EPROM), electrically erasable read-only memory (Electric Erasable ProgrammableRead-Only Memory, EEPROM), etc.

[0143] The processor 310 may be an integrated circuit chip with signal processing capability. The processor 310 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

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

[0145] The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the table entry synchronization method disclosed in the above embodiment is implemented. The computer-readable storage medium can be, but is not limited to, various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a PROM, an EPROM, an EEPROM, a FLASH disk, or an optical disk.

[0146] In summary, the embodiments of the present invention provide a table entry synchronization method, device, electronic device and computer-readable storage medium. For the local leaf node and the opposite leaf node in the MLAG-Lite networking system, when the local leaf node receives the ARP message sent by the downstream device, it can generate the ARP table entry of the downstream device based on the ARP message, and at the same time generate a UDP message based on the ARP message. Since the route between the local leaf node and the opposite leaf node is reachable, the local leaf node can then forward the UDP message to the opposite leaf node through the first backbone node or the second backbone node, so that the opposite leaf node can learn the ARP table entry of the downstream device based on the UDP message. Compared with the prior art that requires the configuration of the server's dual network card to periodically send two ARP messages, the present invention does not need to configure the server to send two times, but relies on the reachable route between the local leaf node and the opposite leaf node, and then the local leaf node can forward the UDP message obtained based on the ARP message to the opposite leaf node, so as to achieve ARP table entry synchronization between the two ends.

[0147] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A table entry synchronization method, characterized in that: A local leaf node applied to an MLAG-Lite networking system, wherein the MLAG-Lite networking system further comprises a peer leaf node, a first backbone node, and a second backbone node, wherein both the local leaf node and the peer leaf node are communicatively connected to the first backbone node and the second backbone node, and the local leaf node and the peer leaf node are reachable by a route and are commonly connected to a downlink device; the method comprises: When receiving an ARP message sent by the downstream device, generating an ARP table entry of the downstream device based on the ARP message, and generating a UDP message based on the ARP message; The UDP message is forwarded to the opposite leaf node through the first backbone node or the second backbone node, so that the opposite leaf node learns the ARP table entry of the downstream device based on the UDP message.

2. The method according to claim 1, characterized in that A BGP session is established between the local leaf node and the first backbone node and the second backbone node, and a BGP session is established between the opposite leaf node and the first backbone node and the second backbone node; The specific implementation method of the route between the local leaf node and the opposite leaf node being reachable includes: Get the local loopback address; Based on the BGP session, the local loopback address is respectively notified to the first backbone node and the second backbone node, so that the first backbone node and the second backbone node respectively notify the local loopback address to the opposite leaf node based on the BGP session; Receiving the peer loopback address announced by the first backbone node and the second backbone node based on the BGP session; Adding a routing table entry to the dynamic routing table based on the received two opposite-end loopback addresses, the respective IP addresses of the first backbone node and the second backbone node, and the packet receiving interfaces of the two opposite-end loopback addresses; The local loopback address and the opposite loopback address are respectively set as the source address and the destination address of the ARP message layer 3 network forwarding function.

3. The method according to claim 2, characterized in that The step of generating a UDP message based on the ARP message includes: Parsing the ARP message to obtain ARP message information in the ARP message; Based on the source address and destination address of the three-layer network forwarding function of the ARP message, the ARP message information is encapsulated according to the UDP protocol to obtain the UDP message.

4. The method according to claim 2, characterized in that: The step of forwarding the UDP message to the opposite leaf node through the first backbone node or the second backbone node so that the opposite leaf node learns the ARP table entry of the downstream device based on the UDP message includes: Searching the dynamic routing table for a routing table entry with the opposite end loopback address as the destination address; Determine a next hop node of the UDP message based on the routing table entry; the next hop node is the first backbone node or the second backbone node; The UDP message is forwarded to the opposite leaf node through the determined next hop node, so that the opposite leaf node obtains the ARP table entry of the downstream device after parsing the UDP message.

5. A table entry synchronization method, characterized in that: The method is applied to a peer leaf node in an MLAG-Lite networking system, wherein the MLAG-Lite networking system further includes a local leaf node, a first backbone node, and a second backbone node, wherein both the local leaf node and the peer leaf node are communicatively connected to the first backbone node and the second backbone node, and the local leaf node and the peer leaf node are reachable by a route and are commonly connected to a downlink device; the method includes: Receiving a UDP message sent by the local leaf node through the first backbone node or the second backbone node; the UDP message is generated by the local leaf node based on the ARP message when receiving the ARP message sent by the downstream device; Based on the UDP message, an ARP table entry of the downstream device is obtained.

6. The method according to claim 5, characterized in that A BGP session is established between the local leaf node and the first backbone node and the second backbone node, and a BGP session is established between the opposite leaf node and the first backbone node and the second backbone node; The specific implementation method of the route between the opposite end leaf node and the local end leaf node is reachable, including: Get the peer loopback address; Based on the BGP session, the peer loopback address is respectively notified to the first backbone node and the second backbone node, so that the first backbone node and the second backbone node respectively notify the peer loopback address to the local leaf node based on the BGP session; Receiving a local loopback address announced by the first backbone node and the second backbone node based on the BGP session; Adding a routing table entry to the dynamic routing table based on the two received local loopback addresses, the IP addresses of the first backbone node and the second backbone node, and the packet receiving interfaces of the two local loopback addresses; The opposite end loopback address and the local end loopback address are respectively set as the source address and the destination address of the ARP message layer 3 network forwarding function.

7. The method according to claim 6, characterized in that The step of obtaining the ARP table entry of the downstream device based on the UDP message includes: Obtain the source address and destination address of the UDP message; If the source address and the destination address of the UDP message are consistent with the source address and the destination address of the layer 3 network forwarding function of the ARP message, an ARP table entry of the downstream device is generated based on the ARP message information in the UDP message.

8. A table entry synchronization device, characterized in that: The local leaf node is applied to the MLAG-Lite networking system, wherein the MLAG-Lite networking system further comprises a peer leaf node, a first backbone node and a second backbone node, wherein the local leaf node and the peer leaf node are both communicatively connected to the first backbone node and the second backbone node, and the local leaf node and the peer leaf node are reachable by a route and are commonly connected to a downlink device; the device comprises: A conversion module, configured to generate an ARP table entry of the downstream device based on the ARP message when receiving the ARP message sent by the downstream device, and generate a UDP message based on the ARP message; A synchronization module is used to forward the UDP message to the opposite leaf node through the first backbone node or the second backbone node, so that the opposite leaf node learns the ARP table entry of the downstream device based on the UDP message.

9. A table entry synchronization device, characterized in that: The device is applied to the opposite-end leaf node in the MLAG-Lite networking system, wherein the MLAG-Lite networking system further includes a local leaf node, a first backbone node, and a second backbone node, wherein the local leaf node and the opposite-end leaf node are both communicatively connected to the first backbone node and the second backbone node, and the local leaf node and the opposite-end leaf node are reachable by routing and are commonly connected to a downlink device; the device includes: A receiving module, used for receiving a UDP message sent by the local leaf node through the first backbone node or the second backbone node; the UDP message is generated by the local leaf node based on the ARP message when receiving the ARP message sent by the downstream device; The parsing module is used to obtain the ARP table entry of the downstream device based on the UDP message.

10. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a software program, and when the electronic device is running, the processor executes the software program to implement the table entry synchronization method as described in any one of claims 1-4 or 5-7.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the table entry synchronization method described in any one of claims 1-4 or 5-7 is implemented.