Method and device for accelerating OSPF routing protocol convergence speed and medium

By using the backup LSDB to store the LAS when the link is disconnected in the OSPF router and determining whether to update the routing table based on the threshold of the link disconnection time, the problem of long convergence time of traditional OSPF protocol is solved, and faster and more stable routing recovery is achieved.

CN119892715AActive Publication Date: 2025-04-25INSPUR NETWORK TECH (SHANDONG) CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510050548.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-04-25
Estimated Expiration
2045-01-13

AI Technical Summary

Technical Problem

After the link is disconnected by the traditional OSPF protocol, the router needs to repropagate the LSA and recalculate the shortest path tree, resulting in a long routing convergence time, causing short-term instability of the network and routing black hole phenomenon.

Method used

A backup LSDB is preset in the OSPF router to store the LAS for disconnected links. When the link is disconnected, the LAS is stored to the standby LSDB and attempts to restore the link connection. If the link disconnection time is less than or equal to the preset time threshold, it is determined whether the LAS in the standby LSDB and the information in the main LSDB are consistent. If consistent, the routing calculation is performed based on the standby LSDB; if inconsistent, the router's routing table is updated based on the primary LSDB. If the link disconnection time is greater than the time threshold, delete the LAS in the standby LSDB, build a new LAS and transfer it to the remaining OSPF routers within the autonomous system.

Benefits of technology

By quickly recovering routing computing and reducing redundant network synchronization processes, the convergence speed of OSPF routing protocol is significantly accelerated, reducing network instability and routing black holes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892715A_ABST
    Figure CN119892715A_ABST
Patent Text Reader

Abstract

The invention discloses a method and equipment for increasing the convergence speed of an OSPF routing protocol and a medium, and belongs to the technical field of computer networks. The method comprises the following steps: constructing a standby LSDB in each OSPF router under the autonomous system; and when any OSPF router detects that the link between the OSPF router and another OSPF router is disconnected, storing the disconnected LAS to the standby LSDB of the OSPF router, and trying to recover the connection. Judging whether the link disconnection time exceeds a preset threshold value or not; if not, checking whether the LAS in the standby LSDB is consistent with the LSDB information or not; if yes, routing calculation is carried out based on the LAS of the standby LSDB, and if not, the OSPF router is updated according to the LSDB information and calculation is carried out. And if the link disconnection time exceeds a threshold value, deleting the LAS in the standby LSDB, constructing a new LAS, and transmitting the new LAS to other OSPF routers in the autonomous system. According to the method, the technical effect of increasing the convergence speed of the OSPF routing protocol is achieved to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computer networks, and in particular to a method, device and medium for accelerating the convergence speed of an OSPF routing protocol. Background Art

[0002] The OSPF protocol is a widely used internal gateway protocol. The OSPF protocol exchanges routing information through LAS (LSA) to ensure that the routing tables of each router in the network are consistent. When the network topology changes, especially when a link is disconnected or a neighbor relationship is lost, the OSPF protocol needs to go through a series of processes to ensure routing convergence, that is, all routers in the network update their routing tables to reflect the latest network topology.

[0003] However, in the traditional OSPF protocol, after a link is disconnected, routers usually discard the LSA related to the link and synchronize the latest network topology by exchanging LSAs after reestablishing neighbor relationships. This process includes retransmitting LSAs and recalculating the shortest path tree, which may lead to a long routing convergence time, thus causing short-term instability and routing black hole phenomena in the network. Especially when the link is restored quickly, reestablishing neighbor relationships and retransmitting LSAs becomes a redundant process, wasting time and bandwidth.

[0004] Therefore, how to speed up the convergence of OSPF routing protocol has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The embodiments of the present application provide a method, device and medium for accelerating the convergence speed of the OSPF routing protocol, so as to solve the following technical problem: how to accelerate the convergence speed of the OSPF routing protocol.

[0006] In a first aspect, an embodiment of the present application provides a method for accelerating the convergence speed of the OSPF routing protocol, which is applied to multiple OSPF routers in an autonomous system, and the OSPF routers are configured with an LSDB. The method includes: when any OSPF router detects that a link with another OSPF router is disconnected, storing the LAS of the disconnected link to a backup LSDB preset by any OSPF router; wherein the backup LSDB is used to store the LAS of the disconnected link; any OSPF router attempts to restore the link connection with another OSPF; determines whether the disconnection time of the link is greater than a preset time threshold; if the disconnection time of the link is less than or equal to the time threshold, determines whether the backup LSDB Check whether the LAS in the LSDB is consistent with the information in the LSDB; the information in the LSDB includes the DD messages sent by the remaining OSPF routers in the autonomous system to any OSPF router; if the LAS in the standby LSDB is consistent with the information in the LSDB, perform route calculation based on the LAS in the standby LSDB; if the LAS in the standby LSDB is inconsistent with the information in the LSDB, update any OSPF router based on the information in the LSDB and perform route calculation; if the disconnection time of the link is greater than the time threshold, delete the LAS in the standby LSDB, build a new LAS and transmit the new LAS to the remaining OSPF routers in the autonomous system.

[0007] In one implementation of the present application, when any OSPF router detects that the link with another OSPF router is disconnected, before storing the LAS of the disconnected link to the backup LSDB preset by any OSPF router, the method also includes: when the OSPF router triggers a preset update condition, constructing a backup LSDB synchronized with the LSDB to the OSPF router; wherein the update condition includes at least one of the following: autonomous system initialization, update or reset, OSPF router initialization or update.

[0008] In one implementation of the present application, when any OSPF router detects that a link with another OSPF router is disconnected, before storing the LAS of the disconnected link to the backup LSDB of any OSPF router, the method also includes: taking any OSPF router as a reference, based on a preset BFD mechanism, determining the connection status of any OSPF router with a connected OSPF router; and / or taking any OSPF router as a reference, detecting the interface status of any OSPF router with an adjacent OSPF router; wherein the interface status includes access and disconnection.

[0009] In one implementation of the present application, any OSPF router attempts to restore the link connection with another OSPF, specifically including: any OSPF router sends a Hello message to another OSPF router; and / or any OSPF router sends a DD message to another OSPF router; monitors the feedback of the other OSPF router; if there is feedback from the other OSPF router, any OSPF router is connected to the other OSPF; if there is no feedback from the other OSPF router, any OSPF router is not connected to the other OSPF.

[0010] In one implementation of the present application, if the disconnection time of the link is less than or equal to the time threshold, it is determined whether the information of the LAS in the standby LSDB is consistent with that in the LSDB, specifically including: comparing the standby verification information of the LAS in the standby LSDB with the main verification information in the LSDB to determine whether the standby verification information and the main verification information match; wherein the standby verification information and the main verification information both include at least one of the following: serial number, update time, checksum and OSPF router ID; if the standby verification information matches the main verification information, the LAS in the standby LSDB is consistent with the information in the LSDB; if there is a mismatch between the standby verification information and the main verification information, the LAS in the standby LSDB is inconsistent with the information in the LSDB.

[0011] In one implementation of the present application, if the LAS in the backup LSDB is consistent with the information in the LSDB, route calculation is performed based on the LAS in the backup LSDB, specifically including: extracting the LAS in the backup LSDB to determine the extracted LAS; based on the extracted LAS, combined with the preset OSPF routing algorithm, calculating the shortest path from any OSPF router to the remaining OSPF routers under the AS system; and writing the shortest path into the routing table of any OSPF router.

[0012] In one implementation of the present application, if the LAS in the backup LSDB is inconsistent with the information in the LSDB, any OSPF router is updated based on the information in the LSDB, specifically including: deleting the LAS in the backup LSDB; performing route calculation based on the information in the LSDB; processing the information in the LSDB based on the OSPF routing algorithm to calculate the shortest path for any OSPF router to reach the remaining OSPF routers in the AS system; and writing the shortest path into the routing table of any OSPF router.

[0013] In one implementation of the present application, if the disconnection time of the link is greater than the time threshold, the LAS in the backup LSDB is deleted, a new LAS is constructed and the new LAS is transmitted to the remaining OSPF routers in the autonomous system, specifically including: deleting the LAS in the backup LSDB; constructing a new LAS according to the network topology of any OSPF router; generating a serial number for the new LAS, resetting the update time of the new LAS, calculating the checksum of the new LAS, and marking any OSPF router ID to the new LAS; transmitting the serial number, update time, checksum and any OSPF router ID of the new LAS to the remaining OSPF routers in the autonomous system.

[0014] In a second aspect, an embodiment of the present application further provides a device for accelerating the convergence speed of the OSPF routing protocol, the device comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: when any OSPF router detects that a link with another OSPF router is disconnected, store the LAS of the disconnected link to a backup LSDB preset by any OSPF router; wherein the backup LSDB is used to store the LAS of the disconnected link; any OSPF router attempts to restore the link connection with another OSPF; and determines whether the disconnection time of the link is greater than a preset time threshold. value; if the link disconnection time is less than or equal to the time threshold, determine whether the LAS in the standby LSDB is consistent with the information in the LSDB; wherein, the information in the LSDB includes DD messages sent by the remaining OSPF routers in the autonomous system to any OSPF router; if the LAS in the standby LSDB is consistent with the information in the LSDB, perform route calculation based on the LAS in the standby LSDB; if the LAS in the standby LSDB is inconsistent with the information in the LSDB, update any OSPF router based on the information in the LSDB and perform route calculation; if the link disconnection time is greater than the time threshold, delete the LAS in the standby LSDB, build a new LAS and transmit the new LAS to the remaining OSPF routers in the autonomous system.

[0015] In a third aspect, an embodiment of the present application further provides a non-volatile computer storage medium for accelerating the convergence speed of the OSPF routing protocol, storing computer executable instructions, characterized in that the computer executable instructions are configured as follows: when any OSPF router detects that a link with another OSPF router is disconnected, the LAS of the disconnected link is stored in a backup LSDB preset by any OSPF router; wherein the backup LSDB is used to store the LAS of the disconnected link; any OSPF router attempts to restore the link connection with another OSPF; determines whether the disconnection time of the link is greater than a preset time threshold; if the disconnection time of the link is less than or equal to the time threshold, determines Whether the LAS in the standby LSDB is consistent with the information in the LSDB; wherein, the information in the LSDB includes the DD messages sent by the remaining OSPF routers in the autonomous system to any OSPF router; if the LAS in the standby LSDB is consistent with the information in the LSDB, perform route calculation based on the LAS in the standby LSDB; if the LAS in the standby LSDB is inconsistent with the information in the LSDB, update any OSPF router based on the information in the LSDB and perform route calculation; if the link disconnection time is greater than the time threshold, delete the LAS in the standby LSDB, build a new LAS and transmit the new LAS to the remaining OSPF routers in the autonomous system.

[0016] The embodiment of the present application provides a method, device and medium for accelerating the convergence speed of the OSPF routing protocol. By storing the LAS when the link is disconnected in a preset standby LSDB, the route calculation can be quickly restored when the link is temporarily disconnected, without waiting for the link to be fully restored or relearning the entire network topology. When the link disconnection time is less than or equal to the preset time threshold, by comparing the information in the standby LSDB with the current LSDB, if they are consistent, the route calculation is directly based on the standby LSDB, which greatly shortens the route convergence time. If they are inconsistent, the router is updated based on the LSDB to ensure the accuracy of the routing information. When the link disconnection time exceeds the time threshold, the outdated LAS in the standby LSDB is deleted, and a new LAS is constructed and transmitted to the remaining OSPF routers in the autonomous system, ensuring the real-time and accuracy of the network topology information and improving the reliability and stability of the network. In summary, the present application has the effect of accelerating the convergence speed of the OSPF routing protocol. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0018] Figure 1 A flow chart of a method for accelerating the convergence speed of the OSPF routing protocol provided in an embodiment of the present application;

[0019] Figure 2 A schematic diagram of the internal structure of a device for accelerating the convergence speed of the OSPF routing protocol provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0021] The embodiments of the present application provide a method, device and medium for accelerating the convergence speed of the OSPF routing protocol, so as to solve the following technical problem: how to accelerate the convergence speed of the OSPF routing protocol.

[0022] The technical solution proposed in the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0023] Figure 1 A flow chart of accelerating the convergence speed of OSPF routing protocol is provided in the embodiment of the present application. Figure 1 As shown, a method for accelerating the convergence speed of the OSPF routing protocol provided in an embodiment of the present application specifically includes the following steps:

[0024] Step 1: When any OSPF router detects that a link with another OSPF router is disconnected, the LAS of the disconnected link is stored in a backup LSDB preset by any OSPF router; wherein the backup LSDB is used to store the LAS of the disconnected link.

[0025] In one embodiment, the link between OSPF router A and OSPF router B is disconnected. At this time, OSPF router A will monitor this change and store the LAS of the link disconnection related to OSPF router B (such as the LAS describing the network topology, metric and other information of the link) in its backup LSDB, that is, store the LAS of the link disconnection to the backup LSDB preset by any OSPF router.

[0026] It should be noted that, during the storage process, the LAS in the standby LSDB of OSPF router A is kept consistent with the LAS in the LSDB so that it can be directly replaced or used during subsequent recovery.

[0027] Before executing step 1, you need to build a backup LSDB for the OSPF router to store the LAS for the link disconnection.

[0028] That is, when the OSPF router triggers the preset update condition, a standby LSDB synchronized with the LSDB is constructed to the OSPF router; wherein the update condition includes at least one of the following: autonomous system initialization, update or reset, OSPF router initialization or update.

[0029] In one embodiment, when the autonomous system is initialized, the OSPF router will build and initialize its LSDB. At this time, a standby LSDB that is exactly the same as the LSDB will also be built. During the operation of the autonomous system, if the LSDB is updated (such as adding, deleting or modifying LAS), the standby LSDB will also be synchronized and updated accordingly to maintain consistency with the LSDB.

[0030] Before executing step 1, it is necessary to monitor the link connection relationship of other OSPF routers connected to any OSPF router as a benchmark.

[0031] That is, taking any OSPF router as a reference, the connection status between any OSPF router and an adjacent OSPF router is determined based on a preset BFD mechanism. And / or taking any OSPF router as a reference, the interface status between any OSPF router and an adjacent OSPF router is detected; wherein the interface status includes access and disconnection.

[0032] Taking any OSPF router as the benchmark, the connection status between the OSPF router and the adjacent OSPF router is determined based on the preset Bidirectional Forwarding Detection (BFD) mechanism. BFD is a lightweight and fast fault detection mechanism that can detect changes in link status within milliseconds.

[0033] And / or, taking any OSPF router as a reference, detecting the interface status of the OSPF router and the adjacent OSPF router. The interface status includes access and disconnection. By regularly detecting the interface status, the link disconnection can be discovered in time and the subsequent processing flow can be triggered.

[0034] Step 2: Either OSPF router attempts to restore the link connection with the other OSPF router.

[0035] Step 21: Any OSPF router sends a Hello message to another OSPF router.

[0036] Hello messages are used in the OSPF protocol to discover and maintain neighbor relationships. When this OSPF router recognizes that the link connection with the target router is lost, it will first try to send a Hello message to re-establish the neighbor relationship.

[0037] And / or step 22, any OSPF router sends a DD message to another OSPF router.

[0038] DD (Database Description) messages are messages used in the OSPF protocol to exchange summary information of the link state database. When trying to restore a link connection, this router can also choose to send DD messages at the same time to speed up the establishment of neighbor relationships and the synchronization of link states.

[0039] Step 23: Monitor the feedback from another OSPF router.

[0040] After sending Hello messages and / or DD messages, the router needs to monitor the feedback from the target router, which includes receiving Hello messages, DD messages, or other related OSPF messages sent by the target router to confirm whether the target router responds to the connection attempt of the router.

[0041] Step 24: If there is feedback from another OSPF router, any OSPF router is connected to the other OSPF.

[0042] If the router receives a valid feedback message (such as a Hello message or a DD message) from the target router within the scheduled time, it means that the link connection has been restored or is in the process of being restored. At this time, the router will update its neighbor status with the target router and continue the subsequent OSPF protocol interaction.

[0043] Step 25: If there is no feedback from another OSPF router, then either OSPF router is not connected to the other OSPF.

[0044] If the router does not receive any valid feedback message from the target router within the predetermined time, it means that the link connection still cannot be restored.

[0045] Step 3: Determine whether the link disconnection time is greater than a preset time threshold.

[0046] The "preset time threshold" in this step refers to a time limit set in advance based on network operation and maintenance experience or business requirements, and is used to determine the acceptable range of link disconnection time.

[0047] Step 4: If the link disconnection time is less than or equal to the time threshold, determine whether the information in the LAS in the standby LSDB is consistent with that in the LSDB; wherein the information in the LSDB includes DD messages sent by the remaining OSPF routers in the autonomous system to any OSPF router.

[0048] Step 41, compare the backup authentication information of LAS in the backup LSDB with the main authentication information in the LSDB to determine whether the backup authentication information and the main authentication information match; wherein the backup authentication information and the main authentication information both include at least one of the following: serial number, update time, checksum and OSPF router ID.

[0049] The backup authentication information of the LAS stored in the backup LSDB is compared in detail with the primary authentication information in the LSDB. The backup authentication information and the primary authentication information are key indicators used to ensure data consistency and integrity. The backup authentication information and the primary authentication information include at least the following types of information:

[0050] Sequence number: used to identify the version of the entry in the LSDB and ensure the correctness of the update sequence.

[0051] Update time: The timestamp when the record entry was last updated, used to determine the timeliness of the information.

[0052] Checksum: A checksum value calculated from the contents of an LSDB entry, used to detect errors during data transmission or storage.

[0053] OSPF router ID: unique identifier of the OSPF router that sends the LAS, ensuring the reliability of the information source.

[0054] In one embodiment, there is an OSPF router A, which stores DD message information from other routers in its LSDB. After the link between A and neighbor router B is temporarily disconnected (the disconnection time does not exceed the set time threshold), A needs to recover LAS information from its standby LSDB. At this time, A will execute step 41, comparing the sequence number, update time, checksum and router ID of B's ​​LAS in the standby LSDB with the information of the corresponding items in the main LSDB. If all these verification information are matched, then enter the next step of judgment.

[0055] Step 42: If the backup authentication information matches the primary authentication information, the LAS in the backup LSDB is consistent with the information in the LSDB.

[0056] If all the standby authentication information of the LAS in the standby LSDB is completely consistent with the main authentication information in the main LSDB after the comparison in step 41, it can be considered that the LAS in the standby LSDB is synchronized and consistent with the information in the LSDB. This means that during the link disconnection, the standby LSDB successfully maintains the same state information as the main LSDB without the need for a complex resynchronization process.

[0057] Continuing with the embodiment of step 41, if router A finds that all verification information (serial number, update time, checksum, router ID) about the LAS of router B in the backup LSDB is exactly the same as the record in the main LSDB, A confirms that the LAS in the backup LSDB is valid and can be used directly without re-obtaining the DD message from B.

[0058] Step 43: If the backup authentication information does not match the primary authentication information, the LAS in the backup LSDB is inconsistent with the information in the LSDB.

[0059] If any mismatch between the backup authentication information and the primary authentication information is found during the comparison process of step 41, this indicates that the LAS in the backup LSDB may be outdated or has become inaccurate for some reason.

[0060] Step 5: If the LAS in the standby LSDB is consistent with the information in the LSDB, route calculation is performed based on the LAS in the standby LSDB.

[0061] Step 51: extract LAS from the standby LSDB to determine the extracted LAS.

[0062] This action refers to the process of retrieving or obtaining a Link State Advertisement (LAS) from the backup LSDB. LAS is a data packet used in the OSPF (Open Shortest Path First) protocol to describe network topology, link status, and interface information.

[0063] Step 52: Based on the extracted LAS and in combination with a preset OSPF routing algorithm, the shortest path from any OSPF router to the remaining OSPF routers in the AS system is calculated.

[0064] Step 53: Write the shortest path into the routing table of any OSPF router.

[0065] In one embodiment, there are multiple OSPF routers in the network, and each router maintains a main LSDB and a standby LSDB. When it is necessary to verify and possibly use the standby LSDB, router A will extract all LAS information from its standby LSDB, which includes information such as the status of other routers in the network, interface IP addresses, etc., and router A uses the LAS information extracted from the standby LSDB, combined with the OSPF algorithm of OSPF, to calculate the shortest path from router A to all other OSPF routers in the AS (such as routers B, C, D, etc.). It is understandable that these shortest path paths are determined based on factors such as link cost and network topology, and the OSPF algorithm is a prior art. Router A writes the calculated shortest path information to other OSPF routers (such as reaching router B through interface X, reaching router C through interface Y, etc.) into its routing table. In this way, when router A receives a data packet that needs to be forwarded to these destinations, router A can select the optimal path for forwarding according to the information in the routing table.

[0066] Step 6: If the LAS in the standby LSDB is inconsistent with the information in the LSDB, update any OSPF router based on the information in the LSDB and perform route calculation.

[0067] Step 61: Delete the LAS in the standby LSDB.

[0068] In one embodiment, router A in the network finds that the LAS in its standby LSDB is inconsistent with the information in the active LSDB. In order to ensure the accuracy of the route, router A deletes all LAS information in the standby LSDB.

[0069] Step 62: Perform route calculation using the information in the LSDB.

[0070] The information in the LSDB is considered to be more accurate and reliable, so route calculations should be performed based on this information.

[0071] In one embodiment, after deleting the LAS in the standby LSDB, router A will use the information in its active LSDB to perform route calculations, including the status, link cost, interface IP addresses, etc. of other routers in the network.

[0072] Step 63: Process the information in the LSDB based on the OSPF routing algorithm to calculate the shortest path from any OSPF router to the remaining OSPF routers in the AS system.

[0073] In one embodiment, router A uses the information in the LSDB, combined with the OSPF algorithm of OSPF, to calculate the shortest path from router A to all other OSPF routers in the AS (such as routers B, C, D, etc.).

[0074] Step 64: Write the shortest path into the routing table of any OSPF router.

[0075] In one embodiment, router A writes the calculated shortest path information to other OSPF routers (eg, to reach router B, it should go through interface X; to reach router C, it should go through interface Y, etc.) into its routing table.

[0076] Step 7: If the link disconnection time is greater than the time threshold, delete the LAS in the standby LSDB, build a new LAS and transmit the new LAS to the remaining OSPF routers in the autonomous system.

[0077] Step 71: Delete the LAS in the standby LSDB.

[0078] Step 72: Construct a new LAS according to the network topology of any OSPF router.

[0079] After deleting the outdated LAS, a new LAS needs to be constructed based on the current network topology (i.e., the connectivity of the remaining links and routers). This step involves recalculating the link status in the network, including the link cost, neighbor relationships, etc., and generating a new LAS based on this to reflect the latest topology of the network.

[0080] Step 73: Generate a serial number for the new LAS, reset the update time of the new LAS, calculate the checksum of the new LAS, and identify any OSPF router ID to the new LAS.

[0081] Each LAS has a unique serial number that identifies its version and update order. The serial number of the new LAS should be higher than the previous version number to ensure that other routers can recognize that this is an updated information. The generation time of the new LAS needs to be recorded so that other routers can understand the timeliness of this information. Usually, this time is set to the current time when the LAS is generated. In order to ensure that the LAS is not tampered with during transmission, its checksum needs to be calculated. The checksum is a simple error detection mechanism that can verify the integrity of the data when it is received. The ID of the OSPF router that initiated this update is marked in the new LAS. The router ID is a unique identifier for each router in the OSPF network, which is used to distinguish different routers.

[0082] Step 74: Transmit the serial number, update time, checksum, and any OSPF router ID of the new LAS to the remaining OSPF routers in the autonomous system.

[0083] The above is an embodiment of the method proposed in this application. Based on the same inventive concept, the embodiment of this application also provides a device for accelerating the convergence speed of the OSPF routing protocol, and its structure is as follows: Figure 2 shown.

[0084] Figure 2 A schematic diagram of the internal structure of a device for accelerating the convergence speed of the OSPF routing protocol provided in an embodiment of the present application. Figure 2 As shown, the device includes:

[0085] at least one processor 201;

[0086] and, a memory 202 communicatively connected to the at least one processor;

[0087] The memory 202 stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor 201 to enable at least one processor 201 to:

[0088] When any OSPF router detects that the link with another OSPF router is disconnected, the LAS of the disconnected link is stored in the standby LSDB preset by any OSPF router; wherein the standby LSDB is used to store the LAS of the disconnected link; any OSPF router attempts to restore the link connection with another OSPF; it is determined whether the disconnection time of the link is greater than the preset time threshold; if the disconnection time of the link is less than or equal to the time threshold, it is determined whether the LAS in the standby LSDB is consistent with the information in the LSDB; wherein the information in the LSDB includes DD messages sent by the remaining OSPF routers in the autonomous system to any OSPF router; if the LAS in the standby LSDB is consistent with the information in the LSDB, a route calculation is performed based on the LAS in the standby LSDB; if the LAS in the standby LSDB is inconsistent with the information in the LSDB, any OSPF router is updated based on the information in the LSDB to perform a route calculation; if the disconnection time of the link is greater than the time threshold, the LAS in the standby LSDB is deleted, a new LAS is constructed and the new LAS is transmitted to the remaining OSPF routers in the autonomous system.

[0089] Some embodiments of the present application provide corresponding Figure 1 A non-volatile computer storage medium for accelerating the convergence speed of an OSPF routing protocol, storing computer executable instructions, wherein the computer executable instructions are set as follows:

[0090] When any OSPF router detects that the link with another OSPF router is disconnected, the LAS of the disconnected link is stored in the standby LSDB preset by any OSPF router; wherein the standby LSDB is used to store the LAS of the disconnected link; any OSPF router attempts to restore the link connection with another OSPF; it is determined whether the disconnection time of the link is greater than the preset time threshold; if the disconnection time of the link is less than or equal to the time threshold, it is determined whether the LAS in the standby LSDB is consistent with the information in the LSDB; wherein the information in the LSDB includes DD messages sent by the remaining OSPF routers in the autonomous system to any OSPF router; if the LAS in the standby LSDB is consistent with the information in the LSDB, a route calculation is performed based on the LAS in the standby LSDB; if the LAS in the standby LSDB is inconsistent with the information in the LSDB, any OSPF router is updated based on the information in the LSDB to perform a route calculation; if the disconnection time of the link is greater than the time threshold, the LAS in the standby LSDB is deleted, a new LAS is constructed and the new LAS is transmitted to the remaining OSPF routers in the autonomous system.

[0091] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the IoT device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0092] The system and medium provided in the embodiments of the present application correspond one-to-one to the method. Therefore, the system and medium also have similar beneficial technical effects to the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the system and medium will not be repeated here.

[0093] Those skilled in the art will appreciate that the embodiments of the present application may provide methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0094] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0095] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0096] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0097] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0098] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0099] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0100] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0101] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A method for accelerating the convergence speed of OSPF routing protocol, applied to multiple OSPF routers in an autonomous system, wherein the OSPF routers are configured with LSDB, characterized in that: The method comprises: When any OSPF router detects that a link with another OSPF router is disconnected, the LAS of the disconnected link is stored in a backup LSDB preset by any OSPF router; wherein the backup LSDB is used to store the LAS of the disconnected link; Any of the OSPF routers attempts to restore a link connection with another OSPF; Determine whether the disconnection time of the link is greater than a preset time threshold; If the disconnection time of the link is less than or equal to the time threshold, determine whether the LAS in the standby LSDB is consistent with the information in the LSDB; wherein the information in the LSDB includes DD messages sent by the remaining OSPF routers in the autonomous system to any of the OSPF routers; If the LAS in the standby LSDB is consistent with the information in the LSDB, performing route calculation based on the LAS in the standby LSDB; If the LAS in the standby LSDB is inconsistent with the information in the LSDB, updating any OSPF router based on the information in the LSDB to perform route calculation; If the disconnection time of the link is greater than the time threshold, the LAS in the standby LSDB is deleted, a new LAS is constructed and the new LAS is transmitted to the remaining OSPF routers in the autonomous system.

2. A method for accelerating the convergence speed of the OSPF routing protocol according to claim 1, characterized in that: When any OSPF router detects that a link with another OSPF router is disconnected, before storing the LAS of the disconnected link to the backup LSDB preset by any OSPF router, the method further includes: When the OSPF router triggers a preset update condition, a backup LSDB synchronized with the LSDB is constructed for the OSPF router; wherein the update condition includes at least one of the following: the autonomous system is initialized, updated or reset, and the OSPF router is initialized or updated.

3. A method for accelerating the convergence speed of OSPF routing protocol according to claim 1, characterized in that: When any OSPF router detects that a link with another OSPF router is disconnected, before storing the LAS of the disconnected link to the standby LSDB of any OSPF router, the method further includes: Taking any OSPF router as a reference, determining the connection status between any OSPF router and a connected OSPF router based on a preset BFD mechanism; and / or Taking any OSPF router as a reference, the interface status between any OSPF router and an adjacent OSPF router is detected; wherein the interface status includes access and disconnection.

4. The method for accelerating the convergence speed of the OSPF routing protocol according to claim 1, characterized in that: Any OSPF router attempts to restore the link connection with another OSPF router, specifically including: Any one of the OSPF routers sends a Hello message to the other OSPF router; and / or Any OSPF router sends a DD message to the other OSPF router; Monitoring feedback from the other OSPF router; If there is feedback from another OSPF router, any OSPF router is connected to the other OSPF; If there is no feedback from another OSPF router, then any one of the OSPF routers is not connected to the other OSPF.

5. The method for accelerating the convergence speed of the OSPF routing protocol according to claim 1, characterized in that: If the disconnection time of the link is less than or equal to the time threshold, determining whether the LAS in the standby LSDB is consistent with the information in the LSDB, specifically including: Comparing the standby authentication information of the LAS in the standby LSDB with the main authentication information in the LSDB to determine whether the standby authentication information and the main authentication information both match; wherein the standby authentication information and the main authentication information both include at least one of the following: a sequence number, an update time, a checksum, and an OSPF router ID; If the backup authentication information matches the primary authentication information, the LAS in the backup LSDB is consistent with the information in the LSDB; If there is a mismatch between the backup authentication information and the primary authentication information, the LAS in the backup LSDB is inconsistent with the information in the LSDB.

6. A method for accelerating the convergence speed of OSPF routing protocol according to claim 1, characterized in that: If the LAS in the standby LSDB is consistent with the information in the LSDB, performing route calculation based on the LAS in the standby LSDB specifically includes: Extracting the LAS in the standby LSDB to determine the extracted LAS; Based on the extracted LAS, combined with a preset OSPF routing algorithm, the shortest path from any OSPF router to the remaining OSPF routers in the AS system is calculated; The shortest path is written into the routing table of any OSPF router.

7. A method for accelerating the convergence speed of OSPF routing protocol according to claim 6, characterized in that: If the LAS in the standby LSDB is inconsistent with the information in the LSDB, updating any OSPF router based on the information in the LSDB specifically includes: Deleting the LAS in the standby LSDB; Performing route calculation using the information in the LSDB; Processing the information in the LSDB based on the OSPF routing algorithm to calculate the shortest path from any OSPF router to the remaining OSPF routers in the AS system; The shortest path is written into the routing table of any OSPF router.

8. A method for accelerating the convergence speed of OSPF routing protocol according to claim 5, characterized in that: If the disconnection time of the link is greater than the time threshold, deleting the LAS in the standby LSDB, constructing a new LAS and transmitting the new LAS to the remaining OSPF routers in the autonomous system, specifically including: Deleting the LAS in the standby LSDB; According to the network topology of any OSPF router, a new LAS is constructed; Generate a sequence number for a new LAS, reset the update time of the new LAS, calculate a checksum for the new LAS, and identify any OSPF router ID to the new LAS; The serial number, update time, checksum, and any OSPF router ID of the new LAS are transmitted to the remaining OSPF routers in the autonomous system.

9. A device for accelerating the convergence speed of OSPF routing protocol, characterized in that: The device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: When any OSPF router detects that a link with another OSPF router is disconnected, the LAS of the disconnected link is stored in a backup LSDB preset by any OSPF router; wherein the backup LSDB is used to store the LAS of the disconnected link; Any of the OSPF routers attempts to restore a link connection with another OSPF; Determine whether the disconnection time of the link is greater than a preset time threshold; If the disconnection time of the link is less than or equal to the time threshold, determine whether the LAS in the standby LSDB is consistent with the information in the LSDB; wherein the information in the LSDB includes DD messages sent by the remaining OSPF routers in the autonomous system to any of the OSPF routers; If the LAS in the standby LSDB is consistent with the information in the LSDB, performing route calculation based on the LAS in the standby LSDB; If the LAS in the standby LSDB is inconsistent with the information in the LSDB, updating any OSPF router based on the information in the LSDB to perform route calculation; If the disconnection time of the link is greater than the time threshold, the LAS in the standby LSDB is deleted, a new LAS is constructed and the new LAS is transmitted to the remaining OSPF routers in the autonomous system.

10. A non-volatile computer storage medium for accelerating the convergence speed of the OSPF routing protocol, storing computer executable instructions, characterized in that: The computer executable instructions are configured to: When any OSPF router detects that a link with another OSPF router is disconnected, the LAS of the disconnected link is stored in a backup LSDB preset by any OSPF router; wherein the backup LSDB is used to store the LAS of the disconnected link; Any of the OSPF routers attempts to restore a link connection with another OSPF; Determine whether the disconnection time of the link is greater than a preset time threshold; If the disconnection time of the link is less than or equal to the time threshold, determine whether the LAS in the standby LSDB is consistent with the information in the LSDB; wherein the information in the LSDB includes DD messages sent by the remaining OSPF routers in the autonomous system to any of the OSPF routers; If the LAS in the standby LSDB is consistent with the information in the LSDB, performing route calculation based on the LAS in the standby LSDB; If the LAS in the standby LSDB is inconsistent with the information in the LSDB, updating any OSPF router based on the information in the LSDB to perform route calculation; If the disconnection time of the link is greater than the time threshold, the LAS in the standby LSDB is deleted, a new LAS is constructed and the new LAS is transmitted to the remaining OSPF routers in the autonomous system.

Citation Information

Patent Citations

  • OSPF quick recovery method

    CN101594300A

  • Rapid routing convergence method and device

    CN108270677A

  • BGP+ based routing method and routing monitoring method between source and target terminals

    CN109150713A

  • Information transmission control method and apparatus, information receiving control method and apparatus, and computer readable storage medium

    CN109587822A

  • Method and device for realizing LSDB main / standby synchronization in OSPF protocol

    CN111190767A