CN111030877A - Main/standby equipment switching method and device - Google Patents

Main/standby equipment switching method and device Download PDF

Info

Publication number
CN111030877A
CN111030877A CN201911365190.6A CN201911365190A CN111030877A CN 111030877 A CN111030877 A CN 111030877A CN 201911365190 A CN201911365190 A CN 201911365190A CN 111030877 A CN111030877 A CN 111030877A
Authority
CN
China
Prior art keywords
equipment
priority value
standby
priority
port
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
CN201911365190.6A
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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies 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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201911365190.6A priority Critical patent/CN111030877A/en
Publication of CN111030877A publication Critical patent/CN111030877A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • 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
    • H04L43/0823Errors, e.g. transmission errors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route

Abstract

The application provides a method and a device for switching a main device and a standby device. The method for switching the main equipment and the standby equipment is applied to network equipment and comprises the following steps: when the first device works as a main device, if all links between the first device and an opposite terminal device are detected to be abnormal, the device priority of the network device is adjusted from a first priority value to a second priority value; the second priority value is smaller than a third priority value, the third priority value is the equipment priority of second equipment, and the second equipment works as standby equipment at present; sending a heartbeat message to the second device, wherein the heartbeat message carries a second priority value, so that the second device is switched from a standby device to a main device according to the second priority value; and switching the equipment from the main equipment to the standby equipment according to the second priority value.

Description

