Routing information processing method, ospf device and ospf network

By exchanging messages and modifying version identifiers between faulty devices and neighboring devices in an OSPF network, the problem of packet loss during fault recovery is solved, and accurate packet transmission is achieved.

CN116260763BActive Publication Date: 2025-11-18RUIJIE NETWORKS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111454974.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-01
Publication Date
2025-11-18
Estimated Expiration
2041-12-01

AI Technical Summary

Technical Problem

In OSPF networks, packet loss occurs when outdated LSAs are used for routing decisions during the recovery process of a failed router.

Method used

The faulty device sends a message containing the LSA version identifier after the fault is recovered to the neighboring device. The neighboring device modifies the version identifier according to the received message to ensure that the neighboring device uses the latest LSA for routing decisions.

Benefits of technology

By updating the LSA version identifier of neighboring devices, packet loss caused by using outdated LSAs is avoided, ensuring the accuracy of packet transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116260763B_ABST
    Figure CN116260763B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a kind of route information processing method, OSPF device and OSPF network, the method comprises: the first message is sent to neighbor device by fault device.The second message is fed back to fault device after neighbor device receives the first message.If this second message indicates that neighbor device has the version identification of LSA before fault of fault device, then fault device modifies the version identification of LSA after fault of fault device in the first message according to the version identification of this LSA before fault, and the third message obtained after modification is sent to neighbor device.Through the modification of version identification, the version of LSA after fault recovery in the third message is higher than the version of LSA before fault in the second message, and neighbor device will replace the second message with the third message, so that neighbor device obtains the version identification of the latest LSA of fault device and the LSA corresponding to the identification, and finally based on the latest LSA, packet is sent, so there will not be the problem of packet loss caused by using LSA before fault for routing decision.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of communication technology, and in particular to a routing information processing method, an OSPF device and an OSPF network. BACKGROUND

[0002] OSPF (Open Shortest Path First) is an Interior Gateway Protocol (IGP) formulated by IETF (Internet Engineering Task Force) and is used for making routing decisions in an autonomous system (AS).

[0003] According to the OSPF protocol, any router in the AS can send its locally stored Link-State Advertisement (LSA) to its neighbor routers, wherein the locally stored LSA of the router can include the LSA of the router itself or the LSA of other routers obtained from the neighbor routers. Eventually, each router in the AS obtains the LSA of all routers in the AS and generates a shortest path tree according to the LSA of each router. When transmitting a data packet, each router can make a routing decision according to the generated shortest path tree to obtain a target transmission path, and the data packet is transmitted through each router in the target transmission path in sequence to complete the transmission of the data packet.

[0004] In practice, any router in the target transmission path can fail, and the failed router has a recovery process to restore its data transmission capability. The recovery process of the failed router is a process of re-establishing the adjacency relationship between each router in the target transmission path of the failed router. After the adjacency relationship is established, routing decisions can be made again to continue the transmission of the data packet.

[0005] However, during the recovery process, the neighbor device of the failed device often uses the LSA of the failed device before the failure stored in itself to make routing decisions to transmit the data packet. At this time, the failed device is in the recovery process, and it has not calculated the shortest path tree for making routing decisions. Therefore, when the data packet is transmitted to the failed router, the failed router cannot determine which router in the AS to transmit the data packet to, i.e., if the data packet is sent to the failed device which is in the recovery state, the data packet will be lost. And until the failed router obtains the LSA of all routers in the AS and calculates the shortest path tree, the above data packet loss will disappear.

[0006] Therefore, how to improve the packet loss caused by using the old LSA to make routing decisions becomes a problem to be solved. SUMMARY

[0007] Therefore, the embodiments of the present application provide a routing information processing method, an OSPF device and an OSPF network to improve the packet loss.

[0008] In a first aspect, the embodiments of the present application provide a routing information processing method applied to a fault device in an open shortest path first (OSPF) network, wherein the fault device is in a fault recovery state, and the method comprises the following steps.

[0009] sending a first message to a neighbor device of the fault device, wherein the first message contains a version identifier of a link state advertisement (LSA) of the fault device after the fault recovery;

[0010] if a second message sent by the neighbor device indicates that the neighbor device has the LSA of the fault device, then modifying the version identifier of the LSA of the fault device after the fault recovery in the first message according to a version identifier of a LSA of the fault device before the fault in the second message to obtain a third message, wherein the version of the LSA after the fault recovery in the third message is higher than the version of the LSA before the fault in the second message, and the second message is sent after the neighbor device receives the first message;

[0011] sending the third message to the neighbor device, so that the neighbor device makes routing decisions according to the third message.

[0012] In a second aspect, the embodiments of the present application provide an open shortest path first (OSPF) network, comprising a fault device and a neighbor device of the fault device, wherein the fault device is in a fault recovery state.

[0013] the fault device, configured to send a first message to a neighbor device of the fault device, wherein the first message contains a version identifier of a link state advertisement (LSA) of the fault device after the fault recovery;

[0014] if a second message sent by the neighbor device indicates that the neighbor device has the LSA of the fault device, then modifying the version identifier of the LSA of the fault device after the fault recovery in the first message according to a version identifier of a LSA of the fault device before the fault in the second message to obtain a third message, wherein the version of the LSA after the fault recovery in the third message is higher than the version of the LSA before the fault in the second message, and the second message is sent after the neighbor device receives the first message;

