A method for detecting routing and network equipment
By establishing a BMP session in a BGP network, receiving and comparing the routes in the BGP routing set, the problem of not being able to detect the effectiveness of BGP routing in the prior art is solved, and the effectiveness detection of BGP routing and network reliability are improved.
Patent Information
- Application Number
- CN202110877002.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2016-12-01
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2036-12-01
AI Technical Summary
The prior art cannot detect the effectiveness of BGP routing, resulting in the inability to detect and handle routing exceptions in a timely manner when the BGP operation state is normal.
By establishing a BMP session between the first network device and the second network device, and establishing a BMP session between the first network device and the third network device, receiving and comparing the routes in the BGP route set, it is determined whether the route is valid.
It realizes the detection of the effectiveness of BGP routing, can timely identify unavailable routes, and improves the reliability of message forwarding in the network.
Smart Images

Figure CN113783748B_ABST
Abstract
Description
[0001] This application is a divisional application of an application filed with the China Intellectual Property Office with an application date of December 1, 2016, application number 201611094351.9, and invention name “A method and network device for routing detection”. Technical Field
[0002] The embodiments of the present application relate to the field of communication technology, and in particular to a method and network device for route detection. Background Art
[0003] The Border Gateway Protocol (BGP) Monitoring Protocol (BGP Monitoring Protocol, BMP) can monitor the BGP operation status of devices in the network in real time, and the BGP operation status includes the establishment and termination of peer relationships, etc. However, when the BGP operation status is normal, the validity of the BGP route cannot be detected. Summary of the invention
[0004] The embodiment of the present application provides a method for route detection, which is used to solve the technical problem that the validity of BGP routes cannot be detected in the prior art.
[0005] In a first aspect, an embodiment of the present application provides a method for route detection, the method comprising:
[0006] The first network device establishes a first BMP session with the second network device, and the first network device establishes a second BMP session with the third network device. The first network device receives a first BGP route set sent by the second network device through the first BMP session, the first BGP route set includes one or more BGP routes sent by the second network device to the third network device, and a BGP neighbor has been established between the third network device and the second network device. The first network device receives a second BGP route set sent by the third network device through the second BMP session, the second BGP route set includes one or more BGP routes received by the third network device from the second network device. When the first network device detects that the first BGP route exists in the second BGP route set and the first BGP route does not exist in the first BGP route set, the first network device determines that the first BGP route is an unavailable route.
[0007] In the above scheme, the first network device receives the first BGP route set sent by the second network device through the first BMP session, and receives the second BGP route set sent by the third network device through the second BMP session. The first network device can determine whether there is an abnormality in the process of the second network device publishing the BGP route to the third network device by comparing whether the BGP routes in the two BGP route sets are the same, and can detect the validity of the BGP route.
[0008] In a possible implementation manner, after the first network device determines that the first BGP route is an unavailable route, the method further includes:
[0009] The first network device identifies the first BGP route as an unavailable route, and sends the first BGP route identified as an unavailable route to the third network device. When the first network device determines that the first BGP route is unavailable, the first BGP route is sent to the third network device, and the third network device can stop using the first BGP route for message forwarding, which is conducive to improving the reliability of message forwarding in the network.
[0010] In a possible implementation, the method further includes:
[0011] The first network device uses the available routes in the second BGP route set to plan the forwarding path, and the available routes in the second BGP route set do not include the first BGP route. When the first network device determines that the first BGP route is unavailable, the first network device no longer uses the first BGP route to plan the forwarding path, which is beneficial to improving the reliability of message forwarding in the network.
[0012] In a possible implementation, the second BGP route in the second BGP route set includes attribute information, the second BGP route is any BGP route in the second BGP route set, and the attribute information includes one or more of the following information:
[0013] Priority information used to identify the priority of the second BGP route;
[0014] Status information for identifying a status of the second BGP route in a routing information base (Routing Information Base, RIB) in the first network device;
[0015] Indication information used to identify whether the second BGP route is sent to the forwarding information base (FIB);
[0016] Used to identify the status information after the second BGP routing information is sent to the FIB.
[0017] In a second aspect, an embodiment of the present application provides a routing detection method, the method comprising:
[0018] The second network device establishes a BMP session with the first network device. The second network device generates a BMP message, the BMP message includes a BGP route set, the BGP route set includes a first BGP route that the second network device has sent to a third network device, and a BGP neighbor has been established between the third network device and the second network device. The second network device sends a BMP message to the first network device through the BMP session to trigger the first network device to detect the BGP routes in the BGP route set in the BMP message.
[0019] In a possible implementation, the BGP route set further includes a second BGP route received by the second network device, where the second BGP route includes attribute information, and the attribute information includes one or more of the following information:
[0020] Priority information used to identify the priority of the second BGP route;
[0021] Status information used to identify the status of the second BGP route in the routing information base RIB;
[0022] Publishing information used to identify whether the second BGP route has been published to the third network device;
[0023] Indication information used to identify whether the second BGP route is sent to the forwarding information base FIB;
[0024] Used to identify the status information of the second BGP route after it is sent to the FIB.
[0025] In a possible implementation, the BMP message further includes specification information of the second network device, where the specification information includes one or more of the following information:
[0026] The number of BGP routes that the second network device can accommodate;
[0027] default configuration parameters of the second network device;
[0028] Standard information supported by the second network device;
[0029] Feature information supported by the second network device.
[0030] In a possible implementation, the BMP message further includes a BGP routing rule of the second network device, where the BGP routing rule includes one or more of the following:
[0031] The rule of optimizing BGP routes with short autonomous systems (AS) paths;
[0032] The rule that BGP routes with longer survival time are preferred.
[0033] In a third aspect, an embodiment of the present application provides a first network device, the first network device comprising:
[0034] The establishing unit is used to establish a first BMP session with the second network device and to establish a second BMP session with the third network device.
[0035] The receiving unit is used to receive a first BGP route set sent by the second network device through the first BMP session established by the establishing unit. The first BGP route set includes one or more BGP routes sent by the second network device to the third network device. A BGP neighbor has been established between the third network device and the second network device.
[0036] The receiving unit is further configured to receive a second BGP route set sent by the third network device through the second BGP session established by the establishing unit, wherein the second BGP route set includes one or more BGP routes received by the third network device from the second network device.
[0037] The detection unit is used to detect whether the first BGP route exists in the second BGP route set, and the first BGP route does not exist in the first BGP route set.
[0038] The determining unit is configured to determine that the first BGP route is an unavailable route when the detecting unit detects that the first BGP route exists in the second BGP route set and the first BGP route does not exist in the first BGP route set.
[0039] In a possible implementation manner, the first network device further includes:
[0040] The processing unit is configured to mark the first BGP route as an unavailable route after the determining unit determines that the first BGP route is an unavailable route.
[0041] The sending unit is used to send the first BGP route identified as an unavailable route by the processing unit to the third network device.
[0042] In a possible implementation, the processing unit is further configured to use available routes in a second BGP route set to perform forwarding path planning, where the available routes in the second BGP route set do not include the first BGP route.
[0043] In a fourth aspect, an embodiment of the present application provides a second network device, the second network device comprising:
[0044] An establishing unit is used to establish a BMP session with the first network device.
[0045] The generating unit is used to generate a BMP message, the BMP message includes a BGP route set, the BGP route set includes a first BGP route that has been sent by the second network device to the third network device, and a BGP neighbor has been established between the third network device and the second network device.
[0046] The sending unit is used to send a BMP message to the first network device through a BMP session to trigger the first network device to detect the BGP routes in the BGP route set in the BMP message.
[0047] In a fifth aspect, an embodiment of the present application provides a method for route detection, the method comprising:
[0048] The second network device establishes a BMP session with the first network device;
[0049] The second network device generates a BMP message, the BMP message includes a BGP route set, the BGP route set includes the BGP route that the second network device has sent to the third network device, and a BGP neighbor has been established between the third network device and the second network device;
[0050] The second network device sends the BMP message to the first network device through the BMP session.
[0051] In the above solution, the second network device sends the BGP route to the third network device, and then sends the route to the first network device. The first network device can detect the path published externally by the second network device.
[0052] In a sixth aspect, an embodiment of the present application provides a method for route detection, the method comprising:
[0053] The third network device establishes a BMP session with the first network device;
[0054] The third network device generates a BMP message, the BMP message includes a second BGP route set, the second BGP route set includes one or more BGP routes received by the third network device from the second network device, and a BGP neighbor has been established between the third network device and the second network device;
[0055] The third network device sends the BMP message to the first network device through the BMP session;
[0056] The second BGP route in the second BGP route set includes attribute information, where the second BGP route is any one of the BGP routes in the second BGP route set, and the attribute information includes one or more of the following information:
[0057] priority information used to identify the priority of the second BGP route;
[0058] Status information for identifying the status of the second BGP route in the RIB in the third network device;
[0059] Indication information used to identify whether the second BGP route is sent to the forwarding information base FIB;
[0060] Used to identify the state information after the second BGP routing information is sent to the FIB.
[0061] In the above scheme, the third network device receives BGP routes from the second network device and then sends these BGP routes to the first network device. These BGP routes contain attribute information, and the first network device can more accurately detect the availability of BGP routes based on the attribute information.
[0062] In a seventh aspect, an embodiment of the present application provides a third network device, wherein the third network device includes:
[0063] An establishing unit, configured to establish a BMP session with the first network device;
[0064] A generating unit, configured to generate a BMP message, wherein the BMP message includes a second BGP route set, wherein the second BGP route set includes one or more BGP routes received by the third network device from the second network device, and a BGP neighbor has been established between the third network device and the second network device;
[0065] A sending unit, configured to send the BMP message to the first network device through the BMP session; the second BGP route in the second BGP route set includes attribute information, the second BGP route is any one of the BGP routes in the second BGP route set, and the attribute information includes one or more of the following information:
[0066] priority information used to identify the priority of the second BGP route;
[0067] Status information for identifying the status of the second BGP route in the RIB in the third network device;
[0068] Indication information used to identify whether the second BGP route is sent to the forwarding information base FIB;
[0069] Used to identify the state information after the second BGP routing information is sent to the FIB.
[0070] In an eighth aspect, an embodiment of the present application provides a routing detection system, the system comprising: a first network device, a second network device and a third network device, wherein:
[0071] The second network device is used to establish a first BGP session with the first network device and send a first BGP route set to the first network device. The first BGP route set includes one or more BGP routes sent by the second network device to the third network device. A BGP neighbor has been established between the third network device and the second network device.
[0072] The third network device is used to establish a second BGP session with the first network device and send a second BGP route set to the first network device, where the second BGP route set includes one or more BGP routes received by the third network device from the second network device.
[0073] A first network device is used to receive a first BGP route set sent by a second network device through a first BMP session; receive a second BGP route set sent by a third network device through a second BMP session; when the first network device detects that the first BGP route exists in the second BGP route set and the first BGP route does not exist in the first BGP route set, the first network device determines that the first BGP route is an unavailable route.
[0074] In a ninth aspect, an embodiment of the present application provides a first network device, which includes a processor and a memory, wherein the memory stores program instructions and data, and the processor is used to call the program instructions in the memory to execute the corresponding functions in the method of the first aspect.
[0075] In the tenth aspect, an embodiment of the present application provides a second network device, which includes a processor and a memory, wherein the memory stores program instructions and data, and the processor is used to call the program instructions in the memory to execute the corresponding functions in the method of the second aspect.
[0076] In the eleventh aspect, an embodiment of the present application provides a third network device, which includes a processor and a memory, wherein the memory stores program instructions and data, and the processor is used to call the program instructions in the memory to execute the corresponding functions in the method of the sixth aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0078] Figure 1 A schematic diagram of an application scenario of a method for route detection provided in an embodiment of the present application;
[0079] Figure 2 A schematic diagram of a flow chart of a routing detection method provided in an embodiment of the present application;
[0080] Figure 3 A flowchart of another routing detection method provided in an embodiment of the present application;
[0081] Figure 4 A flowchart of another routing detection method provided in an embodiment of the present application;
[0082] Figure 5 A schematic diagram of the structure of a first network device provided in an embodiment of the present application;
[0083] Figure 6 A schematic diagram of the structure of a second network device provided in an embodiment of the present application;
[0084] Figure 7 A schematic diagram of the structure of another first network device provided in an embodiment of the present application;
[0085] Figure 8 A schematic diagram of the structure of another second network device provided in an embodiment of the present application;
[0086] Fig. 9 A schematic diagram of a routing detection system provided in an embodiment of the present application;
[0087] Fig.10 A schematic diagram of the structure of a third network device provided in an embodiment of the present application;
[0088] Fig.11 A schematic diagram of the structure of another third network device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0089] The embodiments of the present invention are described below in conjunction with the accompanying drawings.
[0090] See also Figure 1 , Figure 1A schematic diagram of an application scenario of a routing detection method provided for an embodiment of the present application. The network scenario includes: a first network device 101, a second network device 102, a third network device 103, a network device 104, a network device 105 and a network device 106. The above network devices support BMP respectively. A first BMP session is established between the first network device 101 and the second network device 102, and a second BMP session is established between the first network device 101 and the third network device 103. A BGP neighbor is established between the second network device 102 and the third network device 103, and the second network device 102 sends a BGP route to the third network device 103 via BGP, and stores the sent BGP route in the RIB (Adjacency-routing information base-output, Adj-RIB-Out) sent by the neighbor of the second network device. The third network device 103 stores the BGP route received from the second network device in the RIB (Adjacency-routing information base-input, Adj-RIB-In) received from the neighbor of the third network device 103.
[0091] When the network is normal, the BGP route received by the third network device 103 from the second network device 102 is the same as the BGP route sent by the second network device 102 to the third network device 103. However, when the network is abnormal, for example, the link between the second network device 102 and the third network device 103 is unstable, or the network is attacked by hackers, resulting in the BGP route being rewritten during the process of the second network device 102 sending it to the third network device 103. At this time, the BGP route received by the third network device 103 will not be able to guide the message forwarding normally. At this time, the forwarding path from the network device 106 to the network device 102 through the network device 103 will be unavailable. In this case, the first network device 101 is required to detect the BGP route and optimize the forwarding path from the network device 106 to the network device 102.
[0092] Optionally, the embodiments of the present application can be applied to an open flow network architecture with separated control and forwarding. Compared with the network devices of the traditional centralized architecture, the separation of control and forwarding is to separate the forwarding plane and the control plane of the network device, and deploy them on two different devices. The two work together to complete the forwarding of data packets in the network. The device corresponding to the control plane is called a control device or controller (Controller), which is deployed on an independent device independent of the forwarding plane. The device corresponding to the forwarding plane is called a forwarding device or forwarder. The forwarder has the ability to communicate with the controller. The forwarder can communicate with the controller through a control channel. Figure 1The first network device 101 may be a controller in a control-forwarding separation network architecture, and the second network device 102, the third network device 103, the network device 104, the network device 105 and the network device 106 may be forwarders in the control-forwarding separation network architecture.
[0093] See also Figure 2 , combined with Figure 1 In the application scenario shown, an embodiment of the present application provides a method for route detection, the method comprising:
[0094] 201. A first BMP session is established between a first network device and a second network device.
[0095] 202: A second BMP session is established between the first network device and the third network device.
[0096] 203. The first network device receives a first BGP route set sent by the second network device through the first BMP session. The first BGP route set includes one or more BGP routes sent by the second network device to the third network device. A BGP neighbor has been established between the third network device and the second network device.
[0097] 204. The first network device receives a second BGP route set sent by the third network device through the second BGP session, where the second BGP route set includes one or more BGP routes received by the third network device from the second network device.
[0098] 205. When the first network device detects that the second BGP route set has a first BGP route, and the first BGP route does not exist in the first BGP route set, the first network device determines that the first BGP route is an unavailable route.
[0099] There is no strict order relationship between the above steps 201 and 202, and there is no strict order relationship between the above steps 203 and 204. After the first BMP session is established between the first network device and the second network device, the second network device can send the first BGP route set to the first network device. After the second BMP session is established between the first network device and the third network device, the third network device can send the second BGP route set to the first network device.
[0100] The BGP routes in the first BGP route set are sent by the second network device to the third network device through BGP. After sending the BGP routes in the first BGP route set to the third network device, the second network device stores the BGP routes in the first BGP route set in Adj-RIB-Out of the second network device, and then the second network device sends the BGP routes in Adj-RIB-Out to the first network device. The third network device receives the second BGP route set from the second network device through BGP, stores the BGP routes in the second BGP route set in Adj-RIB-In of the third network device, and then sends the BGP routes in Adj-RIB-In to the first network device.
[0101] Optionally, the first network device may be a controller in a control-forwarding separation network architecture, the controller supports BMP and has the function of a BMP server. The second network device and the third network device also support BMP respectively.
[0102] Through the above technical solution, the second network device sends the routes in the first BGP route set published to the third network device to the first network device, and the third network device sends the routes in the second BGP route set received from the second network device to the first network device. The first network device compares the routes in the first BGP route set and the second BGP route set. If it is determined that the first BGP route exists in the second BGP route set and the first BGP route does not exist in the first BGP route set, it means that the first BGP route is modified during the sending process from the second network device to the third network device, and it is determined that the first BGP route is an unavailable route and cannot be used to guide route forwarding. The first BGP route can be one or more BGP routes.
[0103] Optionally, after the first network device determines that the first BGP route is an unavailable route, the method further includes:
[0104] The first network device identifies the first BGP route as an unavailable route, and sends the first BGP route identified as an unavailable route to the third network device. In this way, when the first network device determines that the first BGP route is unavailable, the first BGP route is sent to the third network device, and the third network device can stop using the first BGP route for message forwarding, which is conducive to improving the reliability of message forwarding in the network.
[0105] Optionally, the method further comprises:
[0106] The first network device uses available routes in the second BGP route set to plan a forwarding path, and the available routes in the second BGP route set do not include the first BGP route.
[0107] The first network device, as a controller in the network, can plan the forwarding path in the network. When it is detected that the first BGP route is unavailable, the first BGP route is no longer used when planning the forwarding path. Moreover, if only the first BGP route on the third network device reaches the specified destination, the planned forwarding path needs to avoid the third network device. For example: Figure 1 If the third network device 103 receives a BGP route to the second network device 102 from the second network device 102, but the BGP route is detected as an unavailable route by the first network device 103, and there is only such a BGP route on the third network device 103 that can reach the second network device 102, then when the first network device 101 plans the forwarding path from the network device 106 to the network device 102, it is necessary to avoid the third network device 103 and select other forwarding paths, such as: a forwarding path passing through the network device 106, the network device 105, the network device 104 and the second network device 102.
[0108] Optionally, the second BGP route in the second BGP route set includes attribute information, and the second BGP route is any BGP route in the second BGP route set, and the attribute information includes one or more of the following information:
[0109] priority information used to identify the priority of the second BGP route;
[0110] Status information for identifying the status of the second BGP route in the RIB in the third network device;
[0111] Indication information used to identify whether the second BGP route is sent to the FIB;
[0112] Used to identify the status information of the second BGP route after it is sent to the FIB.
[0113] The priority information of the second BGP route can identify the priority of the second BGP route when performing path selection or message forwarding, so that the first network device can plan the forwarding path more efficiently according to the priority level information.
[0114] The status information of the second BGP route in the RIB can identify the status of the second BGP route in the RIB in the third network device. If the status of the second BGP route in the RIB is inactive, the second BGP route cannot be used for route selection or guiding message forwarding.
[0115] The indication information of the second BGP route can identify whether the second BGP route has been sent to the FIB of the third network device. If the indication information indicates that the second BGP route has not been sent to the FIB, the second BGP route cannot be used for route selection or guiding message forwarding.
[0116] The state information of the second BGP route sent to the FIB can identify the state of the second BGP route in the FIB. If the state of the second BGP route in the FIB is unavailable, the second BGP route cannot be used for route selection or guiding message forwarding.
[0117] See also Figure 3 , combined with Figure 1 In the application scenario shown, an embodiment of the present application provides a method for route detection, the method comprising:
[0118] The third network device establishes a BMP session with the first network device;
[0119] The third network device generates a BMP message, the BMP message includes a second BGP route set, the second BGP route set includes one or more BGP routes received by the third network device from the second network device, and a BGP neighbor has been established between the third network device and the second network device;
[0120] The third network device sends the BMP message to the first network device through the BMP session;
[0121] The second BGP route in the second BGP route set includes attribute information, where the second BGP route is any one of the BGP routes in the second BGP route set, and the attribute information includes one or more of the following information:
[0122] priority information used to identify the priority of the second BGP route;
[0123] Status information for identifying the status of the second BGP route in the RIB in the third network device;
[0124] Indication information used to identify whether the second BGP route is sent to the FIB;
[0125] Used to identify the status information of the second BGP route after it is sent to the FIB.
[0126] For detailed description of the above attribute information, please refer to Figure 2 The embodiments shown will not be described in detail here.
[0127] See also Figure 4 , combined with Figure 1In the application scenario shown, an embodiment of the present application provides a method for route detection, the method comprising:
[0128] 401, the second network device establishes a BMP session with the first network device;
[0129] 402, the second network device generates a BMP message, the BMP message includes a BGP route set, the BGP route set includes a first BGP route that has been sent by the second network device to a third network device, and a BGP neighbor has been established between the third network device and the second network device;
[0130] 403: The second network device sends the BMP message to the first network device through the BMP session. After receiving the BMP message, the first network device may detect the BGP routes in the BGP route set in the BMP message.
[0131] Optionally, the first network device detects the BGP routes in the BGP route set. Figure 2 The description of the illustrated embodiment will not be repeated here.
[0132] Optionally, the BMP message further includes specification information of the second network device, and the specification information includes one or more of the following information:
[0133] the number of BGP routes that the second network device can accommodate;
[0134] default configuration parameters of the second network device;
[0135] Standard information supported by the second network device;
[0136] Feature information supported by the second network device.
[0137] By obtaining the number of BGP routes that the second network device can accommodate, the first network device can control the number of BGP routes sent to the second network device to avoid exceeding the BGP route specifications of the second network device, resulting in memory exhaustion of the second network device, or causing the second network device to be unable to normally receive the BGP routes sent by the first network device and unable to forward messages normally.
[0138] The default configuration parameters may be BGP default configuration parameters or system default configuration parameters. For example, the BGP default configuration parameters may be the number of neighbors supported by BGP or the number of BGP load sharing supported. After the first network device obtains these BGP default configuration parameters, it may more effectively monitor the second network device, such as controlling the number of BGP load sharing of the second network device.
[0139] By obtaining the standard information or characteristic information of the second network device, the first network device can manage the second network device more flexibly. For example, when the second network device does not support a certain feature, avoid deploying the configuration related to the feature on the second network device. When the second network device does not support a certain standard, avoid deploying the technical solution related to the standard on the second network device.
[0140] Optionally, the BMP message further includes a BGP routing rule of the second network device, and the BGP routing rule includes one or more of the following:
[0141] The rule for optimizing BGP routes with short AS Path length;
[0142] The rule that BGP routes with longer survival time are preferred.
[0143] The first network device can effectively perform path planning and selection by obtaining the BGP routing rule of the second network device.
[0144] See also Figure 5 , combined with Figure 1 In the application scenario shown, the embodiment of the present application provides a first network device 500, wherein Figure 5 The first network device 500 may execute Figure 2 or Figure 3 In the method of the embodiment shown, the first network device 500 may be Figure 2 , Figure 3 or Figure 4 The first network device in the embodiment. The first network device 500 includes:
[0145] An establishing unit 501 is used to establish a first BMP session with a second network device and a second BMP session with a third network device;
[0146] A receiving unit 502 is configured to receive a first BGP route set sent by the second network device through the first BMP session established by the establishing unit 501, wherein the first BGP route set includes one or more BGP routes sent by the second network device to the third network device, and a BGP neighbor has been established between the third network device and the second network device;
[0147] The receiving unit 502 is further configured to receive a second BGP route set sent by the third network device through the second BGP session established by the establishing unit 501, wherein the second BGP route set includes one or more BGP routes received by the third network device from the second network device;
[0148] A detection unit 503 is configured to detect that the second BGP route set has a first BGP route, and the first BGP route set does not have the first BGP route;
[0149] The determining unit 504 is configured to determine that the first BGP route is an unavailable route when the detecting unit 503 detects that the second BGP route set has a first BGP route and the first BGP route set does not have the first BGP route.
[0150] Optionally, the first network device 500 further includes:
[0151] a processing unit, configured to mark the first BGP route as an unavailable route after the determining unit determines that the first BGP route is an unavailable route;
[0152] A sending unit is used to send the first BGP route marked as an unavailable route by the processing unit to the third network device.
[0153] Optionally, the processing unit is further configured to use available routes in the second BGP route set to perform forwarding path planning, and the available routes in the second BGP route set do not include the first BGP route.
[0154] See also Figure 6 , combined with Figure 1 In the application scenario shown, the present application embodiment provides a second network device 600, wherein Figure 6 The second network device 600 in may execute Figure 2 , Figure 3 or Figure 4 The second network device 600 can be Figure 2 , Figure 3 or Figure 4 The second network device in the network device 600 includes:
[0155] An establishing unit 601 is used to establish a BMP session with a first network device;
[0156] A generating unit 602 is configured to generate a BMP message, wherein the BMP message includes a BGP route set, wherein the BGP route set includes a first BGP route that has been sent by the second network device to a third network device, and a BGP neighbor has been established between the third network device and the second network device;
[0157] The sending unit 603 is used to send the BMP message to the first network device through the BMP session to trigger the first network device to detect the BGP routes in the BGP route set in the BMP message.
[0158] See also Figure 7 , an embodiment of the present application provides a first network device 700, wherein Figure 7 The first network device 700 may execute Figure 2 , Figure 3 or Figure 4 The method of the embodiment shown. The first network device 700 can be Figure 2 , Figure 3 or Figure 4 The first network device in the embodiment. The first network device 700 includes a processor 701, a network interface 702 and a memory 703. The processor 701 includes but is not limited to one or more of a CPU, a network processor (English: Network Processor, abbreviated: NP), an application-specific integrated circuit (English: Application-Specific Integrated Circuit, abbreviated: ASIC) or a programmable logic device (English: Programmable Logic Device, abbreviated: PLD). The above-mentioned PLD can be a complex programmable logic device (English: Complex Programmable Logic Device, abbreviated: CPLD), a field programmable gate array (English: Field-Programmable Gate Array, abbreviated: FPGA), a generic array logic (English: Generic Array Logic, abbreviated: GAL) or any combination thereof.
[0159] The memory 703 may include but is not limited to a content-addressable memory (CAM), such as a ternary content-addressable memory (TCAM), or a random-access memory (RAM).
[0160] The network interface 702 may include a common physical interface, which may be an Ethernet interface or an Asynchronous Transfer Mode (ATM) interface. The processor 701, the network interface 702 and the memory 703 may be integrated into one or more independent circuits or hardware, such as ASIC.
[0161] The memory 703 can be used to store the program code and data of the first network device 700, and the processor 701 is used to call the program instructions in the memory 703 to execute the method shown in the above embodiment. The specific execution steps can be referred to the above embodiment and will not be repeated here.
[0162] See also Figure 8 , a schematic diagram of a structure of a second network device 800 provided in an embodiment of the present application. The second network device 800 provided in this embodiment can be applied to Figure 2 , Figure 3 or Figure 4 In the method of the embodiment, the function of the second network device is realized. The second network device 700 can be Figure 2 , Figure 3 or Figure 4 The second network device in the embodiment. The second network device 800 includes a processor 801, a network interface 802, a memory 803 and. The processor 801 includes but is not limited to one or more of a CPU, an NP, an ASIC or a PLD. The PLD may be a CPLD, an FPGA, a GAL or any combination thereof.
[0163] The memory 803 may be, but is not limited to, a CAM, such as a TCAM or a RAM.
[0164] The network interface 802 may include a common physical interface, which may be an Ethernet interface or an ATM interface. The processor 801, the network interface 802 and the memory 803 may be integrated into one or more independent circuits or hardware, such as ASIC.
[0165] The memory 803 can be used to store the program code and data of the second network device 800, and the processor 801 is used to call the program instructions in the memory 803 to execute the method shown in the above embodiment. The specific execution steps can be referred to the above embodiment and will not be repeated here.
[0166] See also Fig. 9 The embodiment of the present application provides a routing detection system 900, the system comprising: a first network device 901, a second network device 902 and a third network device 903, wherein:
[0167] The second network device 902 is used to establish a first BGP session with the first network device 901, and send a first BGP route set to the first network device 901, where the first BGP route set includes one or more BGP routes sent by the second network device 902 to the third network device 903, and a BGP neighbor has been established between the third network device 903 and the second network device 902;
[0168] The third network device 903 is used to establish a second BGP session with the first network device 903, and send a second BGP route set to the first network device 901, where the second BGP route set includes one or more BGP routes received by the third network device 903 from the second network device 902;
[0169] The first network device 901 is used to receive a first BGP route set sent by the second network device 902 through a first BMP session; receive a second BGP route set sent by the third network device 903 through a second BMP session; when the first network device 901 detects that the first BGP route exists in the second BGP route set and the first BGP route does not exist in the first BGP route set, the first network device 901 determines that the first BGP route is an unavailable route.
[0170] Optionally, the first network device 901 may be Figure 2 , Figure 3 , Figure 4 , Figure 5 or Figure 7 In the embodiment shown, the first network device and the second network device 902 may be Figure 2 , Figure 3 , Figure 4 , Figure 6 or Figure 8 In the embodiment shown, the second network device and the third network device 903 may be Figure 2 , Figure 3 or Figure 4 A third network device in the illustrated embodiment.
[0171] See also Fig.10 , combined with Figure 1 In the application scenario shown, the present application embodiment provides a third network device 1000, wherein Fig.10 The third network device 1000 may execute Figure 3 The third network device 1000 can be Figure 2 , Figure 3 or Figure 4 The third network device 1000 includes:
[0172] An establishing unit 1001 is used to establish a BMP session with a first network device;
[0173] A generating unit 1002 is configured to generate a BMP message, where the BMP message includes a second BGP route set, where the second BGP route set includes one or more BGP routes received by the third network device from the second network device, and a BGP neighbor has been established between the third network device and the second network device;
[0174] The sending unit 1003 is configured to send the BMP message to the first network device through the BMP session; the second BGP route in the second BGP route set includes attribute information, the second BGP route is any BGP route in the second BGP route set, and the attribute information includes one or more of the following information:
[0175] priority information used to identify the priority of the second BGP route;
[0176] Status information for identifying the status of the second BGP route in the RIB in the third network device;
[0177] Indication information used to identify whether the second BGP route is sent to the forwarding information base FIB;
[0178] Used to identify the state information after the second BGP routing information is sent to the FIB.
[0179] See also Fig.11 , a schematic diagram of the structure of a third network device 1100 provided in an embodiment of the present application. The third network device 1100 provided in this embodiment can be applied to Figure 3 In the method of the embodiment, the function of the third network device is realized. The third network device 1100 can be Figure 2 , Figure 3 or Figure 4 The third network device 1100 includes a processor 1101, a network interface 1102, and a memory 1103. The processor 1101 includes but is not limited to one or more of a CPU, an NP, an ASIC, or a PLD. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
[0180] The memory 1103 may be, but is not limited to, a CAM, such as a TCAM or a RAM.
[0181] The network interface 1102 may include a common physical interface, which may be an Ethernet interface or an ATM interface. The processor 1101, the network interface 1102 and the memory 1103 may be integrated into one or more independent circuits or hardware, such as ASIC.
[0182] The memory 1103 can be used to store program codes and data of the second network device 1100. The processor 1101 is used to call program instructions in the memory 1103 to execute the method shown in the above embodiment. The specific execution steps can be referred to the above embodiment and will not be repeated here.
[0183] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium can be at least one of the following media: various media that can store program codes, such as read-only memory (ROM), RAM, magnetic disk or optical disk.
[0184] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application and the beneficial effects brought about by the present application have been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the claims of the present application.
Claims
1. A method for route detection, characterized in that: The method comprises: The first network device establishes a first Border Gateway Protocol Monitoring Protocol BMP session with the second network device, and the first network device establishes a second BMP session with the third network device; The first network device receives a first Border Gateway Protocol (BGP) route set sent by the second network device through the first BGP session, wherein the first BGP route set includes one or more BGP routes sent by the second network device to the third network device, and a BGP neighbor relationship has been established between the third network device and the second network device; The first network device receives a second BGP route set sent by the third network device through the second BGP session, where the second BGP route set includes one or more BGP routes received by the third network device from the second network device; The first network device performs BGP route monitoring according to the first BGP route set and the second BGP route set.
2. The method according to claim 1, characterized in that: The first network device performing BGP route monitoring according to the first BGP route set and the second BGP route set includes: When the first network device detects that the second BGP route set has a first BGP route, and the first BGP route set does not have the first BGP route, the first network device determines that the first BGP route is an unavailable route, or When the first network device detects that the second BGP route set does not contain the first BGP route, and the first BGP route exists in the first BGP route set, the first network device determines that the first BGP route is an unavailable route.
3. The method according to claim 1 or 2, characterized in that: After the first network device determines that the first BGP route is an unavailable route, the method further includes: The first network device identifies the first BGP route as an unavailable route, and sends the first BGP route identified as an unavailable route to the third network device.
4. The method according to claim 1 or 2, characterized in that: The second BGP route in the second BGP route set includes attribute information, where the second BGP route is any one of the BGP routes in the second BGP route set, and the attribute information includes one or more of the following information: BGP route priority information; BGP routing state information in the RIB in the third network device; Indication information on whether the BGP route is delivered to the routing table; Status information after BGP routes are sent to the FIB; Indicates whether BGP routes are used for route selection.
5. The method according to claim 4, characterized in that The priority information identifies the priority of the BGP route when performing path selection or message forwarding.
6. The method according to claim 4, characterized in that The priority information indicates whether the BGP route is a primary path or a backup path.
7. The method according to claim 4, characterized in that The state information of the BGP route in the RIB in the third network device indicates that the BGP route cannot be used for route selection or cannot be used to guide message forwarding.
8. The method according to claim 4, characterized in that The indication information of whether the BGP route is sent to the routing table includes indication information indicating that the BGP route is not sent to the routing table.
9. The method according to claim 4, characterized in that The routing table includes a forwarding information base FIB or a routing information base RIB.
10. The method according to claim 4, characterized in that The indication information of whether the BGP route is used for route selection includes indication information indicating that the BGP route is not used for route selection.
11. The method according to claim 1 or 2, characterized in that: The one or more BGP routes are contained in an outbound adjacent routing information base Adj-RIB-Out of the second network device.
12. The method according to claim 1 or 2, characterized in that: The first network device is a controller or a server.
13. A method for route detection, characterized in that: The method comprises: The second network device establishes a Border Gateway Protocol Monitoring Protocol BMP session with the first network device; The second network device generates a BMP message, the BMP message includes a BGP route set, the BGP route set includes one or more BGP routes sent by the second network device to the third network device, a BGP neighbor has been established between the third network device and the second network device, the one or more BGP routes are routes in an outbound adjacent routing information base Adj-RIB-Out of the second network device, and the one or more BGP routes include attribute information; The second network device sends the BMP message to the first network device through the BMP session to trigger the first network device to detect the BGP routes in the BGP route set in the BMP message.
14. The method according to claim 13, characterized in that The attribute information includes one or more of the following information: BGP route priority information; BGP routing state information in the RIB in the third network device; Indication information on whether the BGP route is delivered to the routing table; Status information after BGP routes are sent to the FIB; Indicates whether BGP routes are used for route selection.
15. The method according to claim 14, characterized in that The priority information identifies the priority of the BGP route when performing path selection or message forwarding.
16. The method according to claim 14 or 15, characterized in that The priority information indicates whether the BGP route is a primary path or a backup path.
17. The method according to claim 14 or 15, characterized in that The state information of the BGP route in the RIB in the third network device indicates that the BGP route cannot be used for route selection or cannot be used to guide message forwarding.
18. The method according to claim 14 or 15, characterized in that The indication information of whether the BGP route is sent to the routing table includes indication information indicating that the BGP route is not sent to the routing table.
19. The method according to claim 14 or 15, characterized in that The routing table includes a forwarding information base FIB or a routing information base RIB.
20. The method according to claim 14 or 15, characterized in that The indication information of whether the BGP route is used for route selection includes indication information indicating that the BGP route is not used for route selection.
21. The method according to claim 14 or 15, characterized in that The one or more BGP routes are contained in an inbound adjacent routing information base Adj-RIB-In of the second network device.
22. The method according to claim 14 or 15, characterized in that The first network device is a BMP client.
23. A first network device, characterized in that: include: processor and memory, The memory is used to store program instructions; The processor is used to call the program instructions in the memory to trigger the first network device to execute the method of any one of claims 1-12.
24. A second network device, characterized in that: include: processor and memory, The memory is used to store program instructions; The processor is used to call the program instructions in the memory to trigger the second network device to execute the method of any one of claims 13-22.
Citation Information
Patent Citations
Fault-tolerant multicasting network
US20040111606A1
Method and apparatus for achieving border gateway protocol convergence using alternate route information
US20070162614A1