CN115225468A - Method and system for fast switching flow and computer readable storage medium - Google Patents

Method and system for fast switching flow and computer readable storage medium Download PDF

Info

Publication number
CN115225468A
CN115225468A CN202210886734.9A CN202210886734A CN115225468A CN 115225468 A CN115225468 A CN 115225468A CN 202210886734 A CN202210886734 A CN 202210886734A CN 115225468 A CN115225468 A CN 115225468A
Authority
CN
China
Prior art keywords
switch
downlink
target
port
traffic
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.)
Pending
Application number
CN202210886734.9A
Other languages
Chinese (zh)
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.)
Suzhou Centec Communications Co Ltd
Original Assignee
Suzhou Centec Communications 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 Suzhou Centec Communications Co Ltd filed Critical Suzhou Centec Communications Co Ltd
Priority to CN202210886734.9A priority Critical patent/CN115225468A/en
Publication of CN115225468A publication Critical patent/CN115225468A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • 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 embodiment of the invention provides a method, a system and a computer readable storage medium for fast switching of flow, belonging to the field of data processing, wherein the method is applied to an M-LAG system, the M-LAG system comprises a first switch and a second switch which are connected through a peerLink, and the method comprises the following steps: when the first switch receives downlink flow sent by the server, whether a first target downlink port of the first switch is in fault is judged, if yes, the first switch sends the downlink flow to the second switch through the peerLink, and after the second switch receives the downlink flow, the downlink flow is sent to target equipment in the plurality of downlink equipment through a second target downlink port of the second switch.

Description

Method and system for quickly switching flow and computer readable storage medium
Technical Field
The invention relates to the field of data processing, in particular to a method and a system for fast switching flow and a computer readable storage medium.
Background
A cross-device Link Aggregation Group (M-LAG) refers to that two physical devices are virtualized into one device on an Aggregation layer to implement cross-device Link Aggregation, thereby providing device-level redundancy protection and traffic load sharing, and implementing redundancy of links and nodes. Two physical devices under an M-LAG mechanism are virtualized to form one device, downlink ports of the two physical devices are bound to form an MLAG group, members in the group are mutually protected, and when one device member fails or is disconnected, data traffic can be forwarded from the other device MLAG group member.
In a scenario where the M-LAG mechanism is applied to a data link layer (L2), when one physical device fails, downlink traffic on the physical device needs to be switched to another physical device. At present, in order to switch the downlink traffic to another physical device and then normally send the downlink traffic to the downlink device, a mac table of the failed physical device needs to be flush-operated, a mac table entry learned before is deleted, and the downlink traffic learns a port of another physical device according to the relearning of the traffic, thereby completing the traffic switching. However, in the process from flush operation to relearning completion of the mac table, the consumed time is long, and the traffic switching speed is slow.
Disclosure of Invention
In view of this, an object of the present invention is to provide a method, a system, and a computer-readable storage medium for fast switching traffic, which can solve the problem that when a downlink traffic of a switch with a failed downlink port is switched to an opposite-end switch in an existing M-LAG system, the consumed time is long, and the traffic switching speed is slow.
In order to achieve the above object, the embodiments of the present invention adopt the following technical solutions.
In a first aspect, an embodiment of the present invention provides a method for fast switching of traffic, which is applied to an M-LAG system, where the M-LAG system includes a first switch and a second switch that are connected by a peerLink link, and both the first switch and the second switch are communicatively connected to a server and multiple downstream devices, and the method includes:
when the first switch receives the downlink flow sent by the server, judging whether a first target downlink port of the first switch is in failure;
if so, replacing the first target downlink port by a peerlink member port of the first switch to switch the downlink traffic to the peerlink link, and switching the downlink traffic to the second switch through the peerlink link;
after receiving the downlink traffic, the second switch sends the downlink traffic to a target device of the plurality of downlink devices through a second target downlink port of the second switch;
the first target downlink port and the second target downlink port are both downlink ports matched with the downlink traffic and have an aggregation binding relationship.
Further, the step of determining whether the first target downlink port of the first switch has a fault includes:
when the first switch receives a link interruption message about a first target downlink port, judging that the first target downlink port has a fault;
the link interruption message is sent when the monitoring module of the first switch monitors that the first target downlink port fails.
Further, the step of determining whether the first target downlink port of the first switch has a failure includes:
the first switch polls a plurality of downlink ports of the first switch at regular time, and if the response instruction of the first target downlink port is not received, the first target downlink port is judged to be in fault.
Further, the step of the first switch receiving the downlink traffic sent by the server includes:
the first switch receives a task request sent by the target equipment and sends the task request to the server;
and the first switch receives downlink flow returned by the server after responding to the task request.
Further, after receiving the downlink traffic, the second switch sends the downlink traffic to a target device of the plurality of downlink devices through a second target downlink port of the second switch, including:
after receiving the downlink flow, the second switch determines a second target downlink port from the downlink port of the second switch based on a prestored forwarding table;
and sending the downlink flow to the target equipment through the second target downlink port.
Further, the step of determining a second target downlink port from the downlink ports of the forwarding table based on the pre-stored forwarding table includes:
analyzing the downlink flow to obtain a target MAC address of the downlink flow;
and matching the target MAC address with the matching relation in the forwarding table to determine a second target downlink port.
In a second aspect, an embodiment of the present invention provides a method for fast switching of traffic, where the method is applied to a first switch in an M-LAG system, the first switch is connected to a second switch through a peerLink link, and the first switch is communicatively connected to a server and a plurality of downstream devices, and the method includes:
when receiving downlink traffic sent by the server, determining a first target downlink port from a plurality of downlink ports of the server, and detecting whether the first target downlink port is in fault;
if so, replacing the first target downlink port with a peerlink member port of the peerlink member port to switch the downlink traffic to the peerlink link, and switching the downlink traffic to the second switch through the peerlink link to send the downlink traffic to a target device in the plurality of downlink devices through a second target downlink port of the second switch.
In a third aspect, an embodiment of the present invention provides a method for fast switching of traffic, where the method is applied to a second switch in an M-LAG system, the second switch is connected to a first switch through a peerLink link, and the second switch is communicatively connected to a plurality of downstream devices, and the method includes:
receiving downlink traffic sent by the first switch, and analyzing the downlink traffic to determine a second target downlink port;
and sending the downlink flow to target equipment in the plurality of downlink equipment through the second target downlink port.
In a fourth aspect, an embodiment of the present invention provides a fast traffic switching system, including a first switch and a second switch that are connected by a peerLink link, where the first switch and the second switch are both in communication connection with a server and multiple downstream devices;
the first switch is configured to, when receiving the downlink traffic sent by the server, determine whether a first target downlink port of the first switch is faulty, if so, replace the first target downlink port with a peerlink member port of the first switch, so as to switch the downlink traffic to the peerlink link, and switch the downlink traffic to the second switch through the peerlink link;
the second switch is configured to send the downlink traffic to a target device of the plurality of downlink devices through a second target downlink port of the second switch after receiving the downlink traffic;
the first target downlink port and the second target downlink port are downlink ports matched with the downlink traffic and have an aggregation binding relationship.
In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the fast traffic switching method according to the first aspect, the fast traffic switching method according to the second aspect, or the fast traffic switching method according to the third aspect.
In the method, the system, and the computer-readable storage medium for fast traffic switching provided in the embodiments of the present invention, when a first target downlink port of a first switch in an M-LAG system fails, the first switch replaces the first target downlink port with a peerlink member port of the first switch, so as to switch downlink traffic to a peerlink link, and further switch the downlink traffic to a second switch, so that the second switch forwards the downlink traffic to a target device through a second target downlink port of the second switch, that is, when a downlink port of a certain switch in the M-LAG system fails, only the downlink traffic of the port needs to be switched to another switch to the target device through the peerlink, and the switch with the failed downlink port does not need to perform flush operation, so that time consumption can be greatly reduced, and traffic switching speed can be increased.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 shows a schematic block diagram of a system for quickly switching traffic according to an embodiment of the present invention.
Fig. 2 shows one of the flow diagrams of the method for fast switching traffic according to the embodiment of the present invention.
Fig. 3 shows a second flowchart of the method for fast switching traffic according to the embodiment of the present invention.
Fig. 4 shows a schematic flow diagram of the step substeps of step S107 in fig. 2 or 3.
Fig. 5 shows a third flowchart of the method for fast switching traffic according to the embodiment of the present invention.
Fig. 6 shows a fourth flowchart of the fast traffic switching method according to the embodiment of the present invention.
Fig. 7 is a block diagram illustrating a fast traffic switching apparatus according to an embodiment of the present invention.
Fig. 8 is a block diagram of a switch provided by an embodiment of the present invention.
Reference numerals: 100-flow fast switching system; 110-a first switch; 120-a second switch; 130-a downstream device; 140-a server; 150-a downstream port; 160-flow fast switching device; 170-a receiving module; 180-a switching module; 190-a sending module; 200-switch.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
For the requirement of redundancy protection, there are a series of existing technologies in the conventional network, such as Spanning Tree Protocol (STP), rapid Spanning Tree Protocol (RSTP), and Multiple Spanning Tree Protocol (MSTP). After using the spanning tree protocol, to avoid loops, there is a link in a block state (i.e., a blocking state). The use of spanning tree protocol to achieve redundancy does not increase the actual network bandwidth. However, a method capable of achieving both redundancy protection and load sharing task is most commonly a Link Aggregation Group (LAG) in the data Link layer (L2), and an equivalent routing protocol (ECMP protocol) is mainly used in the network layer (L3).
In actual deployment, a data link layer is the most common, but a conventional link aggregation layer can only be used for aggregation of links, and cannot achieve the purpose of disaster recovery of the whole device. After the virtualization technology of the data center is raised, a multiple virtual one stacking technology is used to solve the problem. Multiple devices are virtualized into one logic device through a cross-device Link Aggregation Group (M-LAG), and then a Link Aggregation Group is deployed on the logic device, so that the purpose of device-level disaster recovery and backup Aggregation is achieved.
Two physical devices under an M-LAG mechanism are virtualized to form one device, downlink ports of the two physical devices are bound to form an MLAG group, members in the group are protected with each other, and when one device member fails or is disconnected, data traffic can be forwarded from another device MLAG group member.
In a scenario where the M-LAG mechanism is applied to a data link layer (L2), when one physical device fails, downlink traffic (mainly unicast packets) on the physical device needs to be switched to another physical device. At present, in order to switch the downlink traffic to another physical device and then normally send the downlink traffic to the downlink device, a mac table of the failed physical device needs to be flush-operated, a mac table entry learned before is deleted, and the downlink traffic learns a port of another physical device according to the relearning of the traffic, thereby completing the traffic switching. However, in the process from flush operation to relearning completion of the mac table, the consumed time is long, and the traffic switching speed is slow.
Based on the above consideration, an embodiment of the present invention provides a fast traffic switching scheme, which can solve the problem that, in the current M-LAG mechanism, when one physical device fails and downlink traffic on the physical device needs to be switched to another physical device, a mac table of the physical device with the failed downlink port needs to be subjected to flush operation, and the flush operation process consumes a long time, which results in a slow traffic switching speed.
In one embodiment, referring to fig. 1, the present invention provides a fast traffic switching system 100, where the fast traffic switching system 100 includes a first switch 110 and a second switch 120 connected by a peerlink, and the first switch 110 and the second switch 120 are virtualized externally into one device by using an M-LAG mechanism. The first switch 110 and the second switch 120 are each communicatively coupled to a server 140 and a plurality of downstream devices 130 via a network. The fast traffic switching system 100 is actually an M-LAG system.
The first switch 110 and the second switch 120 have respective peerlink member interfaces, and the peerlink link is formed by connecting a peerlink member port of the first switch 110 with a peerlink member port of the second switch 120.
In detail, the downstream port of the first switch 110 and the downstream port of the second switch 120 are bound into a MLAG group two by two, that is, each downstream port of the first switch 110 and one downstream port of the second switch 120 have an aggregation binding relationship, and each group of downlink ports to which aggregation is bound serves at least one downlink device 130.
The first switch 110 is configured to, when receiving the downlink traffic sent by the server 140, determine whether a first target downlink port of the first switch is faulty, and if yes, send the downlink traffic to the second switch 120 through the peerLink.
The second switch 120 is configured to send the downlink traffic to a target device in the multiple downstream devices 130 through a second target downlink port of the second switch after receiving the downlink traffic.
The first target downlink port and the second target downlink port are downlink ports matched with downlink traffic and have aggregation binding relation.
When a first target downlink port of the first switch 110 in the M-LAG system fails, switching the downlink traffic to a peerlink link, and switching the downlink traffic to the second switch 120 through the peerlink link, so that the second switch 120 forwards the downlink traffic to the target device through its own second target downlink port. That is, when a downstream port of a certain switch 200 in the M-lag system fails, the downstream traffic of the port only needs to be switched to another switch through the peerlink link, and the other switch sends the downstream traffic to the target device from its own downstream port, and the switch 200 with the failed downstream port does not need to perform flush operation, so that time consumption can be greatly reduced, and the traffic switching speed is further improved.
It should be understood that the first switch 110 and the second switch 120 in the traffic fast switching system 100 are substantially the first switch 110 and the second switch 120 in the M-LAG system.
It should be noted that the traffic fast switching system 100 may include more than two switches adopting the M-LAG mechanism, and the second switch 120 is the switch 200 without a failure of a downstream port (i.e., a second target downstream port) having an aggregation binding relationship with a first target downstream port, among the switches except the first switch 110.
To describe the fast traffic switching scheme in more detail, in an embodiment, referring to fig. 2, an embodiment of the present invention provides a fast traffic switching method, which is applied to an M-LAG system formed by a first switch 110 and a second switch 120 that employ an M-LAG mechanism in fig. 1, and may be substantially applied to the fast traffic switching system 100 in fig. 1.
And S103, when the first switch receives the downlink flow sent by the server, judging whether a first target downlink port of the first switch fails. If yes, go to step S105.
Faults include, but are not limited to: the first target downlink port is damaged, and the first target downlink port is disconnected.
The first target downlink port is a downlink port matched with the downlink traffic, and is in communication connection with the target device of the downlink traffic under the condition of no fault.
The target device of the downlink traffic refers to a destination arrival device of the downlink traffic.
The first switch 110 pre-stores a forwarding table, which records a matching relationship between each downlink port of the forwarding table and a mac address of the downstream device 130. That is, the forwarding table may know from which downstream port the information of the downstream device 130 is to be sent.
The next traffic contains a destination mac address, that is, the mac address of the target device, so that after receiving the downlink traffic, the first target downlink port can be determined by combining the forwarding table pre-stored in the second switch 120 according to the destination mac address.
It should be understood that if the first target downstream port is not faulty, the first target downstream port is sent directly to the target device through the first downstream port.
And S105, the first switch replaces the first target downlink port with the peerlink member port of the first switch to switch the downlink traffic to the peerlink link, and switches the downlink traffic to the second switch through the peerlink link.
When the first target downlink port fails, the first switch replaces the first target downlink port with the peerlink member port of the first switch (that is, sending downlink traffic is switched from the first target downlink port to the peerlink member port), switches the downlink traffic to the peerlink link, and switches the downlink traffic to the second switch through the peerlink.
Replacing the first target downstream port with its peerlink member port may also be understood as replacing a downstream aggregation group member with a peerlink group member.
It should be understood that the packet may be sent to the second switch 120 first, or may be sent directly to the second switch 120 without being packetized.
And S107, after receiving the downlink traffic, the second switch sends the downlink traffic to a target device in the plurality of downlink devices through a second target downlink port of the second switch.
The second target downlink port is a downlink port matched with the downlink traffic and is in communication connection with the target device of the downlink traffic.
The second target downlink port and the first target downlink port are MLAG groups, that is, have an aggregation binding relationship and belong to a link aggregation group in the M-LAG system.
By the flow fast switching method, when a downlink port of a certain switch in an M-lag system fails, only the local peerlink member port is needed to replace the downlink port, so that the downlink flow is switched to a peerlink link, the downlink flow is switched to another switch through the peerlink link and is sent to target equipment from the local downlink port by the other switch, and the switch with the failed downlink port does not need flush operation, so that the time consumption can be greatly reduced, and the flow switching speed is further improved.
Further, referring to fig. 3, the fast traffic switching method further includes steps S101 and S102. S101 is executed before step S102, and S102 is executed before step S103.
S101, the first switch receives a task request sent by target equipment and sends the task request to a server.
Among them, the task request may be, but is not limited to: any of a connection request, an access request, a computation request, a task processing instruction, an allocation instruction, and the like.
After receiving the task request, the server 140 performs corresponding processing to obtain the returned downlink traffic, and sends the downlink traffic to the first switch 110.
And S102, the first switch receives the downlink flow returned by the server after responding to the task request.
It should be understood that for downstream traffic, the downstream traffic is unicast messages, not multicast and broadcast messages. Therefore, in the absence of a failure, only the first switch 110 in the M-LAG system receives and transmits the downstream traffic, and the other switches in the M-LAG mechanism do not have the downstream traffic.
The manner of determining whether the first target downlink port of the first switch 110 has a fault may be flexibly set, for example, active monitoring may be performed, or passive learning may be performed.
When active monitoring, it may be: the first switch 110 polls multiple downstream ports of itself at regular time, and if the response instruction of the first target downstream port is not received, it determines that the first target downstream port is faulty.
In detail, the first switch 110 polls a plurality of downlink ports of itself at regular time, and responds to the response instruction when a downlink port without a fault is polled, and sets the status identifier of the downlink port as a fault when the response instruction of any downlink port is not received, and sets the status identifier of the downlink port as normal when the response instruction of the downlink port with the status identifier as a fault is received during certain polling. And when the first target downlink port is determined, acquiring whether the first target downlink port is in fault or not according to the state identifier of the first target downlink port.
When passive learning, it may be: when receiving the link interruption packet related to the first target downlink port, the first switch 110 determines that the first target downlink port is faulty. That is, a linkdown interrupt that is port dependent in nature, and a board interrupt notifies a failure when hardware is going to do so.
In more detail, the controller of the first switch 110 includes a monitoring module in the form of hardware, and when the monitoring module monitors that any one of the downstream ports has a hardware fault, the monitoring module sends a link interrupt message related to the downstream port. When receiving the link interruption message, the first switch 110 sets the status identifier of the downlink port as a failure. And when the recovery of the downlink port with the fault is monitored, setting the state identifier of the downlink port as no fault. And when the first target downlink port is determined, acquiring whether the first target downlink port is in fault or not according to the state identifier of the first target downlink port.
It should be understood that any switch under the M-LAG mechanism may detect and record the state of its downstream port in the above manner.
Under the M-LAG mechanism, forwarding tables of all switches of the M-LAG system are the same, and the forwarding tables record matching relationships between downlink ports of all switches and mac addresses of the downstream devices 130. Similarly, the forwarding tables of all switches in the traffic fast switching system 100 are the same.
For example, when there are two switches, the matching information of the forwarding table may be as shown in table 1 below.
TABLE 1
Figure BDA0003766018100000121
The table 1 is matching information of a forwarding table of the first switch 110, a mac address is an address of a target device, the downlink port 11 is a first target downlink port of the first switch 110, and the peerlink member downlink port 21 is a second target downlink port of the second switch 120.
It can be seen that, in the traffic fast switching method provided by the present invention, when a downlink port of a certain switch fails, the exit link aggregation group corresponding to the mac address does not change, and the downlink traffic does not need to relearn the mac address, but only the port of the downlink traffic is changed from the downlink port 11 to the PeerLink member downlink port 21. Therefore, when a linkdown event occurs on the downlink port of the first switch 110, the downlink traffic is guided to the opposite-end device (the second switch 120), and the device-level aggregation protection is realized.
On this basis, referring to fig. 4, step S107 may be realized by the following steps.
S1071, after the second switch receives the downstream flow, the second switch determines a second target downstream port from the downstream port of the second switch based on the pre-stored forwarding table.
More specifically, the downlink traffic is analyzed to obtain a target MAC address of the downlink traffic. And matching the target MAC address with the matching relation in the forwarding table, and determining a second target downlink port for connecting with the target equipment.
And S1072, sending the downlink flow to the target equipment through the second target downlink port.
Through the steps S1071 to S1072, the second target downlink port can be determined quickly.
When a plurality of switches are included in the M-LAG system, the second switch 120 is a switch in which a downstream port connected to the target device is not failed among all switches except the first switch 110.
In detail, it may be: when determining that the first target downlink port of the first switch 110 is faulty, the first switch 110 may send a query instruction to each switch through the peerlink link, where the query instruction includes a destination mac address of the downlink traffic. After receiving the query instruction, any switch quickly checks the status identifier of the downstream port matched with the mac address in the query instruction, and responds to the first switch 110 if the status identifier is no fault. The first switch 110 randomly selects one of the responding switches as the second switch 120.
After detecting the state identifier of the downlink port of each switch, each switch may broadcast the state identifier through a peerlink link, so that the forwarding table (as shown in table 1 above) of each switch records the state identifier of the downlink port of each switch. After determining that the first target downlink port fails, the first switch 110 may query a forwarding table to determine the status identifiers of other downlink ports of the link aggregation group members of the first target downlink port. The first switch 110 randomly selects one of the plurality of switches whose states are identified as non-failed as the second switch 120.
In the above method for fast switching traffic, the MLAG system may use the downlink traffic which is a unicast packet to implement the switching and forwarding of the downlink traffic. For the downlink traffic of multicast or broadcast packet type, peerlink group members and M-LAG group members always exist, so that the downlink traffic is switched to the second switch 120 without failure, and no additional processing is required.
In the method for fast switching traffic provided in the embodiment of the present invention, when a first switch receives downlink traffic and a first target downlink port of the downlink traffic fails, a peerlink port of the first switch is used to replace the first target downlink port, the downlink traffic is switched to a peerlink link, and then the downlink traffic is switched to a second switch through the peerlink link, so that the downlink traffic is sent to a target device through a second target downlink port of the second switch (the first target downlink port and the second target downlink port both belong to a downlink aggregation group, that is, an M-LAG group).
Based on the concept of the fast traffic switching method, in one embodiment, referring to fig. 5, a fast traffic switching method applied to the first switch 110 in the M-LAG system is provided. The first switch 110 is connected to the second switch 120 via a peerLink link, and the first switch 110 is communicatively connected to a server 140 and a plurality of downstream devices 130. The M-LAG system includes at least two switches. The fast flow switching method comprises the following steps.
S201, when receiving the downlink traffic sent by the server, determining a first target downlink port from a plurality of downlink ports of the server, and detecting whether the first target downlink port is in fault.
And S202, if so, replacing the first target downlink port with the peerlink member port of the peerlink member port to switch the downlink traffic to the peerlink link, and switching the downlink traffic to the second switch through the peerlink link to send the downlink traffic to the target equipment in the plurality of downlink equipment through the second target downlink port of the second switch.
When a first target downlink port of a first switch in the M-LAG system fails, the first switch switches downlink traffic to a peerlink link and switches the downlink traffic to a second switch through the peerlink link, so that the second switch can forward the downlink traffic to a target device through a second target downlink port of the second switch, which is beneficial to improving the problem of low traffic switching speed.
Based on the concept of the fast traffic switching method, in one embodiment, referring to fig. 6, a fast traffic switching method applied to the second switch 120 in the M-LAG system is provided. The second switch 120 is connected to the first switch 110 via a peerLink link, and the second switch 120 is communicatively connected to a server 140 and a plurality of downstream devices 130. The M-LAG system includes at least two switches. The fast flow switching method comprises the following steps.
S301, receiving the downlink traffic sent by the first switch, and analyzing the downlink traffic to determine a second target downlink port.
And S302, sending the downlink traffic to a target device in the plurality of downlink devices through a second target downlink port.
After receiving the downlink traffic sent by the first switch 110, the second target downlink port is queried, and the downlink traffic is sent from the second target downlink port to the target device, which is helpful for improving the traffic switching speed in the M-LAG system.
It should be understood that any switch in the M-LAG system may be both the first switch 110 and the second switch 120, and thus, any switch in the M-LAG system can implement the above-described fast traffic switching method applied to the first switch 110 and the above-described fast traffic switching method applied to the second switch 120. And, for the specific definition of the fast switching method of the flow rate, reference may be made to the above definition of the fast switching method of the flow rate applied in the MLAG system, and details are not described herein again.
Based on the above concept, an embodiment of the present invention provides a fast traffic switching apparatus 160, and referring to fig. 7, the fast traffic switching apparatus 160 is applied to any switch in an M-LAG system, and the fast traffic switching apparatus 160 includes a receiving module 170, a switching module 180, and a sending module 190.
The receiving module 170 is configured to, when receiving the downlink traffic sent by the server 140, determine whether a first target downlink port of the receiving module is faulty.
The switching module 180 is configured to replace the first target downlink port with a peerlink member port of the switching module if it is determined that the first target downlink port of the switching module is faulty, so as to switch the downlink traffic to the peerlink link, switch the downlink traffic to the second switch through the peerlink link, and send the downlink traffic to a target device in the multiple downlink devices through the second target downlink port of the second switch.
The sending module 190 is configured to send the downlink traffic to a target device in the multiple downstream devices through a downlink port matched with the downlink traffic after receiving the downlink traffic sent by any switch.
For specific limitations of the fast traffic switching device 160, reference may be made to the above limitations of the fast traffic switching method, which will not be described herein again. The modules in the fast traffic switching apparatus 160 may be implemented in whole or in part by software, hardware, or a combination thereof. The modules may be embedded in a hardware form or independent from a processor in the switch 200, or may be stored in a memory in the switch 200 in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a switch 200 is provided, the switch 200 may be a terminal, and the internal structure of the switch 200 may be as shown in fig. 8. The switch 200 includes a processor, memory, communication interface, display screen, and input devices connected by a system bus. Wherein the processor of the switch 200 is configured to provide computing and control capabilities. The memory of the switch 200 includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the switch 200 is used for performing wired or wireless communication with an external terminal, and the wireless communication may be implemented by WIFI, an operator network, near Field Communication (NFC), or other technologies. The computer program is executed by a processor to implement a fast traffic switching method. The display screen of the switch 200 may be a liquid crystal display screen or an electronic ink display screen, and the input device of the switch 200 may be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the housing of the switch 200, or an external keyboard, a touch pad or a mouse, etc.
It is to be understood that the architecture shown in fig. 8 is a block diagram of only a portion of the architecture associated with the inventive arrangements and does not constitute a limitation on the switch 200 to which the inventive arrangements are applied, as a particular switch 200 may include more or less components than shown, or combine certain components, or have a different arrangement of components.
In one embodiment, the fast traffic switching apparatus 160 provided by the present invention can be implemented in the form of a computer program, and the computer program can be executed on the switch 200 shown in fig. 8. The memory of the switch 200 may store various program modules constituting the traffic fast switching apparatus 160, such as the receiving module 170, the switching module 180, and the sending module 190 shown in fig. 7. The computer program constituted by the program modules causes the processor to execute the steps of the traffic fast switching method according to the embodiments of the present invention described in the present specification.
For example, the switch 200 shown in fig. 8 may execute step S201 through the receiving module 170 in the traffic fast switching apparatus 160 shown in fig. 7. The switch 200 may perform step S202 through the switching module 180. The switch 200 may perform steps S301 and S302 through the transmission module 190.
In one embodiment, a switch 200 is provided comprising a memory storing a computer program and a processor implementing the following steps when executing the computer program: when receiving downlink traffic sent by a server, determining a first target downlink port from a plurality of downlink ports of the server, and detecting whether the first target downlink port is in fault; and if so, replacing the first target downlink port with the self peerlink member port to switch the downlink traffic to a peerlink link, and switching the downlink traffic to a second switch through the peerlink link to send the downlink traffic to the target equipment in the plurality of downlink equipment through a second target downlink port of the second switch.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, performs the steps of: when receiving downlink traffic sent by a server, determining a first target downlink port from a plurality of downlink ports of the server, and detecting whether the first target downlink port is in fault; and if so, replacing the first target downlink port with the self peerlink member port to switch the downlink traffic to a peerlink link, and switching the downlink traffic to a second switch through the peerlink link to send the downlink traffic to the target equipment in the plurality of downlink equipment through a second target downlink port of the second switch.
In one embodiment, a switch 200 is provided comprising a memory storing a computer program and a processor implementing the following steps when executing the computer program: receiving downlink traffic sent by a first switch, and analyzing the downlink traffic to determine a second target downlink port; and sending the downlink flow to target equipment in the plurality of downlink equipment through a second target downlink port.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving downlink traffic sent by a first switch, and analyzing the downlink traffic to determine a second target downlink port; and sending the downlink flow to target equipment in the plurality of downlink equipment through a second target downlink port.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. 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 should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. 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, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or a part thereof which substantially contributes to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A fast traffic switching method applied to an M-LAG system, the M-LAG system including a first switch and a second switch connected by a peerLink link, the first switch and the second switch each being communicatively connected to a server and a plurality of downstream devices, the method comprising:
when the first switch receives the downlink flow sent by the server, judging whether a first target downlink port of the first switch is in failure;
if so, replacing the first target downlink port by a peerlink member port of the first switch to switch the downlink traffic to the peerlink link, and switching the downlink traffic to the second switch through the peerlink link;
after receiving the downlink traffic, the second switch sends the downlink traffic to a target device of the plurality of downlink devices through a second target downlink port of the second switch;
the first target downlink port and the second target downlink port are both downlink ports matched with the downlink traffic and have an aggregation binding relationship.
2. The method according to claim 1, wherein the step of determining whether the first target downstream port of the first switch has failed comprises:
when the first switch receives a link interruption message about a first target downlink port, judging that the first target downlink port has a fault;
the link interruption message is sent when the monitoring module of the first switch monitors that the first target downlink port fails.
3. The method according to claim 1 or 2, wherein the step of determining whether the first target downstream port of the first switch has a failure includes:
the first switch polls a plurality of downlink ports of the first switch at regular time, and if the response instruction of the first target downlink port is not received, the first target downlink port is judged to be in fault.
4. The method according to claim 1, wherein the downlink traffic is a unicast message, and the step of receiving, by the first switch, the downlink traffic sent by the server includes:
the first switch receives a task request sent by the target equipment and sends the task request to the server;
and the first switch receives downlink flow returned by the server after responding to the task request.
5. The method for fast switching traffic according to claim 1, wherein the step of sending the downlink traffic to a target device in the plurality of downstream devices through a second target downlink port of the second switch after the second switch receives the downlink traffic includes:
after receiving the downlink flow, the second switch determines a second target downlink port from the downlink port of the second switch based on a prestored forwarding table;
and sending the downlink flow to the target equipment through the second target downlink port.
6. The method according to claim 5, wherein the step of determining the second target downlink port from the downlink ports of the mobile device based on the pre-stored forwarding table comprises:
analyzing the downlink flow to obtain a target MAC address of the downlink flow;
and matching the target MAC address with the matching relation in the forwarding table to determine a second target downlink port.
7. A fast traffic switching method is applied to a first switch in an M-LAG system, wherein the first switch is connected with a second switch through a peerLink, and the first switch is connected with a server and a plurality of downstream devices in a communication mode, and the method comprises the following steps:
when receiving downlink traffic sent by the server, determining a first target downlink port from a plurality of downlink ports of the server, and detecting whether the first target downlink port is in fault;
and if so, replacing the first target downlink port with a peerlink member port of the peerlink member port to switch the downlink traffic to the peerlink link, and switching the downlink traffic to the second switch through the peerlink link to send the downlink traffic to target equipment in the plurality of downlink equipment through a second target downlink port of the second switch.
8. A method for fast switching traffic, applied to a second switch in an M-LAG system, wherein the second switch is connected to a first switch through a peerLink link, and the second switch is communicatively connected to a plurality of downstream devices, the method comprising:
receiving downlink traffic sent by the first switch, and analyzing the downlink traffic to determine a second target downlink port;
and sending the downlink flow to target equipment in the plurality of downlink equipment through the second target downlink port.
9. A flow fast switching system is characterized by comprising a first switch and a second switch which are connected through a peerLink link, wherein the first switch and the second switch are both in communication connection with a server and a plurality of downstream devices;
the first switch is configured to, when receiving the downlink traffic sent by the server, determine whether a first target downlink port of the first switch is faulty, if so, replace the first target downlink port with a peerlink member port of the first switch, so as to switch the downlink traffic to the peerlink link, and switch the downlink traffic to the second switch through the peerlink link;
the second switch is configured to send the downlink traffic to a target device of the plurality of downlink devices through a second target downlink port of the second switch after receiving the downlink traffic;
the first target downlink port and the second target downlink port are both downlink ports matched with the downlink traffic and have an aggregation binding relationship.
10. A computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method for fast switching traffic according to any one of claims 1 to 6, the method for fast switching traffic according to claim 7, or the method for fast switching traffic according to claim 8.
CN202210886734.9A 2022-07-26 2022-07-26 Method and system for fast switching flow and computer readable storage medium Pending CN115225468A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210886734.9A CN115225468A (en) 2022-07-26 2022-07-26 Method and system for fast switching flow and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210886734.9A CN115225468A (en) 2022-07-26 2022-07-26 Method and system for fast switching flow and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115225468A true CN115225468A (en) 2022-10-21

Family

ID=83613084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210886734.9A Pending CN115225468A (en) 2022-07-26 2022-07-26 Method and system for fast switching flow and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115225468A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639464A (en) * 2015-01-09 2015-05-20 盛科网络(苏州)有限公司 System and method for realizing cross-interchanger link aggregation on OpenFlow interchanger
CN108337161A (en) * 2017-12-18 2018-07-27 中国电子科技集团公司第三十二研究所 Method for smoothly switching M L AG interface fault three-layer data flow
CN110166356A (en) * 2018-02-11 2019-08-23 华为技术有限公司 Send the method and the network equipment of message
CN112134796A (en) * 2019-06-25 2020-12-25 中兴通讯股份有限公司 Method, device and system for realizing flow switching
CN112187633A (en) * 2020-09-14 2021-01-05 锐捷网络股份有限公司 Link fault convergence method and device, electronic equipment and storage medium
WO2021088808A1 (en) * 2019-11-05 2021-05-14 中兴通讯股份有限公司 Method for dual-homing device access traffic forwarding, device, and storage medium
WO2021238672A1 (en) * 2020-05-29 2021-12-02 中兴通讯股份有限公司 Entry synchronization method, gateway device, networking system, and storage medium
CN114338512A (en) * 2020-10-12 2022-04-12 华为技术有限公司 MLAG link fault switching method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639464A (en) * 2015-01-09 2015-05-20 盛科网络(苏州)有限公司 System and method for realizing cross-interchanger link aggregation on OpenFlow interchanger
CN108337161A (en) * 2017-12-18 2018-07-27 中国电子科技集团公司第三十二研究所 Method for smoothly switching M L AG interface fault three-layer data flow
CN110166356A (en) * 2018-02-11 2019-08-23 华为技术有限公司 Send the method and the network equipment of message
CN112134796A (en) * 2019-06-25 2020-12-25 中兴通讯股份有限公司 Method, device and system for realizing flow switching
WO2021088808A1 (en) * 2019-11-05 2021-05-14 中兴通讯股份有限公司 Method for dual-homing device access traffic forwarding, device, and storage medium
WO2021238672A1 (en) * 2020-05-29 2021-12-02 中兴通讯股份有限公司 Entry synchronization method, gateway device, networking system, and storage medium
CN112187633A (en) * 2020-09-14 2021-01-05 锐捷网络股份有限公司 Link fault convergence method and device, electronic equipment and storage medium
CN114338512A (en) * 2020-10-12 2022-04-12 华为技术有限公司 MLAG link fault switching method and device

