CN114244736A - Multi-master detection method, equipment and medium based on stacking environment - Google Patents

Multi-master detection method, equipment and medium based on stacking environment Download PDF

Info

Publication number
CN114244736A
CN114244736A CN202111527604.8A CN202111527604A CN114244736A CN 114244736 A CN114244736 A CN 114244736A CN 202111527604 A CN202111527604 A CN 202111527604A CN 114244736 A CN114244736 A CN 114244736A
Authority
CN
China
Prior art keywords
master
stacking
decision
detection
equipment
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
CN202111527604.8A
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.)
Inspur Cisco Networking Technology Co Ltd
Original Assignee
Inspur Cisco Networking Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Cisco Networking Technology Co Ltd filed Critical Inspur Cisco Networking Technology Co Ltd
Priority to CN202111527604.8A priority Critical patent/CN114244736A/en
Publication of CN114244736A publication Critical patent/CN114244736A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
    • 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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • 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/30Decision processes by autonomous network management units using voting and bidding
    • 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

Abstract

The embodiment of the specification discloses a multi-master detection method, equipment and a medium based on a stacking environment, wherein the method comprises the following steps: the main equipment sends the generated detection message to the decision equipment, wherein the detection message comprises the relevant information of the main equipment; when the decision device receives a plurality of detection messages at the same time, judging that a plurality of main devices appear in the stacking environment; the decision device selects one master device from the plurality of master devices according to the detection messages of the plurality of master devices, and sends the related information of the selected master device to the stacking member device, so that the stacking member device can conveniently perform port setting according to the related information of the selected master device, and normal operation of the service is realized. The decision device carries out centralized competitive election on the devices in the stacking system, so that the timeliness and the detection performance of multi-master detection in the stacking system are improved, the defect that the time consumed by soft forwarding of the message by the intermediate access device in the prior art is overcome, and a plurality of master devices can be detected simultaneously.

Description

Multi-master detection method, equipment and medium based on stacking environment
Technical Field
The present disclosure relates to the field of network communication technologies, and in particular, to a multi-master detection method, device, and medium based on a stacking environment.
Background
The stacking system is a network virtualization technology, and a plurality of switch devices supporting the stacking characteristic can be combined together through switch stacking to be logically combined into one switch device. The stack system can realize the forwarding of high network reliability and large network data volume and simplify network management. When a physical link of the stacking system fails, the stacking system can be split into two or more stacking subsystems, the multi-main detection function can only reserve the optimal sub-stacking system, and other split sub-stacking systems can be quickly closed, so that normal operation of network services is guaranteed.
The existing multi-master detection mode is carried out through an access switch, and when multi-master detection is carried out, relevant information of master equipment in a stacking system cannot be detected in advance, so that the timeliness of the multi-master detection is reduced.
Disclosure of Invention
One or more embodiments of the present specification provide a multi-master detection method, device and medium based on a stacking environment, which are used to solve the following technical problems: the existing multi-master detection mode cannot detect the relevant information of the master equipment in the stacking system in advance, and the timeliness of multi-master detection is reduced.
One or more embodiments of the present disclosure adopt the following technical solutions:
one or more embodiments of the present specification provide a multi-master detection method based on a stacking environment, which is applied to a multi-master detection system, where the multi-master detection system includes a stacking member device and a decision device, the stacking member device includes a master device and multiple slave devices, and when a link between the stacking member devices is disconnected, the slave devices are changed into the master device to form multiple stacking subsystems, where each stacking subsystem includes one master device and at least one slave device, and the method includes: the main equipment sends the generated detection message to the decision equipment, wherein the detection message comprises relevant information of the main equipment; when the decision device receives a plurality of detection messages at the same time, judging that a plurality of main devices appear in the stacking environment; the decision device selects a master device from the plurality of master devices according to the detection messages of the plurality of master devices, and sends the related information of the selected master device to the stacking member device, so that the stacking member device can conveniently perform port setting according to the related information of the selected master device, and normal operation of the service is realized.
Further, the related information includes a bridge MAC address, and the stack member device performs port setting according to the related information of the elected master device, specifically including: the decision device of the multi-master detection system generates confirmation messages according to the bridge MAC addresses of the elected master devices and sends the confirmation messages to the stacking member devices respectively; and the stacking member equipment judges whether the bridge MAC address in the confirmation message is consistent with the bridge MAC address stored in the stacking member equipment or not according to the received bridge MAC address in the confirmation message, and if the bridge MAC address stored in one or more appointed stacking member equipment is inconsistent with the bridge MAC address in the confirmation message, the service port of the one or more appointed stacking member equipment is closed.
Further, the main device sends the generated detection packet to the decision device, and before the step, the method further includes: setting decision equipment, wherein the decision equipment is used for carrying out competitive election on a plurality of main equipment in a stacking environment; the decision device is connected with a detection port of the stacking member device to form a cross-device link aggregation group, and the decision device and the stacking member device send messages to each other in the cross-device link aggregation group to realize competitive election of the decision device on the stacking member device.
Further, the main device sends the generated detection packet to the decision device, and before the step, the method further includes: each main device packages the corresponding related information according to TLV format to generate expanded data; and generating the detection message according to the standard LACP message and the expansion data.
Further, the related information further includes any one or more of a stacking domain ID, a device priority, and a device start time, and the decision device selects one master device from the plurality of master devices according to the detection packets of the plurality of master devices, which specifically includes: storing relevant information in the detection message corresponding to each main device to an aggregation member port in the decision device, so that the decision device can judge whether the plurality of main devices belong to the same stacking domain according to the stacking domain ID of each main device; if the plurality of main devices belong to the same stacking domain, selecting one main device from the plurality of main devices according to any one or more of the device priority, the bridge MAC address and the device starting time of each main device; the related information of the elected master device meets any one or more of the device priority minimum, the bridge MAC address minimum and the device startup time minimum.
Further, the decision device selects one master device from the plurality of master devices according to the detection packets of the plurality of master devices, and then the method further includes: and comparing the bridge MAC address corresponding to the elected main equipment with the bridge MAC address pre-stored in the local decision equipment, and if the bridge MAC address corresponding to the elected main equipment is different from the bridge MAC address pre-stored in the decision equipment, covering the bridge MAC address pre-stored in the decision equipment, and storing the bridge MAC address corresponding to the elected main equipment in the decision equipment.
Further, the main device sends the generated detection packet to the decision device, and before the step, the method further includes: the method comprises the steps that related information of all stacking member devices is obtained in advance, and each stacking member device sends corresponding related information to other devices belonging to the same stacking member subsystem; and according to the related information, determining a designated device as a main device in each stacking member subsystem, and using the rest devices in the stacking member subsystems as standby devices corresponding to the main device, wherein the element information of the main device meets any one or more of the minimum priority of the device, the minimum bridge MAC address and the minimum device starting time.
Further, the main device sends the generated detection packet to the decision device, and before the step, the method further includes: after the main equipment and the standby equipment in each stacking subsystem are determined, the bridge MAC address of the main equipment is stored in the standby equipment of the corresponding stacking subsystem to be used as the bridge MAC address of the standby equipment.
One or more embodiments of the present specification provide a multi-master detection device based on a stacked environment, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
the method comprises the steps that a main device sends a generated detection message to a decision device, wherein the detection message comprises relevant information of the main device; when the decision device receives a plurality of detection messages at the same time, judging that a plurality of main devices appear in the stacking environment; the decision device selects a master device from the plurality of master devices according to the detection messages of the plurality of master devices, and sends the related information of the selected master device to the stacking member device, so that the stacking member device can conveniently perform port setting according to the related information of the selected master device, and normal operation of the service is realized.
One or more embodiments of the present specification provide a non-transitory computer storage medium storing computer-executable instructions configured to: the method comprises the steps that a main device sends a generated detection message to a decision device, wherein the detection message comprises relevant information of the main device; when the decision device receives a plurality of detection messages at the same time, judging that a plurality of main devices appear in the stacking environment; the decision device selects a master device from the plurality of master devices according to the detection messages of the plurality of master devices, and sends the related information of the selected master device to the stacking member device, so that the stacking member device can conveniently perform port setting according to the related information of the selected master device, and normal operation of the service is realized.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects:
the decision device carries out centralized competitive election on the devices in the stacking system, so that the timeliness and the detection performance of multi-master detection in the stacking system are improved, the defect that the time consumed by soft forwarding of the message by the intermediate access device in the prior art is overcome, and a plurality of master devices can be detected simultaneously.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort. In the drawings:
fig. 1 is a schematic structural diagram of a multi-primary detection system in a normal stacking environment according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a multi-master detection system component corresponding to a link disconnection according to an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating a multi-master detection method based on a stack environment according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a structure of a detection packet provided in the embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a multi-master detection device based on a stacked environment according to an embodiment of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present specification without any creative effort shall fall within the protection scope of the present specification.
The stacking system is a network virtualization technology, combines a plurality of switch devices supporting stacking characteristics together through switch stacking, and logically combines the switch devices into one switch device, so that high network reliability and large network data volume forwarding can be realized, and network management is simplified. When a physical link of the stacking system fails, the stacking system is split into two or more stacking subsystems, and since configuration information such as IP addresses of the stacking subsystems is the same, system conflict is caused, and service processing is affected.
Currently, a plurality of multi-main detection modes are applied: when a plurality of main devices appear in the failure split of the stacking system, an expanded LACP message is constructed, the bridge MAC address and the member number of the new main device are packaged, and the message is sent to the access switch. The access switch is used for generating a list comprising bridge MAC and member numbers of all stack members in advance, comparing the bridge MAC and member numbers in the received messages with the bridge MAC and member numbers in the local list, and only if the bridge MAC is the same, the messages with different member numbers are forwarded to the corresponding stack members. And the stacking member equipment judges whether the equipment needs to enter a Recovery state or not according to the member number, so that the split stacking system only keeps one main equipment.
In the multi-master detection mode, under the condition that the multi-master device is generated by stacking splitting, the multi-master detection competition election mechanism is inconsistent with the master role election mechanism of the stacking system, and the situation that the party winning the multi-master detection competition election is necessarily the optimal party under the stacking election rule cannot be ensured. In addition, the message received by the access switch is subjected to filtering processing and then is soft-forwarded to the stacking member equipment, then the member equipment performs competition election analysis, and the message is soft-forwarded by the intermediate equipment, so that the timeliness of multi-master detection is reduced, and the performance of the multi-master detection is also influenced. The multi-master detection competition election mechanism is fixed and single, and the selectivity of the multi-master competition rule cannot be achieved.
An embodiment of the present disclosure provides a multi-master detection method based on a stacking environment, which is applied to a multi-master detection system, and fig. 1 is a multi-master detection system in a normal stacking environment. As shown in fig. 1, the multi-master detection system includes a stack member device and a decision device M. In a normal stacking environment, the stacking member devices include a master device a and a plurality of standby devices, in an embodiment of the present specification, the plurality of standby devices are respectively represented by a standby device B, a standby device C, and a standby device D, the master device a and the standby device B are connected by a link L1, the other end of the standby device B is connected by a link L2, and the other end of the standby device D and the standby device C are connected by a link L3. The decision device M is responsible for centrally managing competitive election of multiple master devices, multiple master detection ports of all stack member devices and the upper connection decision device M jointly form a cross-device link aggregation group AGG1, and LACP protocol messages are sent between the multiple master detection ports and the upper connection decision device M at regular time.
When the link between the stacking member devices is disconnected, the designated standby device is converted into a main device to form a plurality of stacking subsystems, wherein each stacking subsystem comprises one main device and at least one standby device. Fig. 2 is a multi-master detection system corresponding to the link disconnection, as shown in fig. 2, a link L2 between a standby device B and a standby device C is disconnected, and the characteristics of the stacking system cause the original stacking system to form two stacking subsystems, and a competitive election is performed between a device a and a device B in the first stacking subsystem to elect a master device a and a standby device B; and performing competition election between the equipment C and the equipment D in the second stacking subsystem, and electing the main equipment C and the auxiliary equipment D. That is, after the L2 link is broken, the standby device C becomes the master device C.
At this time, after the L2 link is disconnected, two main devices are formed in the original stacking system, and since the configuration information such as the IP addresses of these stacking subsystems are the same, system collision may occur, which affects service processing. Therefore, an embodiment of the present specification provides a multi-master detection method based on a stacking environment, fig. 3 is a schematic flow chart of the multi-master detection method based on the stacking environment provided by the embodiment of the present specification, and the method steps are described below with reference to fig. 1, fig. 2, and fig. 3, as shown in fig. 3, the method mainly includes the following steps:
step S301, the main device sends the generated detection message to the decision device.
When the link is normal, internal election needs to be performed on a plurality of stacking member devices, that is, each device in the stacking system performs stacking role election according to the device information of the device, and selects a master device role and a backup device role. Specifically, the relevant information of all the stack member devices is acquired. It should be noted that the relevant information of the device is used to describe the device, and the relevant information of the device may include the priority of the device, the bridge MAC address of the device, and the device start time. Each stack member device sends its own related information to other member devices, and it should be noted that the other member devices herein may be devices belonging to the same stack member subsystem. And each stacking member device elects an optimal device as a main device according to the received related information, and stores the bridge MAC address of the main device locally as the bridge MAC address of the main device. That is, after determining the master device and the standby device in each stacking subsystem, the bridge MAC address of the master device is stored in the standby device of the corresponding stacking subsystem as the bridge MAC address of the standby device.
In one embodiment of the present description, a stack member device may elect an optimal device as a master device according to device priority, and the smaller the device priority is, the better the device performance is; the optimal equipment can be selected as the main equipment according to the bridge MAC address, and the smaller the bridge MAC address is, the better the equipment performance is; the optimal equipment can be selected as the main equipment according to the starting time of the equipment, and the smaller the starting time of the equipment is, the better the performance of the equipment is. It should be noted that, this is only an exemplary illustration, stacking election mechanisms corresponding to different switch manufacturers are different, and parameter related information participating in decision making is also different, and may be set according to actual situations.
The existing multi-master detection mode is to forward a message through an access switch, the access switch only has the message forwarding function, and specific competitive election is still performed by stacking equipment, so that the existing detection mode cannot detect a plurality of master equipment in time. In an embodiment of the present specification, a decision device is provided, and the decision device is configured to perform contention election on a plurality of main devices in a stacking environment, that is, in the present specification, the decision device has a contention election function in addition to receiving and sending a message. The decision device is connected with the detection port of the stacking member device to form a cross-device link aggregation group, and the decision device and the stacking member device mutually send messages in the cross-device link aggregation group to realize competitive election of the decision device on the stacking member device.
In an embodiment of this specification, the decision device and the stacking member device send messages to each other in the cross-device link aggregation group, where first, the master device in the stacking member device sends a detection message to the decision device, and it should be noted that, when the link L2 is not disconnected, as shown in fig. 1, there is only one master device a, and at this time, the master device a sends the detection message to the decision device; when the link L2 is disconnected, as shown in fig. 2, the stacking system includes two main devices, which are a main device a and a main device C, and at this time, the main device a and the main device C respectively send detection messages to the decision device.
In an embodiment of the present specification, the detection packet includes device-related information, which may include a stack domain ID, a device priority, a bridge MAC address, and a device start time, for example, when the link L2 is disconnected, the master device a encapsulates its stack domain ID, device priority, bridge MAC address, and device start time according to TLV format to generate extended data, and generates the detection packet of the master device a according to the standard LACP packet and the extended data. And the main equipment C encapsulates the stacking domain ID, the equipment priority, the bridge MAC address and the equipment starting time according to the TLV format to generate extended data, and generates a detection message of the main equipment C according to the standard LACP message and the extended data.
In an embodiment of this specification, a message type identifier mad type may also be added to the extended data, the mad type is set to 1, the extended data is generated by encapsulating the extended data and related information of the device into a specified field, and the specified field may be a reserved field, as shown in fig. 4, fig. 4 is a schematic diagram of a structure of a detection message corresponding to this embodiment, where the detection message is composed of a standard LACP message and a specified field, and the specified field includes the message type identifier mad type, and further includes a device information type, a device information length len, and a device information value corresponding to each piece of related information of the device.
In an embodiment of this specification, the standby device may send an LACP message to the decision device in addition to the detection message sent by the primary device.
Step S302, when the decision device receives multiple detection messages at the same time, it determines that multiple master devices are present in the stacking environment.
In an embodiment of the present specification, the decision device determines whether a plurality of master devices are present in the stacking environment according to the detection packet. For example, after the main device a and the main device C generate the detection messages, the main device a and the main device C respectively send the respective corresponding detection messages to the decision device. When the decision device receives respective detection messages sent by the main device A and the main device C at the same time, it is determined that a plurality of main devices appear in the stacking environment. Because the detection message is only generated and sent by the main equipment, the number of the main equipment can be judged according to the number of the received detection messages. In the scenario of fig. 1, only one master device a is in the stacking system, so that the decision device receives the detection packet sent by the master device a. In addition, it should be noted that, here, it is only necessary that a plurality of received detection messages belong to the same message sending period. Through the technical scheme, the existence of the plurality of main devices in the stacking system can be detected in time, and the timeliness of multi-main detection is realized.
Step S303, the decision device selects one master device from the multiple master devices according to the detection messages of the multiple master devices, and sends the related information of the selected master device to the stacking member device, so that the stacking member device performs port setting according to the related information of the selected master device, thereby implementing normal operation of the service.
In an embodiment of the present specification, a decision device receives detection packets sent by a plurality of master devices, and determines that the plurality of master devices appear. And selecting the optimal equipment from the plurality of main equipment as the only one main equipment according to the relevant information of the equipment corresponding to the plurality of detection messages. The decision device analyzes the received detection messages to obtain the stacking domain ID, the device priority, the bridge MAC address and the device starting time corresponding to each main device in the messages, and stores the related information in the aggregation member port of the corresponding main device in the decision device.
The decision device firstly judges whether the stacking domain IDs of the multiple main devices are consistent, and if the stacking domain IDs are consistent, the multiple main devices belong to the same stacking domain. And then, preferentially selecting a plurality of main devices belonging to the same stacking domain. The optimal equipment can be selected as the only main equipment according to the equipment priority, and the smaller the equipment priority is, the better the equipment performance is; the optimal equipment can be selected as the only main equipment according to the bridge MAC address, and the smaller the bridge MAC address is, the better the equipment performance is; and selecting the optimal equipment as the only main equipment according to the starting time of the equipment, wherein the smaller the starting time of the equipment is, the better the performance of the equipment is. The elected optimal main equipment is elected by the decision equipment, and the election rule is consistent with the election rule in the stacking system, so that the elected main equipment is ensured to be the optimal main equipment.
After the optimal master device is selected, comparing the bridge MAC address corresponding to the selected master device with the bridge MAC address pre-stored in the local of the decision device, if the bridge MAC address corresponding to the selected master device is different from the bridge MAC address pre-stored in the decision device, covering the bridge MAC address pre-stored in the decision device, and storing the bridge MAC address corresponding to the selected master device in the decision device. Before election, the bridge MAC address of the master device elected before is stored in the decision device, and if the master device elected after election is different from the master device elected before, the bridge MAC address of the latest master device is stored in the decision device to update the device information.
In one embodiment of the present description, the decision device sends information about the elected master device to the stack member devices. That is to say, before sending the next detection message of the stack member device, the decision device encapsulates the relevant information of the selected master device to form a confirmation message, fills the bridge MAC address of the master device stored in the decision device into the confirmation message, and sends the confirmation message to the stack member device, so as to notify the stack member device of the selected master device.
In an embodiment of the present specification, each of the stacking member devices receives a confirmation message sent by the decision device, and the stacking member device performs port setting according to the selected related information of the master device. And judging whether the bridge MAC address in the confirmation message is consistent with the locally stored bridge MAC address, and if the bridge MAC address stored in one or more appointed stacking member devices is inconsistent with the bridge MAC address in the confirmation message, closing the service port of one or more appointed stacking member devices. It should be noted that the device that receives the acknowledgment packet includes both the master device and the standby device, and the bridge MAC address locally stored by the standby device is the bridge MAC address of the master device that belongs to the same stacking subsystem. For example, in fig. 2, the local bridge MAC address stored by the standby device B is the bridge MAC address of the master device a, and the local bridge MAC address stored by the standby device D is the bridge MAC address of the master device C.
If the optimal main device selected from the main device a and the main device C in fig. 2 is the main device a, sending a bridge MAC address of the main device a to the main device a, the standby device B, the main device C, and the standby device D, where the bridge MAC addresses stored locally by the main device a and the standby device B are the bridge MAC addresses of the main device a, and the bridge MAC addresses stored locally by the main device C and the standby device D are the bridge MAC addresses of the main device C; the bridge MAC addresses stored by the master device C and the standby device D in the four devices are different from the bridge MAC address in the received acknowledgement message, so that the service ports of the master device C and the standby device D are closed, and only the master device a is reserved in the stacking system. By means of a centralized multi-master competition election mechanism of the decision device, timeliness and detection performance of stacked multi-master detection are improved, and the time-consuming problem that the intermediate access device forwards the message in a soft mode is solved.
The embodiment of the present specification further provides a multi-master detection method based on a stacking environment, and provides the multi-master detection method under a strict mode and a non-strict model, where it should be noted that the strict mode is applied to a case where user service requirements are relatively strict on switch stacking performance, and the non-strict mode is applied to a case where user service requirements are relatively loose on switch stacking performance.
As shown in fig. 1, in a normal situation, each device in the stacking system performs a role election according to its own device information, selects a master device role and a slave device role, and four-element information participating in the calculation of the role election includes a stacking domain ID, a device priority, a bridge MAC address, and a device start time. In the same stacking domain, the priority of equipment is smaller and better, the MAC address of a bridge is smaller and better, the starting time of the equipment is smaller and better, the stacking election mechanisms of different manufacturers are different, and the parameter information participating in the stacking election is different. Wherein the decision device may be represented by a decision switch. The decision switch is responsible for centralized management of competition election of the multiple master devices, the multiple master detection ports of all the stack member devices and the upper connection decision switch jointly form a cross-device link aggregation group AGG1, and LACP protocol messages are sent among the multiple master detection ports and the upper connection decision switch at regular time. Under the strict mode of multi-master detection, all the stacked master devices send extended LACP messages carrying four-element information, and all the stacked standby devices send standard LACP messages without extension. Under the non-strict mode of multi-master detection, all the stacking member devices uniformly send standard LACP messages without expansion. It should be noted that the notification message and the extended LACP message both represent the detection message.
The format of the extended LACP message carrying the four-element information is shown in fig. 4 below. The method comprises the steps of adopting an expanded standard LACP protocol message in a stacking multi-main detection strict mode, wherein standard LACP field information is kept unchanged, packaging stacking election four-element information into a designated field by adopting a TLV format, setting a numerical value mad type of a message type to be 1, and constructing a notice notification message, namely a detection message, wherein the four-element information refers to equipment related information. All the main devices send the detection messages to the decision switch, and all the standby devices send non-extended standard LACP messages with message type identification and four-element information both being 0, namely only sending standard LACP messages. The decision switch executes multi-master election work, packaging optimal master equipment bridge MAC winning in election into an extended LACP message, setting a message type identification mad type to be 2, constructing a confirmation message, receiving the confirmation message with the message type identification mad type equal to 2 by all stacking equipment, comparing the MAC field in the self bridge MAC and the ACK message, if the MAC field is not equal, closing the equipment port service except for a stacking port and LACP cross-equipment aggregation group.
If the L2 link fails, the scenario of splitting the stack into multiple masters is shown in fig. 2, the stacking system is split into two stacking subsystems, two masters are generated in the network simultaneously, the master a and the master C belong to two sub-stacking systems, and the multiple master detection process is as follows:
s1: if the mode is strict, all the main equipment fills the self election quad-element information into the LACP expansion field, and sends a notice message, namely a detection message, to the decision equipment M, and the standby equipment sends a normal standard LACP message without expansion information;
further, if the mode is not a strict mode, all hosts only send normal standard LACP messages without extension information, and the message type identifier mad type and the encapsulation quad-element information do not need to be set.
S2: and after receiving the detection message, the decision device M stores four-element information in the message into link structure data corresponding to the aggregation member port, each member port of the aggregation group stores four-element information of opposite-end main equipment, if the opposite end is standby equipment, the four-element information stored in the local link structure is empty, and is in competition comparison with four-element information stored in other aggregation member ports, so that an optimal bridge MAC address in the four-element information is found out, and the optimal bridge MAC address is stored in a local optimal data structure in a covering manner.
Further, if the mode is a non-strict mode, the aggregation member port of the decision device M only needs to store the bridge MAC address of the opposite device, which is obtained from the source MAC address carried in the standard LACP packet, the bridge MAC addresses sent by all the member devices in the same sub-stack system are the bridge MAC address of the main device, the competition analysis only needs to compare the MAC addresses, and the optimal MAC address after each competition is always stored in the local optimal data structure in a covering manner.
S3: in the next LACP sending period, the decision device M creates an ACK packet, that is, an acknowledgment packet, fills the locally stored optimal MAC address information into the ACK packet, and sends the ACK packet to all stack member devices at the opposite end from all aggregation member port links.
S4: stacking all member devices to receive the ACK message, comparing the optimal MAC address carried in the message, if the optimal MAC address is the same as the local MAC address (in the same sub-stacking system, all the stacking member devices adopt the bridge MAC of the main device as the local MAC), opening all service ports of the switch device if the device executes the device closing action, recovering the normal operation of the device service, otherwise, no action is carried out; otherwise, if the address is not the local bridge MAC address, the service port of the device is closed.
S5: if the link L2 is recovered from the fault and the primary device C is recovered to the role of the standby device, sending a standard LACP message with a message type identifier mad type of 0, receiving the standard LACP message with the message type identifier mad type of 0 by the decision switch device, and if the role of the device at the opposite end of the link is considered to be the non-primary device, removing the election quad-element information stored under the port of the aggregation member, and if the mode is the non-strict mode, removing the MAC address information.
Further, if the MAC address in the quaternary element information cleared by the decision switch or the MAC information in the non-strict mode is equal to the optimal bridge MAC address stored in the local global structure, the optimal bridge MAC is deleted, all the quaternary element information stored in all the remaining aggregation member ports or the MAC information in the non-strict mode is triggered to perform competition analysis and comparison again, the next optimal bridge MAC is found out, the next optimal bridge MAC is stored in the local optimal data structure in a covering manner again, and then the process goes to step S3.
Through the technical scheme, the multi-main competition election mechanism is consistent with the election mechanism of the main equipment of the stacking system, and the main equipment for detecting the winning competition of the multi-main competition is ensured to be optimal under the condition of strictly complying with the election rule of the stacking system. In addition, a centralized multi-master competition election mechanism improves the timeliness and the detection performance of stacked multi-master detection, reduces the time consumption of soft forwarding of messages by intermediate access equipment, and supports simultaneous detection of multiple master equipment. And finally, selectable multi-main detection modes are supported and are divided into a strict-type multi-main detection mode and a non-strict-type multi-main detection mode, and the diversity of multi-main competition rule selection is met.
An embodiment of the present specification further provides a multi-master detection device based on a stacking environment, as shown in fig. 5, the device mainly includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
the main equipment sends the generated detection message to the decision equipment, wherein the detection message comprises the relevant information of the main equipment; when the decision device receives a plurality of detection messages at the same time, judging that a plurality of main devices appear in the stacking environment; the decision device selects one master device from the plurality of master devices according to the detection messages of the plurality of master devices, and sends the related information of the selected master device to the stacking member device, so that the stacking member device can conveniently perform port setting according to the related information of the selected master device, and normal operation of the service is realized.
Embodiments of the present specification also provide a non-volatile computer storage medium storing computer-executable instructions configured to: the main equipment sends the generated detection message to the decision equipment, wherein the detection message comprises the relevant information of the main equipment; when the decision device receives a plurality of detection messages at the same time, judging that a plurality of main devices appear in the stacking environment; the decision device selects one master device from the plurality of master devices according to the detection messages of the plurality of master devices, and sends the related information of the selected master device to the stacking member device, so that the stacking member device can conveniently perform port setting according to the related information of the selected master device, and normal operation of the service is realized.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the device, and the nonvolatile computer storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above description is merely one or more embodiments of the present disclosure and is not intended to limit the present disclosure. Various modifications and alterations to one or more embodiments of the present description will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of one or more embodiments of the present specification should be included in the scope of the claims of the present specification.

Claims (10)

1. A multi-primary detection method based on a stacking environment is applied to a multi-primary detection system, the multi-primary detection system comprises a stacking member device and a decision-making device, the stacking member device comprises a primary device and a plurality of standby devices, and when a link between the stacking member devices is disconnected, the standby devices are switched into the primary devices to form a plurality of stacking subsystems, wherein each stacking subsystem comprises a primary device and at least one standby device, the method comprises the following steps:
the main equipment sends the generated detection message to the decision equipment, wherein the detection message comprises relevant information of the main equipment;
when the decision device receives a plurality of detection messages at the same time, judging that a plurality of main devices appear in the stacking environment;
the decision device selects a master device from the plurality of master devices according to the detection messages of the plurality of master devices, and sends the related information of the selected master device to the stacking member device, so that the stacking member device can conveniently perform port setting according to the related information of the selected master device, and normal operation of the service is realized.
2. The method according to claim 1, wherein the related information includes a bridge MAC address, and the stack member device performs port setting according to the related information of the elected master device, specifically including:
the decision device of the multi-master detection system generates confirmation messages according to the bridge MAC addresses of the elected master devices and sends the confirmation messages to the stacking member devices respectively;
and the stacking member equipment judges whether the bridge MAC address in the confirmation message is consistent with the bridge MAC address stored in the stacking member equipment or not according to the received bridge MAC address in the confirmation message, and if the bridge MAC address stored in one or more appointed stacking member equipment is inconsistent with the bridge MAC address in the confirmation message, the service port of the one or more appointed stacking member equipment is closed.
3. The multi-master detection method based on the stack environment according to claim 1, wherein the master device sends the generated detection packet to the decision device, and before the method further comprises:
setting decision equipment, wherein the decision equipment is used for carrying out competitive election on a plurality of main equipment in a stacking environment;
the decision device is connected with a detection port of the stacking member device to form a cross-device link aggregation group, and the decision device and the stacking member device send messages to each other in the cross-device link aggregation group to realize competitive election of the decision device on the stacking member device.
4. The multi-master detection method based on the stack environment according to claim 1, wherein the master device sends the generated detection packet to the decision device, and before the method further comprises:
each main device packages the corresponding related information according to TLV format to generate expanded data;
and generating the detection message according to the standard LACP message and the expansion data.
5. The method according to claim 2, wherein the related information further includes any one or more of a stack domain ID, a device priority, and a device start time, and the decision device selects a master device from the plurality of master devices according to the detection packets of the plurality of master devices, specifically including:
storing relevant information in the detection message corresponding to each main device to an aggregation member port in the decision device, so that the decision device can judge whether the plurality of main devices belong to the same stacking domain according to the stacking domain ID of each main device;
if the plurality of main devices belong to the same stacking domain, selecting one main device from the plurality of main devices according to any one or more of the device priority, the bridge MAC address and the device starting time of each main device;
the related information of the elected master device meets any one or more of the device priority minimum, the bridge MAC address minimum and the device startup time minimum.
6. The method according to claim 2, wherein the decision device selects one master device from the plurality of master devices according to the detection messages of the plurality of master devices, and thereafter the method further comprises:
and comparing the bridge MAC address corresponding to the elected main equipment with the bridge MAC address pre-stored in the local decision equipment, and if the bridge MAC address corresponding to the elected main equipment is different from the bridge MAC address pre-stored in the decision equipment, covering the bridge MAC address pre-stored in the decision equipment, and storing the bridge MAC address corresponding to the elected main equipment in the decision equipment.
7. The multi-master detection method based on the stack environment according to claim 4, wherein the master device sends the generated detection message to the decision device, and before the method further comprises:
the method comprises the steps that related information of all stacking member devices is obtained in advance, and each stacking member device sends corresponding related information to other devices belonging to the same stacking member subsystem;
and according to the related information, determining a designated device as a main device in each stacking member subsystem, and using the rest devices in the stacking member subsystems as standby devices corresponding to the main device, wherein the element information of the main device meets any one or more of the minimum priority of the device, the minimum bridge MAC address and the minimum device starting time.
8. The multi-master detection method based on the stack environment according to claim 7, wherein the master device sends the generated detection message to the decision device, and before the method further comprises:
after the main equipment and the standby equipment in each stacking subsystem are determined, the bridge MAC address of the main equipment is stored in the standby equipment of the corresponding stacking subsystem to be used as the bridge MAC address of the standby equipment.
9. A multi-master detection device based on a stacked environment, the device comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
the method comprises the steps that a main device sends a generated detection message to a decision device, wherein the detection message comprises relevant information of the main device;
when the decision-making equipment receives a plurality of detection messages at the same time, judging that a plurality of main equipment appear in the stacking environment;
the decision device selects a master device from the plurality of master devices according to the detection messages of the plurality of master devices, and sends the related information of the selected master device to the stacking member device, so that the stacking member device can conveniently perform port setting according to the related information of the selected master device, and normal operation of the service is realized.
10. A non-transitory computer storage medium storing computer-executable instructions configured to:
the method comprises the steps that a main device sends a generated detection message to a decision device, wherein the detection message comprises relevant information of the main device;
when the decision device receives a plurality of detection messages at the same time, judging that a plurality of main devices appear in the stacking environment;
the decision device selects a master device from the plurality of master devices according to the detection messages of the plurality of master devices, and sends the related information of the selected master device to the stacking member device, so that the stacking member device can conveniently perform port setting according to the related information of the selected master device, and normal operation of the service is realized.
CN202111527604.8A 2021-12-14 2021-12-14 Multi-master detection method, equipment and medium based on stacking environment Pending CN114244736A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111527604.8A CN114244736A (en) 2021-12-14 2021-12-14 Multi-master detection method, equipment and medium based on stacking environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111527604.8A CN114244736A (en) 2021-12-14 2021-12-14 Multi-master detection method, equipment and medium based on stacking environment

Publications (1)

Publication Number Publication Date
CN114244736A true CN114244736A (en) 2022-03-25

Family

ID=80755995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111527604.8A Pending CN114244736A (en) 2021-12-14 2021-12-14 Multi-master detection method, equipment and medium based on stacking environment

Country Status (1)

Country Link
CN (1) CN114244736A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118682A (en) * 2022-06-06 2022-09-27 上海华信长安网络科技有限公司 Method and device for communication between stacking switch and external equipment
CN115250226A (en) * 2022-07-26 2022-10-28 迈普通信技术股份有限公司 MLAG double-master fault recovery method, device, system, medium and equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030169748A1 (en) * 2002-03-11 2003-09-11 Weyman Raphael J. Stackable network units with resiliency facility
CN101442484A (en) * 2008-12-05 2009-05-27 杭州华三通信技术有限公司 Method, system and equipment for detecting stacking multi-Active
CN101610182A (en) * 2009-06-26 2009-12-23 杭州华三通信技术有限公司 Multi-primary apparatus conflict detection method and stack member apparatus in piling up
CN102404172A (en) * 2011-12-21 2012-04-04 迈普通信技术股份有限公司 Multi-activity detection method and device
CN104104596A (en) * 2014-07-28 2014-10-15 杭州华三通信技术有限公司 Intelligent resilient framework (IRF) split processing method and device
CN105656645A (en) * 2014-11-12 2016-06-08 杭州华三通信技术有限公司 Decision making method and device for fault processing of stacking system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030169748A1 (en) * 2002-03-11 2003-09-11 Weyman Raphael J. Stackable network units with resiliency facility
CN101442484A (en) * 2008-12-05 2009-05-27 杭州华三通信技术有限公司 Method, system and equipment for detecting stacking multi-Active
CN101610182A (en) * 2009-06-26 2009-12-23 杭州华三通信技术有限公司 Multi-primary apparatus conflict detection method and stack member apparatus in piling up
CN102404172A (en) * 2011-12-21 2012-04-04 迈普通信技术股份有限公司 Multi-activity detection method and device
CN104104596A (en) * 2014-07-28 2014-10-15 杭州华三通信技术有限公司 Intelligent resilient framework (IRF) split processing method and device
CN105656645A (en) * 2014-11-12 2016-06-08 杭州华三通信技术有限公司 Decision making method and device for fault processing of stacking system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118682A (en) * 2022-06-06 2022-09-27 上海华信长安网络科技有限公司 Method and device for communication between stacking switch and external equipment
CN115250226A (en) * 2022-07-26 2022-10-28 迈普通信技术股份有限公司 MLAG double-master fault recovery method, device, system, medium and equipment
CN115250226B (en) * 2022-07-26 2023-11-24 迈普通信技术股份有限公司 MLAG double-master fault recovery method, device, system, medium and equipment

