Routing error processing method and device and related equipment
By detecting and updating the sequence number of the link state advertisement or sending a message indicating a delay in the migration of neighbor states, the routing calculation error caused by LSA remnants after router restart is resolved, thus achieving routing accuracy and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILE COMM LTD RES INST
- Filing Date
- 2024-10-30
- Publication Date
- 2026-05-01
AI Technical Summary
After a router restarts abnormally, the Link State Advertisement (LSA) from before the restart remains in the network, causing incorrect route calculation results and creating a routing black hole.
The problem of LSA remnants can be resolved by detecting the database description (DD) messages sent by the second device, regenerating and sending link state announcements with updated sequence numbers, or sending target messages indicating delayed migration of neighbor states.
It effectively eliminates routing black holes, ensures the accuracy of routing calculation results, and avoids errors caused by LSA residues.
Smart Images

Figure CN121967302A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a method, apparatus and related equipment for handling routing errors. Background Technology
[0002] Interior Gateway Protocols (IGPs) are protocols for exchanging routing information between gateways (hosts and routers) within an Autonomous Network (AS). IGPs are generally classified into two types: distance-vector routing protocols and link-state routing protocols. Open Shortest Path First (OSPF), a link-state routing protocol, uses the Shortest Path First (SPF) algorithm. Each router is responsible for discovering and maintaining relationships with its neighbors, describing the known neighbor list and link information through Link State Update (LSU) messages. Through reliable flooding, it periodically interacts with other routers within the AS to learn the network topology of the entire AS; and injects routing information from other ASs through routers at the AS boundary, thus obtaining routing information for the entire Internet. At specific intervals or when the link state changes, a new Link State Advertisement (LSA) is generated, and the router advertises the new LSA through a flooding mechanism to achieve real-time route updates.
[0003] However, in practical applications, if a device in the network unexpectedly reboots, the LSA (with a large sequence number (Seqnum)) from before the reboot will remain in the Link State Database (LSDB) of other devices in the network. If this LSA is not refreshed in time after the reboot, other devices in the network will perform route calculations based on the remaining LSA, leading to incorrect route calculation results. For example, routes that should not exist after the reboot may be calculated, creating routing black holes and affecting traffic forwarding. Summary of the Invention
[0004] The purpose of this application is to provide a method, apparatus, and related equipment for handling routing errors, so as to solve the problem of incorrect routing calculation results after routing restart.
[0005] To achieve the above objectives, embodiments of this application provide a method for handling routing errors, executed by a first device, comprising:
[0006] In the event of an abnormal restart of the first device
[0007] The database description (DD) message sent by the second device is detected, and if the DD message contains the first link-state advertisement (LSI) of the first device, a second LSI is regenerated and sent; wherein the sequence number of the first LSI is greater than the sequence number of the LSI existing in the local database; or,
[0008] Send a first target message to a second device; wherein the first target message includes a first identifier, the first identifier being used to indicate the delayed migration neighbor status.
[0009] Optionally, the sequence number of the second link state announcement is equal to the sequence number of the first link state announcement plus 1.
[0010] Optionally, the first identifier is a flag bit added to the first target message, and the flag bit indicates the delayed migration neighbor status when it takes a first value.
[0011] Optionally, the first identifier is a specific flag bit set in the first target message to identify the completion of database description message interaction.
[0012] Optionally, after sending the first target message to the second device, the method further includes:
[0013] Send the second target message to the second device;
[0014] The second target message includes a second identifier, which is a flag bit added to the second target message. When the flag bit takes a second value, it indicates restoration of the neighbor migration state; or...
[0015] The second target message does not have a specific flag bit set to identify the completion of the database description message interaction.
[0016] Optionally, sending the second target message to the second device includes:
[0017] The second target message is sent when the timer expires, the timer being started when the first device restarts or when the first target message is sent; or...
[0018] The second target message is sent after the second link state advertisement is regenerated.
[0019] Optionally, the first target message is a DD message.
[0020] To achieve the above objectives, embodiments of this application provide a method for handling routing errors, executed by a second device, comprising:
[0021] In the event of an abnormal restart of the first device
[0022] The system receives a second link-state advertisement generated and sent by the first device when it detects that a DD packet contains a first link-state advertisement from the first device; wherein the sequence number of the first link-state advertisement is greater than the sequence number of a link-state advertisement existing in the local database; or,
[0023] Receive a first target message sent by a first device; wherein the first target message includes a first identifier, the first identifier being used to indicate the delayed migration neighbor status.
[0024] Optionally, the sequence number of the second link state announcement is equal to the sequence number of the first link state announcement plus 1.
[0025] Optionally, the first identifier is a flag bit added to the first target message, and the flag bit indicates the delayed migration neighbor status when it takes a first value.
[0026] Optionally, the first identifier is a specific flag bit set in the first target message to identify the completion of database description message interaction.
[0027] Optionally, after receiving the first target message sent by the first device, the method further includes:
[0028] Receive the second target message sent by the first device;
[0029] The second target message includes a second identifier, which is a flag bit added to the second target message. When the flag bit takes a second value, it indicates restoration of the neighbor migration state; or...
[0030] The second target message does not have a specific flag bit set to identify the completion of the database description message interaction.
[0031] Optionally, the first target message is a DD message.
[0032] To achieve the above objectives, embodiments of this application provide a routing error processing apparatus, applied to a first device, comprising:
[0033] The first processing module is configured to respond to an abnormal restart of the first device.
[0034] The database description (DD) message sent by the second device is detected, and if the DD message contains the first link-state advertisement (LSI) of the first device, a second LSI is regenerated and sent; wherein the sequence number of the first LSI is greater than the sequence number of the LSI existing in the local database; or,
[0035] Send a first target message to a second device; wherein the first target message includes a first identifier, the first identifier being used to indicate the delayed migration neighbor status.
[0036] To achieve the above objectives, embodiments of this application provide a routing error processing apparatus, applied to a second device, comprising:
[0037] The second processing module is used to handle situations where the first device experiences an abnormal restart.
[0038] The system receives a second link-state advertisement generated and sent by the first device when it detects that a DD packet contains a first link-state advertisement from the first device; wherein the sequence number of the first link-state advertisement is greater than the sequence number of a link-state advertisement existing in the local database; or,
[0039] Receive a first target message sent by a first device; wherein the first target message includes a first identifier, the first identifier being used to indicate the delayed migration neighbor status.
[0040] To achieve the above objectives, embodiments of this application provide a network device, including: a transceiver, a processor, a memory, and a program or instructions stored in the memory and executable on the processor; when the processor executes the program or instructions, it implements the routing error handling method executed by the first device as described above, or the routing error handling method executed by the second device as described above.
[0041] To achieve the above objectives, embodiments of this application provide a readable storage medium storing a program or instructions thereon, which, when executed by a processor, implements the routing error handling method executed by the first device as described above, or the steps in the routing error handling method executed by the second device as described above.
[0042] To achieve the above objectives, embodiments of this application provide a computer program product, including computer instructions, which, when executed by a processor, implement the routing error handling method performed by a first device as described above, or the steps of the routing error handling method performed by a second device as described above.
[0043] The beneficial effects of the above technical solution in this application are as follows:
[0044] The method in this application embodiment, for the scenario of an abnormal restart of the first device, includes two methods: Method 1, which detects DD packets sent by the second device and, if the sequence number of the first LSA contained in the DD packet is greater than the sequence number of the LSA existing in the local database, regenerates and sends the second LSA; Method 2, which sends a first target packet to the second device, wherein the first identifier included in the first target packet indicates a delayed migration of neighbor states. Thus, Method 1, by refreshing its own generated LSAs in advance, and Method 2, by delaying the migration of the neighbor states of the second device, solves the problem of incorrect routing calculation results caused by the first device's LSAs remaining on the second device. Attached Figure Description
[0045] Figure 1 This is a diagram illustrating the restart of an existing route.
[0046] Figure 2 This is one of the flowcharts for a routing error handling method according to an embodiment of this application;
[0047] Figure 3 This is one of the schematic diagrams illustrating the application of the method in the embodiments of this application;
[0048] Figure 4 This is a schematic diagram of the DD message format in an embodiment of this application;
[0049] Figure 5 This is a second schematic diagram illustrating the application of the method in the embodiments of this application;
[0050] Figure 6 This is the third schematic diagram illustrating the application of the method in the embodiments of this application;
[0051] Figure 7 This is a second flowchart of a routing error handling method according to an embodiment of this application;
[0052] Figure 8 This is one of the schematic diagrams of the module structure of the routing error handling device according to an embodiment of this application;
[0053] Figure 9 This is a second schematic diagram of the module structure of the routing error handling device according to an embodiment of this application;
[0054] Figure 10 This is a structural diagram of a network device according to an embodiment of this application. Detailed Implementation
[0055] To make the technical problems, technical solutions and advantages of this application clearer, a detailed description will be provided below in conjunction with the accompanying drawings and specific embodiments.
[0056] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.
[0057] In the various embodiments of this application, it should be understood that the sequence number of each process described below does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0058] In addition, the terms "system" and "network" are often used interchangeably in this article.
[0059] In the embodiments provided in this application, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information.
[0060] For ease of understanding, the following describes some aspects of the embodiments of this application:
[0061] OSPF is a widely used dynamic routing protocol with advantages such as fast route convergence, no routing loops, support for Variable Length Subnet Mask (VLSM) and summarization, and hierarchical area division. When OSPF is used in a network, most routes are automatically calculated and generated by OSPF itself, eliminating the need for manual configuration by network administrators. When the network topology changes, the protocol can automatically calculate and correct routes, greatly simplifying network management.
[0062] Assuming, such as Figure 1 As shown, Router A rebooted abnormally, and after the reboot, the external route 10.1.1.1 was deleted. After the reboot, Routers A and B began database descriptions, as follows: Figure 1 As shown in the process, after Router B clears its local request queue and its neighbor state reaches the full state, a new Router-LSA is generated. This LSA will publish the adjacency relationship between B and A. At this time, B performs route calculation and will consider the route 10.1.1.1 to be reachable. However, this route no longer exists after Router A restarts, which means a routing black hole is created.
[0063] After receiving an update message from Router B, Router A discovers that the message contains an LSA it generated, and that the sequence number (seqnum) N of this LSA is greater than the sequence number of an LSA existing in its local database. Router A then initiates a re-originate process, publishing the LSA with sequence number N+1 to Router B. At this point, Router B performs route calculations and determines that the route 10.1.1.1 is unreachable, thus eliminating the black hole.
[0064] The seven states of OSPF are as follows:
[0065] 1. Down: The status that immediately sends the first hello message when the device is powered on.
[0066] 2. Init: After sending the first hello message, wait for the other party to send a hello message.
[0067] 3. 2-way: Bidirectional connection. When a hello message is received from a neighbor (which carries information such as the route ID of the neighbor), the election of the Designated Router (DR) and the Backup Designated Router (BDR) is completed in this state.
[0068] 4. Exstart: Both parties begin exchanging empty Database Description (DD) messages: DD messages negotiate and elect master and slave devices through the sequence number and other summary information in the DD messages.
[0069] 5. Exchange: Both parties exchange DD messages carrying LSA summaries for LSDB synchronization (it can be said that each party stores its own LSA message database, i.e., LSDB).
[0070] 6. Loading: Used to load any missing LSA messages after an exchange. (This process sends LSR, LSU, and LSAck messages).
[0071] 7. Full: LSDB synchronization complete. ((During this process, changes in the topology link will trigger the sending of HELLO, DD, LSR, LSU, and LSAck messages to dynamically refresh the LSDB.)
[0072] like Figure 2 As shown, a routing error handling method according to an embodiment of this application is executed by a first device, including:
[0073] Step 201, in the event of an abnormal restart of the first device,
[0074] The database description (DD) message sent by the second device is detected, and if the DD message contains the first link-state advertisement (LSI) of the first device, a second LSI is regenerated and sent; wherein the sequence number of the first LSI is greater than the sequence number of the LSI existing in the local database; or,
[0075] Send a first target message to a second device; wherein the first target message includes a first identifier, the first identifier being used to indicate the delayed migration neighbor status.
[0076] Thus, the routing error handling method of this application embodiment, implemented by the first device, includes two methods for scenarios where the first device experiences an abnormal restart: Method 1 involves detecting the DD message sent by the second device. If the sequence number of the first LSA contained in the DD message is greater than the sequence number of the LSA existing in the local database, the second LSA is regenerated and sent. Method 2 involves sending a first target message to the second device, where a first identifier included in the first target message indicates a delayed migration of neighbor states. In this way, Method 1, by refreshing its own generated LSAs in advance, and Method 2, by delaying the migration of the second device's neighbor states, solve the problem of incorrect routing calculation results caused by the first device's LSAs remaining on the second device.
[0077] In method 2, after or simultaneously with sending the first target message, the second link state announcement will be regenerated. Specifically, regenerating the second link state announcement includes: when an update message sent by the second device is detected, which contains the first link state announcement of the first device, the second link state announcement will be regenerated.
[0078] It should be noted that in this embodiment, both the first device and the second device are routers. The second device is a neighboring device of the first device.
[0079] It should be noted that in this embodiment, Method 1 advances the timing of regenerating the second link state advertisement to the neighbor DD synchronization process (database description interaction). When a DD packet sent by the second device is received containing an LSA generated locally, and this LSA is more up-to-date than the LSA actually generated after the device's restart, the LSA is immediately regenerated (i.e., a refresh operation). Method 1 is applicable to all types of LSAs. Preferably, to reduce flooding pressure, it can be limited to specific types of LSAs, such as Route-LSA and Network-LSA. The refreshed LSA may also not be added to the request list.
[0080] It should also be understood that, in this embodiment, the first identifier indicating delayed neighbor migration state can also be understood as suspending neighbor migration state, or suppressing neighbor migration state.
[0081] Optionally, in this embodiment, the sequence number of the second link state announcement is equal to the sequence number of the first link state announcement plus 1.
[0082] That is, if the sequence number of the first link state announcement is N, then the sequence number of the second link state announcement regenerated by the first device is N+1.
[0083] For example, such as Figure 3 As shown, the first device (Router A) abnormally restarts, and the external route 10.1.1.1 is deleted after the restart. After Router A and the second device (Router B) begin synchronizing their databases via 1-way Hello and 2-way Hello, Router A discovers a self-generated LSA in the DD packets sent by Router B. Since the sequence number (N) of this LSA is larger than the sequence number of the LSA actually generated after the restart, Router A regenerates and sends a new LSA with sequence number N+1. Thus, Router B, when performing route calculations, considers the route 10.1.1.1 unreachable, and the black hole is eliminated. Subsequently, Router A and Router B perform requests and updates, reaching the Full state.
[0084] Optionally, the first target message is a DD message.
[0085] That is, in method 2, the first device can use DD messages to carry a first identifier to indicate the delayed migration of neighbor status.
[0086] Optionally, the first identifier is a flag bit added to the first target message, and the flag bit indicates the delayed migration neighbor status when it takes a first value.
[0087] In other words, for the first destination message, a flag bit can be added based on the free bits in its format, and the flag bit can be set to a specific value, i.e., the first value, to indicate a delayed, suspended, or suppressed neighbor migration state. For example, if the first destination message is a DD message, its format is as follows: Figure 4 As shown, the first identifier corresponds to the 1-bit marker bit with the background in the figure, and the first value is "0".
[0088] Optionally, the first identifier is a specific flag bit set in the first target message to identify the completion of database description message interaction.
[0089] That is, for the first destination message, a field with a specific function in its format can be reused to indicate a delay, pause, or suppression of neighbor migration status. For example, if the first destination message is a DD message, its format is as follows: Figure 4As shown, the first identifier corresponds to the M-bit set in the figure to identify the completion of the database description message (DD message) interaction. The specific flag bit is the M-bit.
[0090] In addition, considering that the second device needs to restore the neighbor migration state after delaying, pausing, or suppressing it to ensure that the neighbor relationship between the two devices can be established and maintained normally, this embodiment may optionally include the following after sending the first target message to the second device:
[0091] Send the second target message to the second device;
[0092] The second target message includes a second identifier, which is a flag bit added to the second target message. When the flag bit takes a second value, it indicates restoration of the neighbor migration state; or...
[0093] The second target message does not have a specific flag bit set to identify the completion of the database description message interaction.
[0094] Thus, for the second destination message, a flag bit can be added based on the free bits in its format, and the flag bit can be set to a specific value, namely the second value, to indicate the restoration of the migrated neighbor state. For example, if the second destination message is a DD message, the first identifier is the corresponding... Figure 4 The first bit is a background marker, and the second value is "1".
[0095] Alternatively, for the second destination message, when a specific flag indicating the completion of its multiplexing identifier message interaction is used to indicate a delayed, suspended, or suppressed neighbor migration state, the resumption of the neighbor migration state can be indicated by not setting that specific flag. For example, if the second destination message is a DD message, the flag may not be set. Figure 4 The M-bit shown is used to indicate the restoration of the migrated neighbor state.
[0096] It is also necessary to know that, Figure 4 The DD message shown also includes the following fields: Version, Packet length, Router ID, Area ID, Checksum, Authentication type, Interface MTU, Options, DD sequence number, Master / Slave relationship (MS), etc.
[0097] Optionally, the second target message shown is a DD message.
[0098] Optionally, in this embodiment, sending the second target message to the second device includes:
[0099] The second target message is sent when the timer expires, the timer being started when the first device restarts or when the first target message is sent; or...
[0100] The second target message is sent after the second link state advertisement is regenerated.
[0101] In this way, on the one hand, the second target message can be triggered by the expiration of a timer, enabling the second device to migrate its neighbor state. This timer starts either when the first device restarts or when the first target message is sent. Specifically, the timer's duration can be preset or configured by other devices.
[0102] On the other hand, the second target message is triggered by determining that the LSA update is complete. The determination of LSA update completion can be made by internally maintaining LSA update information, or it can be considered as the completion of the generation of the second link state advertisement.
[0103] As an optional implementation, such as Figure 5 As shown, the first device (Router A) restarted abnormally, and the external route 10.1.1.1 was deleted after the restart. After Router A and the second device (Router B) started synchronizing their databases via 1-way Hello and 2-way Hello, Router A sent a DD message to Router B, as shown below. Figure 4 As shown, in this DD message, the 1-bit background flag is set to 0 (denoted as the first flag R), indicating that Router B can delay, suspend, or suppress the migration of neighbor states. Upon receiving this flag R, Router B delays, suspends, or suppresses the migration of neighbor states. When Router A receives an updated LSA from Router B, it finds that it is a self-generated LSA, and that the sequence number (N) of this LSA is larger than the sequence number of the LSA actually generated after its restart. Therefore, it regenerates and sends a new LSA with a sequence number of N+1. When the timer expires, Router A sends a new DD message (the DD message with R cleared), which can also be understood as the 1-bit background flag being set to 1 (denoted as the second flag R'), indicating that Router B can migrate neighbor states. Upon receiving this flag R', Router B resumes the migration of neighbor states.
[0104] As an optional implementation, such as Figure 6As shown, the first device (Router A) restarted abnormally, and the external route 10.1.1.1 was deleted after the restart. After Router A and the second device (Router B) started synchronizing their databases via 1-way Hello and 2-way Hello, Router A sent a DD message to Router B (as shown in the last DD message). Figure 4 As shown, the DD message includes an M-bit to identify the completion of the database description message interaction, instructing Router B to delay, pause, or suppress the migration of neighbor states. Upon receiving this DD message, Router B delays, pauses, or suppresses the migration of neighbor states. When Router A receives an updated LSA from Router B, it finds that it is a self-generated LSA, and that the sequence number (N) of this LSA is larger than the sequence number of the LSA actually generated after its restart. Therefore, it regenerates and sends a new LSA with a sequence number of N+1. After the LSA update is complete, Router A sends a new DD message (a DD message with the M-bit cleared), which can also be understood as the DD message not having the M-bit set, indicating that Router B can migrate neighbor states. Upon receiving this DD message, Router B resumes the migration of neighbor states.
[0105] It should also be noted that in this embodiment, the determination of the first link status announcement can be achieved by comparing the sequence number with the link status announcements existing in the local database, or by comparing the timestamp with the link status announcements existing in the local database. These methods will not be listed here.
[0106] Furthermore, in this embodiment, when the second device updates its local LSA based on the received and regenerated second link state announcement, it can determine whether to accept the second link state announcement according to the LSA correctness and timeliness verification process to ensure the accuracy of the network topology information.
[0107] Generally, in this embodiment, method 1 and method 2 can also be used in combination. For example, when detecting a DD message sent by the second device, and the DD message contains the first link state announcement of the first device, a first target message is sent, and a second link state announcement is regenerated and sent.
[0108] In summary, the method of this application embodiment solves the problem of incorrect routing calculation results caused by the residual LSA of the first device on the second device, either by refreshing the LSA generated by the first device in advance or by delaying the neighbor state migration of the second device.
[0109] like Figure 7 As shown, a routing error handling method according to an embodiment of this application is executed by a second device, including:
[0110] Step 701, in the event of an abnormal restart of the first device,
[0111] The system receives a second link-state advertisement generated and sent by the first device when it detects that a DD packet contains a first link-state advertisement from the first device; wherein the sequence number of the first link-state advertisement is greater than the sequence number of a link-state advertisement existing in the local database; or,
[0112] Receive a first target message sent by a first device; wherein the first target message includes a first identifier, the first identifier being used to indicate the delayed migration neighbor status.
[0113] The second device executes the routing error handling method of this application embodiment. For scenarios where the first device experiences an abnormal restart, the method includes: receiving a second link-state advertisement generated and sent by the first device when it detects that a DD packet contains the first link-state advertisement of the first device; and being able to know the regenerated second LSA when the sequence number of the first LSA contained in the DD packet is greater than the sequence number of an LSA existing in the local database; receiving a first destination packet sent by the first device, wherein a first identifier included in the first destination packet indicates a delay in neighbor state migration. This delays the neighbor state migration by either refreshing its own generated LSAs in advance or by delaying the neighbor state migration of the second device. In this way, the problem of incorrect routing calculation results caused by the first device's LSAs remaining on the second device is solved.
[0114] Optionally, the sequence number of the second link state announcement is equal to the sequence number of the first link state announcement plus 1.
[0115] Optionally, the first identifier is a flag bit added to the first target message, and the flag bit indicates the delayed migration neighbor status when it takes a first value.
[0116] Optionally, the first identifier is a specific flag bit set in the first target message to identify the completion of database description message interaction.
[0117] Optionally, after receiving the first target message sent by the first device, the method further includes:
[0118] Receive the second target message sent by the first device;
[0119] The second target message includes a second identifier, which is a flag bit added to the second target message. When the flag bit takes a second value, it indicates restoration of the neighbor migration state; or...
[0120] The second target message does not have a specific flag bit set to identify the completion of the database description message interaction.
[0121] Optionally, the first target message is a DD message.
[0122] Optionally, the second target message is a DD message.
[0123] It should be noted that this method is implemented in conjunction with the method executed by the first device described above. The implementation of the above method embodiments is applicable to this method and can achieve the same technical effect.
[0124] like Figure 8 As shown, an embodiment of this application provides a routing error processing apparatus, applied to a first device, comprising:
[0125] The first processing module 810 is configured to handle situations where the first device experiences an abnormal restart.
[0126] The database description (DD) message sent by the second device is detected, and if the DD message contains the first link-state advertisement (LSI) of the first device, a second LSI is regenerated and sent; wherein the sequence number of the first LSI is greater than the sequence number of the LSI existing in the local database; or,
[0127] Send a first target message to a second device; wherein the first target message includes a first identifier, the first identifier being used to indicate the delayed migration neighbor status.
[0128] Optionally, the sequence number of the second link state announcement is equal to the sequence number of the first link state announcement plus 1.
[0129] Optionally, the first identifier is a flag bit added to the first target message, and the flag bit indicates the delayed migration neighbor status when it takes a first value.
[0130] Optionally, the first identifier is a specific flag bit set in the first target message to identify the completion of database description message interaction.
[0131] Optionally, the device further includes:
[0132] The first sending module is used to send the second target message to the second device;
[0133] The second target message includes a second identifier, which is a flag bit added to the second target message. When the flag bit takes a second value, it indicates restoration of the neighbor migration state; or...
[0134] The second target message does not have a specific flag bit set to identify the completion of the database description message interaction.
[0135] Optionally, the first sending module is further configured to:
[0136] The second target message is sent when the timer expires, the timer being started when the first device restarts or when the first target message is sent; or...
[0137] The second target message is sent after the second link state advertisement is regenerated.
[0138] Optionally, the first target message is a DD message.
[0139] This device addresses the scenario of an abnormal restart of the first device with two methods: Method 1 and Method 2. Method 1 detects DD messages sent by the second device and, if the sequence number of the first LSA in the DD message is greater than the sequence number of an LSA existing in the local database, regenerates and sends a second LSA. Method 2 sends a first target message to the second device, where a first identifier indicates a delayed neighbor state migration. Thus, Method 1, by proactively refreshing its own generated LSAs, and Method 2, by delaying the neighbor state migration of the second device, solves the problem of incorrect routing calculations caused by residual LSAs on the second device.
[0140] It should be noted that this device is an apparatus that performs the method described above by the first device. The implementation of the above method embodiment is applicable to this device and can achieve the same technical effect.
[0141] like Figure 9 As shown, an embodiment of this application provides a routing error processing apparatus, applied to a second device, comprising:
[0142] The second processing module 910 is used to handle situations where the first device experiences an abnormal restart.
[0143] The system receives a second link-state advertisement generated and sent by the first device when it detects that a DD packet contains a first link-state advertisement from the first device; wherein the sequence number of the first link-state advertisement is greater than the sequence number of a link-state advertisement existing in the local database; or,
[0144] Receive a first target message sent by a first device; wherein the first target message includes a first identifier, the first identifier being used to indicate the delayed migration neighbor status.
[0145] Optionally, the sequence number of the second link state announcement is equal to the sequence number of the first link state announcement plus 1.
[0146] Optionally, the first identifier is a flag bit added to the first target message, and the flag bit indicates the delayed migration neighbor status when it takes a first value.
[0147] Optionally, the first identifier is a specific flag bit set in the first target message to identify the completion of database description message interaction.
[0148] Optionally, the device further includes:
[0149] The first receiving module is used to receive the second target message sent by the first device;
[0150] The second target message includes a second identifier, which is a flag bit added to the second target message. When the flag bit takes a second value, it indicates restoration of the neighbor migration state; or...
[0151] The second target message does not have a specific flag bit set to identify the completion of the database description message interaction.
[0152] Optionally, the first target message is a DD message.
[0153] This device addresses scenarios where the first device experiences an abnormal restart by: receiving a second Link State Advertisement (LSA) generated and sent by the first device when it detects a DD packet containing the first device's first Link State Advertisement; and being able to determine the regenerated second LSA when the sequence number of the first LSA contained in the DD packet is greater than the sequence number of an LSA existing in the local database; and receiving a first destination packet sent by the first device, wherein a first identifier included in the first destination packet indicates a delayed neighbor state migration. This delays the neighbor state migration by either refreshing its own generated LSAs in advance or by delaying the neighbor state migration of the second device. In this way, the problem of incorrect routing calculations caused by the first device's LSAs remaining on the second device is solved.
[0154] It should be noted that this device is an apparatus that performs the method described above by the second device. The implementation of the above method embodiments is applicable to this device and can achieve the same technical effect.
[0155] like Figure 10 As shown, the network device in this application embodiment, such as Figure 10 As shown, it includes a transceiver 1010, a processor 1000, a memory 1020, and a program or instructions stored in the memory 1020 and executable on the processor 1000; when the processor 1000 executes the program or instructions, it implements the routing error handling method executed by the first device, or the routing error handling method executed by the second device.
[0156] The transceiver 1010 is used to receive and send data under the control of the processor 1000.
[0157] Among them, Figure 10In this context, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 1000) and memory (memory 1020). The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 1010 may be multiple elements, including transmitters and receivers, providing a unit for communicating with various other devices over a transmission medium. The processor 1000 is responsible for managing the bus architecture and general processing, and the memory 1020 may store data used by the processor 1000 during operation.
[0158] An embodiment of this application provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the routing error handling method executed by the first device as described above, or the steps in the routing error handling method executed by the second device, and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0159] The processor mentioned above is the processor in the network device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0160] This application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the routing error handling method executed by the first device, or the various processes of the routing error handling method embodiment executed by the second device, and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0161] It should be further noted that many of the functional components described in this specification are referred to as modules in order to emphasize the independence of their implementation.
[0162] In this embodiment, the module can be implemented in software so that it can be executed by various types of processors. For example, an identified executable code module may include one or more physical or logical blocks of computer instructions, which may be constructed as objects, procedures, or functions. Nevertheless, the executable code of the identified module does not need to be physically located together, but may include different instructions stored in different bits, which, when logically combined, constitute the module and achieve the module's intended purpose.
[0163] In practice, an executable code module can be a single instruction or many instructions, and can even be distributed across multiple different code segments, different programs, and across multiple memory devices. Similarly, operational data can be identified within the module and can be implemented in any suitable form and organized within any suitable type of data structure. This operational data can be collected as a single dataset or distributed across different locations (including different storage devices), and can exist, at least in part, solely as electronic signals within the system or network.
[0164] When a module can be implemented using software, considering the current level of hardware technology, modules that can be implemented in software can be implemented using hardware circuits by those skilled in the art to achieve the corresponding functions, without considering cost. These hardware circuits include conventional very-large-scale integrated circuits (VLSI) or gate arrays, as well as existing semiconductors such as logic chips and transistors, or other discrete components. Modules can also be implemented using programmable hardware devices, such as field-programmable gate arrays, programmable array logic, and programmable logic devices.
[0165] The exemplary embodiments described above are with reference to the accompanying drawings. Many different forms and embodiments are feasible without departing from the spirit and teachings of this application. Therefore, this application should not be construed as limiting the exemplary embodiments set forth herein. Rather, these exemplary embodiments are provided to make this application complete and convey the scope of this application to those skilled in the art. In these drawings, component dimensions and relative dimensions may be exaggerated for clarity. The terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. As used herein, unless clearly indicated otherwise, the singular forms “a,” “an,” and “the” are intended to include all such forms. It will be further understood that the terms “comprising” and / or “including”, when used in this specification, indicate the presence of the stated features, integers, steps, operations, components, and / or elements, but do not exclude the presence or addition of one or more other features, integers, steps, operations, components, and / or groups thereof. Unless otherwise indicated, when stated, a range of values includes the upper and lower limits of the range and any subranges in between.
[0166] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principles described in this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for handling routing errors, characterized in that, Performed by the first device, including: In the event of an abnormal restart of the first device The database description (DD) message sent by the second device is detected, and if the DD message contains the first link-state advertisement (LSI) of the first device, a second LSI is regenerated and sent; wherein the sequence number of the first LSI is greater than the sequence number of the LSI existing in the local database; or, Send a first target message to a second device; wherein the first target message includes a first identifier, the first identifier being used to indicate the delayed migration neighbor status.
2. The method according to claim 1, characterized in that, The sequence number of the second link state announcement is equal to the sequence number of the first link state announcement plus 1.
3. The method according to claim 1, characterized in that, The first identifier is a flag bit added to the first target message, and when the flag bit is set to a first value, it indicates the delayed migration neighbor status.
4. The method according to claim 1, characterized in that, The first identifier is a specific flag bit set in the first target message to indicate that the database description message interaction is complete.
5. The method according to claim 1, characterized in that, After sending the first target message to the second device, the method further includes: Send the second target message to the second device; The second target message includes a second identifier, which is a flag bit added to the second target message. When the flag bit takes a second value, it indicates restoration of the neighbor migration state; or... The second target message does not have a specific flag bit set to identify the completion of the database description message interaction.
6. The method according to claim 5, characterized in that, Sending the second target message to the second device includes: The second target message is sent when the timer expires, the timer being started when the first device restarts or when the first target message is sent; or... The second target message is sent after the second link state advertisement is regenerated.
7. The method according to claim 1, characterized in that, The first target message is a DD message.
8. A method for handling routing errors, characterized in that, Performed by a second device, including: In the event of an abnormal restart of the first device The system receives a second link-state advertisement generated and sent by the first device when it detects that a DD packet contains a first link-state advertisement from the first device; wherein the sequence number of the first link-state advertisement is greater than the sequence number of a link-state advertisement existing in the local database; or, Receive a first target message sent by a first device; wherein the first target message includes a first identifier, the first identifier being used to indicate the delayed migration neighbor status.
9. The method according to claim 8, characterized in that, The sequence number of the second link state announcement is equal to the sequence number of the first link state announcement plus 1.
10. The method according to claim 8, characterized in that, The first identifier is a flag bit added to the first target message, and when the flag bit is set to a first value, it indicates the delayed migration neighbor status.
11. The method according to claim 8, characterized in that, The first identifier is a specific flag bit set in the first target message to indicate that the database description message interaction is complete.
12. The method according to claim 8, characterized in that, After receiving the first target message sent by the first device, it also includes: Receive the second target message sent by the first device; The second target message includes a second identifier, which is a flag bit added to the second target message. When the flag bit takes a second value, it indicates restoration of the neighbor migration state; or... The second target message does not have a specific flag bit set to identify the completion of the database description message interaction.
13. The method according to claim 8, characterized in that, The first target message is a DD message.
14. A routing error processing apparatus, characterized in that, Applied to the first device, including: The first processing module is configured to respond to an abnormal restart of the first device. The database description (DD) message sent by the second device is detected, and if the DD message contains the first link-state advertisement (LSI) of the first device, a second LSI is regenerated and sent; wherein the sequence number of the first LSI is greater than the sequence number of the LSI existing in the local database; or, Send a first target message to a second device; wherein the first target message includes a first identifier, the first identifier being used to indicate the delayed migration neighbor status.
15. A routing error processing apparatus, characterized in that, Applied to a second device, including: The second processing module is used in the event of an abnormal restart of the first device. The system receives a second link-state advertisement generated and sent by the first device when it detects that a DD packet contains a first link-state advertisement from the first device; wherein the sequence number of the first link-state advertisement is greater than the sequence number of a link-state advertisement existing in the local database; or, Receive a first target message sent by a first device; wherein the first target message includes a first identifier, the first identifier being used to indicate the delayed migration neighbor status.
16. A network device, comprising: A transceiver, a processor, a memory, and a program or instructions stored in the memory and executable on the processor; characterized in that, when the processor executes the program or instructions, it implements the routing error handling method as described in any one of claims 1-7, or the routing error handling method as described in any one of claims 8-13.
17. A readable storage medium having a program or instructions stored thereon, characterized in that, When the program or instructions are executed by the processor, they implement the routing error handling method as described in any one of claims 1-7, or the steps in the routing error handling method as described in any one of claims 8-13.
18. A computer program product, characterized in that, Includes computer instructions, which, when executed by a processor, implement the routing error handling method as described in any one of claims 1-7, or the steps of the routing error handling method as described in any one of claims 8-13.