Method and apparatus for route synchronization in a quiesce dual environment

CN121283939BActive Publication Date: 2026-09-08HANGZHOU DPTECH TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511561159.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-29
Publication Date
2026-09-08
Estimated Expiration
2045-10-29

AI Technical Summary

Technical Problem

然而,在实际应用中,静默双机模式中可能出现问题:优先级受监听端口状态的影响,当某个监听接口down时,设备的优先级会相应降低,从而触发主备机切换;在此过程中,路由同步仍然会继续进行,导致备机删除监听接口上的路由信息,进而导致备机切换为主机后流量转发丢包或网络中断

Benefits of technology

[0023] According to the routing synchronization method and apparatus for a silent dual-machine environment of this application, by monitoring the interface status of multiple interfaces of the host; when the status of at least one interface changes from up to down, the routing information corresponding to the interface is temporarily stored; the interface is added to a global delay synchronization interface linked list; after a preset delay, a dual-machine status check is performed to determine whether a master-slave switchover has occurred between the host and the standby machine; if no master-slave switchover has occurred, the routing information of each interface in the global delay synchronization interface linked list is synchronized to the standby machine. This method can effectively avoid erroneous routing synchronization problems caused by the down monitoring port. Through the buffer queue and delay judgment mechanism, the network device can be guaranteed to operate stably during the master-slave switchover process, thereby improving the reliability and high availability of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121283939B_ABST
    Figure CN121283939B_ABST
Patent Text Reader

Abstract

The application relates to a route synchronization method and device for a silent dual-computer environment. The method comprises the following steps: listening to the interface state of a plurality of interfaces of a host computer; when the state of at least one interface is changed to down, temporarily storing the route information corresponding to the interface; adding the interface to a global delay synchronization interface linked list; after a preset delay, performing dual-computer state checking to determine whether a host-computer-to-backup-computer switchover occurs between the host computer and the backup computer; and when the host-computer-to-backup-computer switchover does not occur, synchronizing the route information of each interface in the global delay synchronization interface linked list to the backup computer. The route synchronization method and device for the silent dual-computer environment can effectively avoid the problem of incorrect route synchronization caused by listening to a down port, and can ensure the stable operation of a network device during the host-computer-to-backup-computer switchover process and improve the reliability and high availability of the network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer information processing, and more specifically, to a routing synchronization method and apparatus for a silent dual-machine environment. Background Technology

[0002] To ensure network robustness, dual-machine hot standby technology is commonly used to build networks. There are many implementation methods for dual-machine hot standby, such as dual-machine systems based on VRRP (Virtual Router Redundancy Protocol) and dynamic routing. Silent dual-machine systems are also a common technology. A silent dual-machine system typically includes a primary and a standby machine. The primary and standby machines have identical configurations, including identical IP addresses for all interfaces. Under normal operation, external devices can logically only perceive the existence of the primary machine; the standby machine remains silent, invisible and undetectable within the network.

[0003] In a silent dual-machine setup, the primary and backup machines are determined by priority. The higher-priority device acts as the primary device, handling traffic, while the other device remains silent, waiting to be woken up. A failover occurs when the primary's priority drops below that of the backup. Since the new primary machine is newly connected to the network, it typically needs to relearn routing information. However, this relearning can cause temporary packet loss. Therefore, a dual-machine routing synchronization method is currently used to ensure that after a failover, the new primary machine can directly forward traffic according to its original routing table.

[0004] Currently, dual-machine routing synchronization is achieved through Socket protocol communication. After establishing a silent dual-machine setup, the primary machine performs batch backup of routes: it retrieves all routing information from the current primary machine and sends the routing information to the standby machine one by one via the Socket protocol. During device operation, any changes to routing information are sent to the standby machine in real time via the Socket protocol.

[0005] Currently, in a silent dual-machine environment, the primary / standby status of the two machines is typically determined based on static priority and dynamic interface status. The routing synchronization mechanism uses the Socket protocol to synchronize routing information in real time, ensuring no packet loss occurs after the standby machine takes over. However, in practical applications, problems may arise in silent dual-machine mode: priority is affected by the status of the listening port. When a listening interface goes down, the device's priority decreases accordingly, triggering a primary / standby switchover. During this process, routing synchronization continues, causing the standby machine to delete routing information on the listening interface, leading to packet loss or network interruption when the standby machine becomes the primary machine.

[0006] Specifically, 1. Instability of real-time route synchronization: Real-time synchronization of routes that change due to a downed listening interface can cause the standby machine to delete route information that should have been retained. 2. Primary / standby switchover issues caused by interface priority changes: When a listening interface goes down, the priority change may trigger a primary / standby switchover. If the standby machine has deleted routes that should have been retained based on the primary machine's synchronization information before switching to primary, then it will be unable to forward traffic normally after switching to primary.

[0007] Therefore, a new routing synchronization method and device are needed for silent dual-machine environments.

[0008] The information disclosed in the background section is only intended to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0009] In view of this, this application provides a routing synchronization method and apparatus for a silent dual-machine environment, which can effectively avoid erroneous routing synchronization problems caused by the downtime of the listening port. Through the buffer queue and delay judgment mechanism, it can ensure the stable operation of network devices during the switching process between primary and backup machines, thereby improving the reliability and high availability of the network.

[0010] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.

[0011] According to one aspect of this application, a routing synchronization method for a silent dual-machine environment is proposed, applied to a dual-machine system including a master and a standby machine. The method includes: monitoring the interface status of multiple interfaces of the master; when the status of at least one interface changes from up to down, temporarily storing the routing information corresponding to the interface; adding the interface to a global delay synchronization interface linked list; performing a dual-machine status check after a preset delay to determine whether a master-slave switchover has occurred between the master and the standby machine; if no master-slave switchover has occurred, synchronizing the routing information of each interface in the global delay synchronization interface linked list to the standby machine.

[0012] In one exemplary embodiment of this application, the method further includes: when the state of at least one interface is detected to be up, deleting the routing information to be synchronized in the global delay synchronization interface linked list; and clearing the temporarily stored routing information corresponding to the interface.

[0013] In one exemplary embodiment of this application, the method further includes: setting up a corresponding buffer queue for each of the plurality of interfaces; and maintaining its own buffer queue for each interface.

[0014] In one exemplary embodiment of this application, temporarily storing the routing information corresponding to the interface includes: temporarily storing the routing information corresponding to the interface in its corresponding buffer queue.

[0015] In one exemplary embodiment of this application, performing a dual-machine status check after a preset delay includes: setting a preset delay time via a timer so that the dual-machine status check is performed after the preset delay time.

[0016] In one exemplary embodiment of this application, a preset delay time is set by a timer so that a dual-machine status check can be performed after the preset delay time. This includes: resetting the timer when the event of the interface becoming down is detected to occur again during the preset delay period; and extending the preset delay time using a multiplicative backoff strategy until the maximum delay threshold is reached.

[0017] In one exemplary embodiment of this application, the preset delay time is extended by employing a backoff strategy that increases in multiples, including: setting the initial delay time to a first preset value; and increasing the delay time by a predetermined multiple after each timer reset.

[0018] In one exemplary embodiment of this application, synchronizing the routing information of each interface in the global delay synchronization interface linked list to the standby machine includes: traversing the global delay synchronization interface linked list and synchronizing the routing information on the buffer queue of each interface in the global delay synchronization interface linked list to the standby machine.

[0019] In one exemplary embodiment of this application, when a primary / standby switchover has occurred, the global delay synchronization interface linked list is cleared and the temporarily stored routing information corresponding to the interface is deleted.

[0020] According to one aspect of this application, a routing synchronization device for a silent dual-machine environment is proposed, applied to a dual-machine system including a master and a standby machine. The device includes: a monitoring module for monitoring the interface status of multiple interfaces of the master; a temporary storage module for temporarily storing the routing information corresponding to the interface when the status of at least one interface changes to down; a linked list module for adding the interface to a global delay synchronization interface linked list; a status module for performing a dual-machine status check after a preset delay to determine whether a master-slave switchover has occurred between the master and the standby machine; and a synchronization module for synchronizing the routing information of each interface in the global delay synchronization interface linked list to the standby machine when no master-slave switchover has occurred.

[0021] According to one aspect of this application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs; and, when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the method as described above.

[0022] According to one aspect of this application, a computer-readable medium is provided having a computer program stored thereon that, when executed by a processor, implements the method described above.

[0023] According to the routing synchronization method and apparatus for a silent dual-machine environment of this application, by monitoring the interface status of multiple interfaces of the host; when the status of at least one interface changes from up to down, the routing information corresponding to the interface is temporarily stored; the interface is added to a global delay synchronization interface linked list; after a preset delay, a dual-machine status check is performed to determine whether a master-slave switchover has occurred between the host and the standby machine; if no master-slave switchover has occurred, the routing information of each interface in the global delay synchronization interface linked list is synchronized to the standby machine. This method can effectively avoid erroneous routing synchronization problems caused by the down monitoring port. Through the buffer queue and delay judgment mechanism, the network device can be guaranteed to operate stably during the master-slave switchover process, thereby improving the reliability and high availability of the network.

[0024] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description

[0025] The above and other objects, features, and advantages of this application will become more apparent from the detailed description of exemplary embodiments with reference to the accompanying drawings. The drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0026] Figure 1 This is a flowchart illustrating a routing synchronization method for a silent dual-machine environment according to an exemplary embodiment.

[0027] Figure 2 This is a flowchart illustrating a routing synchronization method for a silent dual-machine environment according to another exemplary embodiment.

[0028] Figure 3 This is a flowchart illustrating a routing synchronization method for a silent dual-machine environment according to another exemplary embodiment.

[0029] Figure 4 This is a block diagram illustrating a routing synchronization device for a silent dual-machine environment according to an exemplary embodiment.

[0030] Figure 5 This is a block diagram illustrating an electronic device according to an exemplary embodiment.

[0031] Figure 6 This is a block diagram illustrating a computer-readable medium according to an exemplary embodiment. Detailed Implementation

[0032] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this application will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.

[0033] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.

[0034] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0035] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0036] It should be understood that although the terms first, second, third, etc., may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another. Therefore, the first component discussed below may be referred to as the second component without departing from the teachings of this application. As used herein, the term "and / or" includes all combinations of any one and more of the associated listed items.

[0037] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of exemplary embodiments, and the modules or processes in the drawings are not necessarily essential for implementing this application, and therefore cannot be used to limit the scope of protection of this application.

[0038] The technical abbreviations used in this application are explained as follows: Silent Dual-Machine: Silent dual-machine is a working mode in a dual-machine environment. In this system, only one device is active, while the other remains silent. The silent device provides link redundancy and prevents single points of failure. If the active device fails, traffic can be quickly switched to the other device. The election of the primary and backup devices in silent dual-machine mode is based on a priority comparison between the two devices. The two devices periodically exchange their priority information. The device with the higher priority becomes the primary device, carrying traffic, while the other device remains silent, waiting to be woken up. Device priorities can be changed in various ways, such as interface up / down, device restart, manual modification, etc. Once a priority change is detected and the two devices detect a difference in priorities, the dual-machine system will re-elect a primary and backup device.

[0039] Host: The device that forwards services in a dual-machine hot standby environment.

[0040] Standby machine: A device that is under monitoring in a dual-machine hot standby environment and is ready to take over from the host machine at any time.

[0041] Listening interface: The interface that affects the device priority will listen to its interface status, and is called the listening interface. Generally, the business traffic interface is selected.

[0042] Figure 1 This is a flowchart illustrating a route synchronization method for a silent dual-machine environment according to an exemplary embodiment. The route synchronization method 10 for a silent dual-machine environment includes at least steps S102 to S110.

[0043] like Figure 1 As shown, in S102, the interface status of multiple interfaces of the host is monitored. For example, the interface management module in the host monitors the status of each service interface in real time so as to trigger subsequent synchronization control logic when the interface status changes.

[0044] In S104, when the status of at least one interface changes to down, the routing information corresponding to that interface is temporarily stored. This routing information can be temporarily stored in its corresponding buffer queue.

[0045] In one embodiment, the method further includes: setting up a corresponding buffer queue for each of the plurality of interfaces; and maintaining its own buffer queue for each interface.

[0046] The routing information corresponding to the interface can be temporarily stored in its corresponding buffer queue to prevent the routing information from being immediately synchronized due to the interface down event.

[0047] In one embodiment, a corresponding buffer queue is set for each of the multiple interfaces, and each interface maintains its own routing information buffer queue to independently store the routing information to be synchronized related to that interface, thereby realizing the isolated management of routing information at the interface level.

[0048] In S106, the interface is added to the global delay synchronization interface linked list. The global delay synchronization interface linked list is used to centrally manage all listening interfaces in the down state and their corresponding routing buffer queues, so that synchronization processing can be performed uniformly after the delay time expires.

[0049] In S108, a dual-machine status check is performed after a preset delay to determine whether a primary / standby switchover has occurred between the primary and standby machines. For example, a preset delay time can be set via a timer so that the dual-machine status check is performed after the preset delay time.

[0050] In one embodiment, for example, when the event of the interface going down is detected to occur again during the preset delay period, the timer is reset; and the preset delay time is extended using a multiplicative backoff strategy until the maximum delay threshold is reached.

[0051] More specifically, the initial delay time can be set to a first preset value (e.g., 3 seconds); after each timer reset, the next delay time increases by a predetermined multiple.

[0052] For example, a preset delay time can be set via a timer so that a dual-machine status check operation is triggered after the preset delay time expires.

[0053] The aforementioned backoff mechanism can prevent the timer from being continuously reset due to frequent interface jitter, thereby ensuring that the system completes status confirmation within a reasonable time window.

[0054] In one specific embodiment, after starting the timer, the initial delay time is set to 3 seconds. After this delay time expires, the system performs a primary / standby status check to determine whether a primary / standby switchover has occurred.

[0055] If the interface state fluctuates again during the delay period (i.e., the down event occurs again), the system will reset the timer and extend the delay time in multiples, for example: The delay time after the first reset is 6 seconds; The second reset time is 12 seconds. The maximum duration is 30 seconds.

[0056] Through this multiple backoff mechanism, the system can avoid repeated synchronization in scenarios where the interface fluctuates frequently, thus ensuring the stability of the primary / backup status determination.

[0057] In S110, when no primary / standby switchover occurs, the routing information of each interface in the global delay synchronization interface linked list is synchronized to the standby machine. For example, the global delay synchronization interface linked list can be traversed, and the routing information in the buffer queue of each interface in the linked list can be synchronized to the standby machine.

[0058] For example, the global delay synchronization interface linked list can be traversed, and the routing information in the buffer queue corresponding to each interface in the linked list can be synchronized to the standby machine in batches to achieve consistency of the routing tables of the primary and standby machines.

[0059] Through the above synchronization operation, the standby machine can directly use the latest routing information when the primary machine fails and takes over the traffic, thereby avoiding packet loss or network interruption caused by incorrect route deletion.

[0060] In one embodiment, the method further includes: when a primary / standby switchover has occurred, clearing the global delay synchronization interface linked list and deleting the temporarily stored routing information corresponding to the interface.

[0061] According to the routing synchronization method for a silent dual-machine environment of this application, the interface status of multiple interfaces of the host is monitored; when the status of at least one interface changes from up to down, the routing information corresponding to the interface is temporarily stored; the interface is added to a global delay synchronization interface linked list; after a preset delay, a dual-machine status check is performed to determine whether a master-slave switchover has occurred between the master and the standby machine; if no master-slave switchover has occurred, the routing information of each interface in the global delay synchronization interface linked list is synchronized to the standby machine. This method can effectively avoid erroneous routing synchronization problems caused by the down monitoring port. Through the buffer queue and delay judgment mechanism, the network device can be guaranteed to operate stably during the master-slave switchover process, thereby improving the reliability and high availability of the network.

[0062] It should be clearly understood that this application describes how specific examples are formed and used, but the principles of this application are not limited to any details of these examples. Rather, based on the teachings of the disclosure of this application, these principles can be applied to many other embodiments.

[0063] This application provides a novel method for route synchronization in a silent dual-machine environment, applicable to network devices such as network routers and switches. These devices can communicate with the standby machine in real time via the Socket protocol or other process communication mechanisms to synchronize effective routing information, and trigger the route synchronization mechanism of this invention when the listening port status changes.

[0064] This application uses a buffer queue and a delay judgment mechanism to ensure that routing synchronization is only performed when the primary and backup machines are in stable condition, thus avoiding erroneous route deletion due to the downtime of the listening interface and ensuring stable traffic forwarding. Figure 2This is a flowchart illustrating a routing synchronization method for a silent dual-machine environment according to an exemplary embodiment. Figure 2 The process shown in step 20 is... Figure 1 A detailed description of the process shown.

[0065] like Figure 2 As shown, in S202, the listening port is down.

[0066] In S204, the routing information that needs to be deleted is added to the cache queue of this interface.

[0067] When the state of the device's listening interface changes to down, the routing synchronization operation is not performed immediately. Instead, the routing information that needs to be synchronized is added to the buffer queue. In order to avoid timing problems that may occur when only processing routes that change to down, in S206, the interface is added to the global delayed synchronization interface linked list.

[0068] In this application, a global delay synchronization interface linked list has been added. The buffer queue relies on the listening interface, and each listening interface maintains its own routing buffer queue.

[0069] When the listening interface status changes to down, the routing information that needs to be deleted is stored in the interface's own buffer queue, and the interface is added to the global delay synchronization interface linked list.

[0070] In S208, is the timer enabled?

[0071] In S210, the dual-machine status is checked after the first preset value of the timer is enabled.

[0072] In S212, the timer is restarted, with the timing based on a backoff algorithm that is a multiple of the initial step size.

[0073] After a listening interface goes down, a timer is started to check the status of both machines after 3 seconds. Since multiple listening interfaces may go down, or a single listening interface may repeatedly go down and up, if a timer is already running when a listening interface goes down, the timer is reset. To avoid continuous timer resets causing synchronization problems, a multiplicative backoff method is used for timer resets: the initial step is 3 seconds, the multiplier is 2, and the maximum number of resets is 3. If an interface goes down, the status of both machines will be checked after a maximum of 30 seconds to determine if route synchronization has been achieved.

[0074] In S214, is the switching between the two machines allowed?

[0075] In S216, routing information in the socket synchronization buffer queue is used.

[0076] After the timer expires, check if a primary / standby switchover has occurred. If no switchover has occurred, perform a routing synchronization operation, traversing the global delayed synchronization interface linked list and synchronizing the routing information in the buffer queues of each interface on the linked list to the standby device. If a primary / standby switchover has occurred, do not perform a routing synchronization operation.

[0077] In S218, the global delay synchronization interface linked list is cleared and the temporary routing information corresponding to the interface is deleted.

[0078] In S220, the process ends.

[0079] Figure 3 This is a flowchart illustrating a routing synchronization method for a silent dual-machine environment according to another exemplary embodiment. Figure 3 The process shown in step 30 is... Figure 1 Supplementary description of the process shown.

[0080] In one embodiment, the method further includes: when the state of at least one interface changes to "up", deleting the routing information to be synchronized from the global delay synchronization interface linked list; and clearing the temporarily stored routing information corresponding to the interface. More specifically, after the timer timeout check is completed, the global delay synchronization interface linked list and the corresponding interface's buffer queue are cleared.

[0081] More specifically, when the listening interface status changes to up, if there are still routes to be synchronized in the interface buffer queue, the interface will be removed from the delayed synchronization interface list and its buffer queue will be cleared.

[0082] like Figure 3 As shown, in S302, the listening port is up.

[0083] In S304, is there any data in the cache queue of this interface?

[0084] In S306, this interface is removed from the global delay synchronization interface list.

[0085] In S308, clear the cache queue of this interface.

[0086] After each timer timeout check is completed, the delayed synchronization interface linked list and the corresponding routing buffer queue on the interface will be cleared.

[0087] In S310, the end.

[0088] This application introduces a delayed synchronization mechanism. Shortly after the listening interface goes down, the routing information that needs to be synchronized is buffered and synchronized with a delay. A buffer queue is used to temporarily store the routing information to be synchronized, ensuring that relevant routing information is not lost even when the listening port goes down. During the delayed synchronization period, changes in the status of the primary and backup machines are checked to ensure that route synchronization only occurs when the device status is stable, thereby avoiding erroneous route synchronization problems caused by the listening port going down.

[0089] Those skilled in the art will understand that all or part of the steps of the above embodiments are implemented as a computer program executed by a CPU. When the computer program is executed by the CPU, it performs the functions defined by the method provided in this application. The program can be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk.

[0090] Furthermore, it should be noted that the above figures are merely illustrative representations of the processes included in the method according to exemplary embodiments of this application, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0091] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.

[0092] Figure 4 This is a block diagram illustrating a routing synchronization device for a silent dual-machine environment according to an exemplary embodiment. Figure 4 As shown, the routing synchronization device 40 for a silent dual-machine environment includes: a monitoring module 402, a temporary storage module 404, a linked list module 406, a status module 408, and a synchronization module 410.

[0093] The monitoring module 402 is used to monitor the interface status of multiple interfaces of the host; The temporary storage module 404 is used to temporarily store the routing information corresponding to the interface when the state of at least one interface changes to down; the temporary storage module 404 is also used to temporarily store the routing information corresponding to the interface into its corresponding buffer queue.

[0094] The linked list module 406 is used to add the interface to the global delay synchronization interface linked list; The status module 408 is used to perform a dual-machine status check after a preset delay to determine whether a primary / standby switchover has occurred between the primary and standby machines. The status module 408 is also used to set a preset delay time through a timer so that a dual-machine status check can be performed after the preset delay time.

[0095] The synchronization module 410 is used to synchronize the routing information of each interface in the global delay synchronization interface linked list to the standby machine when no primary / standby machine switchover occurs. The synchronization module 410 is also used to traverse the global delay synchronization interface linked list and synchronize the routing information in the buffer queue of each interface in the global delay synchronization interface linked list to the standby machine.

[0096] According to the routing synchronization device for a silent dual-machine environment of this application, the device monitors the interface status of multiple interfaces of the host machine; when the status of at least one interface changes from up to down, the routing information corresponding to the interface is temporarily stored; the interface is added to a global delay synchronization interface linked list; after a preset delay, a dual-machine status check is performed to determine whether a master-slave switchover has occurred between the host and the standby machine; if no master-slave switchover has occurred, the routing information of each interface in the global delay synchronization interface linked list is synchronized to the standby machine. This method can effectively avoid erroneous routing synchronization problems caused by the down monitoring port. Through the buffer queue and delay judgment mechanism, the device can ensure the stable operation of network devices during master-slave switchover, thereby improving the reliability and high availability of the network.

[0097] Figure 5 This is a block diagram illustrating an electronic device according to an exemplary embodiment.

[0098] The following reference Figure 5 To describe an electronic device 500 according to this embodiment of the present application. Figure 5 The electronic device 500 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0099] like Figure 5 As shown, the electronic device 500 is presented in the form of a general-purpose computing device. The components of the electronic device 500 may include, but are not limited to: at least one processing unit 510, at least one storage unit 520, a bus 530 connecting different system components (including storage unit 520 and processing unit 510), a display unit 540, etc.

[0100] The storage unit stores program code that can be executed by the processing unit 510, causing the processing unit 510 to perform the steps described in this specification according to various exemplary embodiments of this application. For example, the processing unit 510 can perform actions such as... Figure 1 , Figure 2 , Figure 3 The steps are shown in the figure.

[0101] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 5201 and / or a cache storage unit 5202, and may further include a read-only memory unit (ROM) 5203.

[0102] The storage unit 520 may also include a program / utility 5204 having a set (at least one) program module 5205, such program module 5205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0103] Bus 530 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0104] Electronic device 500 can also communicate with one or more external devices 500' (e.g., keyboard, pointing device, Bluetooth device, etc.), enabling users to communicate with devices that interact with electronic device 500, and / or any device (e.g., router, modem, etc.) that allows electronic device 500 to communicate with one or more other computing devices. This communication can be performed via input / output (I / O) interface 550. Furthermore, electronic device 500 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 560. Network adapter 560 can communicate with other modules of electronic device 500 via bus 530. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0105] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software, or by combining software with necessary hardware. Therefore, as... Figure 6 As shown, the technical solution according to the embodiments of this application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, mobile hard drive, etc.) or on a network, and includes several instructions to cause a computing device (such as a personal computer, server, or network device, etc.) to execute the above-described method according to the embodiments of this application.

[0106] The software product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0107] The computer-readable storage medium may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0108] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0109] The aforementioned computer-readable medium carries one or more programs. When these programs are executed by a device, the computer-readable medium performs the following functions: monitors the interface status of multiple interfaces of the host; when the status of at least one interface changes from up to down, temporarily stores the routing information corresponding to that interface; adds the interface to a global delay synchronization interface linked list; performs a dual-machine status check after a preset delay to determine whether a primary / standby switchover has occurred between the host and the standby machine; and if no primary / standby switchover has occurred, synchronizes the routing information of each interface in the global delay synchronization interface linked list to the standby machine.

[0110] Those skilled in the art will understand that the above modules can be distributed in the device as described in the embodiments, or they can be modified accordingly and placed in one or more devices that are unique to this embodiment. The modules in the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.

[0111] Through the description of the above embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this application.

[0112] Exemplary embodiments of this application have been specifically shown and described above. It should be understood that this application is not limited to the detailed structures, arrangements, or implementation methods described herein; rather, this application is intended to cover various modifications and equivalents contained within the spirit and scope of the appended claims.

Claims

1. A routing synchronization method for a silent dual-machine environment, applied to a dual-machine system including a master and a standby machine, characterized in that, include: Monitor the interface status of multiple interfaces on the host; When the status of at least one interface changes to down, the routing information that needs to be deleted is temporarily stored by adding it to the cache queue of the interface. Add the interface to the global delay synchronization interface linked list; After a preset delay, a dual-machine status check is performed to determine whether a primary / standby switchover has occurred between the primary and standby machines. When no primary / standby switchover occurs, the global delay synchronization interface linked list is traversed, and the routing information of each interface in the global delay synchronization interface linked list is synchronized to the standby machine via a socket. as well as When a primary / standby switchover has occurred, clear the global delay synchronization interface linked list and delete the temporarily stored routing information corresponding to the interface that needs to be deleted.

2. The method as described in claim 1, characterized in that, Also includes: When the state of at least one interface is detected to be up, delete the routing information to be synchronized from the global delayed synchronization interface list; Clear the temporarily stored routing information corresponding to the interface.

3. The method as described in claim 1, characterized in that, Also includes: Set up a corresponding buffer queue for each of the multiple interfaces; Each interface maintains its own buffer queue.

4. The method as described in claim 1, characterized in that, Perform a dual-machine status check after a preset delay, including: A preset delay time is set by using a timer so that a dual-machine status check can be performed after the preset delay time.

5. The method as described in claim 1, characterized in that, A preset delay time is set via a timer so that a dual-machine status check can be performed after the preset delay time, including: When the event of the interface going down is detected to occur again during the preset delay period, the timer is reset; The preset delay time is extended by adopting a backoff strategy that increases exponentially until the maximum delay threshold is reached.

6. The method as described in claim 4, characterized in that, The preset delay time is extended using a backoff strategy that increases exponentially, including: Set the initial delay time to the first preset value; Each time the timer is reset, the delay time for the next iteration increases by a predetermined multiple.

7. A routing synchronization device for a silent dual-machine environment, applied to a dual-machine system including a master and a standby machine, characterized in that, include: The monitoring module is used to monitor the interface status of multiple interfaces on the host. The temporary storage module is used to temporarily store the routing information that needs to be deleted for the interface by adding the routing information that needs to be deleted to the cache queue of the interface when the status of at least one interface becomes down. The linked list module is used to add the interface to the global delay synchronization interface linked list; The status module is used to perform a dual-machine status check after a preset delay to determine whether a master-slave switchover has occurred between the master and the standby machines. The synchronization module is used to traverse the global delay synchronization interface linked list and synchronize the routing information of each interface in the global delay synchronization interface linked list to the standby machine via socket when no primary / standby machine switchover has occurred; and to clear the global delay synchronization interface linked list and delete the temporarily stored routing information corresponding to the interface that needs to be deleted when a primary / standby machine switchover has occurred.

Citation Information

Patent Citations

  • Email synchronization method and device, and computer readable storage medium

    CN108418746A

  • OLT (Optical Line Terminal) equipment dual-uplink service main / standby protection method and system

    CN111683309A