Similar Documents

Publication Publication Date Title
US8339943B2 (en) Virtual router failover dampening
CN106059791B (en) Link switching method of service in storage system and storage device
EP2243255B1 (en) Method and system for dynamic link failover management
CN108900415B (en) Master-slave equipment switching method and system under MLAG interface failure
CN106533736B (en) Network equipment restarting method and device
CN109450666B (en) Distributed system network management method and device
CN110417569B (en) Network link fault processing method and tunnel endpoint equipment
CN1937528A (en) Information processing apparatuses, communication load decentralizing method and communication system
KR20070026327A (en) Redundant routing capabilities for a network node cluster
KR20150088559A (en) Method and apparatus for restoring failure of network
CN112165429B (en) Link aggregation convergence method and device for distributed switching equipment
CN112583708B (en) Connection relation control method and device and electronic equipment
CN111585797B (en) Ethernet link switching method, device, equipment and computer readable storage medium
CN112217658A (en) Stacking and splitting processing method and device
CN113037565B (en) Message processing method and device
CN111277440B (en) Network device
CN113254205A (en) Load balancing system, method and device, electronic equipment and storage medium
Lee et al. SAFE: A scalable autonomous fault-tolerant ethernet scheme for large-scale star networks
JP6781288B2 (en) Multi-node device and its backup communication method
CN115225468A (en) Method and system for fast switching flow and computer readable storage medium
JP3910967B2 (en) Duplex system and multiplexing control method
JP2003345620A (en) Process monitoring method for multi-node cluster system
CN110912837B (en) VSM system-based main/standby switching method and device
US10644989B2 (en) Method for running a computer network
CN112217718A (en) Service processing method, device, equipment and storage medium

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