CN116260763A - Routing information processing method, OSPF (open shortest path first) equipment and OSPF network - Google Patents

Routing information processing method, OSPF (open shortest path first) equipment and OSPF network Download PDF

Info

Publication number
CN116260763A
CN116260763A CN202111454974.3A CN202111454974A CN116260763A CN 116260763 A CN116260763 A CN 116260763A CN 202111454974 A CN202111454974 A CN 202111454974A CN 116260763 A CN116260763 A CN 116260763A
Authority
CN
China
Prior art keywords
message
fault
lsa
neighbor
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111454974.3A
Other languages
Chinese (zh)
Inventor
陈扬检
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN202111454974.3A priority Critical patent/CN116260763A/en
Publication of CN116260763A publication Critical patent/CN116260763A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/085Retrieval of network configuration; Tracking network configuration history
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/123Evaluation of link metrics

Landscapes

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

Abstract

The embodiment of the invention provides a routing information processing method, OSPF equipment and an OSPF network, wherein the method comprises the following steps: the fault device sends a first message to the neighbor device. And after the neighbor equipment receives the first message, the neighbor equipment feeds back the second message to the fault equipment. If the second message indicates that the neighbor device has the version identifier of the LSA before the failure device fails, the failure device modifies the version identifier of the LSA after the failure device fails in the first message according to the version identifier of the LSA before the failure device fails, and sends a third message obtained after modification to the neighbor device. By modifying the version identifier, the version of the LSA after fault recovery in the third message is higher than the version of the LSA before fault in the second message, and the neighbor device can replace the second message by the third message, so that the neighbor device obtains the version identifier of the latest LSA of the fault device and the LSA corresponding to the identifier, and finally, the data packet is sent based on the latest LSA, and the problem of data packet loss caused by routing decision by using the LSA before fault is avoided.

Description

Routing information processing method, OSPF (open shortest path first) equipment and OSPF network
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a routing information processing method, an OSPF device, and an OSPF network.
Background
OSPF (Open Shortest Path First open shortest path first) is an interior gateway protocol (Interior Gateway Protocol, IGP for short) formulated by IETF (The Internet Engineering Ttack Force, internet engineering task force) for making routing decisions within autonomous systems (autonomous system, AS).
According to the specification of the OSPF protocol, any router in the AS may send a Link-State Advertisement, abbreviated AS LSA, locally stored by itself to each other with its neighboring routers, where the LSA locally stored by the router may include the LSA of the router itself or may include LSAs of other routers acquired from the neighboring routers. Finally, each router in the AS obtains LSAs of all routers in the AS, and generates a tree for the shortest path according to the LSAs of each router. When transmitting the data packet, each router can respectively perform routing decision according to the generated shortest path tree to obtain a target transmission path, and the data packet sequentially passes through each router in the target transmission path to complete the transmission of the data packet.
In practice, any router in the target transmission path may fail, and there is a failure recovery procedure for the failed router to recover its own data transmission capability. The recovery process of the failed router is a process of reestablishing the adjacency relationship between routers in the own target transmission path. And after the establishment of the adjacency is completed, the routing decision can be carried out again, so that the continuous transmission of the data packet is realized.
However, in the fault recovery process, the neighboring device of the fault device often uses the LSA of the fault device stored locally to make a routing decision before the fault, so as to realize the transmission of the data packet. However, the failed device is in the failure recovery state, and the shortest path tree for implementing the routing decision is not calculated yet, so that when the data packet is transmitted to the failed router, the failed router cannot determine which router in the AS the data packet is transmitted to, that is, if the data packet is sent to the failed device in the failure recovery state, the data packet is lost. And the situation of the data packet loss will not disappear until the fault router obtains the LSAs of all routers in the AS and calculates the shortest path tree.
Therefore, how to improve the packet loss caused by the routing decision using the old LSA is a urgent problem to be solved.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a routing information processing method, an OSPF device, and an OSPF network, which are used for improving the loss of a data packet.
In a first aspect, an embodiment of the present invention provides a routing information processing method, which is applied to a failure device in an open shortest path first OSPF network, where the failure device is in a failure recovery state, and includes:
Transmitting a first message to neighbor equipment of the fault equipment, wherein the first message comprises a version identifier of a link state notification LSA after the fault equipment is recovered;
if the second message sent by the neighbor device indicates that the neighbor device has the LSA of the fault device, modifying the version identifier of the LSA after fault recovery of the fault device in the first message according to the version identifier of the LSA before the fault device in the second message to obtain a third message, wherein 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, and the second message is sent after the neighbor device receives the first message;
and sending the third message to the neighbor equipment so that the neighbor equipment carries out routing decision according to the third message.
In a second aspect, an embodiment of the present invention provides an open shortest path first routing OSPF network, including: the fault equipment and neighbor equipment of the fault equipment, wherein the fault equipment is in a fault recovery state;
the fault equipment is used for sending a first message to neighbor equipment of the fault equipment, wherein the first message comprises a version identifier of a link state notification LSA after the fault equipment is recovered from fault;
If the second message indicates that the neighbor device has the LSA of the fault device, modifying the version identifier of the LSA after fault recovery of the fault device in the first message according to the version identifier of the LSA before the fault device in the second message to obtain a third message, wherein 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, and the second message is sent after the neighbor device receives the first message;
sending the third message to the neighbor device;
the neighbor device is configured to send the second message; and carrying out routing decision according to the third message.
In a third aspect, an embodiment of the present invention provides an open shortest path first routing OSPF device, including: the OSPF device is in a fault recovery state;
a sending module, configured to send a first packet to a neighboring device of the failed device, where the first packet includes a version identifier of a link state advertisement LSA after the failed device recovers from the failure; sending a third message to the neighbor device so that the neighbor device makes a routing decision according to the third message;
and the modifying module is used for modifying the version identifier of the LSA after the fault recovery of the fault equipment in the first message according to the version identifier of the LSA before the fault equipment in the second message if the second message sent by the neighbor equipment indicates that the neighbor equipment has the LSA of the fault equipment, so as 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 equipment receives the first message.
In a fourth aspect, an embodiment of the present invention provides an open shortest path first routing OSPF device, including a processor and a memory, where the memory is configured to store one or more computer instructions, and the one or more computer instructions implement the routing information processing method in the first aspect when executed by the processor. The electronic device may also include a communication interface for communicating with other devices or communication networks.
According to the route information processing method provided by the embodiment of the invention, the fault equipment in the fault recovery state needs to establish the adjacent connection with the neighbor equipment again, and at the moment, the first message can be sent to the neighbor equipment. After receiving the first message, the neighbor device further feeds back a second message generated by itself to the fault device. The fault equipment analyzes the received second message, if the second message indicates that the neighbor equipment has the version identifier of the LSA before the fault equipment fails, the fault equipment can modify the version identifier of the LSA after the fault equipment is recovered in the first message according to the version identifier of the LSA before the fault equipment fails, so that a third message is obtained, and the third message is sent to the neighbor equipment.
The version identifier of the LSA after fault recovery in the third message is newer than the version identifier of the LSA before fault in the second message, that is, the version of the LSA after fault recovery is higher than the version of the LSA before fault in the second message. And the neighbor device replaces the locally stored version identifier of the LSA before the fault with the version identifier of the LSA after the fault recovery after comparing the version identifiers of the LSAs of the fault device contained in the second message and the third message, so that the neighbor device obtains the latest version identifier of the LSA of the fault device. When neighbor devices acquire LSAs of devices in the OSPF network, routing decisions can be made.
Therefore, in the method, the fault device can update the version identifier of the LSA before the fault by using the version identifier of the LSA (i.e., the LSA after the fault recovery) of the latest LSA of the fault device through modifying the version identifier of the LSA in the message, so that the latest LSA of the fault device is further obtained, a routing decision is finally made based on the obtained latest LSA, and a data packet is transmitted according to the result of the routing decision, so that the problem of data packet loss caused by the fact that the neighbor device makes the routing decision by using the LSA before the fault is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a routing information processing method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an OSPF network according to an embodiment of the present invention;
fig. 3 is a flowchart of another routing information processing method according to an embodiment of the present invention;
fig. 4 is a flowchart of another routing information processing method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an OSPF network according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an OSPF device corresponding to the routing information processing method provided in the embodiment of the present invention;
fig. 7 is a schematic structural diagram of another OSPF device corresponding to the routing information processing method provided in the embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, the "plurality" generally includes at least two, but does not exclude the case of at least one.
It should be understood that the term "and/or" as used herein is merely one way of describing an association of associated objects, meaning that there may be three relationships, e.g., a and/or B, which may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the associated object is an "or" relationship.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to an identification", depending on the context. Similarly, the phrase "if determined" or "if identified (stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when identified (stated condition or event)" or "in response to an identification (stated condition or event), depending on the context.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a product or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such product or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a commodity or system comprising such elements.
Some embodiments of the present invention are described in detail below with reference to the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and features in the embodiments may be combined with each other. In addition, the sequence of steps in the method embodiments described below is only an example and is not strictly limited.
When the equipment with the shortest path first faults in the OSPF network (namely the fault equipment) is in a fault recovery state, the fault equipment needs to reestablish an adjacent relation with neighbor equipment in the OSPF network, then LSAs of other equipment in the OSPF network obtained in the process of establishing the adjacent relation are used for calculating the shortest path tree, and finally, the routing decision is realized by using the shortest path tree. Of course, based on the established adjacencies, the neighbors of the failed device may also implement routing decisions.
Based on the above description, the process of implementing the routing decision by the neighbor device may be as shown in fig. 1, and the process may also be considered as a routing information processing method. Fig. 1 is a flowchart of a routing information processing method according to an embodiment of the present invention. The route information switching method provided by the embodiment of the invention can be executed by the fault equipment in the OSPF network, and the fault equipment is in a fault recovery state which can be understood as restarting the fault equipment.
The routing information switching method specifically comprises the following steps:
s101, sending a first message to neighbor equipment of the fault equipment, wherein the first message comprises a version identifier of a link state notification LSA after the fault equipment is recovered.
In the OSPF network, the device capable of directly transmitting the data packet with the faulty device is the neighbor device of the faulty device. Whether packet transmissions can be made directly with the failed device or not depends on the line setup between the devices in the OSPF network. Alternatively, the failure device and the neighbor device mentioned in this embodiment and the embodiments described below may be regarded as routers in the OSPF network.
After the fault equipment is converted from the fault state to the fault recovery state, a first message is sent to the neighbor equipment, wherein the first message comprises the version identification of the LSA after the fault equipment is recovered, and the version identification is used for uniquely identifying one LSA. The LSA of the failed device can reflect the cost of communication between the failed device and the neighbor device.
In practice, a malfunctioning device may typically have an adjacency with multiple devices, i.e., one malfunctioning device has multiple neighbor devices. In the fault recovery process, the fault equipment can respectively establish an adjacency relation with different neighbor equipment, so that the fault equipment can obtain the LSA of the neighbor equipment which has established the adjacency relation with the fault equipment and the version identification of each LSA at the same time of obtaining the version identification of the LSA of the fault equipment. And the fault device often needs to use multiple messages to send the version identifiers of all LSAs stored locally to the neighbor device, so that the first message can be any one of the multiple messages.
In practice, optionally, the multiple messages that the fault device sends to the neighbor device and include LSA version identifiers may be database description messages (Database Description Packet, abbreviated as DD messages), and the LSA version identifiers may be used as DD digests of the DD messages. Alternatively, the version identification of the LSA may be specifically the Router LSA (i.e., router-LSA) in the LSA.
For example, in an OSPF network as shown in fig. 2, device 1 and device 4 are both neighbors of failed device 2. In a case where the faulty device 2 has not yet established an adjacency with the device 1 and the device 4, and where the faulty device 2 locally has only its LSA, the transmitted message may contain the version identifier of the LSA of the faulty device 2. Alternatively, the faulty device 2 may already establish an adjacency with the device 1, and at this time, an adjacency with the device 4 needs to be established, and the version identifier of the LSA of each of the faulty device 2 and the device 1 may be included in the message sent by the faulty device 2. Similarly, in another case, the faulty device 2 has already established an adjacency with the device 4, and at this time, an adjacency needs to be established with the device 1, and the message sent by the faulty device 2 will include the version identifiers of LSAs of the faulty device 2 and the device 4 respectively.
The fault device may further obtain a corresponding LSA according to the version identifier of the LSA in the message. When the neighbor device and the failed device have the same LSA, it is indicated that they establish an adjacency. Optionally, the local of the faulty device and the neighbor device are both provided in a link state database (Link State DataBase, LSDB for short) for storing LSAs. Establishing an adjacency between a failed device and a neighboring device may be considered as synchronizing LSAs in their respective LSDBs.
S102, if the second message sent by the neighbor device indicates that the neighbor device has the LSA of the fault device, the version identification of the LSA after the fault recovery of the fault device in the first message is modified according to the version identification of the LSA before the fault device in the second message, so as to obtain a third message.
Then, after receiving the first message sent by the fault device, the neighbor device further feeds back a second message to the fault device. That is, the second message is sent after the neighbor device receives the first message. The second message fed back may include a version identifier of the LSA of the neighboring device itself stored locally or a version identifier of the LSA of another device with which the neighboring device has established an adjacency. Similar to the failed device, the neighboring device often needs to send multiple messages to feed back the version identifiers of all LSAs stored locally to the failed device. The second message is any one of the plurality of messages.
Further, the fault device may analyze the fed back second message. If the second message indicates that the neighbor device has the LSA of the fault device, which indicates that the neighbor device locally stores the pre-fault LSA of the fault device, the fault device may modify the version identifier of the post-fault LSA of the fault device in the first message according to the version identifier of the pre-fault LSA of the fault device in the second message, so as to obtain a third message.
The modification principle of the version identification is as follows: and modifying to enable the version of the LSA after fault recovery in the third message to be higher than the version of the LSA before fault in the second message. The reason for this modification principle is described in the following embodiments.
S103, sending the third message to the neighbor device so that the neighbor device makes a routing decision according to the third message.
And finally, the fault equipment sends a third message obtained after the version identification is modified to the neighbor equipment so that the neighbor equipment obtains the version identification of the latest LSA of the fault equipment, and the latest LSA of the fault equipment is further obtained according to the version identification. At this time, the neighbor device can make a routing decision according to the LSAs of other devices in the OPSF network that have been stored locally and the LSA of the failed device that is the latest.
In this embodiment, the failure device sends a first message to the neighbor device. And the neighbor equipment responds to the sending of the first message and further feeds back a second message to the fault equipment. If the second message indicates that the neighbor device has the version identifier of the LSA before the failure device fails, the failure device can modify the version identifier of the LSA after the failure device recovers from the first message according to the version identifier of the LSA before the failure device fails, so as to obtain a third message, and send the third message to the neighbor device.
After the version identification is modified, the version identification of the LSA after fault recovery in the third message is newer than the version identification of the LSA before fault in the second message, and the neighbor device replaces the locally stored version identification of the LSA before fault with the version identification of the LSA in the third message after comparing the version identifications of the LSA of the fault device in the second message and the third message, so that the neighbor device obtains the latest LSA of the fault device, thereby realizing routing decision, and transmitting the data packet according to the result of the routing decision. Because the neighbor device transmits the data packet according to the latest LSA of the fault device, the problem of data packet loss caused by the fact that the neighbor device uses the LSA to make a routing decision before the fault is avoided.
The following detailed description may be further made regarding the reason why the version identifier needs to be modified according to the preset modification rule in the above step S102, and the principle that the data packet loss can be improved by modifying the version identifier:
in practice, devices in the OSPF network may generate their own latest LSA at preset intervals, and in order to distinguish LSAs generated at different times, version identifiers are set for LSAs, where the version identifiers are used to represent the version of the LSAs. The equipment in the OSPF network is new and old according to the version identification of the LSA, namely the equipment in the OSPF network determines whether to replace the LSA according to the version of the LSA, namely if the version of the LSA is higher than the version of the LSA stored locally, the equipment is replaced, so that the LSDB among different equipment is synchronized; otherwise, no replacement is performed.
Therefore, the version identifier of the LSA after fault recovery in the third message is modified, so that the version in the third message is higher than the version of the LSA before fault in the second message, and the neighbor device can replace the second message with the third message after receiving the third message, so that the neighbor device obtains the version identifier of the LSA latest by the fault device, and the latest LSA of the fault device can be further obtained, and the problem of data packet loss caused by using the old LSA of the fault device can be improved.
Alternatively, the version identifier of the LSA may be specifically represented as a version number of the LSA, where the size of the version number is used to reflect the old and new LSAs. Thus, the modification of the version identification in step S102 may be regarded as a modification of the version number.
Assuming that the version number of LSA after failure recovery of the failed device in the first message is a, a is a smaller value, such as 1, because the failure recovery process of the failed device is actually a restart process of the failed device. Meanwhile, the neighbor device locally stores the version number B of the LSA before the failure of the failed device. Since the malfunctioning device has been running for a certain period of time before it has failed, it has generated multiple versions of LSA, B may be a larger value, such as 100.
Based on the above assumption, for modification of the version number in the first message, alternatively, the version number a of LSA in the first message may be directly modified to a larger preset value C1, where C1 is greater than B. Alternatively, the version number a in the first message may be modified to C2 based on the version number B of LSA in the second message, where c2=b+1.
In addition, whether the equipment is a fault equipment or a neighbor equipment, a preset identification bit can be further arranged in a message sent to the opposite equipment, and the difference of the numerical values of the preset identification bits can reflect whether the equipment has sent all the version identifications of the LSAs stored locally to the opposite equipment.
In practice, if the failure device locally stores the version identifiers of LSAs of other devices at the same time, the failure device will typically send the version identifiers of LSAs of other devices preferentially, and finally send the version identifiers of LSAs of the failure device itself. When the first message sent by the fault device to the neighbor device reflects that the fault device has sent all the locally stored version identifiers of the LSAs to the neighbor device, the neighbor device can obtain the latest LSAs of the fault device and then perform routing decisions by combining with LSAs of other locally stored devices.
Therefore, based on the version identification sending sequence and the preset identification bit setting in the message, the neighbor device can be ensured to perform routing decision after acquiring the latest LSA of the fault device, namely acquiring the LSA of each device in the OSPF network, and perform data packet transmission according to the result of the routing decision, so that the accurate data packet transmission is ensured, and meanwhile, the problem of data packet loss caused by the fact that the neighbor device uses the LSA to perform the routing decision before the fault is avoided.
Based on the above-mentioned sequence of sending version identifiers, the preset identifier bits in the first message and the third message in the embodiment shown in fig. 1 have the same value, and the value can indicate that the fault device has sent all the version identifiers of all the local LSAs to the neighbor device, that is, the third message is the last message sent by the fault device to the neighbor device in the fault recovery process.
Therefore, optionally, before the first message, the fault device may also send at least one message including the version identifier of the LSA to the neighbor device, and the preset identification bits in these non-first messages indicate that the fault device does not send all the version identifiers of the LSA stored locally to the neighbor device. Any message sent before the first message may also be referred to as a fourth message, where the fourth message includes version identifiers of LSAs of other devices in the OSPF network, to ensure clarity of description. Finally, the neighbor device may make a routing decision according to the third message, the second message, and the fourth message.
It should be noted that, since other devices in the network do not fail, the version identifier of the LSA in the fourth message may be already stored locally in the neighbor device, and the neighbor device does not need to reacquire the corresponding LSA according to the version identifier of the LSA in the fourth message.
The embodiment shown in fig. 1 has shown a case where the second message can indicate that the neighbor device has a version identification of the LSA before the failure device failed. In practice, the second message may also indicate that the neighbor device does not have the version identification of the LSA before the failure device failed. The reason is as follows:
each device in the OSPF network can generate and send its LSA to the neighbor device every preset time interval to realize LSDB synchronization of each device in the OSPF network, and finally, the routing decision is realized according to the synchronized LSDB. Meanwhile, LSAs of other devices stored in each device in the OSPF network also have preset maximum aging times. When the LSA of the other device reaches the maximum aging time, the LSA of the other device stored locally will be deleted if the latest LSA of the device sent by the other device is not received yet. The duration of the maximum aging time may be greater than a preset duration for generating LSAs.
Therefore, if the failure duration of the failed device exceeds the maximum aging time of LSAs, the neighbor device of the failed device deletes the LSAs sent by the failed device before failure from the LSDB. At this time, when the fault device is in the fault recovery state, the version identifier of the LSA before the fault of the fault device is naturally not included in the second message sent by the neighbor device.
For the case that the neighbor device does not have the version identifier of the LSA before the failure device fails, fig. 3 is a flowchart of another routing information processing method provided by an embodiment of the present invention. As shown in fig. 3, the method may include the steps of:
s201, a first message is sent to neighbor equipment of the fault equipment, wherein the first message comprises a version identifier of a link state notification LSA after the fault equipment is recovered.
The execution of step S201 is similar to the corresponding steps of the previous embodiment, and specific reference may be made to the related description in the embodiment shown in fig. 3, which is not repeated here.
S202, if the second message indicates that the neighbor device does not have the LSA of the fault device, the second message is stored.
S203, carrying out routing decision according to the first message and the second message.
If the second message indicates that the neighbor device does not have the LSA of the fault device, reflecting that the neighbor device may delete the LSA of the fault device before the fault device fails because of excessively long fault time of the fault device, and if the second message includes the version identifiers of LSAs of other devices in the OSPF network, the fault device will store the second message, and acquire the corresponding LSA according to the first message and the version identifiers in the second message.
After the neighbor device sends all the version identifiers of the LSAs stored locally to the fault device, the fault device can obtain the LSAs of other devices in the OSPF network by the version identifiers, and then the routing decision is realized by combining with the LSAs.
Optionally, the neighbor device may obtain a communication cost between devices having an adjacency relationship in the OSPF network according to LSAs of the devices in the OSPF network obtained by using the first packet and the second packet, and perform a routing decision according to the communication cost. For example, a shortest path tree corresponding to the OSPF network can be obtained according to the minimum communication cost, and a routing decision is made based on the shortest path tree. Similar to the embodiment shown in fig. 1, optionally, the first message in step S201 in the embodiment shown in fig. 3 may also be the last message sent by the fault device to the neighbor device, and then before the first message is sent, the fault device may also send a fourth message to the neighbor device, and then the fault device may make a routing decision according to the first message, the fourth message, and the second message sent by the neighbor device. The content related to the fourth message may refer to the related description in the above embodiment, which is not described herein.
In this embodiment, the failure device can obtain LSAs of other devices in the OSPF network through storing the second packet, and then implement routing decisions by combining with the LSAs of the failure device.
In the embodiments shown in fig. 1 and fig. 3, the starting point of the neighbor device to implement the routing decision is to receive the message sent by the failed device, and the failed device needs to implement the sending of the message by means of the adjacency relationship with the neighbor device. Fig. 4 is a flowchart of another routing information processing method according to an embodiment of the present invention. As shown in fig. 4, before step S101 or S201, the method may further include the steps of:
s301, in response to restarting of the fault device, establishing a neighbor relation between the fault device and the neighbor device.
And restarting the fault equipment, namely in a fault recovery state, and establishing a neighbor relation between the fault equipment and the neighbor equipment in response to the restarting of the fault equipment.
Alternatively, the establishment of the neighbor relation may be achieved by means of hello messages. Specifically, the fault device is in a Down state, and sends hello messages containing the device number of the fault device to the neighbor device. The neighbor device receives hello messages. If the message does not contain the equipment number of the neighbor equipment, the neighbor equipment is in an init state, so that the neighbor equipment sends a hello message to the fault equipment, the message contains the equipment numbers of the adjacent equipment and the fault equipment at the same time, and at the moment, the fault equipment is in a 2-Way state. Then, the fault device sends hello message to the adjacent device again, and the hello message at this time contains the respective device numbers of the adjacent device and the fault device, so that the adjacent device receiving the hello message is also in a 2-Way state,
When the failed device and the neighbor device are both in the 2-Way state, the establishment of a neighbor relationship is indicated.
S302, generating a first message after the adjacency relation between the fault equipment and the neighbor equipment is established based on the neighbor relation.
Based on the established neighbor relation, further establishing an adjacency relation between the two, and sending a message in the overgrowth of the establishment of the adjacency relation. Optionally, when the faulty device is in an exstart state after establishing the neighbor relation, the message is started to be sent. The transmitted message may be the first message or the fourth message mentioned in the above embodiments.
In this embodiment, the establishment of the neighbor relation between the fault device and the neighbor device is implemented by using hello messages, then an adjacency relation is established based on the neighbor relation, and the generation and the transmission of the messages exist in the process of establishing the adjacency relation. The message sent in the process of establishing the adjacency can enable the neighbor device to obtain the latest LSA of the fault device according to the embodiment shown in fig. 1 or fig. 3, so that a routing decision is made, and the data packet is sent according to the decision result, so that the problem of data packet loss caused by using the old LSA is avoided.
According to the method provided by the embodiments, the neighbor device can obtain the latest LSA after the fault recovery of the fault device, and meanwhile, the shortest path tree is calculated according to the LSA of each device in the OSPF network, so that the routing decision is realized based on the shortest path tree.
Continuing to accommodate the OSPF network shown in fig. 2, the specific process may be described as:
when each device in the network is in a normal operation state, in consideration of the communication cost, two PATHs with the same communication cost, namely PATH1, are used by the device 1 to send the data packet to the device 4: device 1-device 2-device 4; PATH2, device 1-device 3-device 4. The interface address of the device 4 may be: 1.1.1.1, the interface corresponding to the device 1 and the device 2 is gi0/1, the interface address of the interface may be 192.168.1.2, the interface corresponding to the device 1 and the device 3 is gi0/2, the address of the interface may be 192.168.2.2, and the device 1 may calculate the routing table shown in table 1 according to LSAs of the devices in the OSPF network:
TABLE 1
Target address Next hop address Interface
1.1.1.1 192.168.1.2 gi0/1
192.168.2.2 gi0/2
According to the routing table described above, device 1 may send a part of the data packet to device 2 via the gi0/1 interface and interface address 192.168.1.2, while another part of the data packet is sent to device 3 via the gi0/2 interface and interface address 192.168.2.2, and similarly, device 2 and device 3 may further send the data packet to device 4 according to their own routing tables.
With the operation of the network, if the device 2 fails, only the PATH2 can normally transmit the data packet, and at this time, the routing table of the neighbor device of the failed device 2, that is, the device 1, may be as shown in table 2:
TABLE 2
Target address Next hop address Interface
1.1.1.1 192.168.2.2 gi0/2
I.e. device 1 may send another part of the data packet to device 3 by means of the gi0/2 interface and the interface address 192.168.2.2, and the data packet is finally sent by device 3 to device 4.
When the failure device 2 completes the failure recovery, the LSA of the failure device 2 may change, and at this time, using the method provided in the foregoing embodiments, the neighbor device 1 may obtain and use the latest LSA of the failure device 2 to recalculate the shortest PATH tree, where the PATH obtained by using the shortest PATH tree is PATH1, which is the PATH with the minimum communication cost required for transmitting the data packet with the device 1 to the device 4. At this time, the device 1 routing table, which is the neighbor device of the failed device 2, may be changed to table 3 as follows:
TABLE 3 Table 3
Target address Next hop address Interface
1.1.1.1 192.168.1.2 gi0/1
I.e. device 1 can send a data packet to the completed fault recovery device 2 by means of the gi0/1 interface and the interface address 192.168.1.2, and the data packet is finally sent by device 2 to device 4.
Similar to the above-mentioned routing decision process implemented by the neighbor device, after the failure device 2 recovers from the failure, a first message generated by itself and a second message sent by the neighbor device may be obtained, that is, LSAs of devices in the OSPF network may be known, and the shortest path tree may be further calculated according to the LSAs.
For data packets that need to be sent from device 1 to device 4, the faulty device 2 can also get the above decision result, taking into account the cost of communication between the devices: PATH1: device 1-device 2-device 4; PATH2 device 1-device 3-device 4 and both PATHs have the same communication cost. And simultaneously, the two paths are used for realizing the transmission of the data packet.
The above embodiments describe the process of the neighbor device obtaining the latest LSA of the failed device and making a routing decision from the perspective of the method. Since the failed device and the neighbor device belong to the same OSPF network, the contents of the foregoing embodiments can also be described from the perspective of the entire network on this basis.
Fig. 5 is a structural framework diagram of an OSPF network according to an embodiment of the present invention. As shown in fig. 5, the network includes: a faulty device and a neighbor device of the faulty device. Wherein the malfunctioning device is in a failure recovery state.
The fault equipment sends a first message containing the version identifier of the LSA after the fault equipment is recovered to the neighbor equipment. After receiving the first message, the neighbor device generates and sends a second message to the fault device. The faulty device will analyze the second message. After analysis, in a case that the second message indicates that the neighbor device has the LSA of the failed device, the version identifier of the LSA after the failure recovery of the failed device in the first message is modified according to the version identifier of the LSA before the failure of the failed device in the second message, so as to obtain a third message. The version of the LSA after fault recovery in the third message is higher than the version of the LSA before fault in the second message after the version identification is revised;
Finally, the neighbor device replaces the second message with the third message, acquires the latest LSA of the fault device according to the version identification of the LSA of the fault device in the third message, performs routing decision by combining with LSAs of other devices in the OSPF network locally stored by the neighbor device, and realizes the transmission of the data packet with the fault device according to the routing decision result.
The version identifier of LSA in the message may specifically be the version number of LSA, and optionally, the version number of LSA after fault recovery in the first message may be directly modified to a larger value C1 for modification of the version number of LSA after fault recovery in the first message. Optionally, the version number of the LSA after fault recovery may also be modified by the version number of the LSA before fault in the second message, and the specific modification manner may be referred to the related description in the above method embodiment, which is not repeated herein.
Optionally, in another case, the second message sent by the neighbor device indicates that the neighbor device does not have LSA of the fault device, and indicates that the neighbor device sends version identifiers of LSAs of other devices in the OSPF network, the fault device stores the second message, and obtains corresponding LSAs according to the version identifiers of LSAs in the first message and the second message, so as to implement routing decision, and implement transmission of data packets with the neighbor device according to a result of the routing decision.
Optionally, whether it is a faulty device or a neighboring device, a preset identification bit may be further set in a message sent to the other device, where the difference in the values of the preset identification bits can reflect whether the device has sent all the version identifiers of LSAs stored locally to the other device.
For parts of the embodiment which are not described in detail, reference is made to the relevant description of the embodiment shown in fig. 1 to 4. The implementation process and technical effects of this technical solution are described in the embodiments shown in fig. 1 to 4, and are not described herein.
Devices in an open shortest path first routing OSPF network in accordance with one or more embodiments of the present invention are described in detail below. Those skilled in the art will appreciate that these OSPF devices can each be configured using commercially available hardware components through the steps taught by the present solution.
Fig. 6 is a schematic structural diagram of an OSPF device according to an embodiment of the present invention, where, as shown in fig. 6, the OSPF device is in a fault recovery state, and the device includes:
a sending module 11, configured to send a first packet to a neighboring device of the failed device, where the first packet includes a version identifier of a link state advertisement LSA after the failed device recovers from the failure; and sending a third message to the neighbor equipment so that the neighbor equipment carries out routing decision according to the third message.
And a modifying module 12, configured to modify, if the second message sent by the neighbor device indicates that the neighbor device has an LSA of the failed device, a version identifier of an LSA after failure recovery of the failed device in the first message according to a version identifier of an LSA before failure of the failed device in the second message, so as to obtain a third message, where a version of the LSA after failure recovery in the third message is higher than a version of the LSA before failure in the second message, and the second message is sent after the neighbor device receives the first message.
Optionally, the version identification includes a version number.
The modification module 12 is specifically configured to: increasing the version number of the LSA before the fault to obtain an updated version number;
and replacing the version number of the LSA after fault recovery in the first message with the updated version number to obtain the third message, wherein the version number after the update, the version number of the LSA before fault and the version number of the LSA after fault recovery are sequentially reduced.
The first message and the third message include preset identification bits, and the preset identification bits indicate that the fault device has sent version identifications of all local LSAs to the neighbor device.
Optionally, the OSPF device further comprises a storage module 13 and a decision module 14.
The storage module 13 is configured to store the second message if the second message indicates that the neighboring device does not have an LSA of the faulty device.
The decision module 14 is configured to obtain, according to the first packet and the second packet, a communication cost between devices having an adjacency relationship in the OSPF network; and carrying out routing decision according to the communication cost.
Optionally, the sending module 11 is further configured to: sending a fourth message to the neighbor device, so that the neighbor device makes a routing decision according to the first message, the second message and the fourth message, wherein the fourth message contains the version identifiers of LSAs of other devices in the OSPF network; and the preset identification bit in the fourth message indicates that the fault equipment does not send the version identifications of all the local LSAs to the neighbor equipment.
Optionally, the OSPF device further comprises: a relationship establishment module 15 and a generation module 16.
The relationship establishing module 15 is configured to establish a neighbor relationship between the faulty device and the neighbor device in response to restarting the faulty device.
The generating module 16 is configured to generate the first packet after the adjacency relationship between the faulty device and the neighbor device is established based on the neighbor relationship.
The apparatus shown in fig. 6 may perform the method of the embodiment shown in fig. 1 to 4, and reference is made to the relevant description of the embodiment shown in fig. 1 to 4 for parts of this embodiment not described in detail. The implementation process and technical effects of this technical solution are described in the embodiments shown in fig. 1 to 4, and are not described herein.
The internal functions and structures of the routing information processing apparatus described above are described, which in one possible design may be realized in particular by means of an electronic device. As shown in fig. 7, the electronic device may include: a processor 21 and a memory 22. Wherein the memory 22 is for storing a program for supporting the electronic device to execute the routing information processing method provided in the embodiments shown in fig. 1 to 4 described above, and the processor 21 is configured for executing the program stored in the memory 22.
The program comprises one or more computer instructions which, when executed by the processor 21, are capable of carrying out the steps of:
Transmitting a first message to neighbor equipment of the fault equipment, wherein the first message comprises a version identifier of a link state notification LSA after the fault equipment is recovered;
if the second message sent by the neighbor device indicates that the neighbor device has the LSA of the fault device, modifying the version identifier of the LSA after fault recovery of the fault device in the first message according to the version identifier of the LSA before the fault device in the second message to obtain a third message, wherein 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, and the second message is sent after the neighbor device receives the first message;
and sending the third message to the neighbor equipment so that the neighbor equipment carries out routing decision according to the third message.
Optionally, the processor 21 is further configured to perform all or part of the steps in the embodiments shown in fig. 1 to 4.
The structure of the electronic device may further include a communication interface 23, for the electronic device to communicate with other devices or a communication network.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for processing routing information, wherein the method is applied to a failed device in an open shortest path first OSPF network, the failed device is in a failure recovery state, and the method comprises:
transmitting a first message to neighbor equipment of the fault equipment, wherein the first message comprises a version identifier of a link state notification LSA after the fault equipment is recovered;
if the second message sent by the neighbor device indicates that the neighbor device has the LSA of the fault device, modifying the version identifier of the LSA after fault recovery of the fault device in the first message according to the version identifier of the LSA before the fault device in the second message to obtain a third message, wherein 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, and the second message is sent after the neighbor device receives the first message; and sending the third message to the neighbor equipment so that the neighbor equipment carries out routing decision according to the third message.
2. The method of claim 1, wherein the version identification comprises a version number;
the modifying the version identifier of the LSA after the fault recovery of the fault device in the first message according to the version identifier of the LSA before the fault device in the second message includes:
Increasing the version number of the LSA before the fault to obtain an updated version number;
and replacing the version number of the LSA after fault recovery in the first message with the updated version number to obtain the third message, wherein the version number after the update, the version number of the LSA before fault and the version number of the LSA after fault recovery are sequentially reduced.
3. The method of claim 1, wherein the first message and the third message include a preset identification bit indicating that the failed device has sent version identifications of all LSAs locally to the neighbor device.
4. The method according to claim 1, wherein the method further comprises:
if the second message indicates that the neighbor device does not have the LSA of the fault device, storing the second message;
acquiring the communication cost between devices with adjacent relations in the OSPF network according to the first message and the second message;
and carrying out routing decision according to the communication cost.
5. The method of claim 4, wherein prior to sending the first message to the neighbor device of the failed device, the method further comprises:
Sending a fourth message to the neighbor device, so that the neighbor device makes a routing decision according to the first message, the second message and the fourth message, wherein the fourth message contains the version identifiers of LSAs of other devices in the OSPF network; and the preset identification bit in the fourth message indicates that the fault equipment does not send the version identifications of all the local LSAs to the neighbor equipment.
6. The method according to claim 1, wherein the method further comprises:
in response to the restarting of the failed device, establishing a neighbor relationship between the failed device and the neighbor device;
and generating the first message after the establishment of the adjacency relation between the fault equipment and the neighbor equipment is completed based on the neighbor relation.
7. The method of claim 1 wherein the failed device and the neighbor device comprise routers within the OSPF network.
8. An open shortest path first routing OSPF network comprising: the fault equipment and neighbor equipment of the fault equipment, wherein the fault equipment is in a fault recovery state;
the fault equipment is used for sending a first message to neighbor equipment of the fault equipment, wherein the first message comprises a version identifier of a link state notification LSA after the fault equipment is recovered from fault;
If the second message indicates that the neighbor device has the LSA of the fault device, modifying the version identifier of the LSA after fault recovery of the fault device in the first message according to the version identifier of the LSA before the fault device in the second message to obtain a third message, wherein 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, and the second message is sent after the neighbor device receives the first message;
sending the third message to the neighbor device;
the neighbor device is configured to send the second message; and carrying out routing decision according to the third message.
9. An apparatus in an open shortest path first routing OSPF network, wherein the OSPF apparatus is in a failure recovery state;
a sending module, configured to send a first packet to a neighboring device of the failed device, where the first packet includes a version identifier of a link state advertisement LSA after the failed device recovers from the failure; sending a third message to the neighbor device so that the neighbor device makes a routing decision according to the third message;
and the modifying module is used for modifying the version identifier of the LSA after the fault recovery of the fault equipment in the first message according to the version identifier of the LSA before the fault equipment in the second message if the second message sent by the neighbor equipment indicates that the neighbor equipment has the LSA of the fault equipment, so as 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 equipment receives the first message.
10. An apparatus in an open shortest path first routing OSPF network, wherein the OSPF apparatus is in a failure recovery state;
the OSFP device includes: a memory, a processor; wherein the memory has stored thereon executable code which, when executed by the processor, causes the processor to perform the routing information processing method according to any one of claims 1 to 7.
CN202111454974.3A 2021-12-01 2021-12-01 Routing information processing method, OSPF (open shortest path first) equipment and OSPF network Pending CN116260763A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111454974.3A CN116260763A (en) 2021-12-01 2021-12-01 Routing information processing method, OSPF (open shortest path first) equipment and OSPF network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111454974.3A CN116260763A (en) 2021-12-01 2021-12-01 Routing information processing method, OSPF (open shortest path first) equipment and OSPF network

Publications (1)

Publication Number Publication Date
CN116260763A true CN116260763A (en) 2023-06-13

Family

ID=86681130

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111454974.3A Pending CN116260763A (en) 2021-12-01 2021-12-01 Routing information processing method, OSPF (open shortest path first) equipment and OSPF network

Country Status (1)

Country Link
CN (1) CN116260763A (en)

Similar Documents

Publication Publication Date Title
US8856584B2 (en) Transport control server that modifies routing information
JP7152533B2 (en) Method, apparatus, and system for handling transmission path failures
CN113261245B (en) Recovery system and method for network link or node failure
US8432913B2 (en) Relay device, network system, route switching method, and recording medium
US8817798B2 (en) Constraining topology size and recursively calculating routes in large networks
EP1905196B1 (en) Method and apparatus for updating label-switched paths
US9755962B2 (en) Reducing link state protocol traffic during graceful restart
US20120124238A1 (en) Prioritization of routing information updates
KR101463364B1 (en) Lookahead computation of routing information
CN102404189A (en) Main and standby switching method of device supporting multi-topology routing as well as master control board
CN102325080B (en) Open shortest path first (OSPF) protocol graceful restarting method and device
CN103152261A (en) Method and equipment for generating and distributing link state protocol data unit fragment messages
CN113615132A (en) Fast flooding topology protection
CN103746828A (en) Method and device for network node management
US8514876B2 (en) Method and apparatus for sequencing operations for an incoming interface check in data center ethernet
JP6042838B2 (en) Management system, management server, and management method
CN116260763A (en) Routing information processing method, OSPF (open shortest path first) equipment and OSPF network
US9143399B2 (en) Minimizing the number of not-via addresses
CN114430387B (en) Node configuration method, controller and node
CN114041279B (en) System and method for abstracting IGP partitions
JP2013034080A (en) Routing information update system and routing information update method
JP2004349881A (en) Flooding quantity reducing method, and communication device
JP2006094313A (en) Routing recovery system
JP2010028464A (en) Communication system and transfer device
CN114978886A (en) Information publishing method and device and computer readable storage medium

Legal Events

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