A routing processing method and related devices

By introducing a network-wide diffusion mechanism and independent routing computer system for link failure information into network equipment in large data centers, the problem of long routing convergence time for network equipment during link failure is solved, and faster routing convergence and network recovery are achieved.

CN113810274BActive Publication Date: 2025-05-30HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010549885.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-16
Publication Date
2025-05-30
Estimated Expiration
2040-06-16

AI Technical Summary

Technical Problem

In large data centers, network equipment needs to hop-by-hop routing convergence in the event of link failure, resulting in a long routing convergence time.

Method used

After the network device obtains the link failure information, it sends information indicating the link failure to the neighbor device, so that it spreads across the entire network, and each network device receiving the information independently calculates the unreachable route, thereby achieving parallel routing convergence.

Benefits of technology

This method significantly reduces the time for routing convergence and improves the response speed and efficiency of network devices in the face of link failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113810274B_ABST
    Figure CN113810274B_ABST
Patent Text Reader

Abstract

The present application discloses a routing processing method for enabling network devices in a network system to perform routing convergence in parallel and reducing the time for routing convergence. A first network device obtains first information, where the first information indicates a first link failure, and the first link is a link between any two network devices in the network system to which the first network device belongs; the first network device sends the first information to a second network device through BGP, for example, sends a link failure message to the second network device through BGP, and the first information is carried in the link failure message, and the second network device is a neighbor device of the first network device; the first network device determines the unreachable routes in the routing table of the first network device according to the first information and the topology of the network system, and the paths corresponding to the unreachable routes include the first link; the first network device marks the unreachable routes as invalid.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a routing processing method and related devices. Background Art

[0002] Currently, in some large data centers, the routing protocol adopted is usually the Border Gateway Protocol (BGP) with hop-by-hop direct connection, that is, the network devices in the data center run BGP with hop-by-hop direct connection. When BGP routes are propagated between network devices, the next hop of the BGP route is changed hop by hop by the network devices.

[0003] In a data center running BGP, each network device only advertises the locally optimal route to its neighbor devices. When a link failure occurs in the network, the affected network device first performs local optimal route calculation. If it is determined that there is no backup path to the destination route prefix locally after the local optimal route calculation, the network device sends a route withdrawal message to its neighbor devices. The neighbor devices that receive the route withdrawal message also perform local optimal route calculation, and when it is determined that there is no backup path to the destination route prefix locally, they send route withdrawal messages to other neighbor devices.

[0004] That is to say, when a link failure occurs in the network, the network devices on the fault propagation path perform routing convergence serially, and the routing convergence time of the entire network is relatively long. Summary of the Invention

[0005] This application provides a routing processing method and a network device. After the network device obtains information about a link failure, it sends information indicating the link failure to its neighbor devices to spread the message of the link failure across the entire network; and each network device that receives the information about the link failure independently calculates the unreachable routes and processes the unreachable routes, that is, the network devices in the entire network can perform routing convergence in parallel, reducing the routing convergence time.

[0006] The first aspect of the present application provides a routing processing method. A first network device obtains first information, where the first information indicates a first link failure, and the first link is a link between any two network devices in the network system to which the first network device belongs; the first network device sends the first information to a second network device, for example, sends a link failure message to the second network device, and the first information is carried in the link failure message, and the second network device is a neighbor device of the first network device; the first network device determines, according to the first information and the topology of the network system, the unreachable routes in the routing table of the first network device, and the path corresponding to the unreachable route includes the first link, and the topology of the network system may be obtained by the first network device in advance.

[0007] Among them, the first link failure indicated by the first information may refer to a link failure between any two network devices in the network system, for example, the physical line connected between two network devices is disconnected; the first link failure may also refer to a failure of any one network device in the network system, resulting in a link interruption between the network device and another network device.

[0008] In the present application, after a network device obtains the information of the link failure, the network device sends the information indicating the link failure to a neighbor device to spread the message of the link failure throughout the network; each network device that receives the information of the link failure can independently calculate the unreachable routes and can further process the unreachable routes, that is, the network devices in the entire network can perform routing convergence in parallel, reducing the routing convergence time.

[0009] Optionally, the method further includes: the first network device receives second information from a neighbor device, where the second information includes an identifier of a third network device and link information between the third network device and a neighbor device of the third network device, and the third network device is any network device in the network system other than the first network device; the first network device forwards the second information to the remaining neighbor devices of the first network device; the first network device generates the topology of the network system according to the second information.

[0010] Among them, the network system to which the first network device belongs is composed of each network device and the links between the network devices. BGP can be run on each link between two network devices in the network system. Each network device in the network system can announce its own node information and link information with other network devices in the network, so that the network devices in the network system can form an entire network topology based on the node information and the link information.

[0011] In this application, the network device obtains the node information and link information corresponding to each network device by receiving the information published by other network devices in the network system, thereby ensuring that the network devices in the network system can all generate the topology of the network system based on the received node information and link information, ensuring that each network device can independently calculate the unreachable routes based on the link failure information, and improving the flexibility of the solution implementation.

[0012] Optionally, the identifier of the third network device includes the loopback interface address of the third network device. This loopback interface address can be an Internet Protocol version 4 (IPv4) address or an IPv6 address. The link information includes the interface address of the third network device and the interface address of the neighbor device of the third network device.

[0013] In this application, the loopback interface address of the network device is used as the identification information of the network device, and the interface addresses of two connected network devices are used as the link information, ensuring that the network device can generate the correct network topology based on the received identification information and link information, and improving the feasibility of the solution.

[0014] Optionally, the first network device determines the unreachable routes in the routing table of the first network device according to the first information and the topology of the network system, including: when the first network device is the first-end device of the first link, the first network device determines that the route including the first link published by the second-end device of the first link is an unreachable route; or, when the first network device is not the end device of the first link, the first network device determines the network device that is unreachable through the neighbor device according to the first information, the information of the neighbor device that sends the first information, and the topology of the network system, and determines that the route received through the neighbor device generated by the unreachable network device is an unreachable route. Here, the route generated by the unreachable network device refers to the route published when the unreachable network device is the routing start device, that is, the source of the route is the unreachable network device.

[0015] It can be understood that when the first network device is the first - end device of the first link, after the first network device senses a failure of the first link, the first network device can determine that the route advertised by the peer device of the first link is an unreachable route. When the first network device is not the end device of the first link, the first network device receives the first information indicating the failure of the first link from its neighbor device. Therefore, the first network device can determine, based on the topology of the network system, the network devices that are unreachable through this neighbor device, that is, determine which network device reached through this neighbor device has a path including the first link on it, and then determine that the route generated by this unreachable network device and received through the neighbor device is an unreachable route.

[0016] In this application, the network device determines unreachable routes through two different methods based on whether it is the end device of the faulty link or not, ensuring that network devices in different scenarios can correctly determine unreachable routes and improving the feasibility of the solution.