[0015] sending the third message to the neighbor device;

[0016] The neighbor device is configured to send the second message and make a routing decision according to the third message.

[0017] In a third aspect, an embodiment of the present application provides an open shortest path first routing (OSPF) device, comprising: the OSPF device is in a fault recovery state;

[0018] The sending module is configured to send a first message to a neighbor device of the fault device, the first message containing a version identifier of a link state advertisement (LSA) of the fault device after the fault recovery; and send a third message to the neighbor device, so that the neighbor device makes a routing decision according to the third message.

[0019] The modifying module is configured to, if the second message sent by the neighbor device indicates that the neighbor device has the LSA of the fault device, modify the version identifier of the LSA of the fault device after the fault recovery in the first message according to a version identifier of the LSA of the fault device before the fault in the second message, to obtain a third message, the version of the LSA after the fault recovery in the third message being higher than the version of the LSA before the fault in the second message, the second message being sent after the neighbor device receives the first message.

[0020] In a fourth aspect, an embodiment of the present application provides an open shortest path first routing (OSPF) device, comprising a processor and a memory, the memory being configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the routing information processing method in the first aspect. The electronic device can further comprise a communication interface configured to communicate with other devices or communication networks.

[0021] The routing information processing method provided by the embodiment of the present application, the fault device in the fault recovery state needs to re-establish an adjacency connection with a neighbor device, at this time, a first message can be sent to the neighbor device. The neighbor device further feeds back a second message generated by itself to the fault device after receiving the sending of the first message. The fault device analyzes the received second message, if the second message indicates that the neighbor device has a version identifier of the LSA of the fault device before the fault, the fault device can modify the version identifier of the LSA of the fault device after the fault recovery in the first message according to the version identifier of the LSA before the fault, to obtain a third message, and send the third message to the neighbor device.

[0022] Wherein, the modification through the version identification is that the version identification of the LSA after the failure recovery in the third message is newer than the version identification of the LSA before the failure in the second message, that is, the version of the LSA after the failure recovery is higher than the version of the LSA before the failure in the second message. Then, the neighbor device will replace the version identification of the LSA before the failure stored locally with the version identification of the LSA after the failure recovery by comparing the version identification of the LSA of the failure device contained in the second message and the third message, so that the neighbor device obtains the latest version identification of the LSA of the failure device. When the neighbor device obtains the LSA of each device in the OSPF network, the routing decision can be made.

[0023] It can be seen that in the above method, the neighbor device can update the version identification of the LSA before the failure with the latest version identification of the LSA of the failure device (that is, the LSA after the failure recovery) through the modification of the version identification of the LSA in the message, so that the latest LSA of the failure device is further obtained, and finally the routing decision is made based on the obtained latest LSA, and the transmission of the data packet is performed according to the result of the routing decision, so that the problem of data packet loss caused by the routing decision of the neighbor device using the LSA before the failure does not occur. BRIEF DESCRIPTION OF DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0025] Figure 1 A flowchart of a routing information processing method provided by an embodiment of the present application;

[0026] Figure 2 A structural schematic diagram of an OSPF network provided by an embodiment of the present application;

[0027] Figure 3 A flowchart of another routing information processing method provided by an embodiment of the present application;

[0028] Figure 4 A flowchart of still another routing information processing method provided by an embodiment of the present application;

[0029] Figure 5 A structural schematic diagram of an OSPF network provided by an embodiment of the present application;

[0030] Figure 6 A structural schematic diagram of an OSPF device corresponding to the routing information processing method provided by an embodiment of the present application;

[0031] Figure 7 Another structure diagram of an OSPF device corresponding to the routing information processing method provided by the embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0033] The terms used in the embodiments of the present application are merely for the purpose of describing particular embodiments and are not intended to limit the present application. The singular forms "a", "an" and "the" used in the embodiments of the present application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. "Plural" generally includes at least two but does not exclude the case of including at least one.

[0034] It should be understood that the term "and / or" used herein is merely a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent the three cases of A existing alone, A and B existing together, and B existing alone. In addition, the character " / " in this paper generally represents an "or" relationship between the front and rear associated objects.

[0035] Depending on the context, the word "if" as used herein can be interpreted as meaning "when" or "while" or "in response to determining" or "in response to identifying". Similarly, depending on the context, the phrase "if it is determined" or "if it is identified (a stated condition or event)" can be interpreted as meaning "when it is determined" or "in response to determining" or "when it is identified (a stated condition or event)" or "in response to identifying (a stated condition or event)".

[0036] It should also be noted that the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such product or system. Without more limitations, the element defined by the phrase "including a" does not exclude the presence of another identical element in the product or system including the element.

[0037] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Where there is no conflict between the embodiments, the following embodiments and features can be combined with each other. Furthermore, the timing of the steps in the following method embodiments is merely an example and not a strict limitation.

