CN108900415B - Master-slave equipment switching method and system under MLAG interface failure - Google Patents

Master-slave equipment switching method and system under MLAG interface failure Download PDF

Info

Publication number
CN108900415B
CN108900415B CN201811011329.2A CN201811011329A CN108900415B CN 108900415 B CN108900415 B CN 108900415B CN 201811011329 A CN201811011329 A CN 201811011329A CN 108900415 B CN108900415 B CN 108900415B
Authority
CN
China
Prior art keywords
interface
mlag
state
peer
master
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
CN201811011329.2A
Other languages
Chinese (zh)
Other versions
CN108900415A (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.)
CETC 32 Research Institute
Original Assignee
CETC 32 Research Institute
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 CETC 32 Research Institute filed Critical CETC 32 Research Institute
Priority to CN201811011329.2A priority Critical patent/CN108900415B/en
Publication of CN108900415A publication Critical patent/CN108900415A/en
Application granted granted Critical
Publication of CN108900415B publication Critical patent/CN108900415B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering

Landscapes

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

Abstract

The invention provides a master-slave equipment switching method and a system under MLAG interface failure, which comprises the following steps: when a peer-link interface fault occurs in the MLAG system, selecting master and slave equipment according to master and slave election rules, and simultaneously executing Error-Down operation on the interfaces of the slave equipment except for a management interface, the peer-link interface and a stacking interface; when the selected master device has an MLAG uplink interface or an MLAG member interface fault, selecting a new master device and a new slave device according to master-slave election rules, simultaneously recovering an uplink interface of the new master device ERR _ DOWN and the MLAG member interface to be in an UP state, and executing Error-Down operation on interfaces of the new slave device except for a management interface, a peer-link interface and a stack interface. The invention ensures normal communication between the CE equipment at the user side and the network equipment at the network side through the intelligent switching mode of the master equipment and the slave equipment.

Description

Master-slave equipment switching method and system under MLAG interface failure
Technical Field
The invention relates to the field of communication, in particular to a master-slave device switching method and a master-slave device switching system under MLAG interface failure.
Background
An MLAG (Multi-Chassis Link Aggregation Group) technology is a cross-device Link Aggregation technology, in which 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.
As shown in fig. 1, a user-side device CE (which may be a switch or a server) performs cross-device link aggregation with two other devices (SwitchA and SwitchB) through an MLAG mechanism, and together form an M-LAG dual-master system. Therefore, the traffic forwarding can be realized by the SwitchA and the SwitchB together, and the reliability of the network is ensured. There are four types of interfaces for MLAG dual host systems, respectively: peer-link interface, MLAG member interface, MLAG uplink interface and Keepalive interface.
The Peer-link interface is an internal control interface for connecting the SwitchA and SwitchB devices, only one Peer-link interface can exist on each device, a link established through the Peer-link interface is called a Peer-link, and the link is used for negotiating messages between interactive devices and carrying part of forwarding data traffic. Meanwhile, in order to enhance the reliability and stability of the peer-link, multiple links are recommended to be used for link aggregation.
The MLAG member interface is a convergence interface where the SwitchA or SwitchB device connects to the CE device (server or switching device) on the user side. The MLAG member interface and the CE equipment adopt a two-layer convergence interface for connection, and meanwhile, the MLAG member interfaces connected with the same aggregation groups of the SwitchA equipment and the SwitchB equipment and the user side CE equipment belong to a group of distributed convergence groups. The distributed convergence group interface is used for bearing load balance of traffic between the Switch equipment and the user side CE equipment, and meanwhile, the reliability of communication between the Switch equipment and the user side CE equipment is improved.
The MLAG uplink interface is an interface for connecting the SwitchA or SwitchB equipment with NetWork NetWork side equipment. The interface mainly bears the load balance of the flow between the Switch equipment and the NetWork NetWork side equipment, and simultaneously improves the reliability of the communication between the Switch equipment and the NetWork NetWork side equipment.
The Keepalive interface is an interface for double-master detection between the Switch a and the Switch b devices, a link for double-master detection between the Switch devices is called a double-master detection link, and the link is a three-layer intercommunication link and is used for sending a double-master detection message between the M-LAG master and slave devices. The Keepalive link suggests that a three-layer reachable link is configured separately to serve as a dual-master detection link (for example, a device management interface), so that the problem that the Keepalive link is unavailable due to a Peer-link interface failure is avoided.
As shown in fig. 2, the protocol message format of the MLAG dual-host system master-slave device interacting through the Keepalive link, the protocol format content: message type, protocol message serial number, system priority, uplink interface state, number of UP MLAG member interfaces and Peer-link interface state. The Switch equipment compares the received MLAG interface state data of the opposite-end Switch equipment with the MLAG interface state of the local equipment to select Primary equipment and Secondary equipment.
Master-slave election rules:
and if the uplink interface states of the local device and the opposite-end Switch device, the UP number of the MLAG member interface and the Peer-link interface states are consistent, the system priority of the device is taken as a judgment condition, the device with high system priority is taken as a main device, and the device with low system priority is taken as a slave device.
If the uplink interface states of the local device and the Switch device at the opposite end are not consistent, and the number of the UP interfaces of the MLAG member is consistent with the Peer-link interface states, the uplink interface state of the device is adopted as a judgment condition, the device in the uplink interface state UP is elected as a master device, and the device in the uplink interface state DOWN is elected as a slave device.
If the UP numbers of the MLAG member interfaces of the local equipment and the switching equipment at the opposite end are not consistent, and the uplink interface state and the Peer-link interface state are consistent, the UP number of the MLAG member interfaces of the equipment is adopted as a judgment condition, the UP number of the MLAG member interfaces is large as main equipment, and the UP number of the MLAG member interfaces is small as slave equipment.
According to the election rule, the MLAG dual-master system elects master-slave equipment. When the Peer-link interface is in an UP state and does not have a fault, the elected slave device does not process the interface related to the MLAG, and only the master device and the slave device are elected. When the Peer-link interface fails, the selected slave device executes Error-Down operation on the interfaces except the management interface, the Peer-link interface and the stack port.
In the attached figure 3, when the Peer-link interface fails, the MLAG dual master devices are triggered to perform Keepalive protocol message interaction, and meanwhile, master and slave devices are elected, wherein the election rule is as described above. At this time, the interfaces except the management interface, the peer-link interface and the stack interface on the selected slave device execute Error-Down operation, that is, the MLAG member interface and the uplink interface of the slave device execute Error-Down, so as to ensure the correctness of data traffic forwarding.
When the Peer-link interface fails, a new master device and a new slave device are elected, so that the newly elected master device can be ensured to carry out normal data forwarding, and normal communication between the CE device at the user side and the network device at the network side is ensured. However, this solution has the following problems:
1. if the uplink interface of the newly elected main equipment fails, the data forwarding of the MLAG system is abnormal, and the system cannot ensure that the communication between the CE equipment at the user side and the network equipment at the network side is normal;
2. if the new elected main device LAG member interface fails, the data forwarding capability of the MLAG system is affected, and the communication bandwidth and the data communication capability of the Network side Network device and the user side CE device are reduced.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a master-slave device switching method and a master-slave device switching system under the MLAG interface failure.
The master-slave equipment switching method under the MLAG interface failure provided by the invention comprises the following steps:
and (3) switching the failures of the peer-link interface: when a peer-link interface fault occurs in the MLAG system, selecting master and slave equipment according to master and slave election rules, and simultaneously executing Error-Down operation on the interfaces of the slave equipment except for a management interface, the peer-link interface and a stacking interface;
MLAG goes upward or member interface trouble switches over the step: when the selected master device has an MLAG uplink interface or an MLAG member interface fault, selecting a new master device and a new slave device according to master-slave election rules, simultaneously recovering an uplink interface of the new master device ERR _ DOWN and the MLAG member interface to be in an UP state, and executing Error-Down operation on interfaces of the new slave device except for a management interface, a peer-link interface and a stack interface.
Preferably, the step of switching the peer-link interface fault includes:
s601, the Switch equipment registers a peer-link interface fault event, and enters S602 when receiving an MLAG interface fault event;
s602, the master device or the slave device receives a peer-link interface fault event, triggers to enter a double-master detection process, collects and acquires the state information of a local terminal interface, packages the information into a double-master detection message, and sends the information to the opposite terminal Switch device through a keepalive interface.
Preferably, step S602 further includes:
s701, after receiving the double-main detection protocol message, the Switch equipment enters S702;
s702, acquiring the priority of a local system, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of an MLAG member interface in an UP state, packaging the information into a double-main detection message, and sending the double-main detection message to opposite-end Switch equipment through the peer-link interface;
s703, analyzing the received double-master detection message, obtaining the system priority of the Switch device of the opposite end, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state from the message, comparing the system priority, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state of the local end, and then electing the master device and the slave device;
s704, keeping the states of all interfaces of the elected master device unchanged, and executing Error-Down operation on the elected slave device except for a management interface, a peer-link interface and a stack interface.
Preferably, the MLAG uplink or member interface failure switching step includes:
s801, when a peer-link interface of the MLAG fails, the main equipment receives an MLAG uplink interface failure event or an MLAG member interface failure event, and the step enters S802;
s802, the main device obtains the priority of the local system, the Peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state, packages the information into a double main detection message and then sends the double main detection message to the opposite Switch device through the Peer-link interface.
Preferably, after S802, the method includes:
s901, receiving a double-main detection message from a main device by a slave device when a peer-link interface of an MLAG fails;
s902, obtaining the system priority, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state of the opposite-end Switch device from the received double-main detection message;
s903, obtaining the buffered peer-link interface state of the slave equipment, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state, encapsulating the messages to double main detection messages, and sending the messages to the main equipment through a keepalive interface;
s904, the slave device compares and elects the received Peer-link interface state of the master device, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state according to the local system priority and the number of interfaces of the Peer-link interface state, the MLAG uplink interface state and the MLAG member interface in the UP state which are combined with the local system priority, and elects a new master device and a new slave device;
s905, selecting the slave device as a new master device, and executing No Error-Down operation on the interfaces except the management interface, the peer-link interface and the stack port.
Preferably, after S802, the method includes:
s1001, when a peer-link interface of the MLAG fails, the master device receives a double-master detection message from the slave device;
s1002, obtaining the system priority, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in an UP state of the opposite-end Switch equipment from the received double-main detection message;
s1003, the master device compares and elects the received interface numbers of the peer-link interface state, the MLAG uplink interface state and the MLAG member interface in the UP state of the slave device according to the local system priority, the peer-link interface state, the MLAG uplink interface state and the MLAG member interface in the UP state, and elects a new master device and a new slave device;
and S1004, electing the master device as a new slave device, and executing Error-Down operation on the interfaces except the management interface, the peer-link interface and the stack port.
Preferably, the method further comprises the following normal working steps: the Peer-link interface, the MLAG member interface, the MLAG uplink interface and the keepalive interface of the Switch equipment are all UP, data receiving and sending are all in a normal state, and master and slave equipment is elected according to master and slave election rules.
Preferably, the normal operation step includes:
s501, a Switch device registers a message receiving event, and simultaneously periodically sends a double-main detection message to an opposite-end Switch device, wherein the double-main detection message carries the system priority of the local-end Switch device, the Peerlink interface state, the MLAG uplink interface state and the number of interfaces of an MLAG member interface in an UP state, and when the message receiving event is received, the S502 is entered;
s502, analyzing the received double-main detection message, acquiring the system priority of the opposite-end Switch equipment, the Peerlink interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state, and acquiring the system priority of the local-end Switch equipment, the Peerlink interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state;
and S503, based on the data of the local terminal Switch equipment and the opposite terminal Switch equipment acquired in the S502, carrying out master-slave election operation, and forwarding the traffic by the elected master-slave equipment together.
Preferably, step S503 further includes: and carrying out data synchronization and backup between the master device and the slave device.
The master-slave equipment switching system under the MLAG interface failure provided by the invention comprises:
a peer-link interface fault switching module: when a peer-link interface fault occurs in the MLAG system, selecting master and slave equipment according to master and slave election rules, and simultaneously executing Error-Down operation on the interfaces of the slave equipment except for a management interface, the peer-link interface and a stacking interface;
MLAG goes upward or member interface trouble switches over the module: when the selected master device has an MLAG uplink interface or an MLAG member interface fault, selecting a new master device and a new slave device according to master-slave election rules, simultaneously recovering an uplink interface of the new master device ERR _ DOWN and the MLAG member interface to be in an UP state, and executing Error-Down operation on interfaces of the new slave device except for a management interface, a peer-link interface and a stack interface.
Compared with the prior art, the invention has the following beneficial effects:
1) the invention ensures normal communication between the CE equipment at the user side and the network equipment at the network side through a master-slave intelligent switching mode;
2) the invention ensures the communication bandwidth and the data communication capacity of the Network equipment at the Network side and the CE equipment at the user side in a master-slave intelligent switching mode.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:
FIG. 1 is a schematic MLAG diagram;
FIG. 2 is a schematic diagram of a Keeplive protocol format;
FIG. 3 is a master-slave switching diagram of a peer-link interface failure;
FIG. 4 is a master-slave switching diagram of a new master device uplink interface failure;
FIG. 5 is a flow chart of master-slave device election in the normal state of the Switch device interface;
FIG. 6 is a flow chart of the Switch device peer-link interface failure processing;
FIG. 7 is a flow chart of the process of Switch device master-slave election switching;
FIG. 8 is a flowchart of the interface failure processing related to the MLAG of the Switch master;
FIG. 9 is a flowchart of a process for switching a Switch slave to a master;
fig. 10 is a flowchart of a process of switching the Switch master to the slave.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that it would be obvious to those skilled in the art that various changes and modifications can be made without departing from the spirit of the invention. All falling within the scope of the present invention.
According to the master-slave equipment switching method under the MLAG interface failure, provided by the invention, the MLAG system can be ensured to continuously carry out master-slave election, and the problem of data packet loss caused by the failure of the MLAG uplink interface or the MLAG member interface of the newly elected master equipment is solved to the maximum extent. The method comprises the following steps:
when a peer-link interface fault occurs in the MLAG system, selecting master and slave equipment according to master and slave election rules, and simultaneously executing Error-Down operation on the interfaces of the slave equipment except for a management interface, the peer-link interface and a stacking interface; when the selected master device has an MLAG uplink interface or an MLAG member interface fault, selecting a new master device and a new slave device according to master-slave election rules, simultaneously recovering an uplink interface of the new master device ERR _ DOWN and the MLAG member interface to be in an UP state, and executing Error-Down operation on interfaces of the new slave device except for a management interface, a peer-link interface and a stack interface. Comprises the following steps:
a. the states of a peer-link interface, an MLAG member interface, an MLAG uplink interface and a Keepalive interface of the Switch equipment are UP, and data receiving and sending are in normal states;
b. the Switch equipment elects the master-slave equipment of the MLAG double-main system according to the master-slave equipment election rule of the MLAG double-main system, and both the master-slave Switch equipment and the slave Switch equipment participate in normal data forwarding;
c. when a peer-link interface of Switch equipment fails, an MLAG double-main system immediately triggers double-main detection, elects new main equipment according to a master-slave election rule, and simultaneously executes Error-Down operation on the elected slave equipment except for a management interface, the peer-link interface and a stacking port, wherein the Error-Down is a protection mechanism provided by the equipment, and can automatically close shutdown operation of the shutdown interface according to the setting in a fault scene, so that a network is protected from being influenced;
d. when the MLAG interface of the Switch elected new master equipment fails or the MLAG member interface fails, the MLAG double-master system immediately triggers double-master detection, and because the MLAG interface of the slave equipment executes Error-Down, the interface state needs to be used as a double-master election condition according to the interface state before the slave equipment executes the Error-Down in the master-slave election rule, thereby ensuring the correctness of electing the new master equipment;
e. after the Switch equipment is elected as the master equipment by the slave equipment, no Error-Down operation needs to be executed on the interfaces except for a management interface, a peer-link interface and a stack interface immediately, the recovery interface is in an UP state, data can be guaranteed to be normally forwarded on the new master equipment, no Error-Down is a protection mechanism provided by the equipment, the no Error-Down operation cannot be automatically recovered by default after the interface Error-Down in general, and no shutdown operation is executed on the interface after certain specified strategy conditions are met, so that normal communication of the interface is recovered;
f. when the Switch is the MLAG-related interface failure of the new master device, the operation in step d and the operation in step e are both required.
As shown in fig. 4, when the uplink interface of the newly elected master device (the master device elected by the peer-link interface failure) fails, the new master device is triggered to enter a dual-master detection flow, and the local interface status data is sent to the slave device. The slave device receives the interface state data of the master device and the interface state data (before the slave device executes ERR-DOWN) of the local cache to perform master-slave election, and meanwhile, the slave device packages the interface state data of the local cache into a double-master detection message and sends the double-master detection message to the master device through a keepalive interface. And the master equipment receives the double-master detection message of the slave equipment, extracts the interface state data and the local interface state data and carries out master-slave election. And finishing the switching of the master equipment and the slave equipment by judging the master-slave election rule. The slave equipment is switched to the master equipment, and an interface of ERR-DOWN is immediately restored to an UP state; when the master device is switched to the slave device, the Error-Down operation needs to be executed on the interfaces except the management interface, the peer-link interface and the stack port; and ensuring that the CE equipment at the user side and the Network side equipment finish data forwarding only through the new main equipment.
Example 1: the MLAG associated interfaces are all in a normal state, and the Switch master-slave device election scheme specifically includes the following steps (as shown in fig. 5):
step 501: the double-main detection management module of the Switch equipment registers a message receiving event, and simultaneously periodically sends a double-main detection message to the opposite-end Switch equipment, wherein the message carries the system priority of the local Switch equipment, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state. Step 502 is entered when a message reception event is received;
step 502: and analyzing the received double-main detection message to obtain the system priority, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state of the opposite-end Switch equipment. And simultaneously acquiring the system priority of the Switch equipment at the local end, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state.
Step 503: and performing master-slave election operation based on the master-slave election data of the local Switch device and the remote Switch device acquired in the step 502. Since all interface states are in the UP state, only the master and slave devices need to be elected according to the system priority. The elected master-slave Switch equipment jointly forwards the flow, so that the reliability of the network is ensured. Meanwhile, in order to ensure the forwarding correctness of the traffic jointly, the master Switch device and the slave Switch device synchronize and backup the related data, for example: FDB table entries and routing table entries, etc.
Example 2 of implementation: the method for triggering a master-slave Switch device dual-master detection scheme by a peerlink interface failure of the MLAG specifically includes the following steps (as shown in fig. 6):
step 601: a double-main detection management module of Switch equipment registers a peer-link interface fault event, and when receiving an MLAG interface fault event, the step 602 is executed;
step 602: the MLAG main equipment or the slave equipment receives a peer-link interface fault event, immediately triggers to enter a double-main detection process, collects and acquires local equipment interface state information, encapsulates the local equipment interface state information into a double-main detection message, and sends the double-main detection message to opposite-end Switch equipment through a keepalive interface.
Example 3: receiving a double-master detection message of the opposite-end Switch to perform a master-slave device election scheme when a peer-link interface of the MLAG fails, specifically including the following steps (as shown in fig. 7):
step 701: after receiving the dual master detection protocol message, the master-slave election module of the Switch device proceeds to step 702;
step 702: the Switch equipment acquires the priority of a local system, the state of a peer-link interface, the state of an MLAG uplink interface and the number of interfaces of an MLAG member interface in an UP state. Packaging the information into a double main detection message, and then sending the double main detection message to opposite-end equipment through a peer-link interface;
step 703: the Switch device analyzes the received double-main detection message, obtains the system priority, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state of the opposite terminal device from the message, compares the system priority, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state of the local terminal device, and then elects the master device and the slave device.
Step 704: all the interface states of the Switch equipment elected as the master are kept unchanged, and the Switch equipment elected as the slave needs to execute Error-Down operation on the interfaces except the management interface, the peer-link interface and the stacking port, so that the data traffic can only be forwarded from the master equipment, and the correctness of the data traffic forwarding is ensured.
Example 4: the method specifically includes the following steps (as shown in fig. 8) that a peer-link interface of the MLAG fails, an elected master device fails to have an MLAG uplink interface, and a dual-master detection packet sending scheme of the Switch master device is triggered:
step 801: a peer-link interface fault of the MLAG, a master-slave election module read by the elected Switch master device receives an MLAG uplink interface fault event or an MLAG member interface fault event, and the step goes to step 802;
step 802: the Switch master device obtains the local system priority, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state. And packaging the information into a double main detection message, and then sending the double main detection message to the opposite-end equipment through a peer-link interface.
Example 5: the scheme that the peer-link interface of the MLAG fails, the elected slave device receives the dual master detection packet from the master device, and triggers master-slave election specifically includes the following steps (as shown in fig. 9):
step 901: when a peer-link interface of the MLAG fails, a master-slave election module of the elected slave equipment receives a double-master detection message from the master equipment;
step 902: acquiring system priority, peer-link interface state, MLAG uplink interface state and the number of interfaces of an MLAG member interface in an UP state of opposite terminal equipment from a received message;
step 903: because the MLAG related interfaces of the slave device are all executed with ERR-DOWN operation, effective master-slave elections cannot be performed according to the actual state of the current interface, the slave device needs to cache the state of the interface before executing ERR-DOWN. Obtaining the cached peer-link interface state, the MLAG uplink interface state and the interface number of the MLAG member interface in the UP state, encapsulating the interface numbers into a double-main detection message, and sending the message to main equipment through a keepalive interface;
step 904: and the slave equipment compares and elects the received number of interfaces of the peer-link interface state, the MLAG uplink interface state and the MLAG member interface in the UP state of the master equipment according to the local system priority and the number of interfaces of the peer-link interface state, the MLAG uplink interface state and the MLAG member interface in the UP state of the local cache.
Step 905: if the slave device is elected as the master device, No Error-Down operation needs to be performed on the interfaces except the management interface, the peer-link interface and the stacking interface, so that the state of the MLAG uplink interface and the MLAG member interface can be ensured to quickly recover UP, and thus data traffic forwarding can be recovered as soon as possible.
Example 6: the scheme that the elected master device receives a dual-master detection message from a slave device in response to a peer-link interface failure of the MLAG and triggers master-slave election specifically includes the following steps (as shown in fig. 10):
step 1001: when a peer-link interface of the MLAG fails, a master-slave election module of the elected master equipment receives a double-master detection response message from slave equipment;
step 1002: acquiring system priority, peer-link interface state, MLAG uplink interface state and the number of interfaces of an MLAG member interface in an UP state of opposite terminal equipment from a received message;
step 1003: and the master device compares and elects the received peer-link interface state of the slave device, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state according to the local system priority, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state, and elects the master device and the slave device.
Step 1004: the master device is elected as a slave device, and the Error-Down operation needs to be executed on the interfaces except the management interface, the peer-link interface and the stacking port, so that the data traffic can only be forwarded from the master device, and the correctness of the data traffic forwarding is ensured.
Based on the method for switching the master device and the slave device under the MLAG interface failure, the invention also provides a system for switching the master device and the slave device under the MLAG interface failure, which comprises the following steps:
a peer-link interface fault switching module: when a peer-link interface fault occurs in the MLAG system, selecting master and slave equipment according to master and slave election rules, and simultaneously executing Error-Down operation on the interfaces of the slave equipment except for a management interface, the peer-link interface and a stacking interface;
MLAG goes upward or member interface trouble switches over the module: when the selected master device has an MLAG uplink interface or an MLAG member interface fault, selecting a new master device and a new slave device according to master-slave election rules, simultaneously recovering an uplink interface of the new master device ERR _ DOWN and the MLAG member interface to be in an UP state, and executing Error-Down operation on interfaces of the new slave device except for a management interface, a peer-link interface and a stack interface.
Those skilled in the art will appreciate that, in addition to implementing the system and its various devices, modules, units provided by the present invention as pure computer readable program code, the system and its various devices, modules, units provided by the present invention can be fully implemented by logically programming method steps in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Therefore, the system and various devices, modules and units thereof provided by the invention can be regarded as a hardware component, and the devices, modules and units included in the system for realizing various functions can also be regarded as structures in the hardware component; means, modules, units for performing the various functions may also be regarded as structures within both software modules and hardware components for performing the method.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.

Claims (5)

1. A master-slave device switching method under MLAG interface failure is characterized by comprising the following steps:
and (3) switching the failures of the peer-link interface: when a peer-link interface fault occurs in the MLAG system, selecting master and slave equipment according to master and slave election rules, and simultaneously executing Error-Down operation on the interfaces of the slave equipment except for a management interface, the peer-link interface and a stacking interface;
MLAG goes upward or member interface trouble switches over the step: when the selected master equipment has an MLAG uplink interface or an MLAG member interface fault, selecting new master-slave equipment according to master-slave election rules, simultaneously recovering an uplink interface of new master equipment ERR _ DOWN and the MLAG member interface to be in an UP state, and executing Error-Down operation on interfaces of the new slave equipment except a management interface, a peer-link interface and a stack interface;
the step of switching the failure of the peer-link interface comprises the following steps:
s601, the Switch equipment registers a peer-link interface fault event, and enters S602 when receiving an MLAG interface fault event;
s602, the master device or the slave device receives a peer-link interface fault event, triggers to enter a double-master detection process, collects and acquires the state information of a local terminal interface, packages the information into a double-master detection message, and sends the information to the opposite terminal Switch device through a keepalive interface;
after step S602, the method further includes:
s701, after receiving the double-main detection protocol message, the Switch equipment enters S702;
s702, acquiring the priority of a local system, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of an MLAG member interface in an UP state, packaging the information into a double-main detection message, and sending the double-main detection message to opposite-end Switch equipment through the peer-link interface;
s703, analyzing the received double-master detection message, obtaining the system priority of the Switch device of the opposite end, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state from the message, comparing the system priority, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state of the local end, and then electing the master device and the slave device;
s704, keeping the states of all interfaces of the elected master equipment unchanged, and executing Error-Down operation on the elected slave equipment except for a management interface, a peer-link interface and a stacking port;
the MLAG uplink or member interface fault switching step comprises the following steps:
s801, when a peer-link interface of the MLAG fails, the main equipment receives an MLAG uplink interface failure event or an MLAG member interface failure event, and the step enters S802;
s802, the main equipment acquires the priority of a local system, the Peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state, packages the information into a double-main detection message and then sends the double-main detection message to opposite-end Switch equipment through the Peer-link interface;
after S802, the method includes:
s901, receiving a double-main detection message from a main device by a slave device when a peer-link interface of an MLAG fails;
s902, obtaining the system priority, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state of the opposite-end Switch device from the received double-main detection message;
s903, obtaining the buffered peer-link interface state of the slave equipment, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state, encapsulating the messages to double main detection messages, and sending the messages to the main equipment through a keepalive interface;
s904, the slave device compares and elects the received Peer-link interface state of the master device, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state according to the local system priority and the number of interfaces of the Peer-link interface state, the MLAG uplink interface state and the MLAG member interface in the UP state which are combined with the local system priority, and elects a new master device and a new slave device;
s905, electing the slave equipment as new master equipment, and executing No Error-Down operation on the interfaces except the management interface, the peer-link interface and the stacking port;
after S802, the method includes:
s1001, when a peer-link interface of the MLAG fails, the master device receives a double-master detection message from the slave device;
s1002, obtaining the system priority, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in an UP state of the opposite-end Switch equipment from the received double-main detection message;
s1003, the master device compares and elects the received interface numbers of the peer-link interface state, the MLAG uplink interface state and the MLAG member interface in the UP state of the slave device according to the local system priority, the peer-link interface state, the MLAG uplink interface state and the MLAG member interface in the UP state, and elects a new master device and a new slave device;
and S1004, electing the master device as a new slave device, and executing Error-Down operation on the interfaces except the management interface, the peer-link interface and the stack port.
2. The method for master-slave device switching under the MLAG interface failure according to claim 1, further comprising a normal operation step: the Peer-link interface, the MLAG member interface, the MLAG uplink interface and the keepalive interface of the Switch equipment are all UP, data receiving and sending are all in a normal state, and master and slave equipment is elected according to master and slave election rules.
3. The method for master-slave device switching under the MLAG interface failure as claimed in claim 2, wherein the normal operation step includes:
s501, a Switch device registers a message receiving event, and simultaneously periodically sends a double-main detection message to an opposite-end Switch device, wherein the double-main detection message carries the system priority of the local-end Switch device, the Peerlink interface state, the MLAG uplink interface state and the number of interfaces of an MLAG member interface in an UP state, and when the message receiving event is received, the S502 is entered;
s502, analyzing the received double-main detection message, acquiring the system priority of the opposite-end Switch equipment, the Peerlink interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state, and acquiring the system priority of the local-end Switch equipment, the Peerlink interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state;
and S503, based on the data of the local terminal Switch equipment and the opposite terminal Switch equipment acquired in the S502, carrying out master-slave election operation, and forwarding the traffic by the elected master-slave equipment together.
4. The method for switching between master and slave devices under the MLAG interface failure as claimed in claim 3, wherein step S503 further comprises: and carrying out data synchronization and backup between the master device and the slave device.
5. A master-slave device switching system under MLAG interface failure is characterized by comprising:
a peer-link interface fault switching module: when a peer-link interface fault occurs in the MLAG system, selecting master and slave equipment according to master and slave election rules, and simultaneously executing Error-Down operation on the interfaces of the slave equipment except for a management interface, the peer-link interface and a stacking interface;
MLAG goes upward or member interface trouble switches over the module: when the selected master equipment has an MLAG uplink interface or an MLAG member interface fault, selecting new master-slave equipment according to master-slave election rules, simultaneously recovering an uplink interface of new master equipment ERR _ DOWN and the MLAG member interface to be in an UP state, and executing Error-Down operation on interfaces of the new slave equipment except a management interface, a peer-link interface and a stack interface;
the peer-link interface fault switching module comprises:
s601, the Switch equipment registers a peer-link interface fault event, and enters S602 when receiving an MLAG interface fault event;
s602, the master device or the slave device receives a peer-link interface fault event, triggers to enter a double-master detection process, collects and acquires the state information of a local terminal interface, packages the information into a double-master detection message, and sends the information to the opposite terminal Switch device through a keepalive interface;
after S602, the method further includes:
s701, after receiving the double-main detection protocol message, the Switch equipment enters S702;
s702, acquiring the priority of a local system, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of an MLAG member interface in an UP state, packaging the information into a double-main detection message, and sending the double-main detection message to opposite-end Switch equipment through the peer-link interface;
s703, analyzing the received double-master detection message, obtaining the system priority of the Switch device of the opposite end, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state from the message, comparing the system priority, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state of the local end, and then electing the master device and the slave device;
s704, keeping the states of all interfaces of the elected master equipment unchanged, and executing Error-Down operation on the elected slave equipment except for a management interface, a peer-link interface and a stacking port;
the MLAG uplink or member interface fault switching module comprises:
s801, when a peer-link interface of the MLAG fails, the main equipment receives an MLAG uplink interface failure event or an MLAG member interface failure event, and the step enters S802;
s802, the main equipment acquires the priority of a local system, the Peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state, packages the information into a double-main detection message and then sends the double-main detection message to opposite-end Switch equipment through the Peer-link interface;
s901, receiving a double-main detection message from a main device by a slave device when a peer-link interface of an MLAG fails;
s902, obtaining the system priority, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state of the opposite-end Switch device from the received double-main detection message;
s903, obtaining the buffered peer-link interface state of the slave equipment, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state, encapsulating the messages to double main detection messages, and sending the messages to the main equipment through a keepalive interface;
s904, the slave device compares and elects the received Peer-link interface state of the master device, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in the UP state according to the local system priority and the number of interfaces of the Peer-link interface state, the MLAG uplink interface state and the MLAG member interface in the UP state which are combined with the local system priority, and elects a new master device and a new slave device;
s905, electing the slave equipment as new master equipment, and executing No Error-Down operation on the interfaces except the management interface, the peer-link interface and the stacking port;
s1001, when a peer-link interface of the MLAG fails, the master device receives a double-master detection message from the slave device;
s1002, obtaining the system priority, the peer-link interface state, the MLAG uplink interface state and the number of interfaces of the MLAG member interface in an UP state of the opposite-end Switch equipment from the received double-main detection message;
s1003, the master device compares and elects the received interface numbers of the peer-link interface state, the MLAG uplink interface state and the MLAG member interface in the UP state of the slave device according to the local system priority, the peer-link interface state, the MLAG uplink interface state and the MLAG member interface in the UP state, and elects a new master device and a new slave device;
and S1004, electing the master device as a new slave device, and executing Error-Down operation on the interfaces except the management interface, the peer-link interface and the stack port.
CN201811011329.2A 2018-08-31 2018-08-31 Master-slave equipment switching method and system under MLAG interface failure Active CN108900415B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811011329.2A CN108900415B (en) 2018-08-31 2018-08-31 Master-slave equipment switching method and system under MLAG interface failure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811011329.2A CN108900415B (en) 2018-08-31 2018-08-31 Master-slave equipment switching method and system under MLAG interface failure

Publications (2)

Publication Number Publication Date
CN108900415A CN108900415A (en) 2018-11-27
CN108900415B true CN108900415B (en) 2021-06-22

Family

ID=64358882

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811011329.2A Active CN108900415B (en) 2018-08-31 2018-08-31 Master-slave equipment switching method and system under MLAG interface failure

Country Status (1)

Country Link
CN (1) CN108900415B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110351127B (en) * 2019-06-28 2022-06-28 迈普通信技术股份有限公司 Graceful restart method, device and system
CN110635968A (en) * 2019-09-27 2019-12-31 深信服科技股份有限公司 Monitoring method, device and equipment for stacked double-active detection channel and storage medium
CN112187633A (en) * 2020-09-14 2021-01-05 锐捷网络股份有限公司 Link fault convergence method and device, electronic equipment and storage medium
CN112910734B (en) * 2021-01-29 2022-07-12 新华三技术有限公司 Method and system for switching link aggregation group
CN113381931B (en) * 2021-05-17 2022-04-12 浪潮思科网络科技有限公司 Method and device for supporting MLAG (Multi-level Access gateway) dual-active access in VXLAN (virtual extensible local area network)
CN113949623B (en) * 2021-10-18 2024-04-26 迈普通信技术股份有限公司 MLAG double-master exception repairing method and device, electronic equipment and storage medium
CN115051947B (en) * 2022-06-30 2024-02-23 中兴通讯股份有限公司 Communication state switching method, port configuration method, communication system and medium
CN115250226B (en) * 2022-07-26 2023-11-24 迈普通信技术股份有限公司 MLAG double-master fault recovery method, device, system, medium and equipment
CN115250232B (en) * 2022-07-28 2024-03-15 苏州盛科通信股份有限公司 Configuration method and device of main management port and storage medium
CN115883489B (en) * 2022-11-17 2024-07-09 浪潮思科网络科技有限公司 MLAG protocol table item synchronization method, equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932190A (en) * 2012-11-22 2013-02-13 杭州迪普科技有限公司 Method and device for solving single point of failure of equipment section
CN105553735A (en) * 2015-12-24 2016-05-04 迈普通信技术股份有限公司 Stacking system fault handling method, equipment and stacking system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101599907B (en) * 2009-07-31 2012-01-04 杭州华三通信技术有限公司 Method and system for forwarding flow
CN101826983A (en) * 2010-04-02 2010-09-08 中兴通讯股份有限公司 Dual-homing protection switching method, device and system
CN104333470B (en) * 2014-11-14 2017-10-24 新华三技术有限公司 Fault handling method and device
CN104639464B (en) * 2015-01-09 2018-06-15 盛科网络(苏州)有限公司 The system and method for switch-spanning link aggregation is realized on OpenFlow interchangers
US9992102B2 (en) * 2015-08-28 2018-06-05 Ciena Corporation Methods and systems to select active and standby ports in link aggregation groups
CN107465613B (en) * 2016-06-03 2020-11-06 北京华为数字技术有限公司 Link aggregation interface communication state switching method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932190A (en) * 2012-11-22 2013-02-13 杭州迪普科技有限公司 Method and device for solving single point of failure of equipment section
CN105553735A (en) * 2015-12-24 2016-05-04 迈普通信技术股份有限公司 Stacking system fault handling method, equipment and stacking system

Also Published As

Publication number Publication date
CN108900415A (en) 2018-11-27

Similar Documents

Publication Publication Date Title
CN108900415B (en) Master-slave equipment switching method and system under MLAG interface failure
US9106523B2 (en) Communication device and method of controlling the same
US7920576B2 (en) Packet ring network system, packet forwarding method and node
JP5941404B2 (en) Communication system, path switching method, and communication apparatus
CN101436945B (en) Method, system and apparatus for protecting multicast business fault
JP4922972B2 (en) Communications system
CN104486128B (en) A kind of system and method for realizing redundancy heartbeat between dual controller node
CN110838962B (en) Marine network system and marine system
GB2444170A (en) Ethernet protection using a redundant link, with link up of a remote port being triggered using a "link status control mechanism".
CN102006189A (en) Primary access server determination method and device for dual-machine redundancy backup
US9960993B2 (en) Packet network linear protection systems and methods in a dual home or multi-home configuration
CN112583708B (en) Connection relation control method and device and electronic equipment
US20130301404A1 (en) Communication system, communication method, and communication apparatus
WO2007048319A1 (en) A disaster recovery system and method of service controlling device in intelligent network
JP5338428B2 (en) COMMUNICATION DEVICE AND METHOD, COMMUNICATION SYSTEM AND METHOD
US9912527B2 (en) Communication device, communication system, method for determining path, and program
CN110912815A (en) Network element ring formation preventing method, device, equipment and readable storage medium
CN111740898A (en) Link switching method and device and service provider edge equipment
US9692636B2 (en) Relay system and relay device
JP6383232B2 (en) Relay system and switch device
JP2006333077A (en) Line redundancy method and relaying device to be used therein
CN110830310B (en) Cross-data-center disaster backup method and BRAS system
CN104780067A (en) Method and device for rebooting PE (port extender)
JP3910967B2 (en) Duplex system and multiplexing control method
CN103944781A (en) Method and system for preventing unilateral splitting of stacking system

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