[0017] Optionally, after the first network device determines that the route including the first link advertised by the second - end device of the first link is an unreachable route, the method further includes: the first network device sends third information to the neighbor device of the first network device, and the third information is used to instruct the neighbor device of the first network device to revoke the route including the first link advertised by the second - end device of the first link. Specifically, when the first network device is the first - end device of the first link and there is no backup path between the first network device and the second - end device of the first link, the link between the first network device and the second - end device of the first link is interrupted. After the first network device performs optimal route calculation, it can be found that there is no backup path to the second - end device of the first link. Therefore, the first network device can send a route revocation message to its neighbor device, and this route revocation message includes the above - mentioned third information to instruct its neighbor device to revoke the route including the first link advertised by the second - end device of the first link.

[0018] In this application, after the network device performs optimal route calculation based on the faulty link information, it can send a message to revoke the route to the neighbor device, enabling the neighbor device to perform route convergence again based on the route revocation message, improving the reliability of the solution.

[0019] Optionally, the first network device obtains the first information in the following ways: the first network device obtains the first information by detecting the state of the first link or the state of the interface corresponding to the first link; or, the first network device receives the first information from a fourth network device, and the fourth network device is a neighbor device of the first network device.

[0020] In this application, the network device can obtain link fault information by autonomously detecting the status of the link or the status of the interface corresponding to the link, or receiving link fault information diffused by a neighbor device, thereby ensuring that the network devices in the network system can smoothly obtain link fault information and improving the reliability of the solution.

[0021] Optionally, the method further includes: the first network device receives fourth information from the fourth network device; the first network device deletes the unreachable route in the routing table according to the fourth information. Wherein, the fourth network device is a neighbor device of the first network device. Optionally, the fourth information is carried in a route withdrawal message, and the fourth information is used to instruct the first network device to withdraw the route published by the end device of the first link. That is, when the first network device is not the end device of the first link, the first network device can receive a route withdrawal message from a neighbor device. When the first network device performs optimal route calculation according to the route withdrawal message and determines that there is no backup path corresponding to the unreachable route locally, the first network device deletes the unreachable route in the routing table.

[0022] In this application, the network device can perform optimal route calculation based on the route withdrawal message sent by a neighbor device, and delete the unreachable route in the routing table based on the optimal route calculation result, effectively realizing route convergence and improving the reliability of the network device for forwarding routes.

[0023] Optionally, the first network device sends the first information to the second network device through an extended Border Gateway Protocol (BGP).

[0024] In this application, the network device realizes the diffusion of link fault information through BGP, ensuring that the link fault information can be effectively and quickly diffused in the network system and improving the reliability of the solution.

[0025] Optionally, after the first network device determines an unreachable route in the routing table, it further processes the unreachable route. For example, it deletes the unreachable route or marks the unreachable route as invalid.

[0026] A second aspect of this application provides a network device. The network device is a first network device and includes a functional module that executes the routing processing method provided in the first aspect or any possible design of the first aspect. This application does not limit the division of functional modules. The functional modules can be divided corresponding to the process steps of the routing processing method in the first aspect, or can be divided according to specific implementation requirements.

[0027] In a third aspect of the present application, a network device is provided. The network device includes: a processor and a memory; the memory is used to store instructions; the processor is used to execute the instructions in the memory, so that the network device executes the routing processing method provided in the foregoing first aspect or any possible design of the first aspect.

[0028] In a fourth aspect of the present application, a computer storage medium is provided. The computer storage medium can be non-volatile; computer-readable instructions are stored in the computer storage medium, and when the computer-readable instructions are executed by a processor, the routing processing method provided in the foregoing first aspect or any possible design of the first aspect can be implemented.

[0029] In a fifth aspect of the present application, a computer program product containing instructions is provided. When it runs on a computer, it causes the computer to execute the routing processing method provided in the foregoing first aspect or any possible design of the first aspect.

[0030] The embodiments of the present application can be combined with each other without conflict.

[0031] As can be seen from the above technical solutions, the embodiments of the present application have the following advantages:

[0032] The present application provides a routing processing method. After the network device obtains information about a link failure, it sends information indicating the link failure to neighboring devices to spread the message of the link failure throughout the network; each network device that receives the information about the link failure can independently calculate the unreachable route and delete the unreachable route or set the unreachable route to invalid. That is, the network devices in the entire network can perform route convergence in parallel, reducing the time for route convergence. Description of the Drawings

[0033] Figure 1 It is a schematic diagram of a network architecture provided by an embodiment of the present application;

[0034] Figure 2 It is a schematic flowchart of a routing processing method 200 provided by an embodiment of the present application;

[0035] Figure 3 It is a schematic diagram of a network topology provided by an embodiment of the present application;

[0036] Figure 4 It is a schematic diagram of a link failure occurring in a network topology provided by an embodiment of the present application;

[0037] Figure 5 It is a schematic diagram of another link failure occurring in a network topology provided by an embodiment of the present application;

[0038] Figure 6Schematic flowchart of a method 600 for generating a network topology provided by an embodiment of the present application;

[0039] Figure 7 Schematic diagram of the format of a link information provided by an embodiment of the present application;

[0040] Figure 8 Schematic diagram of the architecture of a network system provided by an embodiment of the present application;

[0041] Figure 9 Schematic diagram of a network topology generated by a network device provided by an embodiment of the present application;

[0042] Figure 10 Schematic diagram of the network topology of a data center provided by an embodiment of the present application;

[0043] Figure 11 Schematic diagram of the structure of a network device 1100 provided by an embodiment of the present application. Detailed implementation manners

[0044] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the embodiments of the present application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Those of ordinary skill in the art will understand that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.

[0045] The terms "first", "second", etc. in the description, claims and the above-mentioned drawings of this application are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that such descriptions can be interchanged under appropriate circumstances so that the embodiments can be implemented in an order other than that shown or described in this application. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or modules does not have to be limited to those steps or modules clearly listed, but may include other steps or modules not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of steps that appear in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The named or numbered process steps can be changed in the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved. The division of units that appears in this application is a logical division, and there may be other division methods in actual implementation. For example, multiple units can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the couplings, direct couplings or communication connections shown or discussed with each other can be through some interfaces. The indirect couplings or communication connections between units can be electrical or other similar forms, which are not limited in this application. Moreover, the units or subunits described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed to multiple circuit units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this application.

[0046] Currently, in large-scale data centers, in order to achieve non-blocking traffic forwarding, a CLOS network architecture is generally adopted for networking. The CLOS network architecture is a multi-level switching network architecture, and its topology generally does not exceed three Tiers or 5 stages because a large number of interconnection links are required between every two layers of network devices. The entire data center adopts a three-tier networking method, that is, each network device in the entire network runs a routing protocol, and the network devices form equal-cost multi-path (ECMP) links through the three-tier routing protocol. ECMP is the load balancing mechanism of the CLOS network architecture, and network devices can achieve traffic load balancing through all the network devices directly connected to it. That is to say, data packets can achieve load balancing between different ECMP links, thereby making full use of the link bandwidth under the CLOS network architecture. For large data centers, the routing protocol usually adopted is the hop-by-hop directly connected External Border Gateway Protocol (BGP), that is, the network devices in the data center run the hop-by-hop directly connected BGP. When BGP routes are propagated between network devices, the next hop of the BGP route is changed hop by hop by the network devices. Specifically, reference can be made to Figure 1 , Figure 1 which is a schematic diagram of a network architecture provided by an embodiment of the present application. As Figure 1 shown, the network architecture is divided into three layers. The bottom-of-rack (TOR) switches are connected to servers, and the TOR switches are also connected to the aggregator (AGG) switches in the middle layer, and the AGG is connected to the spine switches in the core layer. The BGP protocol can run on each interconnection link between network devices in different layers. The source Internet Protocol (IP) address of the BGP session is the link interface IP address, rather than the loopback interface address of the network device.

[0047] BGP is a distance-vector (DV) protocol. Network devices running BGP only advertise the calculated best path to neighbor devices. When a link failure occurs in the network, the affected network device will first perform the best path calculation. If it is determined that there is no backup path to the destination route prefix on the network device after the best path calculation, the network device sends a route withdrawal message to the neighbor device. The neighbor device that receives the route withdrawal message also performs the best path calculation, and when it determines that there is no backup path to the destination route prefix, it sends a route withdrawal message to other neighbor devices. In some extreme cases, the route withdrawal message may even need to be transmitted to all network devices in the entire network.

[0048] Only after the optimal route calculation is completed and the network device determines that there is no backup path to the destination route prefix on the network device, will the network device send a route withdrawal message to other neighbor devices, so that the neighbor devices continue to perform the optimal route calculation according to the route withdrawal message. In a large data center with a complex network topology, the process of the network device performing the optimal route calculation is time-consuming; in addition, since the route withdrawal message needs to be propagated hop by hop, if the number of BGP hops on the transmission path is relatively large and each hop of the BGP network device has to perform the optimal route calculation, the time taken for the entire network to complete the processing of the route withdrawal message will be relatively long, that is, the route convergence time of the entire network is relatively long.

[0049] In view of this, an embodiment of the present application provides a routing processing method. After the network device obtains the information of the link failure, it sends the information indicating the link failure to the neighbor devices to spread the message of the link failure throughout the network; each network device that receives the information of the link failure independently calculates the unreachable route and deletes the unreachable route or sets the unreachable route to invalid, that is, the network devices in the entire network can perform route convergence in parallel, reducing the route convergence time.

[0050] Reference may be made to Figure 2 , Figure 2 which is a schematic flowchart of a routing processing method 200 provided by an embodiment of the present application.

[0051] In step 201, the first network device obtains first information, and the first information indicates a first link failure, where the first link is a link between any two network devices in the network system to which the first network device belongs.

[0052] In this embodiment, the first network device may be any network device running BGP in the data center. For example, the first network device may be a spine switch, a leaf switch, an AGG, or a TOR switch in the data center. The network system to which the first network device belongs may be a network system running BGP, and this network system is composed of network devices in the data center where the first network device is located. Among them, the data center where the first network device is located may be networked using a CLOS architecture, for example, using a three-layer networking method, and each network device in the network runs BGP, thus forming the above-mentioned network system.

[0053] It should be noted that in this embodiment, the first link failure indicated by the first information may refer to a link failure between any two network devices in the network system. For example, the physical line connected between two network devices is disconnected; the first link failure may also refer to a failure of any network device in the network system, resulting in a link interruption between this network device and another network device. For example, if network device 1 fails, network device 2 connected to network device 1 cannot establish a communication connection with network device 1, that is, the link between network device 1 and network device 2 is disconnected. That is to say, due to the failure of any one of the network devices at both ends of the link or the failure of the link itself, the link interruption between two network devices can be called a link failure.

[0054] In an alternative embodiment, the first network device may obtain the first information in various ways.

[0055] Method 1:

[0056] The first network device is the end device of the first link. The first network device obtains the first information by detecting the state of the first link or the state of the interface corresponding to the first link.

[0057] In a possible implementation, the first network device obtains the first information by detecting the state of the first link. Specifically, the first network device uses the Bidirectional Forwarding Detection (BFD) technology to detect whether the first link fails. Among them, BFD specifically realizes the detection of the link state by establishing a BFD session between the two end devices of the link. After the BFD session is established, the first network device can periodically send BFD packets to the other end device of the first link. If the first network device does not receive the BFD packet replied by the other end device of the first link within the detection time, it can be considered that the first link fails, that is, the first network device obtains the first information.

[0058] In another possible implementation, the first network device obtains the first information by detecting the state of the interface corresponding to the first link. Specifically, the first network device determines whether the first link fails by sensing whether the optical fiber signal of the local interface corresponding to the first link is lost. If the first network device senses that the optical fiber signal of the local interface corresponding to the first link (that is, the interface where the first network device is connected to the other end device of the first link) is lost, it can be considered that the first link fails, that is, the first network device obtains the first information.

[0059] Method 2:

[0060] The first network device is not an end device of the first link, and the first network device receives the first information from the fourth network device, where the fourth network device is a neighbor device of the first network device.

[0061] In this embodiment, in the network system to which the first network device belongs, any end device of the first link can send a link failure message to its connected neighbor device after detecting a first link failure to indicate the first link failure; after receiving the link failure message, the neighbor device continues to forward the link failure message to other neighbor devices connected to itself to spread the link failure message in the network system. That is to say, when the first network device is not an end device of the first link, the first network device can receive a link failure message from any of its neighbor devices (i.e., the fourth network device), and the first information is carried in the link failure message. Exemplarily, network devices in the network system can publish and spread the link failure message through BGP, and the first information is carried in the load part of the link failure message, and the first information carries the identifiers of the two end devices of the first link. The first network device that receives the link failure message can determine the failed first link based on the identifiers of the end devices carried in the first information.

[0062] In step 202, the first network device sends the first information to the second network device, where the second network device is a neighbor device of the first network device.

[0063] When the first network device is an end device of the first link, after the first network device detects a first link failure, the first network device can generate a link failure message and send the link failure message to its neighbor device (i.e., the second network device). Among them, the first information is carried in the load part of the link failure message, and the first information includes the identifier of the first network device and the identifier of the other end device of the first link to indicate the failed first link. Among them, the second network device can be all neighbor devices connected to the first network device, that is, after the first network device detects a first link failure, the first network device sends a link failure message to all neighbor devices connected to it.

[0064] When the first network device is not the end device of the first link, after the first network device receives the link failure message from the fourth network device, the first network device parses the received link failure message to confirm that the link failure message is a message indicating the failure of the first link. After the first network device confirms that the received message is a link failure message, it may send the link failure message to neighbor devices other than the fourth network device. That is, the second network device may specifically be the devices other than the fourth network device among all the neighbor devices of the first network device.

[0065] The first network device may send the first information to the second network device through BGP. Optionally, the first network device may also use other routing protocols, such as the Routing Information Protocol (RIP), Intermediate System-to-Intermediate System (IS-IS), etc.

[0066] In step 203, the first network device determines the unreachable routes in the routing table of the first network device according to the first information and the topology of the network system. The paths corresponding to the unreachable routes include the first link.

[0067] In this embodiment, after the first network device obtains the first information, it may determine the path including the first link according to the topology of the network system, and further determine that the route corresponding to the path including the first link is an unreachable route in the routing table. Among them, the first network device may obtain the topology of the network system in advance. The topology of the network system includes the connection relationships between all network devices in the network system. The first network device may determine the path to any network device based on the connection relationships between the network devices in the network system.

[0068] That is to say, the first network device may calculate whether the path to any network device includes the first link based on the topology of the network system. If the first network device calculates according to the topology of the network system that one or more paths to a certain network device include the first link, the first network device may determine that the route corresponding to the one or more paths is an unreachable route. If the first network device calculates according to the topology of the network system that all paths to a certain network device include the first link, the first network device may determine that all routes to the network device are unreachable routes.

[0069] It should be noted that there is no fixed sequence between the above step 302 and step 303. The first network device can execute step 302 and step 303 in parallel after obtaining the first information. When the processing resources of the first network device are limited, the first network device can also preferentially execute step 302.

[0070] In step 204, the first network device deletes the unreachable route or marks the unreachable route as invalid.

[0071] Optionally, the routing table may be at least one of a Route Information Base (RIB) and a forwarding information base (FIB).

[0072] In this embodiment, after the first network device determines the unreachable route in the routing table, the first network device can mark the unreachable route in the routing table as invalid by setting an invalid flag for the unreachable route in the routing table.

[0073] In a possible embodiment, when the first network device is not an end device of the first link, the first network device may mark the unreachable route in the RIB as invalid, and the first network device deletes the unreachable route in the local FIB or deletes the outgoing interface of the BGP neighbor corresponding to the unreachable route. After the first network device receives a route withdrawal message indicating the revocation of the unreachable route, the first network device then deletes the unreachable route in the RIB.

[0074] When the first network device is an end device of the first link, the first network device may also mark the unreachable route in the RIB as invalid and delete the unreachable route in the FIB. Since the first network device itself is the device that senses the first link failure, the first network device can directly delete the unreachable route in the RIB after marking the unreachable route in the RIB as invalid, without the need to delete the unreachable route in the RIB based on a route withdrawal message.

[0075] In this embodiment, after the network device obtains the information of the link failure, it sends the information indicating the link failure to its neighbor devices to spread the message of the link failure across the network; each network device that receives the information of the link failure can independently calculate the unreachable route and delete the unreachable route or set the unreachable route to invalid, that is, the network devices in the entire network can perform route convergence in parallel, without the need to perform route convergence after receiving a route withdrawal message sent by the upper-level neighbor device, reducing the time for route convergence.

[0076] Optionally, in a possible embodiment, when a network device in the network system publishes a route to the network, the network device may carry its own identifier in the published route, that is, the originating device of the published route (hereinafter referred to as the route originating device) carries its own identifier in the route it publishes. Specifically, the route originating device may carry an originator attribute in the published route, and the originator attribute includes the identifier of the route originating device. The identifier of the route originating device may be a node identifier, for example, it may be the loopback interface address of the route originating device. Exemplarily, a network device in the network system may introduce routes of different protocol types into BGP, such as introducing external routes such as static routes, direct routes, or Open Shortest Path First (OSPF) routes, and then carry the originator attribute of its own loopback in the introduced route, and then publish the route to its neighbor device, so that the published route can spread in the network system. That is to say, the first network device in the network system may receive a route sent by a neighbor device and carrying the identifier of the route originating device, and the first network device can determine the originating device that publishes the route according to the identifier of the route originating device carried in the received route.

[0077] For ease of understanding, the process of a network device in the network system publishing a route will be described in detail below with specific examples.

[0078] Reference may be made to Figure 3 , Figure 3 which is a schematic diagram of a network topology provided by an embodiment of the present application. It should be noted that for ease of description, hereinafter, TOR switch 1 and TOR switch 2 are simply referred to as TOR1 and TOR2, and spine1 switch and spine2 switch are simply referred to as spine1 and spine2.

[0079] As Figure 3 shown, both TOR1 and TOR2 are connected to AGG1 and AGG2. AGG1 is connected to AGG3 through spine1, and AGG3 is also connected to TOR3 and TOR4; AGG2 is connected to AGG4 through spine2, and AGG4 is also connected to TOR3 and TOR4.

[0080] Assume that the loopback interface address of TOR1 is 1.1.1.1 / 32, and the loopback interface address 1.1.1.1 / 32 is also the node identifier of TOR1. TOR1 has two directly connected routes of 100.1.1.1 / 24 and 101.1.1.1 / 24 locally, where 100.1.1.1 / 24 and 101.1.1.1 / 24 are the IP address prefixes of these two directly connected routes respectively. TOR1 introduces the aforementioned two directly connected routes into BGP and advertises them to AGG1 and AGG2 through BGP. The next hop of the route advertised to AGG1 is 10.1.1.1 (10.1.1.1 is the interface address of TOR1 connecting to AGG1), and the next hop of the route advertised to AGG2 is 11.1.1.1 (11.1.1.1 is the interface address of TOR1 connecting to AGG2). Moreover, the routes advertised to AGG1 and AGG2 carry the originator attribute, and this originator attribute includes 1.1.1.1 (i.e., the loopback address of TOR1). After receiving the routes advertised by TOR1, AGG1 and AGG2 generate two BGP routes to 100.1.1.1 / 24 and 101.1.1.1 / 24 in the routing table. In the routing table of AGG1, the outgoing interface of these two routes is AGG1-TOR1, and the next hop is 10.1.1.1; in the routing table of AGG2, the outgoing interface of the route is AGG2-TOR1, and the next hop is 11.1.1.1. In addition, AGG1 and AGG2 can also generate the association relationships between the routes and the neighbor devices as well as the route originator devices, that is, record which route originator devices' routes are learned from each neighbor device.

[0081] After receiving the routes advertised by TOR1, AGG1 and AGG2 perform optimal route calculation and then send them to other BGP neighbor devices, namely spine1 and spine2. Moreover, the next hop of the route sent by AGG1 to spine1 is changed to 30.1.1.1 (i.e., the interface address of AGG1 connecting to spine1), and the next hop of the route sent by AGG2 to spine2 is changed to 31.1.1.1 (i.e., the interface address of AGG2 connecting to spine2). The originator attribute carried in the route remains unchanged, i.e., it is still 1.1.1.1. Similarly, after receiving the routes, spine1 and spine2 perform optimal route calculation and then send the routes to neighbor devices AGG3 and AGG4 respectively. After receiving the routes, AGG3 and AGG4 send the routes to TOR3 and TOR4 via BGP. TOR3 can receive the routes 100.1.1.1 / 24 and 101.1.1.1 / 24 on both AGG3 and AGG4, thus enabling load sharing locally. The load sharing links are TOR3-AGG3 and TOR3-AGG4. Similarly, TOR4 can also form load sharing links of TOR4-AGG3 and TOR4-AGG4. Specifically, TOR3 and TOR4 can generate the association relationships between the routes, neighbor devices, and the route originator devices. Exemplarily, after learning the routes advertised by TOR1, the association relationships between the routes, neighbor devices, and the route originator devices generated by TOR3 are shown in the following table:

[0082] Table 1

[0083] BGP Neighbor IP Address Prefix / Mask originator Attribute AGG3 100.1.1.1 / 24 1.1.1.1 (TOR1) AGG3 101.1.1.1 / 24 1.1.1.1 (TOR1) AGG4 100.1.1.1 / 24 1.1.1.1 (TOR1) AGG4 101.1.1.1 / 24 1.1.1.1 (TOR1)

[0084] Optionally, in a possible embodiment, in step 303 above, there are various ways for the first network device to determine the unreachable routes in the routing table of the first network device according to the first information and the topology of the network system. Specifically, the ways for the first network device to determine the unreachable routes in the routing table of the first network device are as follows:

[0085] Method 1:

[0086] When the first network device is the first-end device of the first link, the first network device determines that the route including the first link published by the second-end device of the first link is an unreachable route. That is to say, after the first network device senses a failure of the first link, the first network device can determine that the route published by the peer device of the first link is an unreachable route. Therefore, the first network device can look up in the routing table for a route whose originator attribute is the identifier of the peer device of the first link, and delete the found route or set the found route to invalid.

[0087] Exemplarily, reference can be made to Figure 4 , Figure 4 which is a schematic diagram of a link failure occurring in a network topology provided by an embodiment of this application. As Figure 4 shown, on the basis of the Figure 3 embodiment described above, a link between TOR1 and AGG1 fails. After AGG1 senses a failure of the interface locally connected to TOR1 or detects a failure of the AGG1-TOR1 link through BFD, AGG1 sends a link failure message to its neighbor device (i.e., spine1). The link failure message carries the identifiers of AGG1 and TOR1 to indicate the failure of the AGG1-TOR1 link. In addition, AGG1 can determine that the route published by TOR1 is an unreachable route. Therefore, AGG1 can look up in the routing table for a route whose originator attribute is 1.1.1.1, that is, look up in the routing table for a route whose originator attribute is the identifier of TOR1, and delete the found route or set the found route to invalid.

[0088] Method 2:

[0089] When the first network device is not an end device of the first link, the first network device determines, according to the first information, the information of the neighbor device that sends the first information, and the topology of the network system, the network devices that are unreachable through the neighbor device, and determines that the routes received through the neighbor device generated by the unreachable network devices are unreachable routes. Among them, the routes generated by the unreachable network devices refer to the routes published when the unreachable network devices are the route originator devices, that is, the source of route publication is the unreachable network devices.

[0090] It can be understood that when the first network device is not an end device of the first link, the first network device receives the first information indicating the failure of the first link from its neighbor device. Therefore, the first network device can determine, based on the topology of the network system, the network devices that are unreachable through this neighbor device, that is, determine which network device reached through this neighbor device has a path including the first link, and then determine that the route generated by this unreachable network device and received through the neighbor device is an unreachable route.

[0091] Exemplarily, taking Figure 4 the network topology shown as an example, assume that the link between TOR1 and AGG1 fails. After AGG1 senses the link failure, it sends a link failure message to spine1. After spine1 receives this link failure message, it sends this link failure message to other neighbor devices (i.e., AGG3). After AGG3 receives the link failure message, it also sends this link failure message to other neighbor devices (i.e., TOR3). After TOR3 receives this link failure message, TOR3 traverses the network devices that are unreachable through AGG3 according to the network topology. TOR3 can find that it cannot reach TOR1 through AGG3. Therefore, TOR3 can determine that the route learned from this BGP neighbor (AGG3) and generated by TOR1 is an unreachable route.

[0092] Specifically, after TOR3 determines that the route learned from AGG3 and generated by TOR1 is an unreachable route, TOR3 can find the unreachable route in the routing table according to the neighbor device being AGG3, the route originator device being TOR1, and the above-mentioned association relationship (i.e., the association relationship between the route, the neighbor device, and the route originator device). Taking Table 1 above as an example, TOR1 can determine in the RIB that the route with the BGP neighbor being AGG3 and the originator attribute being 1.1.1.1 is an unreachable route, and delete the unreachable route or set the unreachable route to invalid. Subsequently, after TOR3 receives the route withdrawal message sent by AGG3, the TOR switch then deletes the unreachable route in the RIB.

[0093] In another possible example, reference can be made to Figure 5 , Figure 5 a schematic diagram of a link failure occurring in a network topology provided by an embodiment of the present application. As Figure 5 shown, in Figure 3Based on the above-described embodiments, assuming that TOR1 fails, after AGG1 senses the link failure, it sends a link failure message to spine1; after AGG2 senses the link failure, it sends a link failure message to spine2. Finally, the TOR switch can receive link failure messages from AGG3 and AGG4. Then, TOR3 traverses the network devices that are unreachable through AGG3 and AGG4 according to the network topology. TOR3 can find that it cannot reach TOR1 through both AGG3 and AGG4. Therefore, TOR3 can determine that the routes learned from AGG3 and AGG4 and generated by TOR1 are unreachable routes.

[0094] Optionally, in a possible embodiment, the above method 200 may further include: the first network device sends third information to a neighbor device of the first network device through BGP, where the third information is used to instruct the neighbor device of the first network device to revoke a route including the first link published by a second-end device of the first link.

[0095] It can be understood that when the first network device is the first-end device of the first link and there is no backup path between the first network device and the second-end device of the first link, if the link between the first network device and the second-end device of the first link is interrupted, after the first network device performs optimal route calculation, it can find that there is no backup path to the second-end device of the first link. Therefore, the first network device can send a route revocation message to its neighbor device through BGP, and the route revocation message includes the above third information to instruct its neighbor device to revoke the route including the first link published by the second-end device of the first link.

[0096] Taking the above Figure 4 as an example, after AGG1 senses the link failure with TOR1 and performs optimal route calculation, it finds that there is no backup path to TOR1 locally. Therefore, AGG1 can send a route revocation message to spine1 through BGP. After receiving the route revocation message sent by AGG1, spine1 performs optimal route calculation. After spine1 performs optimal route calculation, it finds that there is no backup path to TOR1. Therefore, spine1 deletes the route including the AGG1-TOR1 link published by TOR1 in the RIB.

[0097] In addition, when the first network device is not the first-end device of the first link, when the first network device receives a route revocation message sent by a neighbor device and finds that there is no backup path to a certain route starting device after performing optimal route calculation according to the route revocation message, the first network device can also send a route revocation message to the remaining neighbor devices.

[0098] Similarly, using the above Figure 4 as an example, after spine1 receives the route withdrawal message sent by AGG1 and performs optimal route calculation, it is found that there is no backup path to TOR1. Therefore, spine1 can send a route withdrawal message to AGG3 to instruct AGG3 to withdraw the route published by TOR1. Similarly, after AGG3 receives the route withdrawal message sent by spine1 and performs optimal route calculation, it is found that there is no backup path to TOR1. Therefore, AGG3 can send a route withdrawal message to TOR3 to instruct TOR3 to withdraw the route published by TOR1.

[0099] Optionally, in a possible embodiment, the above method 200 may further include: the first network device receives fourth information from the third network device; the first network device deletes the unreachable route in the routing table according to the fourth information.

[0100] Wherein, the third network device is a neighbor device of the first network device, the fourth information is carried in the route withdrawal message, and the fourth information is used to instruct the first network device to withdraw the route published by the end device of the first link. That is, when the first network device is not the end device of the first link, the first network device can receive a route withdrawal message from a neighbor device. When the first network device performs optimal route calculation according to the route withdrawal message and determines that there is no backup path corresponding to the unreachable route locally, the first network device deletes the unreachable route in the routing table.

[0101] The above has described in detail the process of routing processing by network devices. The following will describe in detail the process of network devices generating a network topology.

[0102] Reference can be made to Figure 6 , Figure 6 which is a schematic flowchart of a method 600 for generating a network topology provided by an embodiment of the present application.

[0103] In step 601, the first network device receives second information, where the second information includes the identifier of the network device and the link information between the network device and its neighbor device, and the network device is any network device in the network system other than the first network device. In the present application, this any network device is referred to as the third network device.

[0104] In this embodiment, the network system to which the first network device belongs is composed of each network device and the links between the network devices. BGP can be run based on each link between two network devices in the network system. To facilitate the formation of the whole-network topology by the network devices in the network system, each network device in the network system can announce its own node information and the link information between itself and other network devices in the network. Among them, the node information of the network device itself can specifically be the identifier of the network device, and the link information between the network device and other network devices can specifically be the link information between the network device and its neighbor device. That is to say, in the network system, each network device can send the corresponding node information and link information to its neighbor device to spread its node information and link information to the whole network through the neighbor device; after receiving the node information and link information, the neighbor device continues to forward the above node information and link information to other adjacent devices, so as to realize the spread of the node information and link information throughout the network. Therefore, the first network device can receive the second information (i.e., node information and link information) published by other network devices in the network system from its neighbor device.

[0105] In a possible embodiment, the identifier of the network device includes the loopback interface address of the network device, that is, the identifier of the network device can be the loopback interface address of the network device itself, and this loopback interface address can be an IPv4 address or an IPv6 address. The link information includes the interface address of the network device and the interface address of the neighbor device of the network device, that is, the link information includes the local interface address of the network device and the interface address of the peer device of the network device. Among them, the local interface address of the network device and the interface address of the peer device can also be an IPv4 address or an IPv6 address.

[0106] Exemplarily, reference can be made to Figure 7 , Figure 7 which is a schematic diagram of the format of a kind of link information provided by the embodiment of the present application. Among them, local node descriptors refer to the node information of the network device locally, that is, the loopback address of the network device; remote node descriptors refer to the node information of the peer device of the network device, that is, the loopback address of the peer device of the network device; link descriptors refer to the local interface address of the network device and the interface address of the peer device of the network device.

[0107] In step 602, the first network device forwards the second information to the neighbor device of the first network device.

[0108] In this embodiment, after the first network device receives the second information sent by the neighbor device, the first network device may forward the second information to other neighbor devices so that the second information can spread across the entire network.

[0109] In a possible embodiment, the first network device may also send its network device identifier and the link information between it and the neighbor device to its neighbor devices, so that the node information and link information of the first network device can spread across the entire network. Optionally, the first network device forwards the second information to the neighbor devices of the first network device through BGP.

[0110] In step 603, the first network device generates the topology of the network system according to the second information.

[0111] It can be understood that after the node information and link information published by each network device in the network system spread and converge across the entire network, the first network device can obtain the second information published by all other network devices. The first network device can determine the connection relationship between the network devices in the entire network according to the node information and link information in the obtained second information, so the topology of the entire network system can be generated, so that the first network device can calculate its reachability to other network devices according to the topology of the network system.

[0112] For ease of understanding, the process of a network device generating a network topology will be described in detail below with a specific example.

[0113] Reference can be made to Figure 8 , Figure 8 which is a schematic diagram of the architecture of a network system provided by an embodiment of the present application. As Figure 8 shown, the loopback interface addresses of TOR1, TOR2, AGG1, AGG2, spine1, spine2, AGG3, AGG4, TOR3, and TOR4 are 1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4, 5.5.5.5, 6.6.6.6, 7.7.7.7, 8.8.8.8, 9.9.9.9, and 10.10.10.10 respectively. And, Figure 8 the addresses of the interfaces connected by each network device and its neighbor device are marked in it. For example, the address of the local interface connected by TOR1 and AGG1 is 10.1.1.1, the address of the local interface connected by TOR1 and AGG2 is 11.1.1.1, the address of the local interface connected by AGG1 and TOR1 is 10.1.1.2, and the address of the local interface connected by AGG2 and TOR2 is 20.1.1.2.

[0114] Specifically, TOR1 can send its loopback interface address and the link information between it and AGG1 and AGG2 (i.e., the local interface address and the interface address of the peer device) to AGG1 and AGG2 through BGP for dissemination across the network. In this way, the loopback interface address and link information published by TOR1 can be disseminated to TOR3 and TOR4 through AGG1 - spnie1 - AGG3 and AGG2 - spine2 - AGG4. Similarly, the loopback interface addresses and link information published by devices such as TOR2, AGG1, AGG2, spine1, spine2, AGG3, and AGG4 can also be disseminated to TOR3 and TOR4.

[0115] For TOR3 and TOR4, after receiving the node information and link information published by other network devices in the network system, they can generate the topology of the network system based on the received node information and link information, and can calculate the reachability to the network devices in the network system based on the generated network topology. Exemplarily, reference can be made to Figure 9 , Figure 9 which is a schematic diagram of a network topology generated by a network device provided in an embodiment of the present application. As Figure 9 shown, TOR3 can generate a corresponding network topology based on the received node information and link information. Among them, Figure 9 (a) in shows the network topology between TOR3 and TOR1. Based on the network topology shown in Figure 9 (a), TOR3 can calculate the reachability to TOR1; Figure 9 (b) in shows the network topology between TOR3 and TOR2. Based on the network topology shown in Figure 9 (b), TOR3 can calculate the reachability of TOR2.

[0116] The above describes the routing processing method provided in the embodiments of the present application. For ease of understanding, the application of the routing processing method provided in the embodiments of the present application in a data center will be described in detail below in combination with the network topology of a specific data center.

[0117] Reference can be made to Figure 10 , Figure 10 which is a schematic diagram of the network topology of a data center provided in an embodiment of the present application. As Figure 10As shown, AGG1 and AGG2 are respectively connected to TOR1 and TOR2, and AGG3 and AGG4 are respectively connected to TOR3 and TOR4; servers 1, 2, 3, and 4 are respectively connected under TOR1, TOR2, TOR3, and TOR4. Both AGG1 and AGG3 are connected to spine1 of plane 1 and spine3 of plane 2; both AGG2 and AGG4 are connected to spine2 of plane 1 and spine4 of plane 2.

[0118] Specifically, Figure 10 The network devices in the shown network can publish their own node information and corresponding link information through BGP and spread it across the entire network, so that all network devices in the network can form a full-network topology. In addition, TOR1, TOR2, TOR3, and TOR4 can also publish the introduced routes through BGP to the entire network, so that network devices in the entire network can learn the corresponding routes.

[0119] After AGG1 fails, spine1 and spine3 connected to AGG1 can sense that there is no signal at the local optical fiber interface connected to AGG1, that is, the link failure between spine1 and AGG1 and the link failure between spine3 and AGG1. Spine1 immediately sends link failure message 1 to AGG3. This link failure message 1 carries the local interface address of spine1 and the interface address of AGG1, and is used to indicate the link failure between spine1 and AGG1; spine3 also immediately sends link failure message 2 to AGG3. This link failure message 2 carries the local interface address of spine3 and the interface address of AGG1, and is used to indicate the link failure between spine3 and AGG1. After receiving link failure message 1 and link failure message 2, AGG3 immediately forwards link failure message 1 and link failure message 2 to TOR3 and TOR4 (i.e., the remaining neighbor devices of AGG3).

[0120] For Spine1 and Spine3, after detecting no signal at the local fiber optic interfaces connected to AGG1, in addition to sending link failure messages to AGG3, Spine1 and Spine3 can also perform routing convergence in parallel. Specifically, based on the network topology, Spine1 and Spine3 can determine that there are no backup paths to TOR1 and TOR2, that is, TOR1 and TOR2 are both unreachable network devices. Therefore, Spine1 and Spine3 can invalidate the routes advertised by TOR1 and TOR2 in the routing table or directly delete the routes initially advertised by TOR1 and TOR2 in the routing table. After Spine1 and Spine3 determine that there are no backup paths to TOR1 and TOR2 or after Spine1 and Spine3 perform optimal routing calculations, Spine1 and Spine3 can also send route withdrawal messages to AGG3 to instruct AGG3 to withdraw the routes advertised by TOR1 and TOR2.

[0121] After receiving the link failure messages sent by Spine1 and Spine3, in addition to forwarding the link failure messages to TOR3 and TOR4, AGG3 can also perform routing convergence in parallel. Specifically, based on the network topology, AGG3 can determine that it is unable to reach TOR1 and TOR2 through Spine1 and Spine3, that is, TOR1 and TOR2 are network devices that are unreachable through both Spine1 and Spine3. Therefore, AGG3 can determine that the routes initially advertised by TOR1 or TOR2 and received through Spine1 or Spine3 are unreachable routes, and AGG3 can invalidate the routes determined to be unreachable in the routing table. In addition, after receiving the route withdrawal messages sent by Spine1 and Spine3, AGG3 can perform optimal routing calculations based on the route withdrawal messages and delete the routes advertised by TOR1 and TOR3 in the routing table according to the results of the optimal routing calculations. After AGG3 completes the optimal routing calculations, AGG3 sends route withdrawal messages to TOR3 and TOR4 to instruct TOR3 and TOR4 to withdraw the routes advertised by TOR1 and TOR2.

[0122] After receiving the link failure message sent by AGG3, TOR3 and TOR4 can perform routing convergence based on the received link failure message. Specifically, both TOR3 and TOR4 can determine, according to the network topology, that they cannot reach TOR1 and TOR2 through AGG3, that is, TOR1 and TOR2 are network devices that are unreachable through AGG3. In fact, TOR3 and TOR4 can also reach TOR1 and TOR2 through AGG4. Therefore, TOR3 and TOR4 can determine that the routes initially published by TOR1 or TOR2 and received through AGG3 are unreachable routes, and TOR3 and TOR4 can set the routes determined to be unreachable in the routing table to invalid. In addition, after TOR3 and TOR4 receive the route withdrawal message sent by AGG3, TOR3 and TOR4 can perform optimal routing calculation according to the route withdrawal message, and delete the routes initially published by TOR1 and TOR3 and received through AGG3 in the routing table according to the result of the optimal routing calculation.

[0123] Based on the above analysis, it can be known that after spine1 and spine3 sense the link failure, spine1 and spine3 immediately send the link failure message to the neighbor device AGG3, so that AGG3 can forward the link failure message to TOR3 and TOR4, that is, the link failure message can spread quickly throughout the network. Since the amount of the link failure message spreading throughout the network is small, the time for the link failure message to spread throughout the network is very short. Ignoring the time for the link failure message to spread, the network devices at all levels in the network (i.e., spine1, spine3, AGG3, TOR3, and TOR4) basically perform routing convergence in parallel, greatly shortening the routing convergence time of the entire network.

[0124] To implement the above embodiments, the present application also provides a network device 1100. Please refer to Figure 11 , Figure 11 which is a schematic structural diagram of a network device 1100 provided by an embodiment of the present application.

[0125] Figure 11 Although the network device 1100 shown has some specific features, those skilled in the art will realize from the embodiments of the present application that, for the sake of simplicity, Figure 11Various other features are not shown so as not to obscure more relevant aspects of the implementation disclosed in the embodiments of the present application. For this purpose, as a restrictive example, in some implementations, the network device 1100 includes an acquisition unit 11042, a transceiver unit 11043, and a processing unit 11044. These units can be implemented in software or in hardware. In some implementations, if the acquisition unit 11042, the transceiver unit 11043, and the processing unit 11044 are implemented in software, the network device 1100 further includes one or more processors (e.g., a central processing unit CPU) 1101, a network interface 1102, a programming interface 1103, a memory 1104, and one or more communication buses 1105. The communication bus 1105 is used to interconnect various components.

[0126] In some implementations, the network interface 1102 is used, among other things, to connect to one or more other network devices in a network system. In some implementations, the communication bus 1105 includes circuitry for interconnecting and controlling the communication between system components. The memory 1104 may include non-volatile memory, such as read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), or flash memory. The memory 1104 may also include volatile memory, and the volatile memory may be random access memory (RAM), which is used as an external cache.

[0127] In some implementations, the memory 1104 or the non-transitory computer-readable storage medium of the memory 1104 stores the following programs, modules, and data structures, or subsets thereof, specifically including an operating system 11041, an acquisition unit 11042, a transceiver unit 11043, and a processing unit 11044.

[0128] The operating system 11041 is used to process various basic system services and processes for performing hardware-related tasks.

[0129] In various implementation manners, the obtaining unit 11042 is configured to obtain information about a link failure, for example, obtain first information indicating a first link failure. In various implementation manners, the transceiver unit 11043 is configured to receive or transmit information and perform routing. For example, the transceiver unit 11043 transmits the foregoing first information or receives the foregoing second information. In various implementation manners, the processing unit 11044 is configured to perform processing operations related to a routing table. For example, the processing unit 11044 determines unreachable routes in the routing table, deletes the unreachable routes, or marks the unreachable routes in the routing table as invalid. In various implementations, the network device 1100 is configured to execute various methods provided in the embodiments of the present application. For example, the network device 1100 executes the routing processing method 200 shown in Figure 2 or the network topology generation method 600 shown in Figure 6 .

[0130] The embodiments of the present application have been described in detail above. The steps in the methods of the embodiments of the present application may be scheduled, combined, or deleted according to actual needs; the modules in the devices of the embodiments of the present application may be divided, combined, or deleted according to actual needs.

[0131] It should be understood that the term "one embodiment" or "an embodiment" mentioned throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the present application. Therefore, the appearances of the phrase "in one embodiment" or "in an embodiment" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that in various embodiments of the present application, the sequence numbers of the foregoing processes do not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0132] As used herein, the term "and / or" is merely used to describe an association relationship between associated objects, and indicates that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after.

[0133] It should be understood that in the embodiments of the present application, "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.

[0134] Those of ordinary skill in the art will realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0135] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0136] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings or direct couplings or communication connections shown or discussed with each other can be through some interfaces, and the indirect couplings or communication connections of devices or units can be in electrical, mechanical, or other forms.

[0137] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0138] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0139] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories, random access memories, magnetic disks, or optical discs.

Claims

1. A routing processing method, characterized in that, it includes: A first network device obtains first information, where the first information indicates a first link failure, and the first link is a link between any two network devices in the network system to which the first network device belongs; The first network device sends the first information to a second network device, and the second network device is a neighbor device of the first network device; The first network device determines the unreachable routes in the routing table of the first network device according to the first information and the topology of the network system. The path corresponding to the unreachable route includes the first link, and the link included in the path corresponding to the route recorded in the routing table of the first network device is not recorded; The first network device processes the unreachable routes.

2. The routing processing method according to claim 1, characterized in that, the method further includes: The first network device receives second information, where the second information includes an identifier of a third network device and link information between the third network device and a neighbor device of the third network device, and the third network device is any network device in the network system other than the first network device; The first network device forwards the second information to a neighbor device of the first network device; The first network device generates the topology of the network system according to the second information.

3. The routing processing method according to claim 2, characterized in that, the identifier of the third network device includes the loopback interface address of the third network device, and the link information includes the interface address of the third network device and the interface address of the neighbor device of the third network device.

4. The routing processing method according to any one of claims 1 to 3, characterized in that, the first network device determines the unreachable routes in the routing table of the first network device according to the first information and the topology of the network system, including: When the first network device is the first-end device of the first link, the first network device determines that the route including the first link published by the second-end device of the first link is an unreachable route; Or, When the first network device is not an end device of the first link, the first network device determines the network devices that are unreachable through the neighbor device according to the first information, the information of the neighbor device that sends the first information, and the topology of the network system, and determines that the routes received by the unreachable network devices through the neighbor device are unreachable routes.

5. The routing processing method according to claim 4, characterized in that, after the first network device determines that the route including the first link published by the second-end device of the first link is an unreachable route, the method further includes: The first network device sends third information to a neighbor device of the first network device, and the third information is used to instruct the neighbor device of the first network device to revoke the route including the first link published by the second-end device of the first link.

6. The routing processing method according to any one of claims 1 to 5, characterized in that, the obtaining of the first information by the first network device includes: the first network device obtains the first information by detecting the state of the first link or the state of the interface corresponding to the first link; or, the first network device receives the first information from a fourth network device, and the fourth network device is a neighbor device of the first network device.

7. The routing processing method according to claim 6, characterized in that, the method further includes: the first network device receives fourth information from the fourth network device, and the fourth information is used to instruct the first network device to revoke the route published by the end device of the first link; the first network device deletes the unreachable route in the routing table according to the fourth information.

8. The routing processing method according to any one of claims 1-7, characterized in that, the sending of the first information by the first network device to the second network device includes: the first network device sends the first information to the second network device through the extended Border Gateway Protocol (BGP); the processing of the unreachable route by the first network device includes: the first network device deletes the unreachable route or marks the unreachable route as invalid.

9. A network device, characterized in that, the network device is a first network device, and includes: an obtaining unit, configured to obtain first information, where the first information indicates a failure of a first link, and the first link is a link between any two network devices in the network system to which the first network device belongs; a transceiver unit, configured to send the first information to a second network device, where the second network device is a neighbor device of the first network device; a processing unit, configured to determine, according to the first information and the topology of the network system, an unreachable route in the routing table of the first network device, where a path corresponding to the unreachable route includes the first link, and the routing table of the first network device does not record a link included in a path corresponding to a route; the processing unit is further configured to process the unreachable route.

10. The network device according to claim 9, characterized in that, the transceiver unit is further configured to receive second information, where the second information includes an identifier of a third network device and link information between the third network device and a neighbor device of the third network device, and the third network device is any network device in the network system other than the first network device; the transceiver unit is further configured to forward the second information to a neighbor device of the first network device through BGP; the processing unit is further configured to generate the topology of the network system according to the second information.

11. The network device according to claim 10, characterized in that, the identifier of the third network device includes the loopback interface address of the third network device, and the link information includes the interface address of the third network device and the interface address of the neighbor device of the third network device.

12. The network device according to any one of claims 9 to 11, wherein, the processing unit is further configured to: when the first network device is the first end device of the first link, determine that the route including the first link published by the second end device of the first link is an unreachable route; or, when the first network device is not an end device of the first link, determine, according to the first information, the information of the neighbor device that sends the first information, and the topology of the network system, the network devices that are unreachable through the neighbor device, and determine that the routes received through the neighbor device generated by the unreachable network devices are unreachable routes.

13. The network device according to claim 12, wherein, the transceiver unit is further configured to send third information to the neighbor device of the first network device, and the third information is used to instruct the neighbor device of the first network device to revoke the route including the first link published by the second end device of the first link.

14. The network device according to any one of claims 9 to 13, wherein, the obtaining unit is configured to obtain the first information by detecting the state of the first link or the state of the interface corresponding to the first link; or, the obtaining unit is configured to obtain the first information from a fourth network device through the transceiver unit, and the fourth network device is a neighbor device of the first network device.

15. The network device according to claim 14, wherein, the transceiver unit is further configured to receive fourth information from the fourth network device, and the fourth information is used to instruct the first network device to revoke the route published by the end device of the first link; the processing unit is further configured to delete the unreachable route in the routing table according to the fourth information.

16. The network device according to any one of claims 9-15, wherein, the transceiver unit is configured to send the first information to the second network device through extended BGP; the processing unit is further configured to delete the unreachable route or mark the unreachable route as invalid.

Citation Information

Patent Citations

  • Network route convergence processing method and network route convergence processing device

    CN103036787A

  • Routing convergence method and system

    CN104283789A