[0038] When a device that failed in a Shortest Path First (SPF) network is in a recovery state, it needs to re-establish adjacency relationships with its neighbors in the OSPF network. It then uses the LSAs of other devices in the OSPF network obtained during the adjacency establishment process to calculate the shortest path tree, and finally uses this shortest path tree to make routing decisions. Of course, based on the established adjacency relationships, the neighboring devices of the failed device can also make routing decisions.

[0039] Based on the above description, the process by which neighboring devices make routing decisions can be as follows: Figure 1 As shown, this process can also be considered a routing information processing method. Figure 1 This is a flowchart illustrating a routing information processing method provided in an embodiment of the present invention. The routing information switching method provided in this embodiment can be executed by a faulty device in an OSPF network, and the faulty device is in a fault recovery state, which can also be understood as the faulty device being restarted.

[0040] The routing information switching method may specifically include the following steps:

[0041] S101, send a first message to the neighboring device of the faulty device. The first message contains the version identifier of the Link State Advertisement (LSA) after the faulty device recovers from the fault.

[0042] In an OSPF network, a device that can directly transmit data packets with a faulty device is considered its neighbor. Whether or not a device can directly transmit data packets with a faulty device depends on the wiring configuration between devices in the OSPF network. Optionally, the faulty device and neighboring device mentioned in this embodiment and the following embodiments can all be considered as routers in the OSPF network.

[0043] After a faulty device transitions from a faulty state to a fault-recovered state, it sends a first message to its neighboring devices. This first message contains the version identifier of the faulty device's recovered LSA, which uniquely identifies an LSA. The faulty device's LSA reflects the communication cost between the faulty device and its neighboring devices.

[0044] In practice, a faulty device can typically have adjacency relationships with multiple devices; that is, a faulty device has multiple neighboring devices. During fault recovery, the faulty device establishes adjacency relationships with different neighboring devices. This allows the faulty device to obtain not only its own LSA version identifier but also the LSAs and version identifiers of each LSA from its neighboring devices with whom it has established adjacency relationships. Furthermore, the faulty device often needs multiple messages to send the version identifiers of all its locally stored LSAs to its neighboring devices. Therefore, the first message mentioned above can be any one of these multiple messages.

[0045] In practice, optionally, the multiple messages containing LSA version identifiers sent by the faulty device to neighboring devices can be Database Description Packets (DD packets), where the LSA version identifier can serve as the DD digest of the DD packet. Optionally, the LSA version identifier can specifically be the router LSA (i.e., Router-LSA) within the LSA.

[0046] For example, in such Figure 2 In the OSPF network shown, both device 1 and device 4 are neighbors of the faulty device 2. In one scenario, the faulty device 2 has not yet established adjacency with either device 1 or device 4. In this case, the faulty device 2 only has its own LSA, and the packets it sends can include the version identifier of its LSA. In another scenario, the faulty device 2 has already established adjacency with device 1, but it still needs to establish adjacency with device 4. In this case, the packets sent by the faulty device 2 can include the version identifiers of both its own and device 1's LSAs. Similarly, in yet another scenario, the faulty device 2 has already established adjacency with device 4, but it still needs to establish adjacency with device 1. In this case, the packets sent by the faulty device 2 will include the version identifiers of both its own and device 4's LSAs.

[0047] The faulty device can further obtain the corresponding LSA based on the LSA version identifier in the packet. When the neighboring device and the faulty device have the same LSA, it indicates that they have established an adjacency relationship. Optionally, both the faulty device and the neighboring device have a local Link State Database (LSDB) for storing LSAs. Establishing an adjacency relationship between the faulty device and the neighboring device can be considered as the synchronization of LSAs in their respective LSDBs.

[0048] S102, if the second message sent by the neighboring device indicates that the neighboring device has the LSA of the faulty device, then according to the version identifier of the LSA of the faulty device before the fault in the second message, modify the version identifier of the LSA of the faulty device after the fault is recovered in the first message to obtain the third message.

[0049] Next, after receiving the first message from the faulty device, the neighboring device will send a second message back to the faulty device. That is, the second message is sent after the neighboring device receives the first message. This second message may include the version identifier of its own LSA stored locally, or the version identifiers of LSAs from other devices that have established an adjacency relationship with this neighboring device. Similar to the faulty device, the neighboring device often needs to send multiple messages to send back the version identifiers of all its locally stored LSAs to the faulty device. The aforementioned second message is any one of these multiple messages.

[0050] Then, the faulty device will analyze the second feedback message. If the second message indicates that the neighboring device has the faulty device's LSA, it means that the neighboring device locally stores the faulty device's pre-fault LSA. The faulty device can then modify the version identifier of the faulty device's post-fault recovery LSA in the first message based on the version identifier of the faulty device's pre-fault LSA in the second message, in order to obtain the third message.

[0051] The principle for modifying the version identifier is to ensure that the version of the LSA after fault recovery in the third message is higher than the version of the LSA before the fault in the second message. The reason for setting this modification principle can be found in the relevant description in the following embodiments.

[0052] S103, send a third message to the neighboring device so that the neighboring device can make routing decisions based on the third message.

[0053] Finally, the faulty device sends a third message with the modified version identifier to its neighboring devices, enabling the neighboring devices to obtain the version identifier of the faulty device's latest LSA. Based on this version identifier, the neighboring devices can then retrieve the faulty device's latest LSA. At this point, the neighboring devices can make routing decisions based on the LSAs of other devices in the OPSF network that they have already stored locally, as well as the faulty device's latest LSA.

[0054] In this embodiment, the faulty device first sends a first message to its neighboring device. In response to this first message, the neighboring device further sends a second message back to the faulty device. If the second message indicates that the neighboring device possesses the version identifier of the faulty device's LSA before the fault, the faulty device can modify the version identifier of the faulty device's LSA after recovery in the first message based on this pre-fault LSA version identifier to obtain a third message, and then send the third message to the neighboring device.

[0055] After modifying the version identifier, the version identifier of the LSA after fault recovery in the third message is newer than the version identifier of the LSA before the fault in the second message. The neighboring device, by comparing the version identifiers of the faulty device's LSA in the second and third messages, will replace the locally stored version identifier of the LSA before the fault with the version identifier of the LSA in the third message. This ensures that the neighboring device obtains the latest LSA of the faulty device, thereby enabling routing decisions and transmitting data packets based on the routing decision results. Because the neighboring device transmits data packets based on the latest LSA of the faulty device, the data packet loss problem caused by the neighboring device using the LSA before the fault for routing decisions will not occur.

[0056] Specifically, regarding the modification of the version identifier in step S102 according to the preset modification principle, the reason for setting this principle and the principle that modifying the version identifier can improve data packet loss can be described in detail as follows:

[0057] In practice, devices in an OSPF network can generate their latest LSAs at preset intervals. To distinguish LSAs generated at different times, a version identifier is set for each LSA, indicating its version. Devices in an OSPF network determine whether to replace an LSA based on its version identifier; that is, if the received LSA has a higher version than the locally stored LSA, it is replaced, thus achieving LSDB synchronization between different devices; otherwise, no replacement is performed.

[0058] Therefore, modifying the version identifier of the LSA after fault recovery in the third message, so that the version in the third message is higher than the version of the LSA before the fault in the second message, can ensure that the neighboring device will replace the second message with this third message after receiving it. This allows the neighboring device to obtain the latest LSA version identifier of the faulty device, and thus obtain the latest LSA of the faulty device. This can improve the problem of packet loss caused by using the outdated LSA of the faulty device.

[0059] Optionally, the LSA version identifier can be specifically represented as the LSA version number, with the value of the version number reflecting the age of the LSA. Therefore, the modification of the version identifier in step S102 can be considered as a modification of the version number.

[0060] Assume the LSA version number of the faulty device after recovery in the first message is A. Since the fault recovery process of the faulty device is actually a restart process, A is a small value, such as 1. Meanwhile, the neighboring device locally stores the LSA version number B of the faulty device before the fault. Because the faulty device had been running for a certain period of time before the fault occurred, it had already generated multiple versions of the LSA; therefore, B can be a large value, such as 100.

[0061] Based on the above assumptions, for modifying the version number in the first message, one option is to directly modify the version number A of the LSA in the first message to a larger preset value C1, where C1 is greater than B. Another option is to modify the version number A in the first message to C2, based on the version number B of the LSA in the second message, where C2 = B + 1.

[0062] In addition, whether it is a faulty device or a neighboring device, the message it sends to the other device can also be set with a preset flag bit. The different values ​​of the preset flag bit can reflect whether the device has sent all the version identifiers of its locally stored LSAs to the other device.

[0063] In practice, if a faulty device locally stores version identifiers of its own LSAs and those of other devices, it will typically send the version identifiers of other devices' LSAs first, and then send its own LSA version identifier last. When the first message sent by the faulty device to its neighboring device reflects that the faulty device has sent the version identifiers of all locally stored LSAs to the neighboring device, the neighboring device can obtain the latest LSA of the faulty device, and then combine it with the LSAs of other devices stored locally to make routing decisions.

[0064] As can be seen, based on the above-mentioned order of version identifier transmission and the setting of preset identifier bits in the message, it can be ensured that the neighboring device obtains the latest LSA of the faulty device, that is, obtains the LSA of each device in the OSPF network, and then makes a routing decision and transmits data packets according to the result of the routing decision, ensuring the accurate transmission of data packets, and at the same time, there will be no data packet loss problem caused by the neighboring device using the LSA before the fault to make a routing decision.

[0065] Based on the order in which the version identifiers were sent, then Figure 1 In the illustrated embodiment, the preset flag bits in the first and third messages have the same value, and this value indicates that the faulty device has sent the version identifiers of all local LSAs to the neighboring device. That is, the third message is the last message sent by the faulty device to the neighboring device during the fault recovery process.

[0066] Therefore, optionally, before the first message, the faulty device can send at least one message containing the LSA version identifier to its neighboring devices. The preset flag in these messages (not the first message) indicates that the faulty device has not sent all the locally stored LSA version identifiers to its neighboring devices. For clarity, any message sent before the first message can be referred to as the fourth message, which contains the LSA version identifiers of other devices in the OSPF network. Finally, the neighboring devices can make routing decisions based on the third, second, and fourth messages.

[0067] It should also be noted that since other devices in the network have not malfunctioned, the version identifier of the LSA in the fourth message may already be stored locally on the neighboring device. Therefore, the neighboring device does not need to re-obtain the corresponding LSA based on the version identifier of the LSA in the fourth message.

[0068] Figure 1 The illustrated embodiment demonstrates a scenario where the second message indicates that the neighboring device possesses the version identifier of the LSA from before the faulty device's failure. However, in practice, the second message may also indicate that the neighboring device does not possess the version identifier of the LSA from before the faulty device's failure. The reasons are as follows:

[0069] In an OSPF network, each device generates and sends its own LSA to its neighbors at preset intervals to synchronize the LSDB (LSB) of all devices. Ultimately, routing decisions are made based on the synchronized LSDB. Simultaneously, each device in the OSPF network stores other devices' LSAs with a preset maximum aging time. If a device has not received its latest LSA from another device by the time the maximum aging time has elapsed, it will delete the other device's LSA from its local storage. The maximum aging time can be longer than the preset time for generating the LSA.

[0070] Therefore, if the fault duration of the faulty device exceeds the maximum aging time of the LSA, the neighboring device will delete the LSA sent by the faulty device before the fault from the LSDB. At this time, when the faulty device is in the fault recovery state, the second message sent by the neighboring device will naturally not contain the version identifier of the faulty device's LSA before the fault.

[0071] If the neighboring device does not have the version identifier of the LSA before the faulty device failed, Figure 3 A flowchart illustrating another routing information processing method provided in an embodiment of the present invention. Figure 3 As shown, the method may include the following steps:

[0072] S201, send a first message to the neighboring device of the faulty device. The first message contains the version identifier of the Link State Advertisement (LSA) after the faulty device recovers from the fault.

[0073] The execution process of step S201 is similar to the corresponding steps in the aforementioned embodiments, and can be found in the following examples. Figure 3 The relevant descriptions in the illustrated embodiments will not be repeated here.

[0074] S202, if the second message indicates that the neighboring device does not have the LSA of the faulty device, then store the second message.

[0075] S203, make routing decisions based on the first and second messages.

[0076] If the second message indicates that the neighboring device does not have the LSA of the faulty device, it reflects that the neighboring device may have deleted the LSA of the faulty device before the fault due to the faulty device's failure time being too long. The second message includes the version identifier of the LSA of other devices in the OSPF network. The faulty device will store the second message and obtain the corresponding LSA based on the version identifier in the first message and the second message.

[0077] When a neighboring device sends all the version identifiers of its locally stored LSAs to the faulty device, the faulty device can obtain the LSAs of other devices in the OSPF network from the version identifiers, and then combine them with its own LSAs to make routing decisions.

[0078] Optionally, neighboring devices can obtain the communication cost between adjacent devices in the OSPF network based on the LSAs of devices in the OSPF network obtained using the first and second packets, and make routing decisions based on the communication cost. For example, they can obtain the shortest path tree corresponding to the OSPF network based on the minimum communication cost, and make routing decisions based on this shortest path tree. Figure 1 Similarly, as shown in the embodiments, alternatively, Figure 3 In the illustrated embodiment, the first message in step S201 can also be the last message sent by the faulty device to its neighboring device. Before sending the first message, the faulty device can also send a fourth message to its neighboring device. The faulty device can then make routing decisions based on the first message, the fourth message, and the second message sent by the neighboring device. The content related to the fourth message can be found in the relevant descriptions in the above embodiments, and will not be repeated here.

[0079] In this embodiment, by saving the second message, the faulty device can obtain the LSAs of other devices in the OSPF network, and then combine them with its own LSA to make routing decisions.

[0080] The above Figure 1 and Figure 3In the illustrated embodiment, the starting point for a neighboring device to make a routing decision is receiving packets sent by the faulty device, and the faulty device needs to rely on its adjacency relationship with neighboring devices to send packets. Figure 4 This is a flowchart illustrating another routing information processing method provided in an embodiment of the present invention. Figure 4 As shown, before step S101 or S201, the method may further include the following steps:

[0081] S301, in response to the restart of the faulty device, establishes a neighbor relationship between the faulty device and neighboring devices.

[0082] When a faulty device restarts, it is in a fault recovery state. In response to the restart of the faulty device, a neighbor relationship is established between the faulty device and its neighboring devices.

[0083] Optionally, neighbor relationships can be established using hello messages. Specifically, the faulty device is in the Down state and sends a hello message containing its own device ID to its neighboring devices. The neighboring devices receive the hello messages. If the message does not contain the neighboring device's device ID, the neighboring device enters the init state, enabling it to send a hello message to the faulty device. This message contains both the device IDs of the neighboring device and the faulty device, at which point the faulty device is in a 2-Way state. Subsequently, the faulty device sends another hello message to its neighboring devices, this time containing both the device IDs of the neighboring device and the faulty device, so that the receiving neighboring device also enters a 2-Way state.

[0084] When both the faulty device and its neighboring device are in a 2-Way state, it indicates that a neighboring relationship has been established.

[0085] S302, based on neighbor relationships, generates the first message after the adjacency relationship between the faulty device and its neighboring devices is established.

[0086] Based on the established neighbor relationship, a further adjacency relationship is established between the two devices. This adjacency relationship establishment process involves message transmission. Optionally, when the faulty device establishes a neighbor relationship and enters the exstart state, it begins sending messages. The transmitted message can be either the first message or the fourth message mentioned in the above embodiments.

[0087] In this embodiment, a neighbor relationship is established between the faulty device and its neighboring devices using a hello message. Adjacency relationships are then established based on these neighbor relationships, and message generation and transmission occur during the adjacency relationship establishment process. The messages sent during this process enable the neighboring devices to... Figure 1 or Figure 3The method shown in the embodiment obtains the latest LSA of the faulty device, thereby making a routing decision and sending data packets according to the decision result, thus avoiding the problem of data packet loss caused by using outdated LSAs.

[0088] The methods provided in the above embodiments enable neighboring devices to obtain the latest LSA after the faulty device recovers from the fault, and calculate the shortest path tree based on the LSA of each device in the OSPF network, thereby making routing decisions based on the shortest path tree.

[0089] Continue to undertake Figure 2 The OSPF network shown can be described in detail as follows:

[0090] When all devices in the network are operating normally, considering communication costs, device 1 uses two paths with the same communication cost to send data packets to device 4: PATH1: device 1-device 2-device 4; PATH2: device 1-device 3-device 4. The interface address of device 4 can be 1.1.1.1. The interface corresponding to device 1 and device 2 is gi0 / 1, and its interface address can be 192.168.1.2. The interface corresponding to device 1 and device 3 is gi0 / 2, and its interface address can be 192.168.2.2. Device 1 can calculate the routing table shown in Table 1 based on the LSAs of each device in the OSPF network.

[0091] Table 1

[0092] Destination Address Next Hop Address Interface 1.1.1.1 192.168.1.2 gi0 / 1 192.168.2.2 gi0 / 2

[0093] According to the routing table above, device 1 can send some data packets to device 2 via the gi0 / 1 interface and the interface address 192.168.1.2, and send another part of the data packets to device 3 via the gi0 / 2 interface and the interface address 192.168.2.2. Similarly, devices 2 and 3 can also send data packets to device 4 according to their own routing tables.

[0094] As the network operates, if device 2 fails, only PATH2 mentioned above can transmit data packets normally. In this case, the routing table of the neighboring device of the failed device 2, i.e., device 1, can be as shown in Table 2:

[0095] Table 2

[0096] Destination Address Next Hop Address Interface 1.1.1.1 192.168.2.2 gi0 / 2

[0097] That is, device 1 can send another part of the data packets to device 3 through the gi0 / 2 interface and the interface address 192.168.2.2, and then device 3 will finally send the data packets to device 4.

[0098] When the faulty device 2 completes its recovery, its LSA may change. Using the methods provided in the above embodiments, neighboring device 1 can obtain and recalculate the shortest path tree using the latest LSA of the faulty device 2. The path obtained through the shortest path tree, PATH1, represents the path with the lowest communication cost for transmitting data packets from device 1 to device 4. At this point, the routing table of the neighboring device 1 (the faulty device 2) can change as shown in Table 3 below:

[0099] Table 3

[0100] Destination Address Next Hop Address Interface 1.1.1.1 192.168.1.2 gi0 / 1

[0101] That is, device 1 can send data packets to device 2, which has completed fault recovery, through the gi0 / 1 interface and the interface address 192.168.1.2, and then device 2 will finally send the data packets to device 4.

[0102] Similar to the routing decision-making process of the neighboring devices mentioned above, when the faulty device 2 recovers from the fault, it can obtain the first message it generated and the second message sent by the neighboring devices. That is, it can know the LSA of each device in the OSPF network and further calculate the shortest path tree based on the LSA.

[0103] For data packets that need to be sent from device 1 to device 4, considering the communication cost between devices, the faulty device 2 can also obtain the above decision result: PATH1: device 1-device 2-device 4; PATH2: device 1-device 3-device 4, and these two paths have the same communication cost. Both paths are used to transmit data packets.

[0104] The above embodiments describe the process by which neighboring devices obtain the latest LSA of the faulty device and make routing decisions from a methodological perspective. Since the faulty device and the neighboring devices both belong to the same OSPF network, the contents of the above embodiments can also be described from the perspective of the entire network.

[0105] but Figure 5 This is a structural framework diagram of an OSPF network provided in an embodiment of the present invention. Figure 5 As shown, the network includes a faulty device and its neighboring devices. The faulty device is currently in a fault recovery state.

[0106] The faulty device sends a first message containing the version identifier of its post-fault recovery LSA to its neighboring device. Upon receiving the first message, the neighboring device generates and sends a second message to the faulty device. The faulty device analyzes the second message. If, after analysis, the second message indicates that the neighboring device possesses the faulty device's LSA, then based on the version identifier of the faulty device's pre-fault LSA in the second message, the faulty device modifies the version identifier of its post-fault recovery LSA in the first message to obtain a third message. In this modified version identifier, the version of the post-fault recovery LSA in the third message is higher than the version of the pre-fault LSA in the second message.

[0107] Ultimately, the neighboring device will replace the second message with the third message, obtain the latest LSA of the faulty device based on the version identifier of the faulty device's LSA in the third message, and then make a routing decision by combining it with the LSAs of other devices in the OSPF network stored locally. Based on the routing decision result, the device will realize the transmission of data packets with the faulty device.

[0108] The LSA version identifier in the message can specifically be the LSA version number. Therefore, for modifying the LSA version number after fault recovery in the first message, optionally, the LSA version number after fault recovery in the first message can be directly modified to a larger value C1. Alternatively, the LSA version number before the fault in the second message can be modified to the LSA version number after fault recovery. Specific modification methods can be found in the relevant descriptions in the above method embodiments, and will not be repeated here.

[0109] After the faulty device analyzes the second message, alternatively, in another scenario, if the second message sent by the neighboring device indicates that the neighboring device does not have the faulty device's LSA, and that the neighbor is sending the version identifier of the LSA of another device in the OSPF network, then the faulty device will store this second message and obtain the corresponding LSA based on the LSA version identifier in the first and second messages, thereby realizing routing decisions, and realizing the transmission of data packets with the neighboring device based on the result of the routing decisions.

[0110] Optionally, whether it is a faulty device or a neighboring device, the message it sends to the other device can also be set with a preset flag bit. The different values ​​of the preset flag bit can reflect whether the device has sent all the version identifiers of its locally stored LSAs to the other device.

[0111] For parts not described in detail in this embodiment, please refer to the following: Figures 1 to 4 The relevant descriptions of the illustrated embodiments are provided below. For the execution process and technical effects of this technical solution, please refer to [link / reference]. Figures 1 to 4 The descriptions in the illustrated embodiments will not be repeated here.

[0112] The following describes in detail devices in an Open Shortest Path First (OSPF) network according to one or more embodiments of the present invention. Those skilled in the art will understand that these OSPF devices can be configured using commercially available hardware components through the steps taught in this solution.

[0113] Figure 6 This is a schematic diagram of the structure of an OSPF device provided in an embodiment of the present invention, as shown below. Figure 6 As shown, the OSPF device is in a fault recovery state, and the device includes:

[0114] The sending module 11 is configured to send a first message to a neighboring device of the faulty device, the first message containing a version identifier of the Link State Advertisement (LSA) after the faulty device recovers from the fault; and send a third message to the neighboring device so that the neighboring device can make a routing decision based on the third message.

[0115] The modification module 12 is configured to modify the version identifier of the LSA after the fault recovery in the first message according to the version identifier of the LSA before the fault in the second message if the second message sent by the neighboring device indicates that the neighboring device has the LSA of the faulty device, so as to obtain a third message. The version of the LSA after the fault recovery in the third message is higher than the version of the LSA before the fault in the second message. The second message is sent after the neighboring device receives the first message.

[0116] Optionally, the version identifier includes a version number.

[0117] The modification module 12 is specifically used to: increase the version number of the LSA before the fault, so as to obtain the updated version number;

[0118] The updated version number replaces the version number of the fault-recovered LSA in the first message to obtain the third message, wherein the updated version number, the version number of the pre-fault LSA, and the version number of the fault-recovered LSA decrease sequentially.

[0119] The first message and the third message include a preset identifier bit, which indicates that the faulty device has sent the version identifiers of all local LSAs to the neighboring device.

[0120] Optionally, the OSPF device further includes a storage module 13 and a decision module 14.

[0121] The storage module 13 is configured to store the second message if the second message indicates that the neighboring device does not have the LSA of the faulty device.

[0122] The decision module 14 is used to obtain the communication cost between devices with adjacency in the OSPF network based on the first message and the second message; and to make routing decisions based on the communication cost.

[0123] Optionally, the sending module 11 is further configured to: send a fourth message to the neighboring device, so that the neighboring device can make a routing decision based on the first message, the second message and the fourth message, wherein the fourth message contains the version identifiers of the LSAs of other devices in the OSPF network; a preset flag bit in the fourth message indicates that the faulty device has not sent the version identifiers of all its local LSAs to the neighboring device.

[0124] Optionally, the OSPF device further includes a relationship establishment module 15 and a generation module 16.

[0125] The relationship establishment module 15 is used to establish a neighbor relationship between the faulty device and the neighboring device in response to the restart of the faulty device.

[0126] The generation module 16 is used to generate the first message based on the neighbor relationship after the adjacency relationship between the faulty device and the neighboring device is established.

[0127] Figure 6 The device shown can perform Figures 1 to 4 For the methods shown in the embodiments, the parts not described in detail in this embodiment can be referred to the following: Figures 1 to 4 The relevant descriptions of the illustrated embodiments are provided below. For the execution process and technical effects of this technical solution, please refer to [link / reference]. Figures 1 to 4 The descriptions in the illustrated embodiments will not be repeated here.

[0128] The internal functions and structure of the routing information processing device have been described above. In one possible design, the aforementioned routing information processing device can be implemented using an electronic device. For example... Figure 7 As shown, the electronic device may include a processor 21 and a memory 22. The memory 22 is used to store data supporting the electronic device in performing the above-described actions. Figures 1 to 4 The program for the routing information processing method provided in the illustrated embodiment is such that the processor 21 is configured to execute the program stored in the memory 22.

[0129] The program includes one or more computer instructions, wherein when the one or more computer instructions are executed by the processor 21, they can perform the following steps:

[0130] Send a first message to the neighboring device of the faulty device, the first message containing the version identifier of the Link State Advertisement (LSA) after the faulty device has recovered from the fault;

[0131] If the second message sent by the neighboring device indicates that the neighboring device has the LSA of the faulty device, then according to the version identifier of the LSA of the faulty device before the fault in the second message, the version identifier of the LSA of the faulty device after the fault is recovered in the first message is modified to obtain a third message. The version of the LSA after the fault is recovered in the third message is higher than the version of the LSA before the fault in the second message. The second message is sent after the neighboring device receives the first message.

[0132] The third message is sent to the neighboring device so that the neighboring device can make a routing decision based on the third message.

[0133] Optionally, the processor 21 is further configured to perform the aforementioned Figures 1 to 4 All or part of the steps in the illustrated embodiments.

[0134] The structure of the electronic device may also include a communication interface 23 for the electronic device to communicate with other devices or communication networks.

[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A routing information processing method, characterized in that, The method, applied to a faulty device in an Open Shortest Path First (OSPF) network, wherein the faulty device is in a fault recovery state, includes: Send a first message to the neighboring device of the faulty device, the first message containing a version identifier of the Link State Advertisement (LSA) after the faulty device has recovered; the version identifier contains a version number; If the second message sent by the neighboring device indicates that the neighboring device has the LSA of the faulty device, then the version number of the LSA before the fault in the second message is increased to obtain an updated version number; the updated version identifier replaces the version number of the LSA after the fault is recovered in the first message to obtain a third message, in which the version of the LSA after the fault is recovered in the third message is higher than the version of the LSA before the fault in the second message, and the updated version number, the version number of the LSA before the fault, and the version number of the LSA after the fault are recovered decrease sequentially; the second message is sent after the neighboring device receives the first message; the third message is sent to the neighboring device so that the neighboring device can make routing decisions based on the third message.

2. The method according to claim 1, characterized in that, The first message and the third message include a preset identifier bit, which indicates that the faulty device has sent the version identifiers of all local LSAs to the neighboring device.

3. The method according to claim 1, characterized in that, The method further includes: If the second message indicates that the neighboring device does not have the LSA of the faulty device, then the second message is stored; Based on the first message and the second message, obtain the communication cost between devices with adjacency in the OSPF network; Routing decisions are made based on the communication costs.

4. The method according to claim 3, characterized in that, Before sending the first message to the neighboring device of the faulty device, the method further includes: A fourth message is sent to the neighboring device so that the neighboring device can make a routing decision based on the first message, the second message and the fourth message, wherein the fourth message contains the version identifiers of the LSAs of other devices in the OSPF network; a preset flag bit in the fourth message indicates that the faulty device has not sent the version identifiers of all its local LSAs to the neighboring device.

5. The method according to claim 1, characterized in that, The method further includes: In response to the restart of the faulty device, a neighbor relationship is established between the faulty device and the neighboring device; Based on the neighbor relationship, the first message is generated after the adjacency relationship between the faulty device and the neighboring device is established.

6. The method according to claim 1, characterized in that, The faulty device and the neighboring device include routers within the OSPF network.

7. An Open Shortest Path First (OSPF) network, characterized in that, include: The faulty device and its neighboring devices, wherein the faulty device is in a fault recovery state; The faulty device is configured to send a first message to its neighboring device, the first message containing the version identifier of the Link State Advertisement (LSA) after the faulty device has recovered from the fault. If the second message indicates that the neighboring device has the LSA of the faulty device, then according to the version identifier of the LSA of the faulty device before the fault in the second message, the version identifier of the LSA of the faulty device after the fault is recovered in the first message is modified to obtain a third message. The version of the LSA after the fault is recovered in the third message is higher than the version of the LSA before the fault in the second message. The second message is sent after the neighboring device receives the first message. Send the third message to the neighboring device; The neighboring device is used to send the second message; Routing decisions are made based on the third message.

8. A device in an Open Shortest Path First (OSPF) network, characterized in that, The device is in a fault recovery state; The sending module is configured to send a first message to a neighboring device of the device in the fault recovery state, the first message containing a version identifier of the Link State Advertisement (LSA) after the fault recovery of the device in the fault recovery state; and send a third message to the neighboring device so that the neighboring device can make a routing decision based on the third message. The modification module is used to increase the version number of the LSA of the device in the fault recovery state before the fault in the second message if the second message sent by the neighboring device indicates that the neighboring device has the LSA of the device in the fault recovery state, so as to obtain the updated version number. The updated version identifier replaces the version number of the fault-recovered LSA in the first message to obtain a third message. The version of the fault-recovered LSA in the third message is higher than the version of the pre-fault LSA in the second message. The updated version number, the pre-fault LSA version number, and the fault-recovered LSA version number decrease sequentially. The second message is sent after the neighboring device receives the first message.

9. A device in an Open Shortest Path First (OSPF) network, characterized in that, The device is in a fault recovery state; The device includes: a memory and a processor; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor performs the routing information processing method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Technique to Minimize Traffic Loss on a Router Reload / Restart

    US20140269407A1