Similar Documents

Publication Publication Date Title
US9282030B2 (en) Transport control server that calculates routing information
EP2911341B1 (en) Method and device for dynamically switching gateway of distributed resilient network interconnect
KR101099822B1 (en) Redundant routing capabilities for a network node cluster
US20100182933A1 (en) Method And Switching Device For Stack Port Configuration
US20140254347A1 (en) Ethernet Ring Protection Switching Method, Node, and System
US10277454B2 (en) Handling failure of stacking system
CN114244736A (en) Multi-master detection method, equipment and medium based on stacking environment
EP3316555B1 (en) Mac address synchronization method, device and system
JP2007060184A (en) Network repeating installation and its control method
CN113328916B (en) BFD detection mode switching method, device and equipment
CN106936613B (en) Method and system for rapidly switching main and standby Openflow switch
US20090006650A1 (en) Communication device, communication method, communication interface, and program product
US20130016617A1 (en) Network relay device and control method thereof
CN111585797B (en) Ethernet link switching method, device, equipment and computer readable storage medium
CN111953591A (en) Fault processing method and device
CN112583708B (en) Connection relation control method and device and electronic equipment
CN108199986B (en) Data transmission method, stacking equipment and stacking system
CN112104548A (en) Communication method and device
CN112737844A (en) Method and device for switching between main and standby in redundant system
CN108282406B (en) Data transmission method, stacking equipment and stacking system
CN109873719B (en) Fault detection method and device
CN114124803B (en) Device management method and device, electronic device and storage medium
CN102546313B (en) Multi-activation detection method and multi-activation detection device
CN113098709B (en) Network recovery method and device based on distributed networking system and computer equipment
CN112367179B (en) Link switching method and device

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