Main/standby equipment switching method and device
Technical Field
The present application relates to network communication technologies, and in particular, to a method and an apparatus for switching between a master device and a slave device.
Background
As the network is larger and larger, the traffic in the network is more and more diversified, and the performance requirements on the network devices are more strict. Today, as the size of networks increases, traffic disruption at any point in time can cause immeasurable losses for enterprises and operators. Therefore, a network device in a standby state is usually set in a networking, so as to switch to an active state when active/standby switching is required, and replace an original active device to complete traffic processing.
At present, usually, a heartbeat packet is periodically sent from an active network device to a standby network device, and after the standby network device does not receive a heartbeat packet sent by the active network device for a long time, it is determined that the active network device fails, so as to perform active-standby switching. However, in the above-mentioned manner of switching between the master and the slave by using the heartbeat packet, the heartbeat packet can detect whether the host has a fault, but cannot detect the link between the master network device and the peer device.
Disclosure of Invention
The application provides a method and a device for switching a main device and a standby device.
The technical scheme provided by the application comprises the following steps:
according to a first aspect of the present application, a method for switching a master device and a slave device is provided, where the method is applied to a network device, and includes:
when the first device works as a main device, if all links between the first device and an opposite terminal device are detected to be abnormal, the device priority of the network device is adjusted from a first priority value to a second priority value; the second priority value is smaller than a third priority value, the third priority value is the current equipment priority of the second equipment, and the second equipment works as standby equipment at present;
sending a heartbeat message to the second device, wherein the heartbeat message carries a second priority value, so that the second device is switched from a standby device to a main device according to the second priority value;
and switching the equipment from the main equipment to the standby equipment according to the second priority value.
According to a second aspect of the present application, there is provided a main/standby device switching apparatus, which is applied to a network device, and includes:
an adjusting unit, configured to, when a first device operates as a master device, adjust a device priority of a network device from a first priority value to a second priority value if all links between the first device and an opposite device are detected to be abnormal; the second priority value is smaller than a third priority value, the third priority value is the current equipment priority of the second equipment, and the second equipment works as standby equipment at present;
a sending unit, configured to send a heartbeat packet to the second device, where the heartbeat packet carries a second priority value, so that the second device is switched from a standby device to a main device according to the second priority value;
and the switching unit is used for switching the equipment from the main equipment to the standby equipment according to the second priority value.
According to the technical scheme, when the first device works as the main device, all links between the first device and the opposite-end device can be detected, and when all links are abnormal, the priority value of the device is adjusted to be lower than that of the second device working as the standby device, so that the main-standby switching is realized. Compared with the scheme of executing the main-standby switching when the heartbeat message is used for detecting the fault of the main equipment, the method and the device can switch when the main equipment does not have the fault but the link is abnormal by detecting the link, so that the problem of flow interruption caused by abnormal link but not executing the main-standby switching is avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a diagram of an application scenario provided by the present application;
FIG. 2 is a flow chart of a method provided herein;
FIG. 3 is a flow chart of a second priority value determination provided herein;
FIG. 4 is a flow chart of link state detection provided herein;
FIG. 5 is a flow chart of port status detection provided herein;
fig. 6 is a flowchart of primary/standby device recovery provided in the present application;
FIG. 7 is a schematic diagram of the apparatus provided herein;
fig. 8 is a schematic hardware structure diagram of the apparatus shown in fig. 7 provided in the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Referring to fig. 1, fig. 1 is an application scenario diagram of a method for switching a primary device and a standby device according to the present application. Fig. 1 includes: a first device 11, a second device 12, an upstream device 13 and a downstream device 14.
The first device and the second device are both connected between the upstream device and the downstream device, and both can forward the message transmitted between the upstream device and the downstream device when working as the main device. Specifically, when any one of the first device and the second device is used as the active device, it may perform an operation of forwarding a packet transmitted between the upstream device and the downstream device; and the other device may act as a standby device that does not perform the operation of forwarding the messages transmitted between the upstream and downstream devices. The first device and the second device are connected with the upstream device and the downstream device through at least two links. The first device and the second device may be firewall devices, routers or gateways, etc.
The upstream and downstream devices may be configured to send messages to the first device and the second device, and may also be configured to receive messages forwarded by the first device and the second device. The upstream and downstream devices may be the same type of device or different types of devices. For example, the upstream device may be a server, the downstream device may be a terminal device, and the upstream device and the downstream device may also be routers at the same time. The application is not limited to a particular type of upstream or downstream equipment.
Referring to fig. 2, fig. 2 is a flowchart of a method for switching between a master device and a slave device according to the present application. As shown in fig. 2, the process may include:
step 101, when a first device works as a master device, if all links between the first device and an opposite device are detected to be abnormal, adjusting the device priority of the network device from a first priority value to a second priority value; the second priority value is smaller than a third priority value, the third priority value is the current equipment priority of the second equipment, and the second equipment works as standby equipment at present;
as an example, the first device and the second device may both be active devices or standby devices. In specific implementation, a user may configure different device priorities for the first device and the second device in advance, so that the first device and the second device elect a device with a high device priority as an active device and a device with a low device priority as a standby device according to the device priorities.
As one example, there are a variety of implementations for the determination of the second priority value. As one implementation, the second priority value may be set by a user in advance and stored in the first device. Fig. 3 also shows another implementation manner, which will be described in detail below, and the detailed description thereof is omitted here.
As an example, there are multiple implementation manners for detecting whether all links between the device and the peer device are abnormal, one of which is shown in fig. 4, which will be described in detail below, and will not be described here again.
As an example, since the active device and the standby device are determined by device priorities of the first device and the second device, when the first device performs an operation of switching from the active device to the standby device, the first device needs to adjust its device priority to be lower than that of the standby device to prepare for subsequent active-standby switching.
Step 102, sending a heartbeat message to the second device, where the heartbeat message carries a second priority value, so that the second device is switched from a standby device to a main device according to the second priority value;
as an example, since the second device does not know that the first device has performed the operation of adjusting the priority of its own device, the first device needs to send a heartbeat packet carrying the second priority value to the second device, so that the second device knows the adjusted priority of the first device, and switches to the active device according to the adjusted priority of the first device.
And 103, switching the device from the active device to the standby device according to the second priority value.
As one example, the first device may compare the second priority value to the third priority value after adjusting the device priority from the first priority value to the second priority value. Because the second priority value is smaller than the third priority value, the result that the device priority of the device is smaller than that of the second device is obtained, and the device is switched from the main device to the standby device.
As an example, after the active device is switched to the standby device, the first device may limit all links connected to the opposite device to no longer forward traffic, so that the second device replaces the first device to forward corresponding traffic.
Thus, the flow shown in fig. 2 is completed.
According to the technical scheme, when the first device works as the main device, all links between the first device and the opposite-end device can be detected, and when all links are abnormal, the priority value of the device is adjusted to be lower than that of the second device working as the standby device, so that the main-standby switching is realized. Compared with the scheme of executing the main-standby switching when the heartbeat message is used for detecting the fault of the main equipment, the method and the device can switch when the main equipment does not have the fault but the link is abnormal by detecting the link, so that the problem of flow interruption caused by abnormal link but not executing the main-standby switching is avoided.
How to determine the second priority value in step 101 is described below with reference to the flow shown in fig. 3. As shown in fig. 3, the process may include:
step 101a, sending a heartbeat message for requesting device priority to the second device;
as an example, in this implementation, the device priority of the second network device is not pre-stored in the first device. Therefore, the first device needs to obtain the device priority of the second network device through the heartbeat message.
Step 101b, receiving a heartbeat message which is sent by a second network device and carries a third priority value;
as an example, after receiving a heartbeat packet for requesting the device priority, the second device will respond to the heartbeat packet and send the heartbeat packet carrying its own device priority to the first device. And after receiving the heartbeat message carrying the third priority value sent by the second equipment, the first equipment can obtain the third priority value from the message.
Step 101c, determining a positive integer from the values smaller than the third priority value and determining the positive integer as the second priority value.
As an example, the primary and standby devices are elected according to the priority of the devices. Therefore, the first device only needs to make the second priority value lower than the third priority value. As a simple example, if the third priority value is 100, the first device may select a positive integer from 1 to 99 as the second priority value, such as 60 as the second priority value.
It should be noted that the mode of selecting a positive integer may be randomly selected, or may be according to a certain rule, for example, selecting a multiple of 5 or a multiple of 3, and the application does not limit the mode of selecting a positive integer.
The flow shown in fig. 3 is completed.
With reference to the flow shown in fig. 4, how to detect whether all links between the device and the peer device are abnormal in step 101 when the first device and the peer device are connected through the dynamic aggregation link is described below. As shown in fig. 4, the process may include:
step 1011, detecting port states of all monitoring ports in the member ports corresponding to the dynamic aggregation link; the monitoring port is a member port which is configured in advance for detecting the link state;
as an example, after the dynamic aggregation link between the local device and the peer device is established, a listening port may be selected from the member ports corresponding to the dynamic aggregation link. The selection mode here may be random selection, or may be according to a certain rule, such as selecting several ports with the smallest MAC address in the member ports or selecting several ports with the largest MAC address in the member ports, and the present application does not limit how to monitor the ports.
It should be noted that the number of the selected listening ports may affect the accuracy of detecting the link anomaly. As a simple example, if the number of the member ports corresponding to the dynamic aggregation link is 8. If only one of the member ports is selected as the snooping port, the snooping port cannot work, but all the other 7 member ports can work normally, and the dynamic aggregation link is determined to be abnormal, which may cause inaccuracy in determining the dynamic aggregation link abnormality. In addition, since the dynamic aggregation link usually carries a relatively large traffic, if all the member ports are selected as the monitoring ports, only one or two of the remaining member ports may work normally, but the active/standby switching is not performed when the traffic exceeds the link load. Therefore, the number of the listening ports needs to be determined according to the number of the member ports of the dynamic aggregation link.
As an example, there are various implementation manners to detect port states of all listening ports in the member ports corresponding to the dynamic aggregation link, one of which is shown in fig. 5 and will be described in detail below, which is not described herein again.
Step 1012, determining all link anomalies between the device and the opposite device when detecting that the port statuses of all the monitoring ports are in the inactive status.
As an example, a member port corresponding to a dynamic aggregation link may have two port states, one of which is an active state, which is used to indicate that the port participates in traffic forwarding; the other is an inactive state, which indicates that the port is not capable of participating in traffic forwarding.
As an example, if it is detected in step 1011 that the port states of all the listening ports are in the inactive state, all the links between the present device and the peer device may be considered to be abnormal.
The flow shown in fig. 4 is completed.
Next, how to detect the port states of all the listening ports in the member ports corresponding to the dynamic aggregation link in step 1011 is described with reference to the flow shown in fig. 5. As shown in fig. 5, the process may include:
step 10111, for each listening port, controlling the listening port to send an LACP (link aggregation control protocol) message to the peer device and start a timer;
as an example, each listening port periodically sends an LACP message to the peer device through the dynamic aggregation link. According to the regulation of IEEE 802.3 protocol, after the member port at the home terminal sends an LACP message to the member port at the opposite terminal, the member port at the opposite terminal returns the LACP message to the member port at the home terminal. Based on this, if the monitoring port is connected with the link between the opposite member ports, the monitoring port can normally receive and transmit the LACP message.
As an example, the duration of the timer may be set by user customization. It should be noted that the duration of the timer here may affect the accuracy of the detection of the port status. As a simple example, if the listening port needs to take 0.2S to complete one time of sending and receiving an LACP message under a normal condition, if the duration of the timer is set to 0.2S, the instant abnormality (such as blockage) of the link may cause the duration of receiving the LACP message to exceed the duration of the timer, and the instant abnormal link may be mistaken as an abnormal link.
Step 10112, if the LACP message sent by the opposite terminal device is received within the timing duration of the timer, determining that the monitoring port is in an active state.
As an example, when the listening port receives an LACP message sent by the peer device, it checks whether the corresponding timer is overtime, and if the timer is not overtime, it can determine that the listening port is in an active state.
The flow shown in fig. 5 is completed.
It can be seen from the above technical solutions that, since the LACP packet is a two-layer packet, the manner in which the LACP packet is used to detect the link state of the dynamic aggregation link in this embodiment is not limited by networking, and can be applied to both a two-layer networking and a three-layer networking.
After the device is switched from the active device to the standby device in step 103, if it is detected that all links have recovered to normal, the active/standby states of the first device and the second device may be recovered to the state before switching, which is described in detail below with reference to fig. 6:
step 104, if it is detected that all links between the device and the opposite terminal device are recovered to normal, adjusting the device priority of the network device from the second priority value to the first priority value;
as an example, there are various implementations of detecting that all links between the device and the peer device are restored to normal. As one implementation manner, refer to the description of steps 1011 to 1012, that is, all the listening ports change from inactive state to active state, and it can be determined that all the links between the device and the peer device are recovered to be normal. It should be noted here that, when the dynamic aggregation link is connected to the peer device, even though each member port is already in an inactive state, the port still sends an LACP message to the peer device, so as to sense the LACP message at the first time when the link is recovered.
As an example, when the device priority of the present device is adjusted from the first priority value to the second priority value in step 102, the first priority value and the second priority value may be correspondingly stored in the designated location of the present device. When the second priority value needs to be adjusted to the first priority value, the first priority value can be acquired from the designated position, and then adjustment is completed.
Step 105, sending a heartbeat message to the second device, where the heartbeat message carries the first priority value, so that the second device is switched from the active device to the standby device according to the first priority value;
as an example, the implementation of this step may refer to the foregoing description of step 102, which is not described here again.
And 106, switching the equipment from the standby equipment to the active equipment according to the first priority value.
As an example, the implementation of this step may refer to the foregoing description of step 103, which is not described herein again.
The flow shown in fig. 6 is completed.
Corresponding to the foregoing embodiment of the method for switching between the main device and the standby device, the present application also provides an embodiment of a device for switching between the main device and the standby device.
The embodiment of the master/standby device switching device can be applied to network devices. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor of the network device where the software implementation is located as a logical means. In terms of hardware, as shown in fig. 8, the present application is a hardware structure diagram of a network device where a main/standby device switching apparatus is located, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 8, a network device where the apparatus is located in the embodiment may also include other hardware according to an actual function of the network device, which is not described again.
Referring to fig. 7, fig. 7 is a structural diagram of the apparatus provided in the present application. The device is applied to network equipment, and the device comprises:
an adjusting unit 710, configured to, when a first device operates as a master device, if all links between the first device and an opposite-end device are detected to be abnormal, adjust a device priority of the network device from a first priority value to a second priority value; the second priority value is smaller than a third priority value, the third priority value is the equipment priority of second equipment, and the second equipment works as standby equipment at present;
a sending unit 720, configured to send a heartbeat packet to the second device, where the heartbeat packet carries a second priority value, so that the second device is switched from a standby device to a primary device according to the second priority value;
the switching unit 730 is configured to switch the device from the active device to the standby device according to the second priority value.
As an example, when the present device and the peer device are connected through a dynamic aggregation link, the adjusting unit 710 detects all link anomalies between the present device and the peer device, including:
detecting the port states of all monitoring ports in the member ports of the dynamic aggregation link; the monitoring port is a member port which is configured in advance for detecting the link state;
and when the port states of all the monitoring ports are detected to be in the inactive state, determining that all the links between the equipment and the opposite equipment are abnormal.
As an example, the adjusting unit 710 detects the port status of all listening ports in the member ports of the dynamic aggregation link by:
for each monitoring port, controlling the monitoring port to send a Link Aggregation Control Protocol (LACP) message to the opposite terminal equipment and starting a timer;
checking whether the monitoring port receives an LACP message sent by the opposite terminal equipment within the timing duration of the timer;
if yes, determining that the monitoring port is in an active state;
if not, determining that the monitoring port is in an inactive state.
As an example, after switching the device from the active device to the standby device, the adjusting unit 710 is further configured to:
if all links between the network equipment and the opposite terminal equipment are detected to be recovered to be normal, adjusting the equipment priority of the network equipment from the second priority value to the first priority value;
the sending unit is further configured to:
sending a heartbeat message to the second device, wherein the heartbeat message carries the first priority value, so that the second device is switched from the main device to the standby device according to the first priority value;
the switching unit is further configured to:
and switching the equipment from the standby equipment to the active equipment according to the first priority value.
As an example, the second priority value is determined by:
sending a heartbeat message for requesting the priority of the equipment to the second equipment;
receiving a heartbeat message which is sent by a second network device and carries a third priority value;
determining a positive integer among the values less than the third priority value and determining the positive integer as the second priority.
This completes the description of the apparatus shown in fig. 7.
Referring to fig. 8, fig. 8 is a hardware structure diagram of a network device where a main/standby device switching apparatus of the present application is located, where the hardware structure includes: a processor and a memory.
Wherein the memory is to store machine executable instructions;
the processor is configured to read and execute the machine executable instructions stored in the memory, so as to implement the active/standby device switching method shown in fig. 2.
For one embodiment, the memory may be any electronic, magnetic, optical, or other physical storage device that may contain or store information such as executable instructions, data, and the like. For example, the memory may be: volatile memory, non-volatile memory, or similar storage media. In particular, the Memory may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard disk drive), a solid state disk, any type of storage disk (e.g., an optical disk, a DVD, etc.), or similar storage medium, or a combination thereof.
So far, the description of the apparatus shown in fig. 8 is completed.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A method for switching between main and standby devices is applied to a network device, and comprises the following steps:
when the first device works as a main device, if all links between the first device and an opposite terminal device are detected to be abnormal, the device priority of the network device is adjusted from a first priority value to a second priority value; the second priority value is smaller than a third priority value, the third priority value is the equipment priority of second equipment, and the second equipment works as standby equipment at present;
sending a heartbeat message to the second device, wherein the heartbeat message carries a second priority value, so that the second device is switched from a standby device to a main device according to the second priority value;
and switching the equipment from the main equipment to the standby equipment according to the second priority value.
2. The method according to claim 1, wherein when the local device and the peer device are connected via a dynamic aggregation link, the detecting all link anomalies between the local device and the peer device includes:
detecting the port states of all monitoring ports in the member ports corresponding to the dynamic aggregation link; the monitoring port is a member port which is configured in advance for detecting the link state;
and when the port states of all the monitoring ports are detected to be in the inactive state, determining that all the links between the equipment and the opposite equipment are abnormal.
3. The method according to claim 2, wherein the detecting the port states of all listening ports in the member ports corresponding to the dynamic aggregation link is implemented by:
for each monitoring port, controlling the monitoring port to send a Link Aggregation Control Protocol (LACP) message to the opposite terminal equipment and starting a timer;
and if the LACP message sent by the opposite terminal equipment is received within the timing duration of the timer, determining that the monitoring port is in an active state.
4. The method of claim 1, wherein after switching the device from the active device to the standby device, the method further comprises:
if all links between the network equipment and the opposite terminal equipment are detected to be recovered to be normal, adjusting the equipment priority of the network equipment from the second priority value to the first priority value;
sending a heartbeat message to the second device, wherein the heartbeat message carries the first priority value, so that the second device is switched from the main device to the standby device according to the first priority value;
and switching the equipment from the standby equipment to the active equipment according to the first priority value.
5. The method of claim 1, wherein the second priority value is determined by:
sending a heartbeat message for requesting the priority of the equipment to the second equipment;
receiving a heartbeat message which is sent by a second network device and carries a third priority value;
determining a positive integer among the values less than the third priority value and determining the positive integer as the second priority.
6. A master/standby device switching apparatus, applied to a network device, includes:
an adjusting unit, configured to, when a first device operates as a master device, adjust a device priority of a network device from a first priority value to a second priority value if all links between the first device and an opposite device are detected to be abnormal; the second priority value is smaller than a third priority value, the third priority value is the equipment priority of second equipment, and the second equipment works as standby equipment at present;
a sending unit, configured to send a heartbeat packet to the second device, where the heartbeat packet carries a second priority value, so that the second device is switched from a standby device to a main device according to the second priority value;
and the switching unit is used for switching the equipment from the main equipment to the standby equipment according to the second priority value.
7. The apparatus according to claim 6, wherein when the device and the peer device are connected via the dynamic aggregation link, the adjusting unit detecting all link anomalies between the device and the peer device includes:
detecting the port states of all monitoring ports in the member ports of the dynamic aggregation link; the monitoring port is a member port which is configured in advance for detecting the link state;
and when the port states of all the monitoring ports are detected to be in the inactive state, determining that all the links between the equipment and the opposite equipment are abnormal.
8. The apparatus of claim 7, wherein the adjusting unit detects the port status of all listening ports in the member ports of the dynamic aggregation link by:
for each monitoring port, controlling the monitoring port to send a Link Aggregation Control Protocol (LACP) message to the opposite terminal equipment and starting a timer;
checking whether the monitoring port receives an LACP message sent by the opposite terminal equipment within the timing duration of the timer;
if yes, determining that the monitoring port is in an active state;
if not, determining that the monitoring port is in an inactive state.
9. The apparatus of claim 6, wherein after switching the device from the active device to the standby device, the adjusting unit is further configured to:
if all links between the network equipment and the opposite terminal equipment are detected to be recovered to be normal, adjusting the equipment priority of the network equipment from the second priority value to the first priority value;
the sending unit is further configured to:
sending a heartbeat message to the second device, wherein the heartbeat message carries the first priority value, so that the second device is switched from the main device to the standby device according to the first priority value;
the switching unit is further configured to:
and switching the equipment from the standby equipment to the active equipment according to the first priority value.
10. The apparatus of claim 6, wherein the second priority value is determined by:
sending a heartbeat message for requesting the priority of the equipment to the second equipment;
receiving a heartbeat message which is sent by the standby network equipment and carries a third priority value;
determining a positive integer among the values less than the third priority value and determining the positive integer as the second priority.
CN201911365190.6A 2019-12-26 2019-12-26 Main/standby equipment switching method and device Pending CN111030877A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911365190.6A CN111030877A (en) 2019-12-26 2019-12-26 Main/standby equipment switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911365190.6A CN111030877A (en) 2019-12-26 2019-12-26 Main/standby equipment switching method and device

Publications (1)

Publication Number Publication Date
CN111030877A true CN111030877A (en) 2020-04-17

Family

ID=70214604

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911365190.6A Pending CN111030877A (en) 2019-12-26 2019-12-26 Main/standby equipment switching method and device

Country Status (1)

Country Link
CN (1) CN111030877A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111654435A (en) * 2020-06-02 2020-09-11 中电科航空电子有限公司 Link protection fault processing system and method based on LACP
CN112383414A (en) * 2020-10-28 2021-02-19 北京中科网威信息技术有限公司 Method and device for fast switching of dual-computer hot backup
CN112714461A (en) * 2021-01-29 2021-04-27 四川安迪科技实业有限公司 DAMA satellite network central station protection switching method
CN115225397A (en) * 2022-07-22 2022-10-21 山石网科通信技术股份有限公司 Control method, control device, firewall and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102098201A (en) * 2009-12-14 2011-06-15 中兴通讯股份有限公司 Method for realizing L2TP user access backup and network system
JP2011166245A (en) * 2010-02-05 2011-08-25 Nippon Telegr & Teleph Corp <Ntt> Network system, switching method of gateway device, first tunnel termination gateway device and second tunnel termination gateway device
CN104333470A (en) * 2014-11-14 2015-02-04 杭州华三通信技术有限公司 Fault handling method and device
CN106301871A (en) * 2015-06-25 2017-01-04 中兴通讯股份有限公司 A kind of forwarding detection (BFD) method based on lacp and system
CN106656791A (en) * 2015-10-30 2017-05-10 华为技术有限公司 Device state switching method, device and system
CN109194521A (en) * 2018-09-29 2019-01-11 新华三技术有限公司 A kind of flow forwarding method and equipment
CN109586986A (en) * 2019-01-29 2019-04-05 杭州迪普科技股份有限公司 Method, apparatus, equipment and the storage medium of network equipment switching

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102098201A (en) * 2009-12-14 2011-06-15 中兴通讯股份有限公司 Method for realizing L2TP user access backup and network system
JP2011166245A (en) * 2010-02-05 2011-08-25 Nippon Telegr & Teleph Corp <Ntt> Network system, switching method of gateway device, first tunnel termination gateway device and second tunnel termination gateway device
CN104333470A (en) * 2014-11-14 2015-02-04 杭州华三通信技术有限公司 Fault handling method and device
CN106301871A (en) * 2015-06-25 2017-01-04 中兴通讯股份有限公司 A kind of forwarding detection (BFD) method based on lacp and system
CN106656791A (en) * 2015-10-30 2017-05-10 华为技术有限公司 Device state switching method, device and system
CN109194521A (en) * 2018-09-29 2019-01-11 新华三技术有限公司 A kind of flow forwarding method and equipment
CN109586986A (en) * 2019-01-29 2019-04-05 杭州迪普科技股份有限公司 Method, apparatus, equipment and the storage medium of network equipment switching

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111654435A (en) * 2020-06-02 2020-09-11 中电科航空电子有限公司 Link protection fault processing system and method based on LACP
CN112383414A (en) * 2020-10-28 2021-02-19 北京中科网威信息技术有限公司 Method and device for fast switching of dual-computer hot backup
CN112383414B (en) * 2020-10-28 2023-09-29 北京中科网威信息技术有限公司 Dual-machine hot backup quick switching method and device
CN112714461A (en) * 2021-01-29 2021-04-27 四川安迪科技实业有限公司 DAMA satellite network central station protection switching method
CN115225397A (en) * 2022-07-22 2022-10-21 山石网科通信技术股份有限公司 Control method, control device, firewall and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN111030877A (en) Main/standby equipment switching method and device
CN105607590B (en) Method and apparatus to provide redundancy in a process control system
US8009556B2 (en) System and method for providing redundant routing capabilities for a network node
US7933198B1 (en) Virtual router failover dampening
JP4437984B2 (en) Network relay device and control method thereof
US8411690B2 (en) Preventing data traffic connectivity between endpoints of a network segment
CN110113259B (en) Path state notification method, path switching method, forwarding equipment and system
CN107612754B (en) Bidirectional forwarding link fault detection method and device and network node equipment
CN106936613B (en) Method and system for rapidly switching main and standby Openflow switch
EP2748989B1 (en) Methods and apparatus for avoiding inter-chassis redundancy switchover to non-functional standby nodes
EP3029883B1 (en) Network protection method and apparatus, next-ring node, and system
CN112217658B (en) Stacking and splitting processing method and device
CN107241208B (en) Message forwarding method, first switch and related system
CN111585797B (en) Ethernet link switching method, device, equipment and computer readable storage medium
CN111447101A (en) Link detection method and device, computer equipment and storage medium
EP3291486B1 (en) Selective transmission of bidirectional forwarding detection (bfd) messages for verifying multicast connectivity
US8218433B2 (en) Monitoring connectivity in ring networks
CN102271049B (en) Method, device and system for setting state of communication equipment
CN115333991B (en) Cross-device link aggregation method, device, system and computer readable storage medium
EP3926900A1 (en) Supporting candidate path selection
CN116016324B (en) Message transmission method, system, device and electronic equipment
CN112653596B (en) Method and device for routing information issuing and gateway equipment switching
CN109218135B (en) BFD detection method and device
CN109802863B (en) Protocol oscillation processing method and device
CN117479226A (en) Traffic processing method, traffic processing device and communication 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200417