CN109586986B - Method, device, equipment and storage medium for switching network equipment - Google Patents
Method, device, equipment and storage medium for switching network equipment Download PDFInfo
- Publication number
- CN109586986B CN109586986B CN201910088075.2A CN201910088075A CN109586986B CN 109586986 B CN109586986 B CN 109586986B CN 201910088075 A CN201910088075 A CN 201910088075A CN 109586986 B CN109586986 B CN 109586986B
- Authority
- CN
- China
- Prior art keywords
- network device
- monitoring
- state
- communication connection
- network
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 238000012544 monitoring process Methods 0.000 claims abstract description 254
- 238000004891 communication Methods 0.000 claims description 228
- 230000006870 function Effects 0.000 claims description 65
- 230000002159 abnormal effect Effects 0.000 claims description 33
- 230000004044 response Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0663—Performing the actions predefined by failover planning, e.g. switching to standby network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application discloses a method, a device, equipment and a storage medium for switching network equipment, wherein the method comprises the following steps: the first network device receives heartbeat messages sent by the second network device, when first priority information of the first network device is the same as second priority information of the second network device, the network device with the function of monitoring the IP is configured, and switching is performed according to the obtained IP monitoring state, so that switching between the main network device and the standby network device is performed in the manner of monitoring the IP state in the silent system.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a storage medium for switching network devices.
Background
A network device is a physical entity that provides network functionality, and network connectivity is affected by network device failure. Therefore, a dual-computer hot standby technology is usually adopted in a network, each network device is configured with a redundant network device, one is used as a main network device, the other is used as a standby network device, and when the main network device fails, the network device is switched to the standby network device to ensure the connectivity of the network.
The silent dual-computer is one of dual-computer hot standby technologies, and the main network device and the standby network device interact with a heartbeat message through a heartbeat interface, where the heartbeat message includes priority information of the network device that sends the heartbeat message. When the main network device works, except the heartbeat interface, the standby network device closes the network interface for receiving and sending messages with other network devices, cannot receive the messages of other network devices, cannot send the messages to other network devices, and only can interact with the main network device to send the heartbeat messages. The silent dual-computer performs the main-standby switching through the heartbeat message, when the heartbeat message indicates that the priority of the main network equipment is lower than that of the standby network equipment, the network interface of the standby network equipment for receiving and transmitting messages of other network equipment is started, and the standby network equipment is switched to the main network equipment.
The priority information in the heartbeat message is determined according to the interface state of the network device, and if the network interface state of the main network device is normal and the main network device fails to normally receive and transmit the message, the priority information in the heartbeat message cannot indicate the failure of the main network device, so that the master-slave switching cannot be realized in time, and the network connectivity is affected.
Disclosure of Invention
The application provides a method, a device, equipment and a storage medium for switching network equipment, wherein a monitoring IP function is arranged on the network equipment, and switching between main network equipment and standby network equipment in a silent dual-machine system is realized according to the monitoring IP state.
Specifically, the method is realized through the following technical scheme:
in a first aspect, a method for switching network devices is provided, where the method is applied to a first network device, the first network device and a second network device form a silent dual-machine system, and both the first network device and the second network device are configured with a function of monitoring an IP address, where the method includes:
the first network device receives a heartbeat message sent by the second network device, wherein the heartbeat message includes second priority information and a second monitoring IP state of the second network device, and the second monitoring IP state is used for representing information of communication connection which can be provided by the second network device;
the first network equipment acquires first priority information and a first monitoring IP state of the first network equipment, wherein the first monitoring IP state is used for representing information of communication connection which can be provided by the first network equipment;
when the first priority information and the second priority information are the same, the first network equipment is switched according to the first monitoring IP state and the second monitoring IP state;
wherein the first network device is a main network device or a standby network device in the silent dual-machine system.
Optionally, the switching, by the first network device, according to the first monitored IP state and the second monitored IP state includes:
the first network device is a main network device, the first monitoring IP state represents that the communication connection of the first network device is abnormal, the second monitoring IP state represents that the communication connection of the second network device is normal, and the first network device is switched to a standby network device;
or,
the first network equipment is standby network equipment, the first monitoring IP state represents that the communication connection of the first network equipment is normal, the second monitoring IP state represents that the communication connection of the second network equipment is abnormal, and the first network equipment is switched into main network equipment.
Optionally, the switching, by the first network device, according to the first monitored IP state and the second monitored IP state includes:
the first network device is a master network device, the first monitoring IP state and the second monitoring IP state represent that the communication connection of the first network device and the second network device is normal, and when the first network device represents that the quality of the communication connection of the first network device is lower than that of the second network device, the first network device is switched to a standby network device;
or,
the first network device is a standby network device, the first monitoring IP state and the second monitoring IP state represent that the communication connection of the first network device and the second network device is normal, and when the first network device is higher than the communication connection quality of the second network device, the first network device is switched to be a main network device.
Optionally, the heartbeat packet further includes a media access control MAC address of the second network device, and the switching by the first network device according to the first monitored IP state and the second monitored IP state includes:
the first network device is a master network device, the first monitoring IP state and the second monitoring IP state represent that the communication connection of the first network device and the second network device is normal, and represent that the quality of the communication connection of the first network device is the same as that of the second network device, the MAC address of the first network device is smaller than that of the second network device, and the first network device is switched to a standby network device;
or,
the first network device is a standby network device, the first monitoring IP state and the second monitoring IP state represent that the communication connection of the first network device and the second network device is normal, and represent that the quality of the communication connection of the first network device is the same as that of the second network device, the MAC address of the first network device is larger than that of the second network device, and the first network device is switched to be a main network device.
In a second aspect, a method for switching network devices is provided, where the method is applied to a first network device, the first network device and a second network device form a silent dual-device system, the first network device is a main network device and is configured with a function of monitoring an IP address, the second network device is a standby network device and is not configured with a function of monitoring an IP address, and the method includes:
the first network device receives a heartbeat message sent by the second network device, wherein the heartbeat message comprises second priority information of the second network device;
the first network equipment acquires first priority information and a monitoring IP state of the first network equipment, wherein the monitoring IP state is used for representing information of communication connection which can be provided by the first network equipment;
and when the first priority information is the same as the second priority information and the monitoring IP state represents that the communication connection of the first network equipment is abnormal, the first network equipment is switched to standby network equipment.
In a third aspect, a device for switching network devices is provided, where the device is applied to a first network device, the first network device and a second network device form a silent dual-network system, and both the first network device and the second network device are configured with a function of monitoring an IP address, and the device includes:
the configuration unit is used for configuring a function of monitoring an Internet Protocol (IP) address;
a receiving unit, configured to receive a heartbeat packet sent by the second network device, where the heartbeat packet includes second priority information of the second network device and a second monitoring IP state, and the second monitoring IP state is used to represent information of communication connection that the second network device can provide;
an obtaining unit, configured to obtain first priority information and a first monitoring IP state of the first network device, where the first monitoring IP state is used to represent information of communication connection that the first network device can provide;
and the switching unit is used for switching according to the first monitoring IP state and the second monitoring IP state when the first priority information and the second priority information are the same.
Optionally, the switching unit includes:
the first switching subunit is configured to switch the first network device to a standby network device, where the first monitoring IP state indicates that the communication connection of the first network device is abnormal, and the second monitoring IP state indicates that the communication connection of the second network device is normal;
or,
and the second switching subunit is used for switching the first network equipment to the master network equipment, wherein the first monitoring IP state represents that the communication connection of the first network equipment is normal, and the second monitoring IP state represents that the communication connection of the second network equipment is abnormal.
Optionally, the switching unit includes:
a third switching subunit, configured to switch the first network device to be a master network device, where the first monitored IP state and the second monitored IP state indicate that communication connections of the first network device and the second network device are normal, and indicate that quality of the communication connection of the first network device is lower than quality of the communication connection of the second network device, and switch to be a standby network device;
or,
and the fourth switching subunit is configured to switch the first network device to be a standby network device, where the first monitoring IP state and the second monitoring IP state indicate that the communication connection between the first network device and the second network device is normal, and indicate that the quality of the communication connection between the first network device and the second network device is higher than that of the second network device, and switch the first network device to be a main network device.
Optionally, the heartbeat packet further includes a media access control MAC address of the second network device, and the switching unit includes:
a fifth switching subunit, configured to switch the first network device to a standby network device, where the first monitored IP state and the second monitored IP state indicate that communication connections of the first network device and the second network device are normal, and indicate that quality of the communication connection of the first network device is the same as quality of the communication connection of the second network device, and the MAC address of the first network device is smaller than that of the second network device;
or,
a sixth switching subunit, configured to switch the first network device to be a standby network device, where the first monitored IP state and the second monitored IP state indicate that communication connections of the first network device and the second network device are normal, and indicate that quality of the communication connection of the first network device is the same as quality of the communication connection of the second network device, and the MAC address of the first network device is larger than that of the second network device, so as to switch the first network device to be a master network device.
In a fourth aspect, a device for switching network devices is provided, where the device is applied to a first network device, the first network device and a second network device form a silent dual-device system, the first network device is a main network device and is configured with a function of monitoring an IP address, the second network device is a standby network device and is not configured with a function of monitoring an IP address, and the device includes:
the configuration unit is used for configuring a function of monitoring an Internet Protocol (IP) address;
a receiving unit, configured to receive a heartbeat packet sent by the second network device, where the heartbeat packet includes second priority information of the second network device;
an obtaining unit, configured to obtain first priority information and a monitoring IP state of the first network device, where the monitoring IP state is used to represent information of communication connection that the first network device can provide;
and the switching unit is used for switching to the standby network equipment when the first priority information is the same as the second priority information and the monitoring IP state represents that the communication connection of the first network equipment is abnormal.
In a fifth aspect, a first network device is provided, where the first network device and a second network device form a silent dual-network system, and both the first network device and the second network device are configured with a function of monitoring an IP address, where the first network device includes: the system comprises an internal bus, a memory, a processor and an external interface which are connected through the internal bus; wherein,
the memory is used for storing machine readable instructions corresponding to the control logic of file storage;
the processor is configured to read the machine-readable instructions on the memory and execute the instructions to implement the following operations:
receiving a heartbeat message sent by the second network device, where the heartbeat message includes second priority information of the second network device and a second monitoring IP state, and the second monitoring IP state is used to represent information of communication connection that the second network device can provide;
acquiring first priority information and a first monitoring IP state of the first network equipment, wherein the first monitoring IP state is used for representing information of communication connection which can be provided by the first network equipment;
and when the first priority information and the second priority information are the same, switching according to the first monitoring IP state and the second monitoring IP state.
In a sixth aspect, a machine-readable storage medium is provided, where the machine-readable storage medium is disposed on a first network device, where the first network device and a second network device form a silent dual-machine system, and both the first network device and the second network device are configured with a function of monitoring an IP address, where the machine-readable storage medium stores thereon a plurality of computer instructions that, when executed, perform the following processing:
receiving a heartbeat message sent by the second network device, where the heartbeat message includes second priority information of the second network device and a second monitoring IP state, and the second monitoring IP state is used to represent information of communication connection that the second network device can provide;
acquiring first priority information and a first monitoring IP state of the first network equipment, wherein the first monitoring IP state is used for representing information of communication connection which can be provided by the first network equipment;
and when the first priority information and the second priority information are the same, switching according to the first monitoring IP state and the second monitoring IP state.
A seventh aspect provides a first network device, where the first network device and a second network device form a silent dual-network system, the first network device is a master network device and configured with a function of monitoring an IP address of an internet protocol, the second network device is a standby network device and not configured with the function of monitoring the IP address, and the first network device includes: the system comprises an internal bus, a memory, a processor and an external interface which are connected through the internal bus; wherein,
the memory is used for storing machine readable instructions corresponding to the control logic of file storage;
the processor is configured to read the machine-readable instructions on the memory and execute the instructions to implement the following operations:
receiving a heartbeat message sent by the second network equipment, wherein the heartbeat message comprises second priority information of the second network equipment;
acquiring first priority information and a monitoring IP state of the first network equipment, wherein the monitoring IP state is used for representing information of communication connection which can be provided by the first network equipment;
and when the first priority information is the same as the second priority information and the monitoring IP state represents that the communication connection of the first network equipment is abnormal, switching to the standby network equipment.
In an eighth aspect, a machine-readable storage medium is provided, where the first network device and a second network device disposed on a first network device form a silent dual-machine system, the first network device is a master network device and configured with a function of monitoring an IP address of an internet protocol, the second network device is a standby network device and not configured with a function of monitoring an IP address, and the machine-readable storage medium stores thereon a plurality of computer instructions, and when executed, the computer instructions perform the following processing:
receiving a heartbeat message sent by the second network equipment, wherein the heartbeat message comprises second priority information of the second network equipment;
acquiring first priority information and a monitoring IP state of the first network equipment, wherein the monitoring IP state is used for representing information of communication connection which can be provided by the first network equipment;
and when the first priority information is the same as the second priority information and the monitoring IP state represents that the communication connection of the first network equipment is abnormal, switching to the standby network equipment.
As can be seen from the above, the technical solution provided by the embodiment of the present application has the following advantages: the first network device receives heartbeat messages sent by the second network device, when first priority information of the first network device is the same as second priority information of the second network device, the network device with the function of monitoring the IP is configured, and switching is performed according to the obtained IP monitoring state, so that switching between the main network device and the standby network device is performed in the manner of monitoring the IP state in the silent system.
Drawings
Fig. 1 is a schematic structural diagram of a silent dual-computer system according to an embodiment of the present application;
fig. 2 is a flowchart of a method for switching a network device according to an embodiment of the present application;
fig. 3 is a flowchart of another method for switching network devices according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a network device switching apparatus according to an embodiment of the present application
Fig. 5 is a schematic structural diagram of another apparatus for switching network devices according to an embodiment of the present application;
fig. 6 is a schematic hardware structure diagram of a first network device according to an embodiment of the present application;
fig. 7 is a schematic hardware structure diagram of another first network device according to an embodiment of 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 silent dual-computer system comprises a main network device and a standby network device, wherein the main network device and the standby network device interact heartbeat messages through heartbeat interfaces, and the heartbeat messages comprise priority information of the network device which sends the heartbeat messages. The main network equipment receives heartbeat messages sent by the standby network equipment, the heartbeat messages sent by the standby network equipment comprise priority information of the standby network equipment, the main network equipment compares the priority information with the priority information of the standby network equipment, and if the priority of the main network equipment is higher than that of the standby network equipment, switching is not performed; and if the priority of the main network equipment is lower than that of the standby network equipment, switching the main network equipment to the standby network equipment and switching the standby network equipment to the main network equipment.
The priority information in the heartbeat message is determined according to the state of the network interface of the network equipment. For example, for a network device, the initial priority information is 100, the priority information of each network interface is 10, when the network interfaces are all normal, the priority information carried in the heartbeat message of the network device is 100, when there is a network interface failure, 10 is subtracted from the initial priority information, the priority information carried in the heartbeat message is 90, and so on.
However, if the main network device fails, the main network device cannot normally receive and transmit the message, but if the network interface state of the main network device is normal, the priority information in the heartbeat message cannot indicate that the main network device fails, and the main-standby switching cannot be realized in time, which affects the network connectivity.
In order to solve the above problem, embodiments of the present application provide a technical solution for network device switching, which is described in detail below.
Exemplary method
Fig. 1 is a schematic structural diagram of a silent dual-machine system according to an embodiment of the present application, where the silent dual-machine system includes a first network device 101 and a second network device 102, and the first network device 101 and the second network device 102 are connected through a heartbeat interface to interact heartbeat messages.
At least the first network device 101 is configured with a function of monitoring an IP Address (Internet Protocol Address). When the first network device 101 performs monitoring the IP address, it periodically establishes a communication connection with an external network device in the network except the silent dual-computer system, so as to record information of establishing the communication connection, including a result of establishing the communication connection and a response time required for establishing the communication connection.
The communication connection may be established in an ICMP (internet Control Message protocol) manner, that is, an ICMP request Message is sent to an external network device, and an ICMP response Message is received within a timeout period, so that the result of establishing the communication connection is a connection, and the response time required for successfully establishing the communication connection is recorded. If the ICMP response message is not received within the overtime time, the communication connection is established, and the communication is abnormal.
The communication connection may be established in a TCP (Transmission Control Protocol) manner, that is, a TCP request message is sent to an external network device, and a TCP response message and a TCP handshake message are received within a timeout period, so that the communication connection is established and response time required for successfully establishing the communication connection is recorded. If the TCP response message is not received within the timeout period, the communication connection is established, and the communication is abnormal.
Of course, it may also establish a communication connection with an external network device in another manner, and perform the function of monitoring the IP address to represent the quality of the communication connection of the first network device 101, which is not described herein.
Fig. 2 is a flowchart of a method for switching network devices according to an embodiment of the present application, where in the embodiment shown in fig. 2, both a first network device and a second network device are configured with a function of monitoring an IP address, and the method includes:
the first network device receives a heartbeat message sent by the second network device, wherein the heartbeat message includes second priority information and a second monitoring IP state of the second network device, and the second monitoring IP state is used for representing information of communication connection which can be provided by the second network device.
The first network device obtains first priority information and a first monitoring IP state of the first network device, wherein the first monitoring IP state is used for representing information of communication connection which can be provided by the first network device.
The first network device is configured with a function of monitoring an IP address, and tries to establish communication connection with the external network device at preset time intervals. A first listening IP state is maintained in the first network device, the first listening IP state being used to characterize information of the communication connections that the first network device is capable of providing.
The first monitoring IP state comprises a communication connection result, and when the first network equipment and the external network equipment establish communication connection successfully, the communication connection result is that the communication connection is normal; when the first network equipment fails to establish the communication connection with the external equipment, the communication connection result is abnormal communication connection.
The first listening IP state may further include a response time, which represents a time period required for the first network device to establish a communication connection with the external network device. It can be understood that the shorter the response time of the first network device to establish the communication connection with the external network device, the faster the communication connection speed that can be provided by the first network device, the better the quality of the communication connection; the longer the response time for the first network device to establish a communication connection with the external network device, the slower the speed of the communication connection that can be provided by the first network device, and the worse the quality of the communication connection.
The first network device also determines first priority information of the first network device according to a state of an interface interacting with the external network device.
The same principle is that: the second network device is configured with a function of monitoring the IP address, and tries to establish communication connection with the external network device at preset time intervals. A second listening IP state is maintained in the second network device, where the second listening IP state is used to represent information of communication connections that the second network device can provide.
The second monitoring IP state comprises a communication connection result, and when the second network equipment and the external network equipment establish communication connection successfully, the communication connection result is that the communication connection is normal; when the second network device fails to establish the communication connection with the external device, the communication connection result is that the communication connection is abnormal.
The second listening IP state may further include a response time, which represents a time period required for the second network device to establish a communication connection with the external network device. It can be understood that the shorter the response time of the second network device to establish the communication connection with the external network device, the faster the communication connection speed that can be provided by the second network device, the better the quality of the communication connection; the longer the response time for the second network device to establish a communication connection with the external network device, the slower the speed of the communication connection that can be provided by the second network device, and the worse the quality of the communication connection.
The second network device also determines second priority information of the second network device according to a state of an interface interacting with the external network device.
It should be noted that, when the first network device and the second network device are both configured with the function of monitoring the IP address, if the first network device is a standby network device, a network interface on the first network device interacting with an external network device is turned on, and a message related to the function of monitoring the IP address can be normally received and transmitted; similarly, if the second network device is a standby network device, the network interface on the second network device interacting with the external network device is opened, and the message related to the function of monitoring the IP address can be normally received and transmitted.
The first network equipment and the second network equipment in the same silent dual-computer system interact heartbeat messages through a heartbeat interface. The first network equipment sends a heartbeat message to the second network equipment, wherein the heartbeat message comprises first priority information and a first monitoring IP state. The first priority information represents the state of a network interface of the first network device interacting with the external network device, and the first monitoring IP state is used for representing the information of the communication connection which can be provided by the first network device. In a similar way, the second network device sends a heartbeat message to the first network device, where the heartbeat message includes the second priority information and the second monitored IP state. The second priority information represents a state of a network interface where the second network device interacts with the external network device, and the second monitoring IP state is used to represent information of communication connection that the second network device can provide.
And the first network equipment performs active-standby switching according to the first priority information and the first monitoring IP state of the first network equipment, and the second priority information and the second monitoring IP state in the received heartbeat message. In a similar way, the second network device performs active-standby switching according to the second priority information and the second monitored IP state of the second network device, and the first priority information and the first monitored IP state in the received heartbeat message.
Therefore, the first network device and the second network device interact through the heartbeat message, and the interaction includes not only priority information representing the interface state, but also a monitoring IP state representing the quality of the established communication connection.
And 203, when the first priority information and the second priority information are the same, the first network equipment is switched according to the first monitoring IP state and the second monitoring IP state.
In one example, if the first priority information and the second priority information are different, if the first priority information is high, the first network device is a master network device, and the second network device is a standby network device; if the second priority information is high, the first network device is a standby network device, and the second network device is a main network device. If the main/standby judgment result is consistent with the current actual main/standby condition, the main/standby switching is not executed; and if the main/standby judgment result is inconsistent with the current actual main/standby condition, executing main/standby switching.
In this embodiment, if the first priority information is the same as the second priority information, it indicates that the network interface states of the first network device and the second network device are the same. At this time, the master/slave switching is performed according to the monitored IP state representing the quality of the established communication connection, and specific implementation examples are described one by one below.
A first switching example: the first network device is a main network device, the first monitoring IP state represents that the communication connection of the first network device is abnormal, the second monitoring IP state represents that the communication connection of the second network device is normal, and the first network device is switched to a standby network device. At this time, the second network device is a standby network device, the first monitoring IP state represents that the communication connection of the first network device is abnormal, the second monitoring IP state represents that the communication connection of the second network device is normal, and the second network device is switched to the master network device.
A second handover example: the first network equipment is standby network equipment, the first monitoring IP state represents that the communication connection of the first network equipment is normal, the second monitoring IP state represents that the communication connection of the second network equipment is abnormal, and the first network equipment is switched into main network equipment. At this time, the second network device is the master network device, the first monitoring IP state represents that the communication connection of the first network device is normal, the second monitoring IP state represents that the communication connection of the second network device is abnormal, and the second network device is switched to the standby network device.
Then, it indicates that the first priority information and the second priority information are the same, and selects the network device with normal communication connection as the main network device and selects the network device with abnormal communication connection as the standby network device. If the main/standby judgment result is consistent with the current actual main/standby condition, the main/standby switching is not executed; and if the main/standby judgment result is inconsistent with the current actual main/standby condition, executing main/standby switching.
The third switching example: the first network device is a master network device, the first monitoring IP state and the second monitoring IP state represent that the communication connection of the first network device and the second network device is normal, and when the first network device represents that the quality of the communication connection of the first network device is lower than that of the second network device, the first network device is switched to a standby network device. At this time, the second network device is a standby network device, the first monitoring IP state and the second monitoring IP state represent that the communication connection between the first network device and the second network device is normal, and when the first network device represents that the quality of the communication connection between the first network device and the second network device is lower than that of the second network device, the second network device is switched to the main network device.
A fourth switching example: the first network device is a standby network device, the first monitoring IP state and the second monitoring IP state represent that the communication connection of the first network device and the second network device is normal, and when the first network device is higher than the communication connection quality of the second network device, the first network device is switched to be a main network device. At this time, the second network device is the master network device, the first monitoring IP state and the second monitoring IP state represent that the communication connection between the first network device and the second network device is normal, and when the representation that the quality of the communication connection between the first network device and the second network device is higher than that of the first network device, the second network device is switched to the standby network device.
The quality of the communication connection is measured by response time in the monitoring IP state, and the shorter the response time for establishing the communication connection by continuously presetting the number is, the higher the quality of the communication connection is; the longer the response time taken for establishing a communication connection with a preset number of consecutive numbers, the lower the quality of the communication connection.
When the first priority information and the second priority information are the same and the communication connection is normal, the network device with high communication connection quality is selected as the main network device, and the network device with low communication connection quality is selected as the standby network device. If the main/standby judgment result is consistent with the current actual main/standby condition, the main/standby switching is not executed; and if the main/standby judgment result is inconsistent with the current actual main/standby condition, executing main/standby switching.
The heartbeat messages interacted between the first network device and the second network device through the heartbeat interface may further include a Media Access Control (MAC) Address.
A fifth switching example: the first network device is a master network device, the first monitoring IP state and the second monitoring IP state represent that the communication connection of the first network device and the second network device is normal, and represent that the quality of the communication connection of the first network device is the same as that of the second network device, the MAC address of the first network device is smaller than that of the second network device, and the first network device is switched to a standby network device. At this time, the second network device is a standby network device, the first monitoring IP state and the second monitoring IP state represent that the communication connection between the first network device and the second network device is normal, and represent that the quality of the communication connection between the first network device and the second network device is the same as that of the communication connection between the first network device and the second network device, the MAC address of the first network device is smaller than that of the second network device, and the second network device is switched to be the main network device.
A sixth switching example: the first network device is a standby network device, the first monitoring IP state and the second monitoring IP state represent that the communication connection of the first network device and the second network device is normal, and represent that the quality of the communication connection of the first network device is the same as that of the second network device, the MAC address of the first network device is larger than that of the second network device, and the first network device is switched to be a main network device. At this time, the second network device is the master network device, the first monitoring IP state and the second monitoring IP state represent that the communication connection between the first network device and the second network device is normal, and represent that the quality of the communication connection between the first network device and the second network device is the same, the MAC address of the first network device is larger than that of the second network device, and the second network device is switched to the standby network device.
When the first priority information and the second priority information are the same and the communication connection is normal, and the communication connection quality is the same, the network device with the small MAC address is selected as the master network device, and the network device with the large MAC address is selected as the standby network device. If the main/standby judgment result is consistent with the current actual main/standby condition, the main/standby switching is not executed; and if the main/standby judgment result is inconsistent with the current actual main/standby condition, executing main/standby switching.
In each of the above examples shown in fig. 2, when the main network device is switched to the standby network device, the network interface of the main network device only interacts with the external network device to monitor the message related to the IP address function; when the standby Network device is switched to the main Network device, the Network interface of the standby Network device and the external device normally interact with a Network message, an IP Address of the Network interface of the standby Network device and an ARP (Address Protocol) of a public Network Address of NAT (Network Address Translation) are notified to the Network interface of the interconnected external Network device, the interconnected external Network device is notified to update a forwarding table item, and therefore the interconnected external Network device can send the Network message to a new main Network device, and the main-standby switching is achieved.
As can be seen from the above, in the embodiment of the present application, the network device with the function of monitoring the IP is configured, when the priority information of the main network device and the standby network device is the same, the switching is performed according to the obtained monitored IP state, and in the muting system, a technical scheme for implementing the switching between the main network device and the standby network device by using the method of monitoring the IP state is provided, so that communication interruption caused by a normal interface state and a network device failure is avoided.
Fig. 3 is a flowchart of another method for switching network devices according to an embodiment of the present application, where the method is applied to a first network device, where the first network device and a second network device form a silent dual-device system, the first network device is a main network device and configured with a function of monitoring an IP address, and the second network device is a standby network device and not configured with a function of monitoring an IP address, and the method includes:
301, the first network device receives a heartbeat message sent by the second network device, wherein the heartbeat message includes second priority information of the second network device.
The first network device obtains first priority information of the first network device and a monitoring IP state, wherein the monitoring IP state is used for representing information of communication connection which can be provided by the first network device.
And 303, when the first priority information is the same as the second priority information and the monitoring IP state represents that the communication connection of the first network equipment is abnormal, switching the first network equipment into standby network equipment.
The first network equipment is main network equipment, is configured with a function of monitoring an IP address, and can acquire a monitoring IP state so as to represent information of establishing communication connection between the first network equipment and external network equipment. The second network device is a standby network device, a network interface interacting with the external network device is closed, and the function of monitoring the IP address is not configured. And the second network equipment sends a heartbeat message to the first network equipment, wherein the heartbeat message only comprises second priority information of the second network equipment.
The first network device compares the local first priority information with the second priority information, and if the first priority information is higher than the second priority information, the primary/standby switching is not performed. If the first priority information is the same as the second priority information and the monitoring IP state indicates that the communication connection established between the first network device and the external device is normal, the master-slave switching is not performed.
And if the first priority information is the same as the second priority information and the monitoring IP state represents that the communication connection established between the first network equipment and the external equipment is abnormal, switching the first network equipment into standby network equipment. At this point, the second network device is switched to the master network device.
It should be noted that, when the main network device is switched to the standby network device, the network interface for the communication between the main network device and the external network device is closed; the standby network equipment starts a network interface communicated with the external network equipment, informs the IP address of the network interface of the standby network equipment and the ARP of the public network address of the NAT to the network interfaces of the interconnected external network equipment, and informs the interconnected external network equipment to update a forwarding table entry, so that the interconnected external network equipment can send a network message to the new main network equipment, and the main-standby switching is realized.
Therefore, although the first priority information and the second priority information are the same and indicate that the external interface states of the first network device and the second network device are the same, when the monitored IP state indicates that the communication connection established between the first network device and the external network device is abnormal, the first network device fails, at this time, the first network device is switched from the main network device to the standby network device, and the second network device is switched from the standby network device to the main network device. In the silent dual-computer system, the main-standby switching realized by adopting the function of monitoring the IP address is provided. And communication interruption caused by normal interface state and network equipment failure is avoided.
Exemplary devices
Fig. 4 is a schematic structural diagram of a network device switching apparatus provided in this embodiment, and is applied to a first network device, where the first network device and a second network device form a silent dual-network system, and both the first network device and the second network device are configured with a function of monitoring an IP address, where the function includes:
a configuration unit 401, configured to configure a function of monitoring an internet protocol IP address.
A receiving unit 402, configured to receive a heartbeat packet sent by the second network device, where the heartbeat packet includes second priority information and a second monitoring IP state of the second network device, and the second monitoring IP state is used to represent information of a communication connection that the second network device can provide.
An obtaining unit 403, configured to obtain first priority information and a first monitoring IP status of the first network device, where the first monitoring IP status is used to represent information of communication connection that can be provided by the first network device.
A switching unit 404, configured to switch according to the first monitored IP state and the second monitored IP state when the first priority information and the second priority information are the same.
In one example, the switching unit includes:
the first switching subunit is configured to switch the first network device to a standby network device, where the first monitoring IP state indicates that the communication connection of the first network device is abnormal, and the second monitoring IP state indicates that the communication connection of the second network device is normal;
or,
and the second switching subunit is used for switching the first network equipment to the master network equipment, wherein the first monitoring IP state represents that the communication connection of the first network equipment is normal, and the second monitoring IP state represents that the communication connection of the second network equipment is abnormal.
In one example, the switching unit includes:
a third switching subunit, configured to switch the first network device to be a master network device, where the first monitored IP state and the second monitored IP state indicate that communication connections of the first network device and the second network device are normal, and indicate that quality of the communication connection of the first network device is lower than quality of the communication connection of the second network device, and switch to be a standby network device;
or,
and the fourth switching subunit is configured to switch the first network device to be a standby network device, where the first monitoring IP state and the second monitoring IP state indicate that the communication connection between the first network device and the second network device is normal, and indicate that the quality of the communication connection between the first network device and the second network device is higher than that of the second network device, and switch the first network device to be a main network device.
In one example, the heartbeat packet further includes a media access control MAC address of the second network device, and the switching unit includes:
a fifth switching subunit, configured to switch the first network device to a standby network device, where the first monitored IP state and the second monitored IP state indicate that communication connections of the first network device and the second network device are normal, and indicate that quality of the communication connection of the first network device is the same as quality of the communication connection of the second network device, and the MAC address of the first network device is smaller than that of the second network device;
or,
a sixth switching subunit, configured to switch the first network device to be a standby network device, where the first monitored IP state and the second monitored IP state indicate that communication connections of the first network device and the second network device are normal, and indicate that quality of the communication connection of the first network device is the same as quality of the communication connection of the second network device, and the MAC address of the first network device is larger than that of the second network device, so as to switch the first network device to be a master network device.
The apparatus shown in fig. 4 is a device corresponding to the method shown in fig. 2, and the specific implementation manner is similar to that described in the method shown in fig. 2, and is not described again here.
Fig. 5 is a schematic structural diagram of another apparatus for switching network devices according to an embodiment of the present application, where the apparatus is applied to a first network device, the first network device and a second network device form a silent dual-device system, the first network device is a main network device and is configured with a function of monitoring an IP address, and the second network device is a standby network device and is not configured with a function of monitoring an IP address, and the apparatus includes:
a configuration unit 501, configured to configure a function of monitoring an IP address of an internet protocol.
A receiving unit 502, configured to receive a heartbeat packet sent by the second network device, where the heartbeat packet includes second priority information of the second network device.
An obtaining unit 503, configured to obtain first priority information of the first network device and a monitoring IP state, where the monitoring IP state is used to represent information of a communication connection that can be provided by the first network device.
A switching unit 504, configured to switch to a standby network device when the first priority information is the same as the second priority information and the monitored IP state indicates that the communication connection of the first network device is abnormal.
The apparatus shown in fig. 5 is a device corresponding to the method shown in fig. 3, and the specific implementation manner is similar, and reference is made to the description in the method shown in fig. 3, which is not repeated here.
Referring to fig. 6, which is a schematic view of an embodiment of a first network device in the present application, the first network device and a second network device form a silent dual-machine system, and both the first network device and the second network device are configured with a function of monitoring an IP address, and the first network device may include: an internal bus 610, and a memory 620, a processor 630, and an external interface 640 connected through the internal bus 610.
The memory 620 is used for storing machine readable instructions corresponding to control logic of file storage;
the processor 630 is configured to read the machine-readable instructions on the memory and execute the instructions to implement the following operations:
receiving a heartbeat message sent by the second network device, where the heartbeat message includes second priority information of the second network device and a second monitoring IP state, and the second monitoring IP state is used to represent information of communication connection that the second network device can provide;
acquiring first priority information and a first monitoring IP state of the first network equipment, wherein the first monitoring IP state is used for representing information of communication connection which can be provided by the first network equipment;
and when the first priority information and the second priority information are the same, switching according to the first monitoring IP state and the second monitoring IP state.
In addition, the flow of network device switching shown in this embodiment of the present application may also be included in a computer-readable storage medium, where the computer-readable storage medium is disposed on a first network device, the first network device and a second network device constitute a silent dual-machine system, both the first network device and the second network device are configured with a function of monitoring an IP address, the storage medium may be connected to a processing device that executes instructions, and the storage medium stores machine-readable instructions corresponding to control logic of file storage, where the instructions are executable by the processing device, and the machine-readable instructions are used to implement the following operations:
receiving a heartbeat message sent by the second network device, where the heartbeat message includes second priority information of the second network device and a second monitoring IP state, and the second monitoring IP state is used to represent information of communication connection that the second network device can provide;
acquiring first priority information and a first monitoring IP state of the first network equipment, wherein the first monitoring IP state is used for representing information of communication connection which can be provided by the first network equipment;
and when the first priority information and the second priority information are the same, switching according to the first monitoring IP state and the second monitoring IP state.
Referring to fig. 7, which is a schematic view of an embodiment of a first network device in the present application, the first network device and a second network device form a silent dual-machine system, the first network device is a master network device and configured with a function of monitoring an IP address, the second network device is a standby network device and not configured with the function of monitoring the IP address, and the first network device may include: an internal bus 710, and a memory 720, a processor 730, and an external interface 740 connected through the internal bus 710.
The memory 720 is used for storing machine readable instructions corresponding to control logic of file storage;
the processor 730 is configured to read the machine-readable instructions stored in the memory, and execute the instructions to:
receiving a heartbeat message sent by the second network equipment, wherein the heartbeat message comprises second priority information of the second network equipment;
acquiring first priority information and a monitoring IP state of the first network equipment, wherein the monitoring IP state is used for representing information of communication connection which can be provided by the first network equipment;
and when the first priority information is the same as the second priority information and the monitoring IP state represents that the communication connection of the first network equipment is abnormal, switching to the standby network equipment.
In addition, the flow of switching network devices shown in this embodiment of the present application may also be included in a computer-readable storage medium, where the computer-readable storage medium is disposed on a first network device, the first network device and a second network device constitute a silent dual-machine system, the first network device is a main network device and is configured with a function of monitoring an IP address, the second network device is a standby network device and is not configured with a function of monitoring an IP address, the storage medium may be connected to a processing device that executes instructions, and the storage medium stores machine-readable instructions corresponding to control logic of file storage, where the instructions are executable by the processing device, and the machine-readable instructions are used to implement the following operations:
receiving a heartbeat message sent by the second network equipment, wherein the heartbeat message comprises second priority information of the second network equipment;
acquiring first priority information and a monitoring IP state of the first network equipment, wherein the monitoring IP state is used for representing information of communication connection which can be provided by the first network equipment;
and when the first priority information is the same as the second priority information and the monitoring IP state represents that the communication connection of the first network equipment is abnormal, switching to the standby network equipment.
In the embodiments of the present application, the computer readable storage medium may be in various forms, such as, in different examples: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof. In particular, the computer readable medium may be paper or another suitable medium upon which the program is printed. Using these media, the programs can be electronically captured (e.g., optically scanned), compiled, interpreted, and processed in a suitable manner, and then stored in a computer medium.
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 (14)
1. A method for switching network equipment is applied to a first network equipment, the first network equipment and a second network equipment form a silent dual-machine system, both the first network equipment and the second network equipment are configured with a function of monitoring an Internet Protocol (IP) address, the function of monitoring the IP address is to establish a communication connection with an external network equipment except the silent dual-machine system so as to record information of establishing the communication connection with the external network equipment, and the method comprises the following steps:
the first network device receives a heartbeat message sent by the second network device, wherein the heartbeat message includes second priority information and a second monitoring IP state of the second network device, and the second monitoring IP state is used for representing information of communication connection which can be provided by the second network device;
the first network equipment acquires first priority information and a first monitoring IP state of the first network equipment, wherein the first monitoring IP state is used for representing information of communication connection which can be provided by the first network equipment;
when the first priority information and the second priority information are the same, the first network equipment is switched according to the first monitoring IP state and the second monitoring IP state;
wherein the first network device is a main network device or a standby network device in the silent dual-machine system.
2. The method of claim 1, wherein switching by the first network device according to the first listening IP state and the second listening IP state comprises:
the first network device is a main network device, the first monitoring IP state represents that the communication connection of the first network device is abnormal, the second monitoring IP state represents that the communication connection of the second network device is normal, and the first network device is switched to a standby network device;
or,
the first network equipment is standby network equipment, the first monitoring IP state represents that the communication connection of the first network equipment is normal, the second monitoring IP state represents that the communication connection of the second network equipment is abnormal, and the first network equipment is switched into main network equipment.
3. The method of claim 1, wherein switching by the first network device according to the first listening IP state and the second listening IP state comprises:
the first network device is a master network device, the first monitoring IP state and the second monitoring IP state represent that the communication connection of the first network device and the second network device is normal, and when the first network device represents that the quality of the communication connection of the first network device is lower than that of the second network device, the first network device is switched to a standby network device;
or,
the first network device is a standby network device, the first monitoring IP state and the second monitoring IP state represent that the communication connection of the first network device and the second network device is normal, and when the first network device is higher than the communication connection quality of the second network device, the first network device is switched to be a main network device.
4. The method of claim 1, wherein the heartbeat packet further includes a Media Access Control (MAC) address of the second network device, and wherein switching by the first network device according to the first monitored IP state and the second monitored IP state comprises:
the first network device is a master network device, the first monitoring IP state and the second monitoring IP state represent that the communication connection of the first network device and the second network device is normal, and represent that the quality of the communication connection of the first network device and the second network device is the same, the MAC address of the first network device is smaller than that of the second network device, and the first network device is switched to a standby network device;
or,
the first network device is a standby network device, the first monitoring IP state and the second monitoring IP state represent that the communication connection of the first network device and the second network device is normal, and represent that the quality of the communication connection of the first network device and the second network device is the same, the MAC address of the first network device is larger than that of the second network device, and the first network device is switched to be a main network device.
5. A method for switching network equipment is applied to first network equipment, the first network equipment and second network equipment form a silent dual-computer system, the first network equipment is main network equipment and is configured with a function of monitoring an Internet Protocol (IP) address, the second network equipment is standby network equipment and is not configured with a function of monitoring an IP address, the function of monitoring the IP address is to establish communication connection with external network equipment except the silent dual-computer system so as to record information of establishing communication connection with the external network equipment, and the method comprises the following steps:
the first network device receives a heartbeat message sent by the second network device, wherein the heartbeat message comprises second priority information of the second network device;
the first network equipment acquires first priority information and a monitoring IP state of the first network equipment, wherein the monitoring IP state is used for representing information of communication connection which can be provided by the first network equipment;
and when the first priority information is the same as the second priority information and the monitoring IP state represents that the communication connection of the first network equipment is abnormal, the first network equipment is switched to standby network equipment.
6. A network device switching device is applied to a first network device, the first network device and a second network device form a silent dual-machine system, both the first network device and the second network device are configured with a function of monitoring an Internet Protocol (IP) address, the function of monitoring the IP address is to establish a communication connection with an external network device except the silent dual-machine system so as to record information of establishing the communication connection with the external network device, and the device comprises:
the configuration unit is used for configuring a function of monitoring an Internet Protocol (IP) address;
a receiving unit, configured to receive a heartbeat packet sent by the second network device, where the heartbeat packet includes second priority information of the second network device and a second monitoring IP state, and the second monitoring IP state is used to represent information of communication connection that the second network device can provide;
an obtaining unit, configured to obtain first priority information and a first monitoring IP state of the first network device, where the first monitoring IP state is used to represent information of communication connection that the first network device can provide;
and the switching unit is used for switching according to the first monitoring IP state and the second monitoring IP state when the first priority information and the second priority information are the same.
7. The apparatus of claim 6, wherein the switching unit comprises:
the first switching subunit is configured to switch the first network device to a standby network device, where the first monitoring IP state indicates that the communication connection of the first network device is abnormal, and the second monitoring IP state indicates that the communication connection of the second network device is normal;
or,
and the second switching subunit is used for switching the first network equipment to the master network equipment, wherein the first monitoring IP state represents that the communication connection of the first network equipment is normal, and the second monitoring IP state represents that the communication connection of the second network equipment is abnormal.
8. The apparatus of claim 6, wherein the switching unit comprises:
a third switching subunit, configured to switch the first network device to be a master network device, where the first monitored IP state and the second monitored IP state indicate that communication connections of the first network device and the second network device are normal, and indicate that quality of the communication connection of the first network device is lower than quality of the communication connection of the second network device, and switch to be a standby network device;
or,
and the fourth switching subunit is configured to switch the first network device to be a standby network device, where the first monitoring IP state and the second monitoring IP state indicate that the communication connection between the first network device and the second network device is normal, and indicate that the quality of the communication connection between the first network device and the second network device is higher than that of the second network device, and switch the first network device to be a main network device.
9. The apparatus according to claim 6, wherein the heartbeat packet further includes a Media Access Control (MAC) address of the second network device, and the switching unit includes:
a fifth switching subunit, configured to switch the first network device to a standby network device, where the first monitored IP state and the second monitored IP state indicate that communication connections of the first network device and the second network device are normal, and indicate that quality of the communication connections of the first network device and the second network device is the same, and the MAC address of the first network device is smaller than that of the second network device;
or,
a sixth switching subunit, configured to switch the first network device to be a standby network device, where the first monitored IP state and the second monitored IP state indicate that communication connections of the first network device and the second network device are normal, and indicate that quality of the communication connections of the first network device and the second network device is the same, and the MAC address of the first network device is larger than that of the second network device, so as to switch the first network device to be a main network device.
10. A network equipment switching device is applied to a first network equipment, the first network equipment and a second network equipment form a silent dual-machine system, the first network equipment is a main network equipment and is configured with a function of monitoring an Internet Protocol (IP) address, the second network equipment is a standby network equipment and is not configured with a function of monitoring the IP address, the function of monitoring the IP address is to establish communication connection with an external network equipment except the silent dual-machine system so as to record information of establishing communication connection with the external network equipment, and the device comprises:
the configuration unit is used for configuring a function of monitoring an Internet Protocol (IP) address;
a receiving unit, configured to receive a heartbeat packet sent by the second network device, where the heartbeat packet includes second priority information of the second network device;
an obtaining unit, configured to obtain first priority information and a monitoring IP state of the first network device, where the monitoring IP state is used to represent information of communication connection that the first network device can provide;
and the switching unit is used for switching to the standby network equipment when the first priority information is the same as the second priority information and the monitoring IP state represents that the communication connection of the first network equipment is abnormal.
11. A first network device, wherein the first network device and a second network device constitute a silent dual-machine system, and both the first network device and the second network device are configured with a function of monitoring an IP address, where the function of monitoring the IP address is to establish a communication connection with an external network device other than the silent dual-machine system, so as to record information of establishing the communication connection with the external network device, and the first network device includes: the system comprises an internal bus, a memory, a processor and an external interface which are connected through the internal bus; wherein,
the memory is used for storing machine readable instructions corresponding to the control logic of file storage;
the processor is configured to read the machine-readable instructions on the memory and execute the instructions to implement the following operations:
receiving a heartbeat message sent by the second network device, where the heartbeat message includes second priority information of the second network device and a second monitoring IP state, and the second monitoring IP state is used to represent information of communication connection that the second network device can provide;
acquiring first priority information and a first monitoring IP state of the first network equipment, wherein the first monitoring IP state is used for representing information of communication connection which can be provided by the first network equipment;
and when the first priority information and the second priority information are the same, switching according to the first monitoring IP state and the second monitoring IP state.
12. A machine-readable storage medium, disposed on a first network device, where the first network device and a second network device constitute a silent dual-machine system, and both the first network device and the second network device are configured with a function of monitoring an IP address, where the function of monitoring the IP address is to establish a communication connection with an external network device other than the silent dual-machine system, so as to record information of establishing a communication connection with the external network device, where the machine-readable storage medium stores computer instructions, and when executed by the first network device, the computer instructions perform the following processes:
receiving a heartbeat message sent by the second network device, where the heartbeat message includes second priority information of the second network device and a second monitoring IP state, and the second monitoring IP state is used to represent information of communication connection that the second network device can provide;
acquiring first priority information and a first monitoring IP state of the first network equipment, wherein the first monitoring IP state is used for representing information of communication connection which can be provided by the first network equipment;
and when the first priority information and the second priority information are the same, switching according to the first monitoring IP state and the second monitoring IP state.
13. A first network device, wherein the first network device and a second network device form a silent dual-device system, the first network device is a master network device and configured with a function of monitoring an IP address of an internet protocol, the second network device is a standby network device and not configured with a function of monitoring an IP address, the function of monitoring an IP address is to establish a communication connection with an external network device other than the silent dual-device system, so as to record information of establishing a communication connection with the external network device, and the first network device includes: the system comprises an internal bus, a memory, a processor and an external interface which are connected through the internal bus; wherein,
the memory is used for storing machine readable instructions corresponding to the control logic of file storage;
the processor is configured to read the machine-readable instructions on the memory and execute the instructions to implement the following operations:
receiving a heartbeat message sent by the second network equipment, wherein the heartbeat message comprises second priority information of the second network equipment;
acquiring first priority information and a monitoring IP state of the first network equipment, wherein the monitoring IP state is used for representing information of communication connection which can be provided by the first network equipment;
and when the first priority information is the same as the second priority information and the monitoring IP state represents that the communication connection of the first network equipment is abnormal, switching to the standby network equipment.
14. A machine-readable storage medium, disposed on a first network device, where the first network device and a second network device form a silent dual-network system, the first network device is a master network device and configured with a function of monitoring an IP address of an internet protocol, the second network device is a standby network device and not configured with a function of monitoring the IP address, the function of monitoring the IP address is to establish a communication connection with an external network device other than the silent dual-network system, so as to record information of establishing the communication connection with the external network device, where the machine-readable storage medium has stored thereon a plurality of computer instructions, and when executed by the first network device, the computer instructions perform the following processes:
receiving a heartbeat message sent by the second network equipment, wherein the heartbeat message comprises second priority information of the second network equipment;
acquiring first priority information and a monitoring IP state of the first network equipment, wherein the monitoring IP state is used for representing information of communication connection which can be provided by the first network equipment;
and when the first priority information is the same as the second priority information and the monitoring IP state represents that the communication connection of the first network equipment is abnormal, switching to the standby network equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910088075.2A CN109586986B (en) | 2019-01-29 | 2019-01-29 | Method, device, equipment and storage medium for switching network equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910088075.2A CN109586986B (en) | 2019-01-29 | 2019-01-29 | Method, device, equipment and storage medium for switching network equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109586986A CN109586986A (en) | 2019-04-05 |
CN109586986B true CN109586986B (en) | 2022-04-26 |
Family
ID=65918127
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910088075.2A Active CN109586986B (en) | 2019-01-29 | 2019-01-29 | Method, device, equipment and storage medium for switching network equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109586986B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111030877A (en) * | 2019-12-26 | 2020-04-17 | 杭州迪普科技股份有限公司 | Main/standby equipment switching method and device |
CN114079981B (en) * | 2020-08-06 | 2024-02-02 | 北京佰才邦技术股份有限公司 | Network equipment switching method and network equipment |
CN112737943B (en) * | 2020-12-31 | 2022-11-08 | 长沙湘计海盾科技有限公司 | Modular rapid stacking method, unit, medium and equipment for redundant switch |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103227725A (en) * | 2012-03-30 | 2013-07-31 | 杭州华三通信技术有限公司 | Method and device for dual-server backup of firewall |
CN107465556A (en) * | 2017-09-07 | 2017-12-12 | 郑州云海信息技术有限公司 | A kind of switching method of active/standby server, apparatus and system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013156963A (en) * | 2012-01-31 | 2013-08-15 | Fujitsu Ltd | Control program, control method, information processing apparatus, and control system |
CN106060088B (en) * | 2016-07-26 | 2020-11-06 | 新华三技术有限公司 | Service management method and device |
-
2019
- 2019-01-29 CN CN201910088075.2A patent/CN109586986B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103227725A (en) * | 2012-03-30 | 2013-07-31 | 杭州华三通信技术有限公司 | Method and device for dual-server backup of firewall |
CN107465556A (en) * | 2017-09-07 | 2017-12-12 | 郑州云海信息技术有限公司 | A kind of switching method of active/standby server, apparatus and system |
Also Published As
Publication number | Publication date |
---|---|
CN109586986A (en) | 2019-04-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI642282B (en) | Fail recovery method and internet of things system and charging system using the same | |
CN102439903B (en) | Method, device and system for realizing disaster-tolerant backup | |
EP3047631B1 (en) | Redundancy network protocol system | |
EP2837161B1 (en) | Method and apparatus for indirectly assessing a status of an active entity | |
CN107332726B (en) | Communication link detection method and device | |
CN109586986B (en) | Method, device, equipment and storage medium for switching network equipment | |
CN105607590B (en) | Method and apparatus to provide redundancy in a process control system | |
US20150350043A1 (en) | Methods and arrangements for checking connectivity and detecting connectivity failure | |
JP4527447B2 (en) | Network relay device and control method thereof | |
CN102404146B (en) | Master-slave switching method, network device and DHCP server | |
TW201421232A (en) | Method, apparatus and computer program product for performing failover in a redundancy group | |
US20170214609A1 (en) | Forwarding method and forwarding device | |
JP2005269068A (en) | Home agent duplication method and apparatus thereof | |
US9270558B2 (en) | Method, local gateway, and system for local voice survivability | |
CN108933818B (en) | Communication method and device | |
CN101485141B (en) | Method and system for two-phase mechanism for discovering web services based on management service | |
JP2010103695A (en) | Cluster system, cluster server and cluster control method | |
CN111030877A (en) | Main/standby equipment switching method and device | |
CN106487696B (en) | Link failure detection method and device | |
CN108270593B (en) | Dual-computer hot backup method and system | |
JP6242376B2 (en) | Communication system and subscriber side device | |
CN100555967C (en) | Be used to find be connected to the method and the equipment thereof of the equipment of ip network | |
US20100185755A1 (en) | Systems and Methods for Changing The Address of an Interface | |
JP2017017465A (en) | Address conversion system, address conversion duplication method and program | |
CN101938758B (en) | Acquisition method and device of user interface connecting state |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |