CN111371680A - Route management method, device, equipment and storage medium for dual-computer hot standby - Google Patents

Route management method, device, equipment and storage medium for dual-computer hot standby Download PDF

Info

Publication number
CN111371680A
CN111371680A CN202010146359.5A CN202010146359A CN111371680A CN 111371680 A CN111371680 A CN 111371680A CN 202010146359 A CN202010146359 A CN 202010146359A CN 111371680 A CN111371680 A CN 111371680A
Authority
CN
China
Prior art keywords
information
standby
target
routing
standby machine
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.)
Granted
Application number
CN202010146359.5A
Other languages
Chinese (zh)
Other versions
CN111371680B (en
Inventor
孙玉飞
李奕森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202010146359.5A priority Critical patent/CN111371680B/en
Publication of CN111371680A publication Critical patent/CN111371680A/en
Application granted granted Critical
Publication of CN111371680B publication Critical patent/CN111371680B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Hardware Redundancy (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a dual-computer hot standby route management method, which comprises the following steps: judging whether an information synchronization request sent by a standby machine is received; if the target information is received, synchronizing the target information to be synchronized to a standby machine, and determining a target algorithm for performing routing calculation on the target information so that the standby machine performs routing calculation on the target information according to the target algorithm to obtain target routing information; and when the router enters a fault state, switching to the standby machine, and executing the routing management operation by the standby machine according to the target routing information. The invention also discloses a dual-computer hot standby route management device and a computer readable storage medium. By keeping the routing information of the host and the standby machine consistent, the problem that the routing management efficiency is poor due to long-time interruption of a network during switching of the two machines is avoided.

Description

Route management method, device, equipment and storage medium for dual-computer hot standby
Technical Field
The present invention relates to the field of network information technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for managing a dual-device hot standby route.
Background
In the current dual-computer hot standby scenario, a scheme of using OSPF (Open short Path First, Open Shortest Path First) to perform routing management mainly has the following problems: although the two routers can dynamically learn the link or the routing information of the other side to perform corresponding routing management through the OSPF networking, the routing information learned based on the OSPF is dynamically changed, so that the routing information of the standby machine is inconsistent with that of the host machine, and the routing information of the new host machine is lost after the standby machine is switched to the new host machine. At this time, the router exchanges routing information with other routers again, which may cause a long-time interruption of the network and affect the transmission efficiency of data.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a dual-computer hot-standby route management method, a dual-computer hot-standby route management device and a computer readable storage medium, and aims to solve the problem that a network is interrupted for a long time during dual-computer switching due to asynchronization of OSPF dynamic routing information in a dual-computer hot-standby scene.
In order to achieve the above object, the present invention provides a dual-computer hot standby route management method, including the following steps:
judging whether an information synchronization request sent by a standby machine is received;
if the target information is received, synchronizing the target information to be synchronized to a standby machine, and determining a target algorithm for performing routing calculation on the target information so that the standby machine performs routing calculation on the target information according to the target algorithm to obtain target routing information;
and when the router enters a fault state, switching to the standby machine, and executing the routing management operation by the standby machine according to the target routing information.
Optionally, the step of synchronizing the target information to be synchronized to the standby machine includes:
acquiring interface information, neighbor information and link state broadcast information;
taking the interface information, the neighbor information and the link state broadcast information as target information to be synchronized;
and synchronizing the target information to be synchronized to the standby machine so as to keep the target information of the standby machine consistent with the host machine.
Optionally, after the step of synchronizing the target information to be synchronized to the standby machine, the method includes:
judging whether the link state update information exists or not;
and if so, sending the updating information to the standby machine so that the standby machine updates the link state broadcast information according to the updating information to keep the link state broadcast information of the standby machine consistent with the host machine.
Optionally, after the step of synchronizing the target information to be synchronized to the standby machine, the method includes:
judging whether update information of a neighbor router exists or not;
and if so, sending the updating information to the standby machine for the standby machine to update the neighbor information of the standby machine according to the updating information so as to keep the neighbor information of the standby machine consistent with the host.
Optionally, after the step of synchronizing the target information to be synchronized to the standby machine, the method includes:
judging whether the update information of the interface exists or not;
and if so, sending the updating information to the standby machine so that the standby machine updates the interface information of the standby machine according to the updating information, so that the interface information of the standby machine is consistent with the interface information of the host machine.
Optionally, when entering the failure state, the switching is performed to the standby device, and the step of executing, by the standby device, the routing management operation according to the target routing information includes:
when entering a fault state, switching the current mode into a client mode, and sending a mode switching command to the standby machine so as to switch the mode of the standby machine into a server mode;
and switching to the standby machine according to the switched mode, and executing the routing management operation by the standby machine according to the target routing information.
Optionally, the step of switching to the standby device according to the switched mode, and the step of executing, by the standby device, the route management operation according to the target route information includes:
if the fault is recovered, sending an information synchronization request to the standby machine so as to receive synchronization information sent by the standby machine;
after receiving the synchronous information, switching the client mode to the server mode, and sending a mode switching instruction to the standby machine so as to switch the mode of the standby machine to the client mode;
and executing the route management operation according to the switched mode.
Optionally, after the step of determining whether the information synchronization request sent by the standby device is received, the method includes:
if the information synchronization request sent by the standby machine is not received within the preset time, whether the information synchronization request sent by the standby machine is received or not is judged again until the information synchronization request sent by the standby machine is received.
In addition, to achieve the above object, the present invention further provides a dual-device hot-standby routing management device, including:
a judging module: the system is used for judging whether an information synchronization request sent by a standby machine is received;
a synchronization and determination module: the standby machine is used for synchronizing target information to be synchronized to the standby machine and determining a target algorithm for performing routing calculation on the target information when receiving an information synchronization request sent by the standby machine, so that the standby machine performs routing calculation on the target information according to the target algorithm to obtain target routing information;
a switching module: and the standby machine is used for switching to the standby machine when entering a fault state, and executing routing management operation according to the target routing information.
In addition, in order to achieve the above object, the present invention further provides a dual-server hot-standby routing management device, where the dual-server hot-standby routing management device includes a memory, a processor, and a dual-server hot-standby routing management program stored on and operable on the processor, and the processor implements the steps of the dual-server hot-standby routing management method when executing the dual-server hot-standby routing management program.
In addition, to achieve the above object, the present invention further provides a computer readable storage medium, where a dual-server hot-standby route management program is stored on the computer readable storage medium, and when executed by a processor, the dual-server hot-standby route management program implements the steps of the dual-server hot-standby route management method as described above.
In the embodiment of the invention, by judging whether an information synchronization request sent by a standby machine is received or not, when the information synchronization request sent by the standby machine is received, target information to be synchronized is synchronized to the standby machine, and a target algorithm for performing routing calculation on the target information is determined, so that the standby machine performs routing calculation on the target information according to the target algorithm to obtain the target routing information.
Drawings
Fig. 1 is a schematic structural diagram of a dual-computer hot-standby routing management device in a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a first embodiment of a dual-device hot-standby routing management method according to the present invention;
fig. 3 is a flowchart illustrating a second embodiment of a dual-device hot-standby routing management method according to the present invention;
fig. 4 is a flowchart illustrating a third embodiment of a dual-device hot-standby routing management method according to the present invention;
fig. 5 is a functional module diagram of an embodiment of a dual-device hot-standby routing management device according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the invention is: judging whether an information synchronization request sent by a standby machine is received; if the target information is received, synchronizing the target information to be synchronized to a standby machine, and determining a target algorithm for performing routing calculation on the target information so that the standby machine performs routing calculation on the target information according to the target algorithm to obtain target routing information; and when the host enters a fault state, switching to the standby machine, and executing the routing management operation by the standby machine according to the target routing information.
In the existing routing information synchronization scheme with hot standby of two computers, such as the OSPF routing information synchronization scheme, because the routing information learned by the OSPF is dynamically changed, the routing information of the standby computer and the host computer is inconsistent, so that the problem that the network is interrupted for a long time during the switching of the two computers and the standby computer cannot replace the host computer in time for routing management exists. Therefore, the present invention provides a method, an apparatus, a device and a computer readable storage medium for dual-device hot standby routing management, by judging whether the information synchronization request sent by the standby machine is received or not, if the information synchronization request sent by the standby machine is received, synchronizing the target information to be synchronized to the standby machine and determining a target algorithm for performing routing calculation on the target information, the standby machine carries out routing calculation on the target information according to the target algorithm to obtain target routing information so as to keep the routing information of the host machine and the standby machine consistent, thus, when the host computer enters a fault state, the host computer can be switched to the standby computer in time, the standby computer executes the routing management operation according to the routing information, and long-time network interruption is not needed to be carried out to exchange routing information with the router again, so that the dual-computer switching efficiency of dual-computer hot standby is improved, and the routing management efficiency of dual-computer hot standby is further improved.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a dual-computer hot-standby routing management device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the dual-device hot-standby routing management device may include: a communication bus 1002, a processor 1001, such as a CPU, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration of the dual-provisioned route management device shown in fig. 1 does not constitute a limitation of the dual-provisioned route management apparatus, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include an operating system, a network communication module, a user interface module, and a dual-server hot-standby routing management program therein.
In the dual-server hot-standby routing management device shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to invoke the dual-server hot-standby routing management program stored in the memory 1005, and perform the following operations:
judging whether an information synchronization request sent by a standby machine is received;
if receiving, synchronizing the target information to be synchronized to a standby machine, and determining a target algorithm for performing routing calculation on the target information, so that the standby machine performs routing calculation on the target information according to the target algorithm to obtain target routing information;
and when the router enters a fault state, switching to the standby machine, and executing routing management operation by the standby machine according to the routing information.
Alternatively, the processor 1001 may call the dual-server hot-standby route management program stored in the memory 1005, and further perform the following operations:
acquiring interface information, neighbor information and link state broadcast information;
taking the interface information, the neighbor information and the link state broadcast information as target information to be synchronized;
and synchronizing the target information to be synchronized to the standby machine so as to keep the target information of the standby machine consistent with the host machine.
Optionally, after the step of synchronizing the target information to be synchronized to the standby machine, the processor 1001 may call a route management program stored in the memory 1005, and further perform the following operations:
judging whether the link state update information exists or not;
and if so, sending the updating information to the standby machine so that the standby machine updates the link state broadcast information according to the updating information to keep the link state broadcast information of the standby machine consistent with the host machine.
Optionally, after the step of synchronizing the target information to be synchronized to the standby machine, the processor 1001 calls a route management program stored in the memory 1005, and performs the following operations:
judging whether update information of a neighbor router exists or not;
and if so, sending the updating information to the standby machine for the standby machine to update the neighbor information of the standby machine according to the updating information so as to keep the neighbor information of the standby machine consistent with the host.
Optionally, after the step of synchronizing the target information to be synchronized to the standby machine, the processor 1001 may call a route management program stored in the memory 1005, and further perform the following operations:
judging whether the update information of the interface exists or not;
and if so, sending the updating information to the standby machine so that the standby machine updates the interface information of the standby machine according to the updating information, so that the interface information of the standby machine is consistent with the interface information of the host machine.
Alternatively, the processor 1001 may call the dual-server hot-standby route management program stored in the memory 1005, and further perform the following operations:
when entering a fault state, switching the current mode into a client mode, and sending a mode switching command to the standby machine so as to switch the mode of the standby machine into a server mode;
and switching to the standby machine according to the switched mode, and executing the routing management operation by the standby machine according to the target routing information.
Optionally, after the step of switching to the standby device according to the switched mode and executing the route management operation by the standby device according to the target route information, the processor 1001 may call the route management program stored in the memory 1005, and further execute the following operations:
if the fault is recovered, sending an information synchronization request to the standby machine so as to receive synchronization information sent by the standby machine;
after receiving the synchronous information, switching the client mode to the server mode, and sending a mode switching instruction to the standby machine so as to switch the mode of the standby machine to the client mode;
and executing the route management operation according to the switched mode.
Alternatively, after the step of determining whether the information synchronization request sent by the standby device is received, the processor 1001 may call the route management program stored in the memory 1005, and further perform the following operations:
if the information synchronization request sent by the standby machine is not received within the preset time, whether the information synchronization request sent by the standby machine is received or not is judged again until the information synchronization request sent by the standby machine is received.
Referring to fig. 2, fig. 2 is a flowchart of a first embodiment of a dual-server hot-standby routing management method according to the present invention, in this embodiment, the dual-server hot-standby routing management method includes the following steps:
step S10: judging whether an information synchronization request sent by a standby machine is received;
the server is one of computers, and provides calculation or application services for clients (such as terminals like PCs, smart phones, ATMs and the like, and even large-scale equipment like train systems and the like) in a network. If a server fails, there are various reasons causing the server failure, such as equipment failure, operating system failure, software system failure, etc., and it usually takes a lot of time to troubleshoot the failure reason and repair the failure according to the failure reason, resulting in long-time network interruption. For some important systems, if the network is interrupted for a long time, there are problems of information loss and data transmission being not timely. Therefore, long-time service interruption is avoided through the dual-computer hot standby, and long-term and reliable service provision of the system is guaranteed. The dual-server hot standby refers to a solution, and for important services, two servers are used for mutual backup and executing the same service together. When one server fails, the other server can undertake the service task, so that the system can be automatically ensured to continuously provide the service without manual intervention. In addition, routing management can be performed between two servers through OSPF (Open Shortest Path First), which is a link state-based interior gateway protocol developed by IETF (Internet Engineering task force) organization; two routers can dynamically learn link or routing information of each other through OSPF networking, and for a more complex networking environment, OSPF is generally used for routing management. One of the two servers is used as a host machine, and the other server is used as a standby machine. When the host and the standby are started, the OSPF services of the host and the standby respectively enter into own working modes, and connection is established through socket. After the connection is completed, because the information is empty when the standby machine is initialized, the host machine needs to actively send an information synchronization request to the host machine for full synchronization, so that when the host machine and the standby machine are started, the host machine firstly judges whether the information synchronization request sent by the standby machine is received, and whether the host machine receives the information synchronization request sent by the standby machine depends on whether the standby machine sends the synchronization information request.
Step S20: synchronizing target information to be synchronized to a standby machine, and determining a target algorithm for performing routing calculation on the target information so that the standby machine performs routing calculation on the target information according to the target algorithm to obtain target routing information;
after the step of determining whether an information synchronization request sent by the standby machine is received, if the information synchronization request sent by the standby machine is received, determining corresponding target information to be synchronized according to the information synchronization request, and synchronizing the target information to the standby machine, where the target information to be synchronized may include: interface information, neighbor information, link state broadcast information update information, neighbor information update information, interface information exception information, and the like. After target information to be synchronized is synchronized to a standby machine, a target algorithm for performing route calculation on the target information by a host machine is determined, wherein the target algorithm can be a Dijkstra algorithm and other route calculation algorithms, and can be determined according to specific use conditions or application scenes. Determining that the target algorithm can enable the host to perform routing calculation on corresponding target information through the target algorithm to obtain host routing information, so as to perform corresponding routing management according to the host routing information when the host works normally; in addition, the determined target algorithm can be used as a route calculation algorithm of the standby machine, so that when the information of the standby machine is consistent with the information of the host machine, the same route information can be obtained if the standby machine adopts the same algorithm as the host machine to perform route calculation on the same information, and the route information of the host machine and the route information of the standby machine are ensured to be consistent. After the target information to be synchronized is synchronized to the standby machine, the standby machine enters a route calculation process according to the received target information, and autonomously calculates corresponding route information, at the moment, after a target algorithm for performing route calculation on the target information is determined, the target algorithm is used as a route calculation algorithm of the standby machine, so that the standby machine performs route calculation on the target information through the target algorithm. Because the standby computer has the same calculation source (target information) and the same routing algorithm (target algorithm), after the standby computer performs routing calculation on the target information through the target algorithm, the standby computer obtains the target routing information obtained by performing the routing calculation on the target information through the target algorithm, so that the routing information obtained by the calculation of the standby computer can be consistent with the routing information obtained by the calculation of the host computer.
When the information synchronization request sent by the standby machine is not received, the information cannot be synchronized to the standby machine, and the routing information of the standby machine is inconsistent with the routing information of the host machine. In order to ensure the consistency of the routing information of the host and the standby machine, if the information synchronization request sent by the standby machine is still not received within the preset time, the standby machine can send the information synchronization request to the host again, at the moment, whether the information synchronization request sent by the standby machine is received is judged again, and the requested information is synchronized to the standby machine until the information synchronization request sent by the standby machine is received. If the time for not receiving the information synchronization request sent by the standby machine exceeds the preset time threshold, the problems such as communication connection and the like may exist between the host and the standby machine, after the problems are eliminated, the standby machine can continuously send the information synchronization request to the host, and whether the information synchronization request sent by the standby machine is received or not is judged again until the information synchronization request sent by the standby machine is received. It is worth noting that whether the host receives the information synchronization request sent by the standby machine or not, a target algorithm for performing route calculation on the target information needs to be determined, and on one hand, the host can calculate the route information of the target information through the determined target algorithm; on the other hand, the standby machine adopts the same target algorithm as the host machine to calculate the routing information of the target information, even if the information of the host machine and the standby machine is not synchronous, the routing information of the host machine and the standby machine can be ensured to be the same as much as possible, and therefore when the host machine fails and is switched to the standby machine to execute the routing management operation, the network interruption time is reduced.
Step S30: when entering a fault state, switching to a standby machine, and executing routing management operation by the standby machine according to the target routing information;
and before switching to the standby machine and executing the routing management operation by the standby machine according to the target routing information, judging whether fault information exists or not. In a preferred embodiment, whether the host has the fault information is determined according to whether the heartbeat information received by the standby machine within a first preset time includes the host fault information or whether the standby machine receives the heartbeat information within a second preset time. If the heartbeat information received by the standby machine in the first preset time contains the host fault information or the heartbeat information is not received by the standby machine in the second preset time, judging that the fault information exists; and when the heartbeat information received by the standby machine in the first preset time does not contain the host fault information or the heartbeat information is received in the second preset time and the heartbeat information part contains the host fault information, judging that no fault information exists. The first preset time is the preset interval time for the host to send heartbeat information to the standby machine, the second preset time is the preset time for judging whether the host fails, and the second preset time is greater than the first preset time.
When the host computer is judged to have fault information, the dual-computer switching is directly carried out, and the standby computer executes the routing management operation according to the calculated target routing information. When the host enters a fault state, because the routing information of the standby machine is consistent with the routing information of the host, when the host is switched to the standby machine to execute the routing management operation, the network interruption is not needed or the time for interrupting the network is extremely short, even the time is as short as the time which is difficult to capture by the prior art, and the seamless butt joint of the host and the standby machine can be basically realized.
In this embodiment, by determining whether an information synchronization request sent by a standby machine is received, if the information synchronization request sent by the standby machine is received, target information to be synchronized is synchronized to the standby machine, and a target algorithm for performing routing calculation on the target information is determined, so that the standby machine performs routing calculation on the target information according to the target algorithm to obtain target routing information, so as to ensure consistency between the routing information of the standby machine and the routing information of a host machine, so that when the standby machine enters a fault state, the standby machine is switched to the standby machine, and the standby machine performs routing management operation according to the target routing information, so that a network does not need to be interrupted to re-exchange routing information with a corresponding router, or the interruption time is extremely short, thereby avoiding information loss caused by network interruption, and improving the efficiency of routing management.
Referring to fig. 3, fig. 3 is a flowchart of a second embodiment of the dual-computer hot-standby routing management method of the present invention, in this embodiment, the dual-computer hot-standby routing management method includes the following steps:
step S11: judging whether an information synchronization request sent by a standby machine is received;
step S12: if so, acquiring interface information, neighbor information and link state broadcast information;
step S13: taking the interface information, the neighbor information and the link state broadcast information as target information to be synchronized;
step S14: synchronizing the target information to be synchronized to a standby machine, and determining a target algorithm for performing routing calculation on the target information so that the standby machine performs routing calculation on the target information according to the target algorithm to obtain target routing information;
step S15: and when the router enters a fault state, switching to the standby machine, and executing the routing management operation by the standby machine according to the target routing information.
In this embodiment, whether an information synchronization request sent by the standby machine is received is determined, and if the information synchronization request sent by the standby machine is received, after receiving the link state broadcast information and the neighbor information sent by the neighbor router, the received neighbor information, the link state broadcast information, and the corresponding interface information are acquired, at this time, the interface information, the neighbor information, and the link state broadcast information of the host are used as target information to be synchronized, and the target information to be synchronized is synchronized to the standby machine. And determining a target algorithm for performing routing calculation on the target information, so that the standby machine performs routing calculation on the target information according to the target algorithm to obtain target routing information, so as to ensure the consistency of the routing information of the host machine and the standby machine, so that when the host machine enters a fault state, the host machine is directly switched to the standby machine, and the standby machine performs routing management operation according to the routing information to manage all routing information in the networking.
In a specific operation process, the target information of the host may be dynamically changed due to the influence of other external routers. When the target information of the host changes, the host actively sends a notification message to the standby machine, and synchronously changes the target information of the standby machine according to the changed target information to realize incremental synchronization. Therefore, in an embodiment, after the step of synchronizing the target information to be synchronized to the standby machine, the method further includes: judging whether the link state update information exists or not; and if so, sending the updating information to the standby machine so that the standby machine can update the link state broadcast information according to the updating information. If the host receives the update information of the link state broadcast information of other neighbor routers, the host is judged to have the update information of the link state, and the update information is sent to the standby machine so that the standby machine can update the link state broadcast information of the standby machine according to the update information, and therefore the link state broadcast information of the standby machine is ensured to be consistent with the link state broadcast information of the host. The update information of the link state broadcast information may include: link state update information such as addition and deletion of links, adjustment of links, and the like.
In an embodiment, after the step of synchronizing the target information to be synchronized to the standby machine, the method further includes: judging whether update information of a neighbor router exists or not; and if so, sending the updating information to the standby machine so that the standby machine updates the neighbor information of the standby machine according to the updating information to keep consistent with the neighbor information of the host machine. Judging whether the host has the update information of the neighbor router according to whether the neighbor router connected with the host has the change, if so, judging that the update information of the neighbor router exists, and sending the update information to the standby machine so that the standby machine can update the neighbor information of the standby machine according to the update information to ensure that the neighbor information of the standby machine is consistent with the neighbor information of the host. The update information may include: and adding, deleting or replacing information of the neighbor router connected with the host, and the like.
In an embodiment, after the step of synchronizing the target information to be synchronized to the standby machine by the control host, the method further includes: judging whether the update information of the interface exists or not; and if so, sending the updating information to the standby machine so that the standby machine updates the interface information of the standby machine according to the updating information, so that the interface information of the standby machine and the interface information of the host machine are kept consistent. Under certain specific conditions, if part of working ports of the host cannot work normally, the data information cannot be continuously acquired from the corresponding working ports, therefore, after the step of synchronizing the target information to be synchronized to the standby machine by the control host, whether the host has the update of the interface is judged, if the host has the update of the interface, the host is judged to have the update information of the interface, and at the moment, the control host sends the update information to the standby machine so that the standby machine updates the interface information of the standby machine according to the update information, and the consistency of the interface information of the standby machine and the interface information of the host is ensured. In addition, the interface updating information can also comprise abnormal information of the interface besides the addition and deletion information of the interface, if part or all of the interfaces of the host computer are abnormal, a corresponding interface switching command is generated and sent to the standby computer, so that the standby computer switches the corresponding interface of the standby computer to a working state to transmit data according to the interface switching command, and the host computer is switched back to after the abnormal interface of the host computer is repaired, and the interface of the host computer is utilized to perform corresponding data transmission operation.
It should be noted that if there are two or more updates in the interface information, the neighbor information, and the link state broadcast information, two or more updates are sent to the standby machine at the same time, that is, as long as there are any updates (which may be one, two, or three updates), the interface information, the neighbor information, and the link state broadcast information of the standby machine will be sent to the standby machine, so that the interface information, the neighbor information, and the link state broadcast information of the standby machine can be completely consistent with the host machine. Therefore, after the consistency of the interface information, the neighbor information and the link state broadcast information of the standby machine and the interface information, the neighbor information and the link state broadcast information of the host machine is ensured, the consistency of the routing information of the standby machine and the routing information of the host machine can be ensured according to the routing algorithm, so that when the host machine enters a fault state, the standby machine is directly switched to, and the standby machine executes routing management operation according to the calculated target routing information.
In this embodiment, when an information synchronization request of a standby device is received, interface information, neighbor information, and link state broadcast information are synchronized to the standby device as target information to be synchronized, and a target algorithm for performing routing calculation on the target information is determined, so that after the standby device performs routing calculation on the target information according to the target algorithm to obtain target routing information, if a host enters a fault state, the standby device is switched to the standby device, and the standby device performs routing management operation according to the routing information.
Referring to fig. 4, fig. 4 is a flowchart of a third embodiment of a dual-computer hot-standby routing management method according to the present invention, in this embodiment, the dual-computer hot-standby routing management method includes the following steps:
step S21: judging whether an information synchronization request sent by a standby machine is received;
step S22: if the target information is received, the control host synchronizes the target information to be synchronized to the standby machine, and determines a target algorithm for performing routing calculation on the target information, so that the standby machine calculates the target information according to the target algorithm to obtain target routing information;
step S23: when entering a fault state, switching the current mode into a client mode, and sending a mode switching command to the standby machine so as to switch the mode of the standby machine into a server mode;
step S24: and switching to the standby machine according to the switched mode, and executing the routing management operation by the standby machine according to the target routing information.
After the servers are connected, it is impossible to determine which server is the master and which is the slave, and therefore it is impossible to determine from which server the information synchronization request is sent. Therefore, when the two servers are both started, different priorities are configured for the two servers, the server with the high priority is determined as the host, the server with the low priority is determined as the standby, and then the information synchronization request is generated and sent to the host by setting the standby. In order to avoid information loss caused by network faults and other reasons, a host judges whether an information synchronization request sent by a standby machine is received or not, synchronizes target information to be synchronized to the standby machine when the information synchronization request sent by the standby machine is received, and determines a target algorithm for performing routing calculation on the target information so that the standby machine performs routing calculation on the target information according to the target algorithm to obtain target routing information.
When the host enters a fault state, because the dual hot-standby devices can be mutually backed up, the dual switching can be realized in a priority switching mode: if the host computer is in failure, the priority of the standby computer is switched to be higher than that of the host computer, at the moment, if the standby computer receives an information synchronization request sent by the host computer, the host computer can work normally, after the standby computer synchronizes target information to be synchronized to the host computer, the standby computer can be continuously controlled to execute the routing management operation until the standby computer enters a failure state, the priority of the host computer is switched to be higher than that of the standby computer again, the host computer with high priority executes the routing management operation, or after the standby computer synchronizes the target information to be synchronized to the host computer, the priority of the host computer is directly switched to be higher than that of the standby computer, and the host computer with high priority executes the routing management operation. Namely, the corresponding priority switching is carried out as long as the dual-computer switching occurs, and the priority can be automatically switched according to the pre-configured priority switching command when the dual-computer switching occurs. Certainly, when the host enters a fault state, that is, the host cannot normally operate with a high priority, at this time, switching of the priority may not be performed, the standby with a low priority is defaulted to perform the routing management operation according to the routing information until the standby receives an information synchronization request sent by the host, which indicates that the host can normally operate, at this time, the standby is controlled to synchronize target information to be synchronized to the host, after the host receives the synchronized target information, the host is preferentially selected according to the priority order to perform the routing management operation, and the standby is restored to a standby state, until the host enters the fault state again, the standby is controlled to perform the routing management operation.
In an embodiment, when the host enters a failure state, the dual-computer switching is realized by a mode switching manner. Before entering a fault state, the mode of the host is a server mode, the mode of the standby machine is a client mode, and at the moment, the host in the server mode executes routing management operation; and after the host enters a fault state, the host needs to be switched to the standby machine, and the standby machine executes the routing management operation, at this time, the current mode of the host is switched from the server mode to the client mode, and a mode switching command is sent to the standby machine so as to switch the mode of the standby machine to the server mode, so that the host is switched to the standby machine, and the standby machine in the server mode executes the routing management operation. After the standby machine in the server mode executes the routing management operation, if the fault of the host machine is repaired, the host machine can normally work, the current working mode can be continuously maintained at the moment, and the standby machine executes the management operation, so that the problem that the processing efficiency of the system is influenced due to information loss caused by frequent switching between the host machine and the standby machine is avoided; or sending an information synchronization request to the standby machine to receive the synchronization information sent by the standby machine, switching the current mode from the client mode to the server mode after receiving the synchronization information, and sending a mode switching instruction to the standby machine to switch the mode of the standby machine from the server mode to the client mode, so that the standby machine is switched back to the host machine according to the switched mode to execute the routing management operation by the host machine in the server state. The mode switching command can be sent manually or automatically by a system, and the automatic sending condition can be that one of the two hot standby parties enters a fault state, or that one of the two hot standby parties sends an information synchronization request after entering the fault state.
In this embodiment, by determining whether an information synchronization request sent by a standby machine is received, when the information synchronization request of the standby machine is received, target information to be synchronized is synchronized to the standby machine, and a target algorithm for performing routing calculation on the target information is determined, so that the standby machine performs routing calculation on the target information according to the target algorithm to obtain target routing information.
In addition, an embodiment of the present invention further provides a dual-server hot-standby routing management device, referring to fig. 5, fig. 5 is a functional module schematic diagram of an embodiment of the dual-server hot-standby routing management device of the present invention.
In this embodiment, the dual-device hot-standby routing management device includes:
the judging module 10: the system is used for judging whether an information synchronization request sent by a standby machine is received;
synchronization and determination module 20: the standby machine is used for synchronizing target information to be synchronized to the standby machine and determining a target algorithm for performing routing calculation on the target information when receiving an information synchronization request sent by the standby machine, so that the standby machine performs routing calculation on the target information according to the target algorithm to obtain target routing information;
the switching module 30: and the standby machine is used for switching to the standby machine when entering a fault state, and executing routing management operation according to the target routing information.
It should be noted that the embodiments of the dual-standby routing management apparatus are basically the same as the embodiments of the dual-standby routing management method, and detailed description thereof is omitted here.
The dual-computer hot standby routing management device provided in this embodiment determines, by the determining module 10, whether an information synchronization request sent by a standby computer is received, then, when receiving the information synchronization request sent by the standby computer, the synchronizing and determining module 20 synchronizes target information to be synchronized to the standby computer, and determines a target algorithm for performing routing calculation on the target information, so that the standby computer performs routing calculation on the target information according to the target algorithm to obtain target routing information, and then, when entering a fault state, the switching module 30 switches to the standby computer, and the standby computer performs routing management operation according to the target routing information, thereby avoiding information loss caused by network interruption, and improving routing management efficiency.
In addition, an embodiment of the present invention further provides a dual-standby routing management device, where the dual-standby routing management device includes a memory, a processor, and a dual-standby routing management program that is stored on the processor and can be run on the processor, and the processor implements the steps of the dual-standby routing management method when executing the dual-standby routing management program.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a dual-device hot-standby routing management program is stored on the computer-readable storage medium, and when executed by a processor, the dual-device hot-standby routing management program implements the steps of the dual-device hot-standby routing management method described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, a television, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (11)

1. A dual-computer hot standby route management method is characterized by comprising the following steps:
judging whether an information synchronization request sent by a standby machine is received;
if the target information is received, synchronizing the target information to be synchronized to a standby machine, and determining a target algorithm for performing routing calculation on the target information so that the standby machine performs routing calculation on the target information according to the target algorithm to obtain target routing information;
and when the router enters a fault state, switching to the standby machine, and executing the routing management operation by the standby machine according to the target routing information.
2. The dual-computer hot-standby routing management method according to claim 1, wherein the step of synchronizing the target information to be synchronized to the standby computer comprises:
acquiring interface information, neighbor information and link state broadcast information;
taking the interface information, the neighbor information and the link state broadcast information as target information to be synchronized;
and synchronizing the target information to be synchronized to the standby machine so as to keep the target information of the standby machine consistent with the host machine.
3. The dual-computer hot-standby routing management method according to claim 2, wherein after the step of synchronizing the target information to be synchronized to the standby computer, the method includes:
judging whether the link state update information exists or not;
and if so, sending the updating information to the standby machine so that the standby machine updates the link state broadcast information according to the updating information to keep the link state broadcast information of the standby machine consistent with the host machine.
4. The dual-computer hot-standby routing management method according to claim 2, wherein after the step of synchronizing the target information to be synchronized to the standby computer, the method includes:
judging whether update information of a neighbor router exists or not;
and if so, sending the updating information to the standby machine for the standby machine to update the neighbor information of the standby machine according to the updating information so as to keep the neighbor information of the standby machine consistent with the host.
5. The dual-computer hot-standby routing management method according to claim 1, wherein after the step of synchronizing the target information to be synchronized to the standby computer, the method includes:
judging whether the update information of the interface exists or not;
if the host computer exists, the control host computer sends the updating information to the standby computer, so that the standby computer updates the interface information of the standby computer according to the updating information, and the interface information of the standby computer is consistent with that of the host computer.
6. The dual-computer hot-standby routing management method according to claim 1, wherein the step of switching to the standby computer when entering the failure state, and executing the routing management operation by the standby computer according to the target routing information includes:
when entering a fault state, switching the current mode into a client mode, and sending a mode switching command to the standby machine so as to switch the mode of the standby machine into a server mode;
and switching to the standby machine according to the switched mode, and executing the routing management operation by the standby machine according to the target routing information.
7. The dual-computer hot-standby routing management method of claim 6, wherein the step of switching to the standby computer according to the switched priority, and the step of executing the routing management operation by the standby computer according to the target routing information, comprises:
if the fault is recovered, sending an information synchronization request to the standby machine so as to receive synchronization information sent by the standby machine;
after receiving the synchronous information, switching the client mode to the server mode, and sending a mode switching instruction to the standby machine so as to switch the mode of the standby machine to the client mode;
and executing the route management operation according to the switched mode.
8. The dual-computer hot-standby routing management method according to claim 1, wherein after the step of determining whether the information synchronization request sent by the standby computer is received, the method includes:
if the information synchronization request sent by the standby machine is not received within the preset time, whether the information synchronization request sent by the standby machine is received or not is judged again until the information synchronization request sent by the standby machine is received.
9. A dual-server hot-standby routing management device, comprising:
a judging module: the system is used for judging whether an information synchronization request sent by a standby machine is received;
a synchronization and determination module: the standby machine is used for synchronizing target information to be synchronized to the standby machine and determining a target algorithm for performing routing calculation on the target information when receiving an information synchronization request sent by the standby machine, so that the standby machine performs routing calculation on the target information according to the target algorithm to obtain target routing information;
a switching module: and the standby machine is used for switching to the standby machine when entering a fault state, and executing routing management operation according to the target routing information.
10. A dual-server hot-standby routing management device, comprising a memory, a processor and a dual-server hot-standby routing management program stored in the memory and operable on the processor, wherein the processor implements the steps of the dual-server hot-standby routing management method according to any one of claims 1 to 8 when executing the dual-server hot-standby routing management program.
11. A computer-readable storage medium, wherein the computer-readable storage medium has a dual-server hot-standby routing management program stored thereon, and when the dual-server hot-standby routing management program is executed by a processor, the steps of the dual-server hot-standby routing management method according to any one of claims 1 to 8 are implemented.
CN202010146359.5A 2020-03-04 2020-03-04 Route management method, device, equipment and storage medium for dual-computer hot standby Active CN111371680B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010146359.5A CN111371680B (en) 2020-03-04 2020-03-04 Route management method, device, equipment and storage medium for dual-computer hot standby

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010146359.5A CN111371680B (en) 2020-03-04 2020-03-04 Route management method, device, equipment and storage medium for dual-computer hot standby

Publications (2)

Publication Number Publication Date
CN111371680A true CN111371680A (en) 2020-07-03
CN111371680B CN111371680B (en) 2022-04-29

Family

ID=71211718

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010146359.5A Active CN111371680B (en) 2020-03-04 2020-03-04 Route management method, device, equipment and storage medium for dual-computer hot standby

Country Status (1)

Country Link
CN (1) CN111371680B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114157555A (en) * 2021-11-12 2022-03-08 杭州迪普科技股份有限公司 Access information synchronization method
CN114337944A (en) * 2022-03-16 2022-04-12 中国人民解放军海军工程大学 System-level main/standby redundancy general control method

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1610898A (en) * 2001-08-22 2005-04-27 诺基亚公司 Method and system for implementing OSPF redundancy
CN1725733A (en) * 2005-06-10 2006-01-25 杭州华为三康技术有限公司 Method of route backup in combination equipment and combination equipment
US20060174012A1 (en) * 2005-02-01 2006-08-03 Fujitsu Limited Relay method, relay apparatus, and computer product
CN101547145A (en) * 2008-03-27 2009-09-30 迈普通信技术股份有限公司 Method for quickly converging routing for RIP dynamic routing protocol
US20100138686A1 (en) * 2008-11-26 2010-06-03 Hitachi, Ltd. Failure recovery method, failure recovery program and management server
CN102916825A (en) * 2011-08-01 2013-02-06 中兴通讯股份有限公司 Management equipment of dual-computer hot standby system, management method and dual-computer hot standby system
CN103441870A (en) * 2013-08-20 2013-12-11 苏州迈科网络安全技术股份有限公司 Intelligent real-time seamless switching two unit standby method
CN104778102A (en) * 2015-03-27 2015-07-15 深圳市创梦天地科技有限公司 Master-slave switching method and system
CN106383706A (en) * 2016-09-05 2017-02-08 广州云晫信息科技有限公司 Virtual desktop and virtual operation system-based adaptive cloud desktop service system
CN106789634A (en) * 2016-11-17 2017-05-31 深圳市深信服电子科技有限公司 Static routing management method and system based on the double primary climates of link load
CN108616455A (en) * 2018-04-23 2018-10-02 上海泰砚通信技术有限公司 A kind of route synchronization method of single machine pile system
CN108933818A (en) * 2018-06-21 2018-12-04 新华三技术有限公司 Communication means and device
CN109219105A (en) * 2017-06-30 2019-01-15 中国电信股份有限公司 Route switching method and route handoff system
CN109274763A (en) * 2018-10-24 2019-01-25 厦门科华恒盛股份有限公司 A kind of information synchronization method and two-node cluster hot backup equipment
CN109347733A (en) * 2018-11-20 2019-02-15 广东电网有限责任公司 Method, client and the server of terminal data progress route backup

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1610898A (en) * 2001-08-22 2005-04-27 诺基亚公司 Method and system for implementing OSPF redundancy
US20060174012A1 (en) * 2005-02-01 2006-08-03 Fujitsu Limited Relay method, relay apparatus, and computer product
CN1725733A (en) * 2005-06-10 2006-01-25 杭州华为三康技术有限公司 Method of route backup in combination equipment and combination equipment
CN101547145A (en) * 2008-03-27 2009-09-30 迈普通信技术股份有限公司 Method for quickly converging routing for RIP dynamic routing protocol
US20100138686A1 (en) * 2008-11-26 2010-06-03 Hitachi, Ltd. Failure recovery method, failure recovery program and management server
CN102916825A (en) * 2011-08-01 2013-02-06 中兴通讯股份有限公司 Management equipment of dual-computer hot standby system, management method and dual-computer hot standby system
CN103441870A (en) * 2013-08-20 2013-12-11 苏州迈科网络安全技术股份有限公司 Intelligent real-time seamless switching two unit standby method
CN104778102A (en) * 2015-03-27 2015-07-15 深圳市创梦天地科技有限公司 Master-slave switching method and system
CN106383706A (en) * 2016-09-05 2017-02-08 广州云晫信息科技有限公司 Virtual desktop and virtual operation system-based adaptive cloud desktop service system
CN106789634A (en) * 2016-11-17 2017-05-31 深圳市深信服电子科技有限公司 Static routing management method and system based on the double primary climates of link load
CN109219105A (en) * 2017-06-30 2019-01-15 中国电信股份有限公司 Route switching method and route handoff system
CN108616455A (en) * 2018-04-23 2018-10-02 上海泰砚通信技术有限公司 A kind of route synchronization method of single machine pile system
CN108933818A (en) * 2018-06-21 2018-12-04 新华三技术有限公司 Communication means and device
CN109274763A (en) * 2018-10-24 2019-01-25 厦门科华恒盛股份有限公司 A kind of information synchronization method and two-node cluster hot backup equipment
CN109347733A (en) * 2018-11-20 2019-02-15 广东电网有限责任公司 Method, client and the server of terminal data progress route backup

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ANDR´E ORIANI: "From Backup to Hot Standby: High Availability for HDFS", 《2012 31ST INTERNATIONAL SYMPOSIUM ON RELIABLE DISTRIBUTED SYSTEMS》 *
蒋涛: "一种面向客户端的双机热备机制的研究与实现", 《CNKI中国硕士论文全文数据库》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114157555A (en) * 2021-11-12 2022-03-08 杭州迪普科技股份有限公司 Access information synchronization method
CN114157555B (en) * 2021-11-12 2023-05-26 杭州迪普科技股份有限公司 Access information synchronization method
CN114337944A (en) * 2022-03-16 2022-04-12 中国人民解放军海军工程大学 System-level main/standby redundancy general control method

Also Published As

Publication number Publication date
CN111371680B (en) 2022-04-29

Similar Documents

Publication Publication Date Title
CN100568854C (en) A kind of method and interface board that keeps neighborhood
EP2595348B1 (en) Streaming service load sharing method, streaming service processing method, device and system thereof
CN103535016A (en) Hitless switchover from active tcp application to standby tcp application
EP2916487B1 (en) Method and system for upgrading patching software
CN102137017A (en) Working method and device used for virtual network unit
US9215607B2 (en) Main/standby switching interface module, network element system, and link information synchronization detection method
CN111371680B (en) Route management method, device, equipment and storage medium for dual-computer hot standby
US9755909B2 (en) Method, device and system for controlling network path
CN106878072B (en) Message transmission method and device
CN104869057A (en) OpeFlow switch graceful restart processing method, device and OpeFlow controller
CN103384212A (en) Double-machine high availability scheme for communication application system and implementation thereof
US20130132499A1 (en) Method and system for auto-configuartion, and network node
CN109450707B (en) Data transmission method and device, gateway equipment and readable storage medium
CN111371625A (en) Method for realizing dual-computer hot standby
US20150249599A1 (en) Virtual cluster establishment method and network device
CN105340226A (en) Primary and secondary system handover method for dynamic route device, and apparatus thereof
CN110895469A (en) Method and device for upgrading dual-computer hot standby system, electronic equipment and storage medium
CN111343019A (en) Reconnection method, reconnection device and storage medium
CN109302328B (en) Hot standby switching method and system for VXLAN (virtual extensible local area network)
CN106411574B (en) Management control method and device
EP3002906A1 (en) Method and device for updating radio network controller
JP6383232B2 (en) Relay system and switch device
CN105763442A (en) PON system and method avoiding interruption of LACP aggregation link in main-standby switching process
CA2789794C (en) Method and system for emergency switching
CN104836729A (en) Linear protection switching method, PE (provider edge) equipment and linear protection switching system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant