CN114172841B - Message forwarding method and device, electronic equipment and read storage medium - Google Patents

Message forwarding method and device, electronic equipment and read storage medium Download PDF

Info

Publication number
CN114172841B
CN114172841B CN202111473845.9A CN202111473845A CN114172841B CN 114172841 B CN114172841 B CN 114172841B CN 202111473845 A CN202111473845 A CN 202111473845A CN 114172841 B CN114172841 B CN 114172841B
Authority
CN
China
Prior art keywords
mlag
message
mac address
port
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111473845.9A
Other languages
Chinese (zh)
Other versions
CN114172841A (en
Inventor
陈可
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN202111473845.9A priority Critical patent/CN114172841B/en
Publication of CN114172841A publication Critical patent/CN114172841A/en
Application granted granted Critical
Publication of CN114172841B publication Critical patent/CN114172841B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a message forwarding method, a message forwarding device, electronic equipment and a storage medium, and relates to the technical field of data communication. The method comprises the following steps: receiving a message to be forwarded; and if the output port of the message to be forwarded is Peerlink and the destination MAC address is the MAC address of the network equipment connected with the first MLAG equipment in the MLAG networking, modifying the output port of the message into a designated logic port, and sending the message to the first MLAG equipment by the designated logic port, wherein the designated logic port is connected with the first MLAG equipment. Therefore, the redirected message is satisfied without forwarding through the Peerlink link, so that the pressure of the Peerlink link can be relieved, and the stability of MLAG networking is improved.

Description

Message forwarding method and device, electronic equipment and read storage medium
Technical Field
The present application relates to the field of data communications technologies, and in particular, to a method and apparatus for forwarding a packet, an electronic device, and a read storage medium.
Background
In an MLAG (Multichassis Link Aggregation Group, cross-Device link aggregation group) dual-active system, two network devices connected in a Peerlink link are typically included, and in addition, dual-Homed Device (DHD) may be included. When the dual homing device receives the external traffic data, the data forwarding can be performed by one or two of the two network devices based on hash splitting. At present, in the data forwarding process, the condition of wasting the Peerlink bandwidth exists, and the stability of MLAG networking is affected.
For example, when the destination device is connected to only one of the two network devices, when the dual homing device performs hash splitting, there is a case where the output port of the data to be forwarded is Peerlink. At this time, the dual homing device needs to forward the data to the network device which is not connected with the destination device, then the network device forwards the data to the opposite terminal network device through the Peerlink link, and then the opposite terminal network device sends the data to the destination device.
Disclosure of Invention
The embodiment of the application aims to provide a message forwarding method, a message forwarding device, electronic equipment and a read storage medium, which are beneficial to relieving forwarding pressure of a Peerlink link in MLAG networking and improving stability of MLAG networking.
In order to achieve the above object, an embodiment of the present application is achieved by:
in a first aspect, an embodiment of the present application provides a method for forwarding a message, which is applied to a dual homing device in an MLAG network, where the dual homing device is configured to be communicatively connected to a first MLAG device and a second MLAG device in the MLAG network, and the method includes: receiving a message to be forwarded; and if the output port of the message to be forwarded is Peerlink and the destination MAC address is the MAC address of the network device connected with the first MLAG device in the MLAG networking, modifying the output port of the message to be forwarded into a designated logic port, and sending the message to be forwarded to the first MLAG device by using the designated logic port, wherein the designated logic port is connected with the first MLAG device.
In the above embodiment, when the packet output port received by the dual homing device is Peerlink and the destination MAC address is the MAC address of the network device connected to only the first MLAG device in the MLAG network, the packet may be redirected at this time, and the packet is sent to the first MLAG device through the designated logical port, and then the first MLAG device sends the packet to the network device of the destination. Therefore, the message does not need to be sent to the MLAG equipment of the local end, and then the message is forwarded through the Peerlink link, so that the pressure of the Peerlink link can be relieved, and the stability of MLAG networking is improved.
With reference to the first aspect, in some optional embodiments, before the receiving the packet to be forwarded, the method further includes: receiving a redirection message sent by the second MLAG device, wherein the redirection message is generated when the second MLAG device learns that an output port is Peerlink and a destination MAC address is the MAC address of a network device connected with the first MLAG device in the MLAG networking when the second MLAG device performs MAC address synchronization with the first MLAG device; and creating the designated logic port according to the redirection message, so as to send the message with the received destination MAC address being the MAC address of the network equipment by the designated logic port, wherein the hash member of the designated logic port only comprises the port which does not receive the redirection message in the dual-homing equipment.
In the above embodiment, by creating the designated logical port on the dual homing device, it is convenient to directly send the message to the first MLAG device by using the designated logical port, so that the message may not need to pass through the Peerlink link, so as to relieve the pressure of the Peerlink link.
With reference to the first aspect, in some optional implementations, the dual homing device is a switch, and creates a designated logical port according to the redirect message, including:
and creating a new trunk port as the designated logical port according to the redirection message.
With reference to the first aspect, in some optional implementations, the dual homing device is an OVS device, or a server, or a host device, and creating a designated logical port according to the redirect message includes:
and creating a new bond as the designated logical port according to the redirection message.
In a second aspect, the present application further provides a message forwarding method, applied to an MLAG device in an MLAG network, where the method includes:
performing MAC address synchronization with a first MLAG device in the MLAG networking;
if the output port is learned to be Peerlink and the destination MAC address is the MAC address of the network device connected with the first MLAG device in the MLAG networking, sending a redirection message to a dual-homing device in the MLAG networking, wherein the dual-homing device is used for creating a designated logic port according to the redirection message so as to send a message of which the received destination MAC address is the MAC address of the network device by the designated logic port, and a hash member of the designated logic port only comprises a port of the dual-homing device, which does not receive the redirection message.
In a third aspect, the present application further provides a packet forwarding device, provided in a dual homing device in an MLAG network, where the dual homing device is configured to be communicatively connected to a first MLAG device and a second MLAG device in the MLAG network, and the device includes:
the receiving unit is used for receiving the message to be forwarded;
and the message modifying and forwarding unit is used for modifying the output port of the message to be forwarded into a designated logic port and sending the message to be forwarded to the first MLAG device by the designated logic port when the output port of the message to be forwarded is Peerlink and the destination MAC address is the MAC address of the network device connected with the first MLAG device in the MLAG networking, wherein the designated logic port is connected with the first MLAG device.
With reference to the third aspect, in some optional embodiments, the apparatus further includes a creation unit;
before the receiving unit receives a message to be forwarded, the receiving unit is further configured to receive a redirection message sent by a second MLAG device, where the redirection message is generated when the second MLAG device learns that an egress port is Peerlink and a destination MAC address is a MAC address of a network device connected to only the first MLAG device in the MLAG network when the second MLAG device performs MAC address synchronization with the first MLAG device;
the creation unit creates the designated logic port according to the redirection message, so as to send the received message with the destination MAC address being the MAC address of the network device by the designated logic port, wherein the hash member of the designated logic port only comprises the port in the dual-homing device, which does not receive the redirection message.
In a fourth aspect, the present application further provides a message forwarding apparatus, provided in a second MLAG device in an MLAG network, where the apparatus includes:
an address synchronization unit, configured to perform MAC address synchronization with a first MLAG device in the MLAG network, where the first MLAG device is an opposite-end MLAG device of the second MLAG device in the MLAG network;
and the sending unit is used for sending a redirection message to a dual-homing device in the MLAG networking if the output port is learned to be Peerlink and the destination MAC address is the MAC address of a network device connected with the first MLAG device in the MLAG networking, wherein the dual-homing device is used for creating a designated logic port according to the redirection message so as to send a message of which the received destination MAC address is the MAC address of the network device by the designated logic port, and the hash member of the designated logic port only comprises a port of the dual-homing device which does not receive the redirection message.
In a fifth aspect, the present application also provides an electronic device, the electronic device comprising a processor and a memory coupled to each other, the memory storing a computer program, which when executed by the processor, causes the electronic device to perform the method described above.
In a sixth aspect, the present application also provides a computer readable storage medium having a computer program stored therein, which when run on a computer causes the computer to perform the above-described method.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a dual active system based on MLAG networking according to an embodiment of the present application.
Fig. 2 is a flow chart of a message forwarding method according to an embodiment of the present application.
Fig. 3 is a block diagram of a message forwarding device according to an embodiment of the present application.
Fig. 4 is a second block diagram of a message forwarding apparatus according to an embodiment of the present application.
Icon: 10-dual activity system; 11-a first MLAG apparatus; 12-a second MLAG device; 13-dual homing device; 14-a network device; 200-message forwarding device; 210-a receiving unit; 220-a message modification forwarding unit; 300-message forwarding device; 310-address synchronization unit; 320-transmitting unit.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. It should be noted that the terms "first," "second," and the like are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance. The following embodiments and features of the embodiments may be combined with each other without conflict.
Referring to fig. 1, the present application provides a dual-active system 10 based on MLAG networking, where the dual-active system 10 may include a first MLAG device 11, a second MLAG device 12, and dual-homing devices (Double Host Device, DHD). The second MLAG device 12 and the first MLAG device 11 are both connected by a Peerlink link, and serve as MLAG devices. The first MLAG device 11 serves as an opposite-end MLAG device of the second MLAG device 12, and likewise, the second MLAG device 12 serves as an opposite-end MLAG device of the first MLAG device 11.
The second MLAG device 12 and the first MLAG device 11 may negotiate with each other to determine that one of the devices is a master device and the other is a slave device. For example, the second MLAG device 12 serves as a master device, and the first MLAG device 11 serves as a slave device. It is understood that the negotiation manner is well known to those skilled in the art, and will not be described herein.
In this embodiment, the dual homing device 13 is connected to both the second MLAG device 12 and the first MLAG device 11. In dual-activity system 10, one or more dual-homing devices 13 may be included. Each dual homing device 13 is connected to a second MLAG device 12 and a first MLAG device 11.
In this embodiment, the second MLAG device 12, the first MLAG device 11 and the dual homing device 13 are all in the MLAG networking. The MLAG network can also be in communication connection with other external devices according to actual conditions. For example, the network device may be communicatively connected only to the first MLAG device 11 in the MLAG networking, and not to the second MLAG device 12 and the dual-homing device 13. The dual homing device 13 may be connected with a user terminal or other device.
The second MLAG device 12 and the first MLAG device 11 may be switches. The dual homing device 13 may be, but is not limited to, a switch, a server, a host device, an Open Virtual Switch (OVS).
The application further provides electronic equipment. The electronic device may include a processing module and a storage module. The memory module stores a computer program which, when executed by the processing module, enables the electronic device to perform the respective steps of the method described below.
Understandably, the electronic device may be the second MLAG device 12 or the first MLAG device 11 in the dual-active system 10, and may have a functional role that the MLAG device has. Alternatively, the electronic device may be the dual homing device 13, and may have the function of the dual homing device 13.
Referring to fig. 2, the present application provides a message forwarding method, which can be applied to the dual-activity system 10, and the MLAG device and the dual-homing device 13 in the dual-activity system 10 cooperate with each other to implement steps in the method, and the method may include the following steps:
step S110, the dual homing device 13 receives the message to be forwarded;
in step S120, if the output port of the message to be forwarded is Peerlink and the destination MAC address is the MAC address of the network device connected to only the first MLAG device in the MLAG network, the dual homing device 13 modifies the output port of the message to be forwarded to a designated logical port, and sends the message to be forwarded to the first MLAG device through the designated logical port, where the designated logical port is connected to the first MLAG device.
In the above embodiment, when the packet output port received by the dual homing device 13 is Peerlink and the destination MAC address is the MAC address of the network device connected to only the first MLAG device in the MLAG network, the packet may be redirected at this time, and the packet is sent to the first MLAG device through the designated logical port, and then the first MLAG device sends the packet to the network device of the destination. Therefore, the message does not need to be sent to the MLAG equipment of the local end, and then the message is forwarded through the Peerlink link, so that the pressure of the Peerlink link can be relieved, and the stability of MLAG networking is improved.
The steps in the method will be described in detail as follows:
prior to step S110, the method may comprise the step of configuring the dual homing device 13.
For example, before step S110, the method may further include:
step S101, a second MLAG device performs MAC address synchronization with a first MLAG device in the MLAG networking, wherein the first MLAG device is opposite-end MLAG device of the second MLAG device in the MLAG networking;
step S102, if the output port is Peerlink and the destination MAC address is the MAC address of the network device connected with the first MLAG device in the MLAG network, the second MLAG device sends a redirection message to the dual homing device 13 in the MLAG network;
step S103, the dual homing device 13 receives the redirection message sent by the second MLAG device;
step S104, the dual homing device 13 creates the designated logical port according to the redirection message, so as to send the received message with the destination MAC address being the MAC address of the network device, with the designated logical port, where the hash member of the designated logical port only includes the port in the dual homing device 13 that does not receive the redirection message.
In step S101, the MLAG device and the first MLAG device are connected by a Peerlink link. For example, referring again to fig. 1, the second MLAG device 12 may be a local-end MLAG device, and the first MLAG device 11 may be an opposite-end MLAG device of the second MLAG device 12.
The address synchronization between the second MLAG device and the first MLAG device may be performed periodically or only when a new device is accessed by a certain MLAG device. The address synchronization mode can be flexibly determined according to actual conditions. During address synchronization, the second MLAG device may learn the MAC address that the first MLAG device has recorded, and likewise, the first MLAG device may learn the MAC address that the second MLAG device has recorded.
In step S102, when the second MLAG device learns the MAC address of the network device with the orphan port from the opposite end, a redirect message is generated and sent to the dual-homing device 13.
Wherein a network device with an isolated port may be understood as a device connected to only one MLAG device in the MLAG networking.
For example, referring again to fig. 1, in the dual-active system 10, the network device 14 is only connected to the first MLAG device 11 in the MLAG networking, i.e., the network device 14 is a stand-alone port device. The first MLAG device 11 may record the MAC address of the network device 14 in advance. When the second MLAG device 12 learns the MAC address of the network device 14 from the first MLAG device 11, a redirect message is generated and sent to the dual-homing device 13.
The redirect message generated by the second MLAG device 12 is an extended LLDP (Link Layer Discovery Protocol ) message, where the LLDPDU (Link Layer Discovery Protocol Data Unit, link layer discovery protocol data unit) is a payload of the LLDP message, and is used to carry a message to be sent. Since the LLDP message is well known in the art, other field information in the message is not described herein.
The format of the LLDPDU is as follows:
understandably, TLV (Type-Length-Value) is a unit constituting LLDPDU in an LLDP message. In the LLDP message, types of TLVs based on existing standards may include types 0 to 127 for 128 types. Wherein type9 to type 126 are reserved fields. In the present application, the reserved field may be redirected and expanded. For example, the TLV type 10 is used to redirect and extend the LLDP packet, and the definition TLV infomation string includes a hostname and a MAC address list, and the specific extension format may be as follows:
in the above-described extension, TLV infomation string length: the length of the TLV information character string comprises the total length of a Hostname field and a MAC address list field;
TLV infomation string includes:
hostname: refers to the device name of the device that sent the LLDP redirect message, e.g., the second MLAG device 12;
MAC address list: referring to a list of MAC addresses that need to be redirected, multiple MAC addresses, such as network device 14, may be carried simultaneously.
Referring again to fig. 1, in the above example, assume that the MAC address of the network device 14 is MAC a. At this time, the second MLAG device 12 may construct an LLDP message, where TLV type of the LLDP message is 10, hostname is the second MLAG device, mac_ads list is filled with MAC a, and the LLDP message is sent to the dual homing device 13 through an MLAG port of the second MLAG device 12.
In step S103, the dual homing device 13 may receive the above-mentioned redirection message through the link connected to the second MLAG device, and then proceeds to step S104.
In step S104, the dual homing device 13 may parse the redirected message to determine the destination MAC address of the message to be redirected, and maintain a forwarding table for redirecting the message to be redirected, so as to forward the message to be redirected by using the forwarding table, thereby implementing redirecting of the message.
In addition, the dual homing device 13 may also create a new logical port as a designated logical port according to the redirected message. The new logical port refers to a port of the dual homing device 13 that does not receive the redirection message in the MLAG networking, and may be flexibly created according to the type of the dual homing device 13.
For example, referring to fig. 1 again, assume that dual homing device 13 includes port 1, port 2, port 3 and port 4, and that port 1, port 2, port 3 and port 4 are all in the same logical port a before the message is not redirected. That is, in the conventional processing manner, when the dual homing device 13 hashes a packet, it selects among the port 1, the port 2, the port 3 and the port 4, and then sends the packet to the outside by using the selected port pair, and if the destination end of the packet is the network device 14 and the dual homing device 13 selects the port 1 or the port 2, it is necessary to forward the packet based on the Peerlink link, and this manner increases the pressure of the Peerlink link.
When the dual homing device 13 receives the redirect message sent by the second MLAG device 12 through the ports 1 and 2, a new logical port B can be created, and the ports 3 and 4 are added to the new logical port B, and the ports 1 and 2 do not need to be added to the logical port B. That is, the new logical port B is used as a designated logical port, and the hash member only includes ports that have not received the redirect message. At this time, when the dual homing device 13 hashes the message, hash selection is performed in the port 3 and the port 4, and then the message is sent out by the selected port pair.
As an alternative embodiment, when the dual homing device 13 is a switch, the dual homing device 13 may create a new trunk port as a designated logical port according to the redirected message.
For example, referring to fig. 1 again, when the dual homing device 13 is a switch, before redirecting the message, the ports 1, 2, 3 and 4 of the dual homing device 13 are usually all in the same trunk a. When the dual homing device 13 receives the redirect message sent by the second MLAG device 12, it can create a trunk B and add the port 3, port 4 to the newly created trunk B.
One trunk port can be understood as realizing redundancy, bandwidth expansion and load balancing of ports by binding a plurality of ports in a chip of a switch into one logical port.
As an alternative embodiment, when the dual homing device 13 is an OVS device, or a server, or a host device, the dual homing device 13 may create a new bond as a designated logical port according to the redirect message.
For example, referring again to fig. 1, if the dual homing device 13 is an OVS device, or a server, or a host device. Before the redirection of the message, port 1, port 2, port 3 and port 4 of the dual-homing device 13 are typically all in the same bond a. When the dual homing device 13 receives the redirect message sent by the second MLAG device 12, a bond B can be created and add port 3, port 4 to the newly created bond B.
One bond can be understood as that redundancy, bandwidth expansion and load balancing of the local network card are realized by binding a plurality of network cards in the dual homing device 13 into one logic network card.
In step S110, the dual homing device 13 may receive a message sent from a device outside the MLAG networking, where the message is a message that the dual homing device 13 needs to forward. For example, the dual homing device 13 may receive messages sent by user terminals or other devices.
In step S120, the dual homing device 13 may hash-split the message after receiving the message. And if the output port of the message is determined to be Peerlink and the destination MAC address is the MAC address of the network equipment connected with the first MLAG equipment in the MLAG networking during hash shunting, redirecting the message.
For example, assume that the destination of the message is network device 14. The redirection treatment mode can be as follows: the dual homing device 13 modifies the output port of the message from the original "Peerlink" to "designated logical port", and sends the modified message to the first MLAG device 11 through the designated logical port by using the forwarding table for message redirection maintained in advance, and then the first MLAG device 11 sends the message to the network device 14. In this way, the dual homing device 13 is not required to send the message to the second MLAG device 12 first, and then forward the message to the first MLAG device 11 through the Peerlink link. Therefore, the redirected message does not need to occupy the Peerlink link, so that the pressure of the Peerlink link can be relieved, and further the reliability and stability of MLAG networking can be improved.
Referring to fig. 3, an embodiment of the present application further provides a message forwarding apparatus 200, which may be disposed in the dual homing device 13 and configured to perform each step in the method. The message forwarding device 200 includes at least one software function module that may be stored in a memory module in the form of software or Firmware (Firmware) or cured in an Operating System (OS) of the dual homing device 13. The processing module is configured to execute executable modules stored in the storage module, such as software functional modules and computer programs included in the packet forwarding device 200.
The message forwarding apparatus 200 may include a receiving unit 210 and a message modifying and forwarding unit 220, where the functional roles of the units may be as follows:
a receiving unit 210, configured to receive a message to be forwarded;
and a message modification forwarding unit 220, configured to modify an output port of the message to be forwarded into a designated logical port if the output port of the message to be forwarded is Peerlink and the destination MAC address is a MAC address of a network device connected to only a first MLAG device in the MLAG networking, and send the message to be forwarded to the first MLAG device through the designated logical port, where the designated logical port is connected to the first MLAG device.
The message forwarding device 200 may further comprise a creation unit. Before the receiving unit 210 receives the message to be forwarded, the receiving unit 210 is further configured to receive a redirection message sent by an MLAG device, where the redirection message is generated when the second MLAG device learns that an egress port is Peerlink and a destination MAC address is a MAC address of a network device connected to only the first MLAG device in the MLAG network when the second MLAG device performs MAC address synchronization with the first MLAG device. The creation unit creates the designated logical port according to the redirection message, so as to send the received message with the destination MAC address being the MAC address of the network device, where the hash member of the designated logical port only includes the port in the dual homing device 13 that does not receive the redirection message.
Optionally, the creating unit is further configured to create, when the dual homing device 13 is a switch, a new trunk as the designated logical port according to the redirect message.
Optionally, the creating unit is further configured to create, when the dual homing device 13 is an OVS device, or a server, or a host device, a new bond as the specified logical port according to the redirection packet.
Referring to fig. 4, another message forwarding apparatus 300 is provided in the embodiment of the present application, which may be disposed in an MLAG device (e.g., the second MLAG device 12) and is used to perform the steps in the method. The message forwarding apparatus 300 includes at least one software function module that may be stored in a memory module in the form of software or Firmware (Firmware) or cured in an Operating System (OS) of the MLAG device. The processing module is configured to execute executable modules stored in the storage module, such as software functional modules and computer programs included in the packet forwarding device 300.
The message forwarding apparatus 300 may include an address synchronization unit 310 and a sending unit 320, where the functional roles of the units may be as follows:
an address synchronization unit 310, configured to perform MAC address synchronization with a first MLAG device in the MLAG network, where the first MLAG device is an opposite-end MLAG device of the second MLAG device in the MLAG network;
and a sending unit 320, configured to send a redirection message to a dual homing device 13 in the MLAG network if it is learned that the egress port is Peerlink and the destination MAC address is a MAC address of a network device connected to only the first MLAG device in the MLAG network, where the dual homing device 13 is configured to create a designated logical port according to the redirection message, to send a received message with the destination MAC address being the MAC address of the network device, with the designated logical port, and the hash member of the designated logical port only includes a port in the dual homing device 13 that does not receive the redirection message.
It should be noted that, in the electronic device, the processing module may be an integrated circuit chip with signal processing capability. The processing module may be a general purpose processor. For example, the processor may be a central processing unit (Central Processing Unit, CPU), digital signal processor (Digital Signal Processing, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the application.
The memory module may be, but is not limited to, random access memory, read only memory, programmable read only memory, erasable programmable read only memory, electrically erasable programmable read only memory, and the like. In this embodiment, the storage module may be used to store a forwarding table and the like. Of course, the storage module may also be used to store a program, and the processing module executes the program after receiving the execution instruction.
It should be noted that, for convenience and brevity of description, specific working processes of the electronic device, the message forwarding device 200, and the message forwarding device 300 described above may refer to corresponding processes of each step in the foregoing method, and will not be described in detail herein.
The embodiment of the application also provides a computer readable storage medium. The computer readable storage medium has stored therein a computer program which, when run on a computer, causes the computer to perform the message forwarding method as described in the above embodiments.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that the present application may be implemented in hardware, or by means of software plus a necessary general hardware platform, and based on this understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disc, a mobile hard disk, etc.), and includes several instructions for causing a computer device (may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective implementation scenario of the present application.
In summary, in the present solution, when the packet output port received by the dual homing device is Peerlink and the destination MAC address is the MAC address of the network device connected to only the first MLAG device in the MLAG network, the packet may be redirected at this time, and the packet is sent to the first MLAG device through the designated logical port, and then the first MLAG device sends the packet to the network device of the destination. Therefore, the message does not need to be sent to the MLAG equipment of the local end, and then the message is forwarded through the Peerlink link, so that the pressure of the Peerlink link can be relieved, and the stability of MLAG networking is improved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus, system and method may be implemented in other manners as well. The above-described apparatus, system, and method embodiments are merely illustrative, for example, flow charts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. In addition, functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and variations will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. The message forwarding method is characterized by being applied to dual homing equipment in a cross-equipment link aggregation group (MLAG) networking, wherein the dual homing equipment is used for being in communication connection with a first MLAG equipment and a second MLAG equipment in the MLAG networking, and the method comprises the following steps:
receiving a message to be forwarded;
and if the output port of the message to be forwarded is Peerlink and the destination MAC address is the MAC address of the network device connected with the first MLAG device in the MLAG networking, modifying the output port of the message to be forwarded into a designated logic port, and sending the message to be forwarded to the first MLAG device by using the designated logic port, wherein the designated logic port is connected with the first MLAG device.
2. The method of claim 1, wherein prior to the receiving the message to be forwarded, the method further comprises:
receiving a redirection message sent by the second MLAG device, wherein the redirection message is generated when the second MLAG device learns that an output port is Peerlink and a destination MAC address is the MAC address of a network device connected with the first MLAG device in the MLAG networking when the second MLAG device performs MAC address synchronization with the first MLAG device;
and creating the designated logic port according to the redirection message, so as to send the message to be forwarded, wherein the received destination MAC address is the MAC address of the network equipment, and the message to be forwarded is sent by the designated logic port, and the hash member of the designated logic port only comprises the port, which does not receive the redirection message, in the dual-homing equipment.
3. The method of claim 2, wherein the dual homing device is a switch, and creating the designated logical port from the redirect message comprises:
and creating a new trunk port as the designated logical port according to the redirection message.
4. The method of claim 2, wherein the dual homing device is an open virtual switch OVS device, or a server, or a host device, creating a designated logical port from the redirect message, comprising:
and creating a new bond as the designated logical port according to the redirection message.
5. A method for forwarding a message, which is applied to a second MLAG device in a cross-device link aggregation group MLAG network, the method comprising:
performing MAC address synchronization with a first MLAG device in the MLAG network, wherein the first MLAG device is opposite-end MLAG device of the second MLAG device in the MLAG network;
if the output port is a Peerlink and the destination MAC address is the MAC address of the network device connected with the first MLAG device in the MLAG network, sending a redirection message to a dual-homing device in the MLAG network, wherein the dual-homing device is used for creating a designated logic port according to the redirection message so as to send a message of which the received destination MAC address is the MAC address of the network device by the designated logic port, and the hash member of the designated logic port only comprises a port of the dual-homing device which does not receive the redirection message, and the designated logic port is connected with the first MLAG device.
6. The utility model provides a message forwarding device, its characterized in that sets up the dual homing device in cross equipment link aggregation group MLAG network deployment, the dual homing device is used for with the first MLAG equipment and the second MLAG equipment communication connection in the MLAG network deployment, the device includes:
the receiving unit is used for receiving the message to be forwarded;
and the message modifying and forwarding unit is used for modifying the output port of the message to be forwarded into a designated logic port and sending the message to be forwarded to the first MLAG device by the designated logic port when the output port of the message to be forwarded is Peerlink and the destination MAC address is the MAC address of the network device connected with the first MLAG device in the MLAG networking, wherein the designated logic port is connected with the first MLAG device.
7. The apparatus of claim 6, further comprising a creation unit;
before the receiving unit receives a message to be forwarded, the receiving unit is further configured to receive a redirection message sent by the second MLAG device, where the redirection message is generated when the second MLAG device learns that an egress port is Peerlink and a destination MAC address is a MAC address of a network device connected to only the first MLAG device in the MLAG network when the second MLAG device performs MAC address synchronization with the first MLAG device;
the creation unit creates the designated logic port according to the redirection message, so as to send the received message with the destination MAC address being the MAC address of the network device by the designated logic port, wherein the hash member of the designated logic port only comprises the port in the dual-homing device, which does not receive the redirection message.
8. A message forwarding apparatus, characterized by a second MLAG device disposed in a cross-device link aggregation group MLAG network, the apparatus comprising:
an address synchronization unit, configured to perform MAC address synchronization with a first MLAG device in the MLAG network, where the first MLAG device is an opposite-end MLAG device of the second MLAG device in the MLAG network;
and the sending unit is used for sending a redirection message to a dual-homing device in the MLAG network if the output port is a Peerlink and the destination MAC address is the MAC address of a network device connected with the first MLAG device in the MLAG network, wherein the dual-homing device is used for creating a designated logic port according to the redirection message so as to send a message of which the received destination MAC address is the MAC address of the network device by the designated logic port, and the hash member of the designated logic port only comprises a port of the dual-homing device which does not receive the redirection message, and the designated logic port is connected with the first MLAG device.
9. An electronic device comprising a processor and a memory coupled to each other, the memory storing a computer program that, when executed by the processor, causes the electronic device to perform the method of any one of claims 1-4 or to perform the method of claim 5.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when run on a computer, causes the computer to perform the method according to any of claims 1-4 or to perform the method according to claim 5.
CN202111473845.9A 2021-11-30 2021-11-30 Message forwarding method and device, electronic equipment and read storage medium Active CN114172841B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111473845.9A CN114172841B (en) 2021-11-30 2021-11-30 Message forwarding method and device, electronic equipment and read storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111473845.9A CN114172841B (en) 2021-11-30 2021-11-30 Message forwarding method and device, electronic equipment and read storage medium

Publications (2)

Publication Number Publication Date
CN114172841A CN114172841A (en) 2022-03-11
CN114172841B true CN114172841B (en) 2023-08-11

Family

ID=80483267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111473845.9A Active CN114172841B (en) 2021-11-30 2021-11-30 Message forwarding method and device, electronic equipment and read storage medium

Country Status (1)

Country Link
CN (1) CN114172841B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115883489B (en) * 2022-11-17 2024-07-09 浪潮思科网络科技有限公司 MLAG protocol table item synchronization method, equipment and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111682927A (en) * 2020-04-27 2020-09-18 浪潮思科网络科技有限公司 Message synchronization method, device, equipment and medium based on MLAG environment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8625410B2 (en) * 2009-05-11 2014-01-07 Ciena Corporation Dual homed E-spring protection for network domain interworking
US8953607B2 (en) * 2012-04-03 2015-02-10 International Business Machines Corporation Internet group membership protocol group membership synchronization in virtual link aggregation
US10454809B2 (en) * 2017-06-08 2019-10-22 Vmware, Inc. Automatic network topology detection for merging two isolated networks
CN107547402B (en) * 2017-07-19 2020-04-03 新华三技术有限公司 Forwarding table generation method and device
CN112769587B (en) * 2019-11-05 2024-05-14 中兴通讯股份有限公司 Forwarding method, equipment and storage medium for access traffic of dual homing device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111682927A (en) * 2020-04-27 2020-09-18 浪潮思科网络科技有限公司 Message synchronization method, device, equipment and medium based on MLAG environment

Also Published As

Publication number Publication date
CN114172841A (en) 2022-03-11

Similar Documents

Publication Publication Date Title
US8730793B2 (en) Method and apparatus providing network redundancy and high availability to remote network nodes
CN110417569B (en) Network link fault processing method and tunnel endpoint equipment
CN113132229B (en) Segment identifier determination method and device
CN113839862B (en) Method, system, terminal and storage medium for synchronizing ARP information between MCLAG neighbors
CN114745255B (en) Hardware chip, DPU, server, communication method and related device
US9973427B2 (en) Method for determining management domain, network device, and virtual cluster
CN110868278B (en) Method for dual-computer redundancy of communication front-end processor of rail transit comprehensive monitoring system
CN103634423A (en) Three-layered interface based MPLS-TP (multi-protocol label switching-transport profile) configuration method and device
CN111988222A (en) Data transmission method and device, electronic equipment and computer readable storage medium
CN114172841B (en) Message forwarding method and device, electronic equipment and read storage medium
CN106921576B (en) Virtualization system-based data network and management network flow separation method and device
US20120294307A1 (en) Apparatus and Method for Identifier Management
CN111130978B (en) Network traffic forwarding method and device, electronic equipment and machine-readable storage medium
CN106209634B (en) Learning method and device of address mapping relation
CN108600073B (en) Dynamic tunnel establishment method and device
CN110830598B (en) Method and network equipment for establishing and transmitting interface address and alias in BGP (Border gateway protocol) session
WO2020181733A1 (en) Vpc-based multi-data center intercommunication method and related device
CN111464443A (en) Message forwarding method, device, equipment and storage medium based on service function chain
US11436172B2 (en) Data frame interface network device
CN115442285A (en) Network testing method, device, equipment and medium based on virtualization configuration
CN108418709B (en) Port aggregation method and device
CN108768845B (en) Multi-homing host routing synchronization method and device
CN114615187B (en) Logic interface data communication method and device
US11252073B1 (en) Fast, reliable, and extensible active-standby multi-vendor link redundancy
CN103051568A (en) Message transmission method, device and switch

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant