A primary / standby device management method, device, apparatus and machine readable storage medium

CN116708211BActive Publication Date: 2026-09-04XINHUASAN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310571328.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-18
Publication Date
2026-09-04
Estimated Expiration
2043-05-18

AI Technical Summary

Technical Problem

当前RBM是基于设备级的备份管理技术,可以解决上述问题,但是RBM是有主备模式和双主模式,在双主模式下时,由于都是主模式时,因为流量就有不对称的情况,但是双主模式下,表项没有同步,报文会被丢弃,导致流量传输中断

Benefits of technology

[0018] When the primary device loses connection, the backup device actively detects the status of the primary device and decides whether to switch the local device status to become the new primary device based on the detection results, thereby taking over the business traffic and mitigating the potential interruption of business traffic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116708211B_ABST
    Figure CN116708211B_ABST
Patent Text Reader

Abstract

The present disclosure provides a kind of master and backup device management method, device, equipment and machine readable storage medium, the method comprises: in response to the event of master device disconnection, check whether current is configured with virtual router redundancy protocol VRRP;In response to the check result of not being configured with virtual router redundancy protocol VRRP, ICMP probe message is sent to target interface, and the ICMP probe message is used to contact with master device;In response to the event of ICMP probe message contact failure, set local backup device as new master device.Through the technical solution of the present disclosure, backup device in the case where master device disconnection, actively probe the state of master device, and decide whether to switch local device state to become new master device according to the detection result, undertake business traffic, improve the problem that business traffic can be interrupted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of communication technology, and in particular to a method, apparatus, device and machine-readable storage medium for managing primary and backup devices. Background Technology

[0002] As networks carry increasingly more and more critical services, ensuring network reliability and uninterrupted service transmission is crucial. Imagine a device deployed at the network's egress point, handling and forwarding all traffic between the internal and external networks. If this device fails, all services between the internal and external networks will be interrupted. Therefore, using only one device at such a critical network location, regardless of its reliability, carries the risk of network outage due to a single point of failure. Consequently, it's common practice to deploy two devices at critical network locations to enhance reliability. When device one fails, traffic is forwarded through device two, ensuring uninterrupted service transmission between the internal and external networks.

[0003] Dual-machine hot standby (RBM) is a proprietary RBM (Remote Backup Management) protocol that implements device-level high reliability (HA). This technology provides a backup solution when communication lines or equipment fail; if one network node fails, another network node can take over and continue operating.

[0004] Traditional routers and switches rely on interface or traffic redundancy. However, firewalls, which require stateful inspection and auditing based on packets, need to match packets through sessions. When implementing redundant nodes in such devices, not only link-level redundancy is necessary, but also consistency of service entry information and configuration information between the two devices must be ensured to achieve device-level redundancy. Only in this way can uninterrupted traffic transmission be truly guaranteed. Current RBM (Replication Management Machine) technology, based on device-level backup management, can solve the above problems. However, RBM has primary / standby mode and dual-primary mode. In dual-primary mode, since both are in primary mode, traffic asymmetry can occur. Furthermore, in dual-primary mode, if entries are not synchronized, packets may be dropped, leading to traffic interruption. Summary of the Invention

[0005] In view of this, the present disclosure provides a method, apparatus, electronic device, and machine-readable storage medium for managing primary and backup devices to improve the problem of potential traffic interruption.

[0006] The specific technical solution is as follows:

[0007] This disclosure provides a primary / backup device management method applied to a backup device, wherein the backup device is a backup device of a primary / backup device in a dual-machine hot standby system, and the dual-machine hot standby system also includes a primary device. The method includes: in response to an event of primary device disconnection, checking whether a Virtual Router Redundancy Protocol (VRRP) is currently configured; in response to the check result that VRRP is not configured, sending an ICMP probe message to a target interface, wherein the ICMP probe message is used to communicate with the primary device; and in response to an event of ICMP probe message communication failure, setting the local backup device as the new primary device.

[0008] As a technical solution, after the step of checking whether a Virtual Router Redundancy Protocol (VRRP) is currently configured in response to the event of the primary device losing connection, the solution further includes: in response to the check result of the VRRP configuration, detecting the VRRP primary / backup status of the local backup device; if the VRRP primary / backup status of the local backup device changes from backup status to primary status, then setting the local backup device as the new primary device.

[0009] As a technical solution, in response to the check result that no Virtual Router Redundancy Protocol (VRRP) is configured, an ICMP probe message is sent to the target interface. The ICMP probe message is used to communicate with the master device, including: sending ICMP probe messages to the target interface at a preset frequency and a preset number of times. If no ICMP probe message response message is received from the sending master device within a preset time period, the ICMP probe message communication is considered to have failed.

[0010] As a technical solution, after the step of setting the local backup device as the new master device, the method further includes: attempting to contact the original master device, responding to an event of replying to communication with the original master device, interacting with the original master device to back up service entries, and re-electing the master / backup device according to preset rules, wherein the service entries are used for forwarding and processing messages.

[0011] This disclosure also provides a primary / backup device management apparatus for a backup device, wherein the backup device is a backup device of the primary / backup device in a dual-machine hot standby system, and the dual-machine hot standby system further includes a primary device. The apparatus includes: a first module, used to check whether a Virtual Router Redundancy Protocol (VRRP) is currently configured in response to an event of primary device disconnection; a second module, used to send an ICMP probe message to a target interface in response to a check result indicating that VRRP is not configured, the ICMP probe message being used to communicate with the primary device; and a third module, used to set the local backup device as the new primary device in response to an event of ICMP probe message communication failure.

[0012] As a technical solution, in response to the event of the primary device losing connection, the first module checks whether the Virtual Router Redundancy Protocol (VRRP) is currently configured, and then further includes: the second module, in response to the check result of the VRRP configuration, detects the VRRP primary / backup status of the local backup device; and the third module sets the local backup device as the new primary device when the VRRP primary / backup status of the local backup device switches from backup status to primary status.

[0013] As a technical solution, in response to the check result that no Virtual Router Redundancy Protocol (VRRP) is configured, an ICMP probe message is sent to the target interface. The ICMP probe message is used to communicate with the master device, including: sending ICMP probe messages to the target interface at a preset frequency and a preset number of times. If no ICMP probe message response message is received from the sending master device within a preset time period, the ICMP probe message communication is considered to have failed.

[0014] As a technical solution, after the third module sets the local backup device as the new master device, it also includes: attempting to contact the original master device, responding to the event of replying to communication with the original master device, interacting with the original master device to back up service entries, and re-electing the master / backup device according to preset rules, wherein the service entries are used to forward and process messages.

[0015] This disclosure also provides an electronic device, including a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the aforementioned primary / backup device management method.

[0016] This disclosure also provides a machine-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the aforementioned primary / backup device management method.

[0017] The technical solution provided in this disclosure brings at least the following beneficial effects:

[0018] When the primary device loses connection, the backup device actively detects the status of the primary device and decides whether to switch the local device status to become the new primary device based on the detection results, thereby taking over the business traffic and mitigating the potential interruption of business traffic. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments of this disclosure or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings of the embodiments of this disclosure.

[0020] Figure 1 This is a flowchart of a primary and backup equipment management method according to one embodiment of the present disclosure;

[0021] Figure 2 This is a structural diagram of a main / standby equipment management device according to one embodiment of the present disclosure;

[0022] Figure 3 This is a hardware structure diagram of an electronic device according to one embodiment of the present disclosure. Detailed Implementation

[0023] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to any and all possible combinations comprising one or more of the associated listed items.

[0024] It should be understood that although the terms first, second, third, etc., may be used to describe various information in embodiments of this disclosure, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" may also be interpreted as "when," "when," or "in response to a determination."

[0025] This disclosure provides a method, apparatus, electronic device, and machine-readable storage medium for managing primary and backup equipment to improve the aforementioned technical problems.

[0026] The specific technical solution is described below.

[0027] In one embodiment, this disclosure provides a primary / backup device management method applied to a backup device, wherein the backup device is a backup device of a primary / backup device in a dual-machine hot standby system, and the dual-machine hot standby system further includes a primary device. The method includes: in response to an event of primary device disconnection, checking whether a Virtual Router Redundancy Protocol (VRRP) is currently configured; in response to the check result that VRRP is not configured, sending an ICMP probe message to a target interface, wherein the ICMP probe message is used to communicate with the primary device; and in response to an event of ICMP probe message communication failure, setting the local backup device as a new primary device.

[0028] Specifically, such as Figure 1 This includes the following steps:

[0029] Step S11: In response to the event of the master device losing connection, check whether the Virtual Router Redundancy Protocol (VRRP) is currently configured.

[0030] Step S12: In response to the check result that the Virtual Router Redundancy Protocol (VRRP) is not configured, an ICMP probe message is sent to the target interface. The ICMP probe message is used to communicate with the master device.

[0031] Step S13: In response to the ICMP probe message communication failure event, set the local backup device as the new master device.

[0032] When the primary device loses connection, the backup device actively detects the status of the primary device and decides whether to switch the local device status to become the new primary device based on the detection results, thereby taking over the business traffic and mitigating the potential interruption of business traffic.

[0033] In one implementation, after the step of checking whether a Virtual Router Redundancy Protocol (VRRP) is currently configured in response to a primary device disconnection event, the method further includes: in response to the check result of VRRP configuration, detecting the VRRP primary / standby status of the local standby device; if the VRRP primary / standby status of the local standby device changes from standby to primary, then setting the local standby device as the new primary device.

[0034] In one implementation, in response to the check result that no Virtual Router Redundancy Protocol (VRRP) is configured, an ICMP probe message is sent to the target interface. The ICMP probe message is used to communicate with the master device, including: sending ICMP probe messages to the target interface at a preset frequency and a preset number of times. If no ICMP probe message response message is received from the sending master device within a preset time period, the ICMP probe message communication is considered to have failed.

[0035] In one implementation, after the step of setting the local backup device as the new master device, the method further includes: attempting to contact the original master device; responding to an event of replying to communication with the original master device; interacting with the original master device to back up service entries; and re-electing the master / backup device according to preset rules, wherein the service entries are used for forwarding and processing messages.

[0036] In one implementation, when establishing an RBM backup group, an RBM channel is specified. This channel establishes a TCP connection and is kept alive via keepalive messages. Normally, routing protocols and VRPP are coordinated; that is, the backup device does not participate in packet forwarding and maximizes uplink and downlink routing costs. Backups are only performed in table entries and configurations.

[0037] In the global view, when a standby device in a primary / standby system is unable to communicate with the primary device, it determines whether it should switch over to become the primary device. In the interface view, when VRRP protocol is present in the downlink of the network, the standby device's VRRP protocol status is used to determine whether the peer primary device is alive.

[0038] If protocol messages can be sent and received normally and the VRRP state has not switched, it means that the downlink data port of the primary device is normal. Therefore, the primary device is considered to still exist and be working normally. The backup device continues to act as a backup device and does not switch to become the primary device. The uplink and downlink routing costs do not change and no traffic is redirected to its own device.

[0039] If the VRRP protocol state of the backup device changes and the backup device itself becomes the primary VRRP, it is considered that the primary device is down. The backup device needs to take over the link, so the backup device becomes the primary device and announces the route through the routing protocol, updates the uplink and downlink, and introduces traffic to the local machine for forwarding.

[0040] If the network does not bind interface-level redundancy protocols such as VRRP, the backup device needs to monitor whether the master device is alive from the data link. The backup device sends ICMP probe messages based on the ICMP protocol. The message TYPE is 111 and the code is 3. This TYPE and code are not currently used. The ICMP probe messages are sent from the backup device's data link, and the destination address is the specified master device data interface address.

[0041] If the primary device is online, upon receiving this message, it initiates a response message (TYPE 121, code2). If the backup device receives this ICMP probe message response message, it considers the primary device alive and does not switch to primary mode. However, if it fails to respond to the message within a predetermined number of times (e.g., 3 times) (ICMP probe messages can be sent at a preset frequency), the primary device is considered down and needs to take over the link. Therefore, the backup device becomes the primary device, and it announces routes through routing protocols, updates uplink and downlink, and directs traffic to its local machine for forwarding.

[0042] Once the control link resumes communication, in dual-master mode, newly added entries can be backed up to each other, and a new master can be elected according to the previous configuration, restoring the master-slave configuration.

[0043] The above implementation addresses the service interruption problem caused by the asymmetry of uplink and downlink traffic when the primary and backup control links are down in primary / backup mode. It can also proactively and intelligently confirm the disconnection situation when the control link is broken, and implement corresponding strategies according to different disconnection situations to ensure that the service process is not interrupted and new service traffic can communicate normally.

[0044] The above implementation achieves the following technical effects: In primary / backup mode, when the control link is disconnected, the backup device can proactively and intelligently determine whether the disconnection is due to a control link problem or a primary device failure. Based on the different disconnection situations, the backup device executes corresponding strategies to ensure uninterrupted business processes and the normal establishment of communication for new business traffic. Furthermore, after the control link is restored, the primary devices back up new entries to each other, ensuring uninterrupted new business processes and enabling the re-establishment of the primary / backup environment.

[0045] In one embodiment, this disclosure also provides a primary / standby equipment management device, such as... Figure 2 This device is applied to a backup device, which is a backup device for the primary and backup devices in a dual-machine hot standby system. The dual-machine hot standby system also includes a primary device. The device includes: a first module 21, used to check whether a Virtual Router Redundancy Protocol (VRRP) is currently configured in response to an event where the primary device loses connection; a second module 22, used to send an ICMP probe message to the target interface in response to the check result that no VRRP is configured, the ICMP probe message being used to communicate with the primary device; and a third module 23, used to set the local backup device as the new primary device in response to an event where communication with the ICMP probe message fails.

[0046] In one implementation, after the first module checks whether a Virtual Router Redundancy Protocol (VRRP) is currently configured in response to the event of the primary device losing connection, the module further includes: the second module checks the VRRP primary / backup status of the local backup device in response to the check result of VRRP configuration; and the third module sets the local backup device as the new primary device when the VRRP primary / backup status of the local backup device switches from backup status to primary status.

[0047] In one implementation, in response to the check result that no Virtual Router Redundancy Protocol (VRRP) is configured, an ICMP probe message is sent to the target interface. The ICMP probe message is used to communicate with the master device, including: sending ICMP probe messages to the target interface at a preset frequency and a preset number of times. If no ICMP probe message response message is received from the sending master device within a preset time period, the ICMP probe message communication is considered to have failed.

[0048] In one implementation, after the third module sets the local backup device as the new master device, it further includes: attempting to contact the original master device, responding to an event of replying to communication with the original master device, interacting with the original master device to back up service entries, and re-electing the master / backup device according to preset rules, wherein the service entries are used to forward and process messages.

[0049] The implementation methods of the apparatus are the same as or similar to the corresponding implementation methods, and will not be described again here.

[0050] In one embodiment, this disclosure provides an electronic device including a processor and a machine-readable storage medium. The machine-readable storage medium stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the aforementioned primary / backup device management method. From a hardware perspective, a hardware architecture diagram can be found... Figure 3 As shown.

[0051] In one embodiment, this disclosure provides a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the aforementioned primary / backup device management method.

[0052] Here, a machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, a machine-readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.

[0053] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.

[0054] For ease of description, the above apparatus is described by dividing it into various functional units. Of course, in implementing this disclosure, the functions of each unit can be implemented in one or more software and / or hardware.

[0055] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware implementation, a completely software implementation, or an implementation combining software and hardware aspects. Furthermore, embodiments of this disclosure can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0056] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0057] Furthermore, these computer program instructions can also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in the process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0058] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0059] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware implementation, a completely software implementation, or an implementation combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product implemented on one or more computer-usable storage media (which may include, but are not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0060] The above description is merely an embodiment of this disclosure and is not intended to limit the scope of this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of the claims of this disclosure.

Claims

1. A method for managing primary and backup equipment, characterized in that, The method is applied to a backup device, which is a backup device for the primary and backup devices in a dual-machine hot standby system. The dual-machine hot standby system also includes a primary device. The method includes: In response to a primary device disconnection event, check if Virtual Router Redundancy Protocol (VRRP) is currently configured. In response to the check result that the Virtual Router Redundancy Protocol (VRRP) is not configured, an ICMP probe message is sent to the target interface. The ICMP probe message is used to communicate with the master device. In response to an ICMP probe message communication failure, the local device is set as the new master device.

2. The method according to claim 1, characterized in that, Following the step of checking whether Virtual Router Redundancy Protocol (VRRP) is currently configured in response to a master device disconnection event, the method further includes: In response to the check results of the Virtual Router Redundancy Protocol (VRRP), the VRRP primary / backup status of the local device is detected; If the VRRP master / slave status of the local device changes from slave to master, then the local device is set as the new master device.

3. The method according to claim 1, characterized in that, In response to the check result indicating that no Virtual Router Redundancy Protocol (VRRP) is configured, an ICMP probe message is sent to the target interface. This ICMP probe message is used to communicate with the master device and includes: ICMP probe messages are sent to the target interface at a preset frequency and for a preset number of times. If no ICMP probe message response message is received from the sending device within a preset time period, the ICMP probe message communication is considered to have failed.

4. The method according to claim 1 or 2, characterized in that, Following the step of setting the local device as the new master device, the method further includes: The system attempts to contact the original master device. In response to an event that the system has resumed communication with the original master device, it interacts with the original master device to back up service entries and re-elects a master / slave status according to preset rules. The service entries are used to forward and process messages.

5. A main / standby equipment management device, characterized in that, Applied to backup equipment, the backup equipment being a backup device for the primary and backup equipment in a dual-machine hot standby system, the dual-machine hot standby system also including the primary equipment, the device comprising: The first module is used to respond to the event of the master device losing connection and check whether the Virtual Router Redundancy Protocol (VRRP) is currently configured. The second module is used to send an ICMP probe message to the target interface in response to the check result that the Virtual Router Redundancy Protocol (VRRP) is not configured. The ICMP probe message is used to communicate with the master device. The third module is used to set the local device as the new master device in response to an ICMP probe message communication failure event.

6. The apparatus according to claim 5, characterized in that, In response to a master device disconnection event, the first module, after checking whether a Virtual Router Redundancy Protocol (VRRP) is currently configured, also includes: The second module responds to the check results configured with Virtual Router Redundancy Protocol (VRRP) and detects the VRRP primary / backup status of the local device. The third module sets the local device as the new master device when the VRRP master / slave status of the local device changes from the backup status to the master status.

7. The apparatus according to claim 5, characterized in that, In response to the check result indicating that no Virtual Router Redundancy Protocol (VRRP) is configured, an ICMP probe message is sent to the target interface. This ICMP probe message is used to communicate with the master device and includes: ICMP probe messages are sent to the target interface at a preset frequency and for a preset number of times. If no ICMP probe message response message is received from the sending device within a preset time period, the ICMP probe message communication is considered to have failed.

8. The apparatus according to claim 5 or 6, characterized in that, After the third module sets the local device as the new master device, it also includes: The system attempts to contact the original master device. In response to an event that the system has resumed communication with the original master device, it interacts with the original master device to back up service entries and re-elects a master / slave status according to preset rules. The service entries are used to forward and process messages.

9. An electronic device, characterized in that, include: A processor and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor to implement the method of any one of claims 1-4.

10. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the method described in any one of claims 1-4.

Citation Information

Patent Citations

  • Method and device for securing server connection reliability

    CN101051951A

  • Fault switching method and system of wireless controller, electronic equipment and storage medium

    CN111405599A