Communication method and device

By receiving service packets in the MLAG network and forwarding them to the appropriate interface using peer-link, the traffic packet loss and bandwidth waste caused by MLAG interface member port failure is solved, and global load sharing and smooth forwarding of traffic is achieved.

CN118890310AActive Publication Date: 2024-11-01NEW H3C TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410916793.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-11-01
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

In the prior art, the traffic packet loss caused by the failure of the member port of the MLAG interface, as well as the bandwidth waste and flow outage caused by the use of the minimum selected member port number or member port linkage function.

Method used

By receiving service messages on the network side, the forwarding interface is determined based on its characteristic information. If the interface is not in the local network device, the associated interface identifier is obtained and the message is forwarded to another network device using peer-link, thereby releasing the local area The traffic isolation between the peerlink port and the MLAG member port is realized to forward third-party network devices.

Benefits of technology

The global load sharing of layer 2 unicast traffic is realized, bandwidth waste and flow outage are avoided, and the problems caused by traffic detours in the prior art are solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118890310A_ABST
    Figure CN118890310A_ABST
Patent Text Reader

Abstract

The invention provides a communication method and device, and the method comprises the steps: receiving a first service message sent by a network side, and enabling the first service message to comprise first feature information; determining a first interface for forwarding the first service message according to the first feature information; if the first interface is not located in the first network equipment, acquiring an interface identifier of a second interface associated with the first interface; sending the first service message to a second network device through a second interface indicated by the interface identifier and a peer-link, so that the second network device forwards the first service message to a third network device accessed to the MLAG after releasing two-layer unicast traffic isolation between a local peerlink port of the second network device and a local MLAG member port; wherein the first service message is a two-layer unicast message, and the second interface is a local peerlink port of the first network equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a communication method and device. Background Art

[0002] Multichassis Link Aggregation Group (MLAG) is a mechanism for implementing cross-device link aggregation. It aggregates the links of one network device with two other network devices, thereby improving link reliability from the single-board level to the device level.

[0003] For Layer 2 forwarding, MLAG can be understood as a horizontal virtualization technology that logically virtualizes the two network devices that make up MLAG into one network device to form a unified Layer 2 logical node. Figure 1 As shown, Figure 1 The following is a schematic diagram of the existing MLAG network. Figure 1 In the example, network device A and network device B form MLAG and share load, and forward traffic together. When one of the network devices fails, the traffic can be quickly switched to the other network device to ensure the normal operation of the business.

[0004] If the MLAG interface in the aggregation group of a network device fails, the traffic from the network side will be forwarded to another network device through the peer-link, and the subsequent traffic will be forwarded by the other network device. The specific process is as follows:

[0005] The downlink interface (also called MLAG interface) between network device A and network device C is in the aggregation group. After the downlink interface fails, the network side is not aware of it and still sends traffic to network device A and network device B. The downlink interface between network device B and network device C is also in the aggregation group and is normal. After network device A receives traffic from the network side to access network device C, it forwards the traffic to network device B through peer-link. Network device B forwards traffic to network device C through the downlink interface. After the downlink interface included in network device A is restored, it continues to forward traffic from the network side.

[0006] In actual applications, if the above-mentioned downlink interface includes multiple member ports, and one of the local member ports fails while the other member ports are normal, packet loss will occur under the existing local priority forwarding principle. Figure 2 As shown, Figure 2 The following is a schematic diagram of the networking of an MLAG interface in an existing network device, which includes multiple member interfaces. Figure 2In the example, the downstream interface between network device A and network device C includes multiple member ports, for example, member port 1 and member port 2. The traffic from network device E to network device C passes through network device A. Assuming that the traffic is 15G, and member port 1 included in the downstream interface of network device A fails, according to the principle of local priority forwarding, network device A continues to forward traffic to network device C through member port 2. At this time, the traffic between network device A and network device C will drop from 20G to 10G, and 5G of traffic will be lost.

[0007] To solve the above-mentioned problem of packet loss caused by member port failure, you can configure the minimum number of selected member ports in the aggregation group or the member port linkage function to make all member ports included in the MLAG interface unselected, so that the traffic is forwarded to another network device via peer-link.

[0008] However, configuring the minimum number of selected member ports in the aggregation group or the member port linkage function to trigger traffic bypass also exposes the following defects: 1) Linking normal member ports to the unselected state will result in bandwidth waste; 2) If there are member port failures on the MLAG interfaces of the two network devices, it will cause traffic interruption. Summary of the invention

[0009] In view of this, the present application provides a communication method and device to solve the problem of bandwidth waste and traffic interruption caused by the existing method of configuring the minimum number of selected member ports in the aggregation group or the member port linkage function to trigger traffic detour.

[0010] In a first aspect, the present application provides a communication method, the method being applied to a first network device, the first network device being in an MLAG, the MLAG further comprising a second network device, a peer-link having been established between the first network device and the second network device, the method comprising:

[0011] Receiving a first service message sent by a network side, wherein the first service message includes first characteristic information;

[0012] Determine, according to the first characteristic information, a first interface for forwarding the first service message;

[0013] If the first interface is not in the first network device, obtaining an interface identifier of a second interface associated with the first interface;

[0014] Sending the first service message to the second network device through the second interface indicated by the interface identifier and the peer-link, so that the second network device releases the layer 2 unicast traffic isolation between the local peerlink port of the second network device and the local member port in the MLAG, and then forwarding the first service message to a third network device connected to the MLAG;

[0015] The first service message is a layer 2 unicast message, and the second interface is a local peerlink port of the first network device.

[0016] In a second aspect, the present application provides a communication device, the device is applied to a first network device, the first network device is in an MLAG, the MLAG also includes a second network device, a peer-link has been established between the first network device and the second network device, the device includes:

[0017] A receiving unit, configured to receive a first service message sent by a network side, wherein the first service message includes first characteristic information;

[0018] A determining unit, configured to determine, according to the first characteristic information, a first interface for forwarding the first service message;

[0019] a first acquiring unit, configured to acquire an interface identifier of a second interface associated with the first interface if the first interface is not in the first network device;

[0020] a sending unit, configured to send the first service message to the second network device through the second interface indicated by the interface identifier and the peer-link, so that the second network device releases the layer 2 unicast traffic isolation between the local peerlink port of the second network device and the local member port in the MLAG, and then forwards the first service message to a third network device connected to the MLAG;

[0021] The first service message is a layer 2 unicast message, and the second interface is a local peerlink port of the first network device.

[0022] In a third aspect, the present application provides a network device, including a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to execute the method provided in the first aspect of the present application.

[0023] Therefore, by applying the communication method and device provided in the present application, the first network device receives a first business message sent by the network side, and the first business message includes first characteristic information; according to the first characteristic information, the first network device determines a first interface for forwarding the first business message; if the first interface is not in the first network device, the first network device obtains the interface identifier of the second interface associated with the first interface; through the second interface indicated by the interface identifier and the peer-link, the first network device sends the first business message to the second network device, so that the second network device releases the isolation of the second-layer unicast traffic between the local peerlink port of the second network device and the member port in the local MLAG, and then forwards the first business message to the third network device connected to the MLAG; wherein the first business message is a layer-2 unicast message, and the second interface is the local peerlink port of the first network device.

[0024] In this way, when determining the interface for forwarding the first service message, the first interface that is not in the first network device can be used as the interface for forwarding the first service message, and the first service message is forwarded to the network device where the first interface is located through the peer-link link, so that the network device where the first interface is located continues to forward the first service message, thereby realizing global load sharing of Layer 2 unicast traffic. This solves the problem of bandwidth waste and traffic interruption caused by the existing method of configuring the minimum number of selected member ports in the aggregation group or the member port linkage function to trigger traffic detour. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 This is a schematic diagram of the existing MLAG network;

[0026] Figure 2 A schematic diagram of a network in which an MLAG interface in an existing network device includes multiple member ports;

[0027] Figure 3 A flow chart of a communication method provided in an embodiment of the present application;

[0028] Figure 4 A schematic diagram of an MLAG network provided in an embodiment of the present application;

[0029] Figure 5 Another MLAG networking diagram provided in an embodiment of the present application;

[0030] Figure 6 A structural diagram of a communication device provided in an embodiment of the present application;

[0031] Figure 7 The network device hardware structure provided in the embodiment of the present application. DETAILED DESCRIPTION

[0032] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0033] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more corresponding listed items.

[0034] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0035] The communication method provided in the embodiment of the present application is described in detail below. Figure 3 , Figure 3 A flow chart of a communication method provided in an embodiment of the present application. The method is applied to a first network device. The communication method provided in an embodiment of the present application may include the following steps.

[0036] Step 310: Receive a first service message sent by a network side, where the first service message includes first characteristic information;

[0037] Specifically, the first network device and the second network device form MLAG, form load sharing, and jointly forward traffic. The first network device includes a first peerlink port, and the second network device includes a second peerlink port. The two network devices establish a peer-link link through their respective peerlink ports. The third network device accesses MLAG and is connected to the downlink port 1 of the first network device and the downlink port 2 of the second network device respectively.

[0038] In the embodiment of the present application, downlink port 1 and downlink port 2 belong to the same MLAG and are member ports in the MLAG. Downlink port 1 and downlink port 2 can also be referred to as aggregation ports. It can be understood that the interface of the third network device accessing the MLAG also belongs to the same MLAG as downlink port 1 and downlink port 2, and the interface of the third network device accessing the MLAG can also be referred to as an aggregation port.

[0039] The network side intends to communicate with the third network device. The network side sends a first service message to the third network device, and the first service message includes first characteristic information. The first characteristic information can be specifically five-tuple information, and the five-tuple information includes the first destination MAC address.

[0040] Optionally, after receiving the first service message, the first network device first obtains the first destination MAC address. According to the first destination MAC address, the first network device obtains a first MAC table entry matching the first destination MAC address from the local MAC forwarding table. The first MAC table entry includes a first outbound interface for forwarding the first service message, and the first outbound interface indicates MLAG. The first outbound interface may specifically be an aggregation group identifier of MLAG.

[0041] Step 320: Determine a first interface for forwarding the first service message according to the first characteristic information;

[0042] Specifically, according to the description of step 310, after the first network device obtains the first characteristic information, it also determines the first interface for forwarding the first service message through the first characteristic information.

[0043] It is understandable that the MLAG includes multiple member ports, and in step 310, after the first network device determines to forward the first service message to the third network device through the MLAG, it needs to continue to determine the member port for forwarding the first service message from the MLAG. The first interface is the member port in the MALG.

[0044] The first network device identifies whether the first interface is located in the first network device. If the first interface is not located in the first network device, the first network device executes step 330.

[0045] Optionally, in this step, based on the first characteristic information, the specific process by which the first network device determines the first interface for forwarding the first service message is as follows: the first network device performs a hash calculation on the first characteristic information to obtain a first hash value of the first characteristic information; based on the first hash value, in the aggregation table item, the first network device obtains a first aggregation table item that matches the first hash value; the first aggregation table item includes an interface identifier of the first interface; the first network device uses the first interface indicated by the first interface identifier as the interface for forwarding the first service message; wherein the first interface is a member port within the MLAG.

[0046] Optionally, before the aforementioned steps, the method further includes a process in which the first network device generates an aggregation table entry.

[0047] Furthermore, the user inputs a first configuration instruction to the first network device through a command line. The first configuration instruction includes a hash value, an aggregation group identifier of the MLAG, and a member port identifier of a member port in the MLAG; after receiving the first configuration instruction, the first network device obtains the hash value, the aggregation group identifier, and the member port identifier therefrom; the first network device generates an aggregation table entry locally and stores the aggregation table entry in the aggregation table, wherein the aggregation table entry includes a hash value, an aggregation group identifier, and a member port identifier.

[0048] The member port identifier includes the identifiers of all member ports belonging to the same MLAG in the network devices constituting the MLAG. For example, the identifier of the downlink port 1 included in the first network device and the identifier of the downlink port 2 included in the second network device. That is, in addition to the identifiers of the member ports belonging to the MLAG in the first network device, the aggregation table item generated by the first network device also includes the identifiers of the member ports belonging to the same MLAG in other network devices constituting the MLAG.

[0049] Optionally, after the first network device generates the aggregation table entry locally, it also identifies whether the member port indicated by each member port identifier is in the first network device. If the member port indicated by the member port identifier is not in the first network device, the first network device will establish a redirection relationship between the member port that is not in the first network device and the second interface; the first network device stores the redirection relationship in the aggregation table entry. The second interface is the local peerlink port of the first network device, that is, the first peerlink port.

[0050] Step 330: If the first interface is not in the first network device, obtain an interface identifier of a second interface associated with the first interface;

[0051] Specifically, according to the description of step 320, the first network device identifies whether the first interface is within the first network device.

[0052] If the first interface is not in the first network device, the first network device continues to obtain the interface identifier of the second interface associated with the first interface from the aggregation table entry.

[0053] It is understandable that when the first network device establishes the aggregation table entry, a redirection relationship has been established between the member port that is not in the network device and the second interface (i.e., the first peerlink port). Therefore, after determining that the first interface is not in the first network device, the first network device can directly obtain the interface identifier of the second interface from the aggregation table entry. That is, the first network device obtains the interface identifier of the first peerlink port.

[0054] Optionally, if the first interface is in the first network device, the first network device sends the first service message to the third network device through the first interface.

[0055] Step 340: Send the first service message to the second network device through the second interface indicated by the interface identifier and the peer-link, so that the second network device releases the layer 2 unicast traffic isolation between the local peerlink port of the second network device and the local member port in the MLAG, and then forwards the first service message to a third network device connected to the MLAG;

[0056] Specifically, according to the description of step 330, after the first network device obtains the interface identifier of the second interface, the first network device sends the first service message to the second network device through the second interface indicated by the interface identifier and the peer-link.

[0057] After receiving the first service message, the second network device may obtain the first destination MAC address from the first service message. The second network device may query the local MAC address table according to the first destination MAC address.

[0058] If there is a MAC table entry matching the first destination MAC address in the local MAC address table and the Layer 2 unicast traffic isolation between the local peerlink port (second peerlink port) of the second network device and the member port (downlink port 2) in the local MLAG has been released in the second network device, the second network device forwards the first service message to the third network device.

[0059] Therefore, by applying the communication method provided in the present application, the first network device receives a first service message sent by the network side, and the first service message includes first characteristic information; according to the first characteristic information, the first network device determines a first interface for forwarding the first service message; if the first interface is not in the first network device, the first network device obtains the interface identifier of the second interface associated with the first interface; through the second interface indicated by the interface identifier and the peer-link, the first network device sends the first service message to the second network device, so that the second network device releases the isolation of the second-layer unicast traffic between the local peerlink port of the second network device and the member port in the local MLAG, and then forwards the first service message to the third network device connected to the MLAG; wherein the first service message is a layer-2 unicast message, and the second interface is the local peerlink port of the first network device.

[0060] In this way, when determining the interface for forwarding the first service message, the first interface that is not in the first network device can be used as the interface for forwarding the first service message, and the first service message is forwarded to the network device where the first interface is located through the peer-link link, so that the network device where the first interface is located continues to forward the first service message, thereby realizing global load sharing of Layer 2 unicast traffic. This solves the problem of bandwidth waste and traffic interruption caused by the existing method of configuring the minimum number of selected member ports in the aggregation group or the member port linkage function to trigger traffic detour.

[0061] Optionally, in the embodiment of the present application, before executing step 310, the first network device will also start the global hash mode.

[0062] Specifically, in one implementation, a user inputs a second configuration instruction to a first network device through a command line. After the first network device receives the second configuration instruction, the first network device starts a global hash mode according to the second configuration instruction. The global hash mode is used for the first network device to use any one of all member ports in the MLAG as the interface for forwarding the service message when determining the interface for forwarding the service message.

[0063] In another implementation, the first network device determines whether the sum of the bandwidth usage of multiple member ports between the first network device and the third network device is the same as the bandwidth threshold (the bandwidth threshold may be: the bandwidth value between the first network device and the network side); if different, the global hash mode is started. The global hash mode is used for the first network device to use any one of all member ports in the MLAG as the interface for forwarding the service message when determining the interface for forwarding the service message.

[0064] Optionally, in the embodiment of the present application, the first network device may also receive the second service message sent by the second network device through the peer-link, and forward the second service message.

[0065] Specifically, after receiving the second service message, the second network device can send the second service message to the first network device through the second peerlink port and the peer-link according to the description of the aforementioned steps 310 to 340. It can be understood that the process of the second network device executing steps 310 to 340 is the same as the process of the first network device executing steps 310 to 340, and will not be repeated here.

[0066] Through the peer-link, the first network device receives the second service message sent by the second network device and obtains the second characteristic information therefrom. The second characteristic information may be specifically five-tuple information, and the five-tuple information includes the second destination MAC address.

[0067] According to the second destination MAC address, the first network device obtains a second MAC table entry matching the second destination MAC address from the local MAC forwarding table. The second MAC table entry includes a second outbound interface for forwarding the second service message, and the second outbound interface indicates an MLAG.

[0068] The first network device performs a hash calculation on the second characteristic information to obtain a second hash value of the second characteristic information. According to the second hash value, in the aggregation table item, the first network device obtains a second aggregation table item that matches the second hash value. The second aggregation table item includes an interface identifier of a third interface. The third interface is a member port in the MLAG.

[0069] The first network device forwards the second service message to the third network device through the third interface indicated by the interface identifier of the third interface.

[0070] Optionally, in an embodiment of the present application, before the first network device forwards the service message sent by the second network device through the peer-link, the first network device needs to release the isolation of the Layer 2 unicast traffic between the local peerlink port, that is, the first peerlink port and the member port in the local MLAG.

[0071] Specifically, the user inputs a third configuration instruction to the first network device through a command line. According to the third configuration instruction, the first network device releases the layer 2 unicast traffic isolation between the local peerlink port of the first network device and the member port in the local MLAG.

[0072] It should be noted that in the prior art, in order to avoid loops during message forwarding, when the third network device connected to the MLAG is a dual-active access, the downstream ports of the first network device and the second network device are set to unidirectional isolation to isolate the traffic sent from the peer-link to the downstream port. Unidirectional isolation is for Layer 2 unicast traffic, Layer 2 broadcast traffic, Layer 2 multicast traffic, and Layer 3 multicast traffic, but does not involve Layer 3 unicast traffic.

[0073] Optionally, in an embodiment of the present application, after any one of the first network device and the second network device synchronizes the MAC table entry of the third network device to the other end, when the other end learns the MAC table entry of the third network device, the other end will maintain unidirectional isolation to avoid the defect that the third network device receives multiple identical service messages.

[0074] Specifically, after the third network device accesses the MLAG, it sends a gratuitous ARP message to the MLAG. For example, after the second network device receives the gratuitous ARP message, it learns and generates a third MAC table entry of the third network device.

[0075] The second network device generates a first notification message, the first notification message including the third MAC table entry. The second network device sends the first notification message to the first network device through the peer-link.

[0076] After receiving the first notification message, the first network device obtains the third MAC table entry from the first notification message. According to the third MAC table entry, the first network device locally generates the fourth MAC table entry of the third network device. Meanwhile, the first network device keeps the unknown unicast traffic between the local peerlink port (i.e., the first peerlink port) of the first network device and the member port in the local MLAG (downlink port 1 connected to the third network device) isolated.

[0077] When receiving the third service message sent by the second network device and destined for the third network device through the peer-link, the first network device no longer forwards the third service message to the third network device through the member port in the local MLAG. The first network device discards the third service message.

[0078] The communication method provided in the embodiment of the present application is described in detail below. Figure 4 , Figure 4 A schematic diagram of an MLAG network provided in an embodiment of the present application.

[0079] exist Figure 4 In the example, network device A and network device B form MLAG, and each network device includes multiple downstream ports, which are correspondingly connected to multiple upstream ports included in network device C. That is, network device C is a dual-active device connected to MLAG, and its multiple upstream ports are correspondingly connected to multiple downstream ports of network device A and network device B respectively.

[0080] The multiple downstream ports and multiple downstream ports included in network device A, network device B, and network device C all belong to the member ports in the same MLAG1. For example, if network device A includes ports 1 and 2, network device B includes ports 3 and 4, and network device C includes ports 5, 6, 7, and 8, then port 1, port 2, port 3, port 4, port 5, port 6, port 7, and port 8 are member ports in the same MLAG1.

[0081] Network device A and network device B further include multiple uplink ports, and the uplink port included in each network device is connected to network device D. The uplink port included in each network device belongs to a member port in MLAG2.

[0082] Network device A and network device B each further include a peerlink port. For example, network device A includes peerlink port 1 and network device B includes peerlink port 2. Peerlink port 1 establishes a peer-link with peerlink port 2. It is understandable that the peerlink port may also be an aggregation port, such as Figure 4 As shown, multiple interfaces in network device A are aggregated into peerlink port 1, and multiple interfaces in network device B are aggregated into peerlink port 2.

[0083] In the embodiment of the present application, network device C is a user-side access device, and network device D is a network-side access device.

[0084] The following description takes network device B as an example.

[0085] The user enters configuration instruction 1 to network device B through the command line. According to configuration instruction 1, network device B removes the isolation of Layer 2 unicast traffic between its peerlink port 2 and port 3 and port 4.

[0086] The user inputs configuration instruction 2 to network device A through the command line. The configuration instruction 2 includes a hash value (1, 2, 3, 4), the aggregation group identifier (MLAG1) of MLAG1, and the member port identifiers (port1, port2, port3, port4) of the member ports in MALG. After receiving configuration instruction 2, network device A obtains the hash value, the aggregation group identifier, and the member port identifier therefrom. Network device A generates an aggregation table locally, and the aggregation table includes multiple aggregation table items, each of which includes a hash value, an aggregation group identifier, and a member port identifier. The first aggregation table is shown in Table 1 below.

[0087] Table 1 The first aggregation table

[0088] Hash value Aggregation Group Identifier Member ID 1 MLAG1 port1 2 MLAG1 port2 3 MLAG1 port3 4 MLAG1 port4

[0089] Furthermore, after generating the aggregation table locally, network device A also identifies whether the member port indicated by each member port identifier is in network device A. If network device A identifies that port1 and port2 are in network device A, network device A will not redirect port1 and port2. If network device A identifies that port3 and port4 are not in network device A but in network device B in MLAG, network device A will redirect port3 and port4. Network device A establishes a redirection relationship between port3 and port4 and the local peerlink port, that is, peerlink port 1.

[0090] Network device A stores the redirection relationship in the corresponding aggregation table entry, as shown in Table 2 below:

[0091] Table 2 Second aggregation table

[0092] Hash value Aggregation Group Identifier Member ID Redirection relationship 1 MLAG1 port1 2 MLAG1 port2 3 MLAG1 port3 peerlink port 1 4 MLAG1 port4 peerlink port 1

[0093] In the embodiment of the present application, the network side wants to communicate with the user side. Network device E sends service message 1 to network device C, and the service message 1 includes characteristic information 1. The characteristic information 1 can be specifically five-tuple information, and the five-tuple information includes destination MAC address 1.

[0094] Network device E sends service packet 1 to MLAG. According to the load sharing principle, service packet 1 will be sent to network device A or network device B. The following takes network device A receiving service packet 1 as an example for description.

[0095] After receiving service message 1, network device A first obtains destination MAC address 1. According to destination MAC address 1, network device A obtains MAC table entry 1 matching destination MAC address 1 from the local MAC forwarding table. MAC table entry 1 includes outbound interface 1 for forwarding service message 1, and outbound interface 1 indicates MLAG1.

[0096] At the same time, network device A also obtains characteristic information 1, such as quintuple information, from service message 1. After obtaining characteristic information 1, network device A determines a member port for forwarding service message 1 from MLAG1 according to characteristic information 1.

[0097] Network device 1 performs a hash calculation on feature information 1 to obtain hash value 1 of feature information 1 (for example, the value of hash value 1 is 3). Based on hash value 1, in the aggregation table, network device A obtains an aggregation table entry that matches hash value 1 (for example, aggregation table entry 3). The member port identifier included in the aggregation table entry is port3. Network device A uses port3 indicated by the member port identifier as the interface for forwarding service message 1.

[0098] The network device A identifies whether port 3 is in the network device A. If port 3 is not in the network device A, the network device A continues to obtain peerlink port 1 having a redirection relationship with port 3 from aggregation entry 3.

[0099] Network device A sends service message 1 to network device B through peerlink port 1 and peer-link.

[0100] After receiving service message 1, network device B can obtain destination MAC address 1 from service message 1. Network device B can query the local MAC address table according to destination MAC address 1.

[0101] If there is a MAC table entry 1 matching the destination MAC1 address in the local MAC address table and the Layer 2 unicast traffic isolation between peerlink port 2 and port 3 and port 4 has been released in network device B, network device B can forward service message 1 to network device C through port 3 or port 4.

[0102] It should be noted that, in the above process, the network device B can forward the service message 1 received through the peer-link only after it has learned the MAC table entry of the network device C locally.

[0103] In an actual application, after network device B releases the Layer 2 unicast traffic isolation between its peerlink port 2 and port 3 and port 4, if network device B does not learn the MAC table entry of network device C, network device C will receive multiple service packets 1.

[0104] like Figure 5 As shown, Figure 5 Another MLAG networking diagram provided in the embodiment of the present application. Figure 5 In the example, if network device A learns the MAC address of network device C, network device A generates a MAC table entry of network device C and immediately synchronizes the learned MAC table entry to network device B. During the MAC table entry synchronization process, network device B receives service message 1 sent by network device D. Since network device B has not synchronously learned the MAC table entry of network device C, network device B processes service message 1 as an unknown unicast. Network device B sends a service message 1 to network device A through peer-link. At the same time, network device B sends a service message 1 to network device C through port 3 or port 4. When service message 1 reaches network device A, since network device A has learned the MAC table entry of network device C and network device A has released the Layer 2 unicast traffic isolation between its peerlink port 1 and port 1 and port 2, network device A will send another service message 1 to network device C. Therefore, network device C will receive two service messages 1, resulting in receiving multiple packets.

[0105] In order to avoid the situation where network device C receives multiple packets, in the embodiment of the present application, before generating the aggregation table locally, network device A can determine whether the bandwidth and value of multiple member ports between network device C are the same as the bandwidth threshold (the bandwidth threshold can be: the bandwidth value between network device A and network device D, 20G); if not, network device A starts the global hash mode. The global hash mode is used for network device A to use any one of all member ports in the network devices constituting MLAG as the interface for forwarding service packets when determining the interface for forwarding service packets. In this way, the probability of peer-link detour and receiving multiple packets can be reduced.

[0106] In an embodiment of the present application, after any one of network device A and network device B synchronizes the MAC table entry of network device C to the other end, when the other end learns the MAC table entry of network device C, the other end will maintain unidirectional isolation to prevent network device C from receiving multiple packets.

[0107] For example, after network device C is connected to MLAG, it sends a gratuitous ARP message to MLAG. For example, after network device A receives the gratuitous ARP message, it learns and generates MAC entry 1 of network device C.

[0108] Network device A generates notification message 1, which includes MAC table entry 1. Network device A sends notification message 1 to network device B through peer-link.

[0109] After receiving notification message 1, network device B obtains MAC table entry 1 from it. Based on MAC table entry 1, network device B generates MAC table entry 2 of network device C locally. At the same time, in the process of learning the MAC table entry of network device C, network device B keeps the unknown unicast traffic between its peerlink port 2 and port 3 and port 4 isolated.

[0110] When receiving service message 1 sent by network device A and destined for network device C through peer-link, network device B no longer forwards service message 1 to network device C through port 3 or port 4. Network device B discards service message 1.

[0111] Based on the same inventive concept, the present application embodiment also provides a communication device corresponding to the communication method. Figure 6 , Figure 6 A communication device provided in an embodiment of the present application is applied to a first network device, the first network device is in an MLAG, the MLAG also includes a second network device, a peer-link has been established between the first network device and the second network device, and the device includes:

[0112] The receiving unit 610 is configured to receive a first service message sent by a network side, wherein the first service message includes first characteristic information;

[0113] A determining unit 620, configured to determine a first interface for forwarding the first service message according to the first characteristic information;

[0114] A first acquiring unit 630, configured to acquire an interface identifier of a second interface associated with the first interface if the first interface is not in the first network device;

[0115] The sending unit 640 is configured to send the first service message to the second network device through the second interface indicated by the interface identifier and the peer-link, so that the second network device releases the layer 2 unicast traffic isolation between the local peerlink port of the second network device and the local member port in the MLAG, and then forwards the first service message to a third network device connected to the MLAG;

[0116] The first service message is a layer 2 unicast message, and the second interface is a local peerlink port of the first network device.

[0117] Optionally, the receiving unit 610 is further configured to receive a first configuration instruction input by a user, where the first configuration instruction includes a hash value, an aggregation group identifier of the MLAG, and a member port identifier of a member port in the MLAG;

[0118] The device also includes: a generating unit (not shown in the figure), which is used to generate an aggregation table entry locally and store the aggregation table entry in an aggregation table, wherein the aggregation table entry includes the hash value, the aggregation group identifier and the member port identifier.

[0119] Optionally, the first service message includes a first destination MAC address;

[0120] The device further includes: a second acquisition unit (not shown in the figure), configured to acquire, according to the first destination MAC address, a first MAC table entry matching the first destination MAC address from a local MAC forwarding table, wherein the first MAC table entry includes a first outbound interface for forwarding the first service message, and the first outbound interface indicates the MLAG;

[0121] The determining unit 620 is specifically configured to perform a hash calculation on the first feature information to obtain a first hash value of the first feature information;

[0122] According to the first Hash value, obtaining, in the aggregation table item, a first aggregation table item matching the first Hash value, where the first aggregation table item includes an interface identifier of the first interface;

[0123] Using the first interface indicated by the first interface identifier as an interface for forwarding the first service message;

[0124] The first interface is a member interface within the MLAG.

[0125] Optionally, the device further comprises:

[0126] an establishing unit (not shown in the figure), configured to establish a redirection relationship between the member port not in the first network device and the second interface if the member port indicated by the member port identifier is not in the first network device;

[0127] A storage unit (not shown in the figure) is used to store the redirection relationship in the aggregation table entry.

[0128] Optionally, the receiving unit 610 is further configured to receive a second configuration instruction input by a user;

[0129] The device also includes: a first starting unit (not shown in the figure), which is used to start the global hash mode according to the second configuration instruction. The global hash mode is used for the first network device to use any one of all member ports in the MLAG as the interface for forwarding the service message when determining the interface for forwarding the service message.

[0130] Optionally, the device further comprises:

[0131] A determination unit (not shown in the figure), used to determine whether the sum of the bandwidth usage of the plurality of member ports between the third network device and the bandwidth threshold is the same;

[0132] The second starting unit (not shown in the figure) is used to start the global hash mode if they are different. The global hash mode is used for the first network device to use any one of all member ports in the MLAG as the interface for forwarding the service message when determining the interface for forwarding the service message.

[0133] Optionally, the receiving unit 610 is further configured to receive, through the peer-link, a second service message sent by the second network device, where the second service message includes a second destination MAC address;

[0134] The second acquisition unit (not shown in the figure) is further used to acquire, according to the second destination MAC address, a second MAC table entry matching the second destination MAC address from a local MAC forwarding table, wherein the second MAC table entry includes a second outbound interface for forwarding the second service message, and the second outbound interface indicates the MLAG;

[0135] The first acquisition unit 630 is further used to perform a hash calculation on the second characteristic information included in the second service message to obtain a second hash value of the second characteristic information;

[0136] The first acquisition unit 630 is further configured to, according to the second Hash value, acquire, in the aggregation table item, a second aggregation table item that matches the second Hash value, where the second aggregation table item includes an interface identifier of the third interface;

[0137] The sending unit 640 is further configured to forward the second service message to the third network device through the third interface indicated by the interface identifier of the third interface;

[0138] The third interface is a member interface within the MLAG.

[0139] Optionally, the receiving unit 610 is further configured to receive a third configuration instruction input by a user;

[0140] The device further includes: a releasing unit (not shown in the figure), which is used to release the layer 2 unicast traffic isolation between the local peerlink port of the first network device and the local member port within the MLAG according to the third configuration instruction.

[0141] Optionally, the receiving unit 610 is further configured to receive, through the peer-link, a first notification message sent by the second network device, where the first notification message includes a third MAC table entry of the third network device;

[0142] The device further includes: a maintaining unit (not shown in the figure), configured to maintain the isolation of unknown unicast traffic between the local peerlink port of the first network device and the local member port within the MLAG when the generating unit locally generates the fourth MAC table entry of the third network device according to the third MAC table entry;

[0143] The sending unit 640 is further configured to, when the receiving unit 610 receives the third service message sent by the second network device and sent to the third network device through the peer-link, no longer forward the third service message to the third network device through the local member port in the MLAG;

[0144] The device further includes: a discarding unit (not shown in the figure) configured to discard the third service message.

[0145] Therefore, by applying the communication device provided in the present application, the first network device receives a first service message sent by the network side, and the first service message includes first characteristic information; according to the first characteristic information, the first network device determines a first interface for forwarding the first service message; if the first interface is not in the first network device, the first network device obtains the interface identifier of the second interface associated with the first interface; through the second interface indicated by the interface identifier and the peer-link, the first network device sends the first service message to the second network device, so that the second network device releases the isolation of the second-layer unicast traffic between the local peerlink port of the second network device and the member port in the local MLAG, and then forwards the first service message to the third network device connected to the MLAG; wherein the first service message is a layer-2 unicast message, and the second interface is the local peerlink port of the first network device.

[0146] In this way, when determining the interface for forwarding the first service message, the first interface that is not in the first network device can be used as the interface for forwarding the first service message, and the first service message is forwarded to the network device where the first interface is located through the peer-link link, so that the network device where the first interface is located continues to forward the first service message, thereby realizing global load sharing of Layer 2 unicast traffic. This solves the problem of bandwidth waste and traffic interruption caused by the existing method of configuring the minimum number of selected member ports in the aggregation group or the member port linkage function to trigger traffic detour.

[0147] Based on the same inventive concept, the embodiment of the present application also provides a network device, such as Figure 7 As shown, it includes a processor 710, a transceiver 720 and a machine-readable storage medium 730, the machine-readable storage medium 730 stores machine-executable instructions that can be executed by the processor 710, and the processor 710 is prompted by the machine-executable instructions to execute the communication method provided in the embodiment of the present application. Figure 6 The communication device shown can be used as Figure 7 The network device hardware structure shown is implemented.

[0148] The computer-readable storage medium 730 may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk storage. Optionally, the computer-readable storage medium 730 may also be at least one storage device located away from the processor 710.

[0149] The processor 710 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.

[0150] In the embodiment of the present application, the processor 710 reads the machine executable instructions stored in the machine readable storage medium 730, and the machine executable instructions enable the processor 710 itself and the transceiver 720 to execute the communication method described in the aforementioned embodiment of the present application.

[0151] In addition, an embodiment of the present application provides a machine-readable storage medium 730, which stores machine-executable instructions. When called and executed by the processor 710, the machine-executable instructions prompt the processor 710 itself and the calling transceiver 720 to execute the communication method described in the aforementioned embodiment of the present application.

[0152] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0153] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0154] As for the communication device and machine-readable storage medium embodiments, since the method contents involved are basically similar to the aforementioned method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0155] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A communication method, characterized in that: The method is applied to a first network device, the first network device is in an MLAG, the MLAG further includes a second network device, a peer-link has been established between the first network device and the second network device, and the method includes: Receiving a first service message sent by a network side, wherein the first service message includes first characteristic information; Determine, according to the first characteristic information, a first interface for forwarding the first service message; If the first interface is not in the first network device, obtaining an interface identifier of a second interface associated with the first interface; Sending the first service message to the second network device through the second interface indicated by the interface identifier and the peer-link, so that the second network device releases the layer 2 unicast traffic isolation between the local peerlink port of the second network device and the local member port in the MLAG, and then forwarding the first service message to a third network device connected to the MLAG; The first service message is a layer 2 unicast message, and the second interface is a local peerlink port of the first network device.

2. The method according to claim 1, characterized in that Before receiving the first service message sent by the network side, the method further includes: receiving a first configuration instruction input by a user, wherein the first configuration instruction includes a hash value, an aggregation group identifier of the MLAG, and member port identifiers of member ports in the MLAG; An aggregation table entry is generated locally and stored in an aggregation table, wherein the aggregation table entry includes the hash value, the aggregation group identifier, and the member port identifier.

3. The method according to claim 2, characterized in that The first service message includes a first destination MAC address; After receiving the first service message sent by the network side, the method further includes: Acquire, according to the first destination MAC address, a first MAC table entry matching the first destination MAC address from a local MAC forwarding table, where the first MAC table entry includes a first outbound interface for forwarding the first service message, and the first outbound interface indicates the MLAG; The determining, according to the first characteristic information, a first interface for forwarding the first service message specifically includes: Performing a hash calculation on the first characteristic information to obtain a first hash value of the first characteristic information; According to the first Hash value, obtaining, in the aggregation table item, a first aggregation table item matching the first Hash value, where the first aggregation table item includes an interface identifier of the first interface; Using the first interface indicated by the first interface identifier as an interface for forwarding the first service message; The first interface is a member interface within the MLAG.

4. The method according to claim 2, characterized in that: After the aggregation table entry is generated locally, the method further includes: If the member port indicated by the member port identifier is not in the first network device, a redirection relationship is established between the member port that is not in the first network device and the second interface; The redirection relationship is stored in the aggregation table entry.

5. The method according to claim 1, characterized in that Before receiving the first service message sent by the network side, the method further includes: receiving a second configuration instruction input by a user; According to the second configuration instruction, a global hash mode is started, and the global hash mode is used for the first network device to use any one of all member ports in the MLAG as the interface for forwarding the service message when determining the interface for forwarding the service message.

6. The method according to claim 1, characterized in that Before receiving the first service message sent by the network side, the method further includes: Determine whether the sum of the bandwidth usage of the plurality of member ports between the third network device and the bandwidth threshold is the same; If they are different, a global hash mode is started. The global hash mode is used for the first network device to use any one of all member ports in the MLAG as the interface for forwarding the service message when determining the interface for forwarding the service message.

7. The method according to claim 2, characterized in that The method further comprises: Receiving, through the peer-link, a second service message sent by the second network device, where the second service message includes a second destination MAC address; According to the second destination MAC address, obtain, from the local MAC forwarding table, a second MAC table entry matching the second destination MAC address, where the second MAC table entry includes a second outbound interface for forwarding the second service message, and the second outbound interface indicates the MLAG; Performing a hash calculation on the second characteristic information included in the second service message to obtain a second hash value of the second characteristic information; According to the second Hash value, obtaining, in the aggregation table item, a second aggregation table item matching the second Hash value, where the second aggregation table item includes an interface identifier of the third interface; Forwarding the second service message to the third network device through the third interface indicated by the interface identifier of the third interface; The third interface is a member interface within the MLAG.

8. The method according to claim 7, characterized in that Before receiving, through the peer-link, the second service message sent by the second network device, the method further includes: receiving a third configuration instruction input by a user; According to the third configuration instruction, the layer 2 unicast traffic isolation between the local peerlink port of the first network device and the local member port within the MLAG is released.

9. The method according to claim 8, characterized in that The method further comprises: receiving, through the peer-link, a first notification message sent by the second network device, where the first notification message includes a third MAC table entry of the third network device; When locally generating a fourth MAC table entry of the third network device according to the third MAC table entry, keeping unknown unicast traffic between the local peerlink port of the first network device and the local member port in the MLAG isolated; When receiving a third service message sent by the second network device and destined for the third network device through the peer-link, no longer forwarding the third service message to the third network device through the local member port in the MLAG; The third service message is discarded.

10. A communication device, characterized in that: The apparatus is applied to a first network device, the first network device is in an MLAG, the MLAG further includes a second network device, a peer-link has been established between the first network device and the second network device, and the apparatus includes: A receiving unit, configured to receive a first service message sent by a network side, wherein the first service message includes first characteristic information; A determining unit, configured to determine, according to the first characteristic information, a first interface for forwarding the first service message; a first acquiring unit, configured to acquire an interface identifier of a second interface associated with the first interface if the first interface is not in the first network device; a sending unit, configured to send the first service message to the second network device through the second interface indicated by the interface identifier and the peer-link, so that the second network device releases the layer 2 unicast traffic isolation between the local peerlink port of the second network device and the local member port in the MLAG, and then forwards the first service message to a third network device connected to the MLAG; The first service message is a layer 2 unicast message, and the second interface is a local peerlink port of the first network device.

Citation Information

Patent Citations

  • Message sending method and network equipment

    CN110166356A

  • Load balancing method and device, network equipment and computer readable storage medium

    CN115348212A

  • Cross-device link aggregation message processing method and system, switch and storage medium

    CN115665033A

  • Flow forwarding method, device and system and main and standby switches

    CN116614436A

  • Message forwarding method and device

    CN117201295A