A method for processing routing and network equipment
By setting timers in the BMP server to manage and delete stored BGP routing information, the problem of wasting storage resources on the BMP server is solved, and timely updates of network topology and accuracy of message forwarding paths are achieved.
Patent Information
- Application Number
- CN202010706860.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2016-12-28
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2036-12-28
AI Technical Summary
When the BMP session between the network device and the BMP server is disconnected, the BMP server cannot process the stored BGP routing information in a timely manner, resulting in a waste of storage resources.
The BMP server starts a timer that is longer than the time interval for the network device to periodically send BMP messages through a BMP session. After the timeout, the stored BGP routing information is deleted, and the timer is restarted when a BMP message is received to ensure continuous monitoring.
This prevents the BMP server from always storing BGP routing information of network devices, saves storage resources, and enables the BMP server to update the network topology in a timely manner and accurately update the packet forwarding path.
Smart Images

Figure CN112039769B_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 28, 2016, application number 201611239135.9, and invention name “A method and network device for processing routing”. Technical Field
[0002] The embodiments of the present application relate to the field of communication technology, and in particular to a method for processing routing and a network device. Background Art
[0003] The Border Gateway Protocol (BGP) Monitoring Protocol (BGP MonitoringProtocol, BMP) server can monitor the BGP operating status of devices in the network in real time, and the BGP operating status includes the establishment and termination of peer relationships. In addition, the network device will periodically send the BGP routes stored in the network device to the BMP server. Furthermore, the BMP server can also monitor the BGP routing information of the network device. However, in the prior art, when the BMP session between the network device and the BMP server is disconnected, the BMP server cannot process the BGP routes stored in the BMP server in a timely manner, resulting in a waste of storage resources of the BMP server. Summary of the invention
[0004] The embodiment of the present application provides a method for processing routing, which is used to solve the technical problem of storage resource waste of BMP servers in the prior art.
[0005] In a first aspect, an embodiment of the present application provides a method for routing processing, the method comprising:
[0006] The BMP server establishes a BMP session with the network device. The BMP server receives and stores the BGP routing information sent by the network device through the BMP session. In response to receiving the BGP routing information, the BMP server starts a timer, and the duration of the timer is greater than the time interval of the BMP messages periodically sent by the network device to the BMP server through the BMP session. The time interval is the time difference between two adjacent BMP messages sent by the network device to the BMP server, and the BMP message includes the BGP routing information sent by the network device to the BMP server. When the timer times out, the BMP server deletes the BGP routing information received from the network device and stored by the BMP server, and the duration from starting the timer to the timeout of the timer is equal to the duration.
[0007] The BMP server starts a timer and sets the timer duration to be greater than the time interval for the network device to periodically send BMP messages to the BMP server through the BMP session. After the timer times out, the BMP server deletes the BGP routing information of the network device stored in the BMP server. That is to say, when the BMP server does not periodically receive the BMP message sent by the network device, the BMP server deletes the BGP routing information of the network device, thereby avoiding the technical problem that the BMP server has been storing the BGP routing information of the network device, causing a waste of BMP server storage resources. In addition, the BMP server can also enable the BMP server to update the network topology in a timely manner by deleting the BGP routing of the network device in a timely manner, so as to accurately update the forwarding path and realize the normal forwarding of the message.
[0008] In one possible design, the method further includes:
[0009] When the BMP server receives the BMP message, it restarts the timer. If the timer does not time out, and a BMP message is received from a network device, the BMP server resets the timer, which is equivalent to restarting the timer and restarting the timing, ensuring that the timer does not time out when the BMP server can periodically receive the BMP message sent by the network device, and the BMP server does not delete the BGP routing information of the network device, so that the BMP server can monitor the BGP routing information of the network device normally when it can periodically receive the BMP message sent by the network device.
[0010] In one possible design, the BMP message is a BMP route monitoring (Route Monitoring) message.
[0011] In one possible design, the method further includes:
[0012] The BMP server receives the message of disabling the BMP capability of the network device sent by the network device. After receiving the message of disabling the BMP capability of the network device, the BMP server cancels the BGP route monitoring of the network device. The network device disables the BMP capability, which means that the network device no longer needs the BMP server to monitor the BGP route of the network device. After the BMP server receives the message of disabling the BMP capability of the network device, the BGP route monitoring of the network device is canceled, that is, the BMP server deletes the BGP route information received from the network device, which can save the storage resources of the BMP server. In addition, the BMP server can delete the BGP route of the network device in time, so that the BMP server can update the network topology in time, so as to accurately update the forwarding path and realize the normal forwarding of the message.
[0013] In a second aspect, an embodiment of the present application provides a method for processing routing, the method comprising:
[0014] The network device establishes a BMP session with the BMP server. The network device sets an identifier for the routes introduced into the private network routing table of the network device. When generating the first BMP message, the network device traverses the private network routing table and adds the routes with the identifier set to the first BMP message. The network device sends the first BMP message to the BMP server through the BMP session to trigger the BMP server to monitor the routes in the BMP message. By setting a special identifier for the routes introduced into the private network routing table, when the network device sends BGP routes to the BMP server, it will also send the routes with the special identifier set to the BMP server, so that the BMP server can monitor the routes introduced into the private network routing table. Thereby, the BMP server is implemented to accurately monitor the BGP routes of the network device.
[0015] In one possible design, the routes introduced into the private network routing table of the network device include:
[0016] The private network route sent to the network device by a customer edge (CE) device connected to the network device; or, the private network route sent to the network device by a backbone network edge (Provider Edge, PE) device that establishes a BGP neighbor relationship with the network device, or, the public network route stored in the network device.
[0017] In one possible design, the method further includes:
[0018] When the network device disables the BMP capability, a second BMP message is sent to the BMP server, wherein the second BMP message includes indication information that the network device has disabled the BMP capability, so as to trigger the BMP server to delete the BGP routing information sent by the network device and stored in the BMP server.
[0019] In a third aspect, an embodiment of the present application provides a method for processing routing, including:
[0020] When the network device disables the BMP capability, a BMP message is generated, wherein the BMP message includes indication information that the network device has disabled the BMP capability;
[0021] The network device sends the BMP message to the BMP server to trigger the BMP server to delete the BGP routing information stored by the BMP server and received from the network device.
[0022] The network device disables the BMP capability, which means that the network device no longer needs the BMP server to monitor the BGP routes of the network device. The network device actively notifies the BMP server that the network device has disabled the BMP capability. After receiving the message of disabling the BMP capability of the network device, the BMP server cancels the BGP route monitoring of the network device, that is, the BMP server deletes the BGP route information received from the network device, which can save the storage resources of the BMP server.
[0023] In a fourth aspect, an embodiment of the present application provides a BMP server, wherein the BMP server includes:
[0024] An establishing unit, for establishing a BMP session with a network device. A receiving unit, for receiving BGP routing information sent by the network device through the BMP session established by the establishing unit. A storage unit, for storing the BGP routing information received by the receiving unit. A timer unit, for starting a timer in response to receiving the BGP routing information, wherein the duration of the timer is greater than the time interval of BMP messages periodically sent by the network device to the BMP server through the BMP session, wherein the time interval is the time difference between two adjacent BMP messages sent by the network device to the BMP server, and the BMP message includes the BGP routing information sent by the network device to the BMP server. A processing unit, for deleting the BGP routing information stored in the BMP server when the timer times out, wherein the duration from starting the timer to the timeout of the timer is equal to the duration.
[0025] In one possible design, the processing unit is also used to restart the timer when the BMP message is received.
[0026] In a possible design, the receiving unit is further used to receive a message sent by the network device to disable the BMP capability of the network device. The processing unit is further used to cancel the BGP route monitoring of the network device after the receiving unit receives the message to disable the BMP capability of the network device.
[0027] In a fifth aspect, an embodiment of the present application provides a network device, the network device comprising:
[0028] An establishing unit is used to establish a BMP session with a BMP server. A setting unit is used to set an identifier for the route introduced into the private network routing table of the network device. A processing unit is used to traverse the private network routing table when generating a first BMP message, and add the route with the identifier set to the first BMP message. A sending unit is used to send the first BMP message to the BMP server through the BMP session to trigger the BMP server to monitor the route in the BMP message.
[0029] In one possible design, the sending unit is further used to send a second BMP message to the BMP server when the network device disables the BMP capability, so as to trigger the BMP server to cancel monitoring of the BGP route of the network device.
[0030] In a sixth aspect, an embodiment of the present application provides a network device, the network device comprising:
[0031] The generating unit is used to generate a BMP message when disabling the BMP capability, wherein the BMP message includes indication information that the BMP capability of the network device has been disabled. The sending unit is used to send the BMP message to the BMP server to trigger the BMP server to delete the BGP routing information received from the network device and stored by the BMP server.
[0032] In a seventh aspect, an embodiment of the present application provides a system for routing processing, the system comprising: a BMP server and a network device, wherein:
[0033] The network device is used to establish a BMP session with the BMP server, set an identifier for the route introduced into the private network routing table of the network device, traverse the private network routing table when generating a first BMP message, add the route with the identifier set to the first BMP message, and send the first BMP message to the BMP server through the BMP session. The BMP server is used to receive the first BMP message sent by the network device, store the routing information in the first BMP message, and monitor the stored routing information.
[0034] In one possible design, the network device is further used to send a second BMP message to the BMP server when the network device disables the BMP capability, and the second BMP message includes indication information that the network device has disabled the BMP capability. The BMP server is also used to receive the second BMP message, and after determining that the second BMP message includes the information that the network device has disabled the BMP capability based on the indication information, delete the BGP routing information sent by the network device stored in the BMP server.
[0035] In an eighth aspect, an embodiment of the present application provides a BMP server, wherein the BMP server network device 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.
[0036] In the ninth aspect, an embodiment of the present application provides a 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 steps in the method of the second aspect or the third aspect.
[0037] In the tenth aspect, a computer-readable storage medium is provided for storing computer software instructions used for the above-mentioned BMP server or network device, which includes a program designed for executing the above-mentioned aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] 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.
[0039] Figure 1 A schematic diagram of an application scenario of a method for processing routing provided in an embodiment of the present application;
[0040] Figure 2 A flowchart of a method for processing routing provided in an embodiment of the present application;
[0041] Figure 3 A flowchart of another method for processing routing provided in an embodiment of the present application;
[0042] Figure 4 A flowchart of another method for processing routing provided in an embodiment of the present application;
[0043] Figure 5 A schematic diagram of the structure of a BMP server provided in an embodiment of the present application;
[0044] Figure 6 A schematic diagram of the structure of a network device provided in an embodiment of the present application;
[0045] Figure 7 A schematic diagram of the structure of another network device provided in an embodiment of the present application;
[0046] Figure 8 A schematic diagram of the structure of another BMP server provided in an embodiment of the present application;
[0047] Fig. 9 A schematic diagram of the structure of another network device provided in an embodiment of the present application;
[0048] Fig.10 A schematic diagram of the structure of another network device provided in an embodiment of the present application;
[0049] Fig.11 A schematic diagram of a system for processing routing provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] The embodiments of the present invention are described below in conjunction with the accompanying drawings.
[0051] See also Figure 1 , Figure 1 A schematic diagram of an application scenario of a method for processing routing provided in an embodiment of the present application. The network scenario includes: a BMP server 101, a network device 102, a network device 103, a network device 104, and a network device 105. Network device 102 and network device 103 are backbone network edge (Provider Edge, PE) devices in the backbone network, and each supports BMP. Network device 104 and network device 105 are user edge (Customer Edge, CE) devices connected through the backbone network and do not support BMP. After the second network device enables the BMP function, a first BMP session is established between the BMP server 101 and the network device 102. After the network device 103 enables the BMP function, a second BMP session is established between the BMP server 101 and the network device 103. A BGP neighbor is established between network device 102 and network device 103. Network device 102 sends BGP routes to network device 103 through BGP, and stores the sent BGP routes in the RIB (Adjacency-routing information base-output, Adj-RIB-Out) sent by the neighbor of network device 102. Network device 103 stores the BGP routes received from network device 102 in the RIB (Adjacency-routing information base-input, Adj-RIB-In) received from the neighbor of network device 103.
[0052] Network device 102 will send the BGP routes in network device 102 to BMP server 101 through the first BMP session via the first session, and BMP server 101 will monitor the BGP route information received from network device 102. Network device 103 will send the BGP routes in network device 103 to BMP server 101 through the second BMP session via the second session, and BMP server 101 will monitor the BGP route information received from network device 103. When a connection failure occurs between network device 102 or network device 103 and BMP server 101, for example, the first BMP session or the second BMP session is disconnected, at this time, BMP server 101 will not be able to normally monitor and process the BGP routes sent by network device 102 and network device 103 that are stored. In addition, when the BMP function is disabled on network device 102 or network device 103, network device 102 or network device 103 can no longer send BMP messages to the BMP service. At this time, the BMP server 101 will not be able to normally monitor and process the BGP routes sent by the stored network devices 102 and 103. In the above case, the storage resources of the BMP server 101 will be wasted.
[0053] 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 1 The BMP server 101 may be a controller in a control-forwarding separation network architecture, and the network device 102, the network device 103, the network device 104 and the network device 105 may be forwarders in the control-forwarding separation network architecture.
[0054] See also Figure 2 , combined with Figure 1 In the application scenario shown, an embodiment of the present application provides a method for processing routing, the method comprising:
[0055] 201. The BMP server establishes a BMP session with the network device.
[0056] 202. The BMP server receives and stores the BGP routing information sent by the network device through the BMP session.
[0057] 203. In response to receiving the BGP routing information, the BMP server starts a timer, and the duration of the timer is greater than the time interval for the network device to periodically send BMP messages to the BMP server through the BMP session. The time interval is the time difference between two adjacent BMP messages sent by the network device to the BMP server. The BMP message includes the BGP routing information sent by the network device to the BMP server.
[0058] 204. When the timer times out, the BMP server deletes the BGP routing information received from the network device and stored by the BMP server, and the duration from starting the timer to the timer timing out is equal to the duration.
[0059] Optionally, the BMP server may be a controller in a control-forwarding separation network architecture, the controller supports BMP and has the function of a BMP server. The network device may be a forwarder in a control-forwarding separation network architecture and supports BMP.
[0060] The network device will periodically send BMP messages to the BMP server to update the BGP routes of the network device stored in the BMP server. For example, the network device sends BMP messages to the BMP server every 300 seconds. In this case, the timer can be set to be greater than 300 seconds, such as 400 seconds. If the timer has not received a BMP message after 400 seconds from the start, it is considered that the network device has been disconnected from the BMP server. At this time, the BGP routes received from the network device stored on the BMP server can be deleted.
[0061] Optionally, when the BMP server receives the BMP message, it restarts the timer.
[0062] Before the timer times out, the BMP server receives a BMP message sent from a network device, and the BMP server resets the timer, which is equivalent to restarting the timer and starting the timing again, ensuring that the timer does not time out when the BMP server can periodically receive BMP messages sent by the network device, and the BMP server does not delete the BGP routing information of the network device, thereby ensuring that the BGP routing information of the network device can be monitored normally in this case.
[0063] Optionally, the BMP message is a BMP Route Monitoring message. The format of the BMP Route Monitoring message can be specifically referred to Request For Comments (RFC) 7854.
[0064] Optionally, the BMP server receives a message of disabling the BMP capability of the network device sent by the network device. After receiving the message of disabling the BMP capability of the network device, the BMP server cancels the BGP route monitoring of the network device. The network device disables the BMP capability, which means that the network device no longer needs the BMP server to monitor the BGP routes of the network device. After the BMP server receives the message of disabling the BMP capability of the network device, it cancels the BGP route monitoring of the network device, that is, the BMP server deletes the BGP route information received from the network device, which can save the storage resources of the BMP server. In addition, the BMP server can delete the BGP route of the network device in a timely manner, so that the BMP server can update the network topology in a timely manner, so as to accurately update the forwarding path and realize the normal forwarding of the message.
[0065] Optionally, in the above solution, before determining that the timer times out, the method may further include:
[0066] The BMP server determines the number of timer timeouts. The above scheme can be that when the BMP server determines that the number of timer timeouts exceeds a specific value, the BMP server deletes the BGP routing information stored by the BMP server and received from the network device. For example, the specific value is 1, that is, when the BMP server determines that the timer has timed out once, and determines that the timer has timed out again, the BGP routing information stored by the BMP server and received from the network device is deleted. Through this implementation method, while being able to effectively save the storage resources of the BMP server, the BGP routing of the network device can be more accurately monitored. For example, when a temporary failure occurs in the BMP session between the network device and the BMP server, one BMP message may be lost in this process. In this process, the BMP server does not need to delete the BGP routing of the network device. After the BMP session is restored, it can continue to monitor the BGP routing of the network device, thereby avoiding the waste of network resources caused by frequent deletion and storage of the BGP routing of the network device.
[0067] In the above technical solution, the BMP server sets a timer, and the timer duration is greater than the time interval for the network device to periodically send BMP messages to the BMP server through the BMP session. After the timer times out, the BGP routing information of the network device stored in the BMP server is deleted. That is to say, when the BMP server does not periodically receive the BMP message sent by the network device, the BGP routing information of the network device is deleted, thereby avoiding the technical problem that the BMP server always stores the BGP routing information of the network device, causing waste of BMP server storage resources. In addition, the BMP server can delete the BGP routing of the network device in a timely manner, and can also enable the BMP server to update the network topology in a timely manner, accurately update the forwarding path, and realize the normal forwarding of the message.
[0068] See also Figure 3 , combined with Figure 1 In the application scenario shown, an embodiment of the present application provides a method for routing processing, the method comprising:
[0069] 301, the network device establishes a BMP session with the BMP server;
[0070] 302, the network device sets an identifier for the route introduced into the private network routing table of the network device;
[0071] 303, when generating a first BMP message, the network device traverses the private network routing table and adds the route with the identifier set to the first BMP message;
[0072] 304. The network device sends the first BMP message to the BMP server through the BMP session to trigger the BMP server to monitor the routing information in the BMP message.
[0073] In the prior art, the BGP routes sent by network devices to the BMP server can only be the BGP routes learned from neighbors, and the BMP server cannot monitor the routes introduced into the private network routing table. Through the above technical solution, a special identifier is set for the routes introduced into the private network routing table. When the network device sends the BGP route to the BMP server, it traverses the private network routing table and sends the routes with the special identifier to the BMP server. In this way, the BMP server can monitor the routes introduced into the private network routing table. In this way, the BMP server can monitor the routes introduced into the private network routing table comprehensively and accurately.
[0074] Optionally, the method further comprises:
[0075] When the network device disables the BMP capability, a second BMP message is sent to the BMP server to trigger the BMP server to cancel the monitoring of the BGP routes of the network device. The network device disables the BMP capability, which means that the network device no longer needs the BMP server to monitor the BGP routes of the network device. After the BMP server receives the message of disabling the BMP capability of the network device, the BGP route monitoring of the network device is canceled, that is, the BMP server deletes the BGP route information received from the network device, which can save the storage resources of the BMP server. In addition, the BMP server can also enable the BMP server to update the network topology in time by deleting the BGP routes of the network device in time, so as to accurately update the forwarding path and realize the normal forwarding of the message.
[0076] Optionally, the routes introduced into the private network routing table of the network device include:
[0077] The private network route sent to the network device by the user edge CE device connected to the network device; or the private network route sent to the network device by the backbone network edge PE device that establishes a Border Gateway Protocol (BGP) neighbor with the network device, or the public network route stored in the network device. The private network to which the route introduced into the private network routing table of the network device belongs may be different from the private network corresponding to the private network routing table. Figure 1 For example, network device 104 belongs to virtual private network (VPN) A, network device 105 belongs to VPN B, network device 102 stores a private network routing table for VPN A and a private network routing table for VPN B. In some application scenarios, network device 102 needs to introduce the private network routes belonging to VPN A received from network device 104 into the routing table of VPN B. At this time, it is necessary to set a special flag for the private network routes belonging to VPN A introduced into the routing table of VPN B, so that when network device 102 sends BGP routes to the BMP server, the private network routes belonging to VPN A with the special flag set will also be sent to the BMP server. In other words, through the above solution, when cross-referencing between different VPN routes, the BMP server can also monitor the private network routes.
[0078] Optionally, the BMP server monitors the routing information in the BMP message including the following:
[0079] The BMP server obtains attribute information in each BGP route, which may include:
[0080] Priority information used to identify the priority of a BGP route;
[0081] Status information used to identify the status of BGP routes in the RIB of a network device;
[0082] Indication information used to identify whether the BGP route is delivered to the FIB;
[0083] Used to identify the status information of BGP routes after they are delivered to the FIB.
[0084] The priority information of BGP routes can identify the priority of BGP routes when performing path selection or message forwarding, so that the BMP server can plan forwarding paths more efficiently according to the priority information. The status information of BGP routes in the Routing Information Base (RIB) can identify the status of BGP routes in the RIB of the network device. If the status of BGP routes in the RIB is inactive, the BGP routes cannot be used for route selection or guiding message forwarding. The indication information of BGP routes can identify whether the BGP routes have been sent to the Forwarding Information Base (FIB) of the network device. If the indication information indicates that the BGP routes have not been sent to the FIB, the BGP routes cannot be used for route selection or guiding message forwarding. The status information of BGP routes sent to the FIB can identify the status of BGP routes in the FIB. If the status of BGP routes in the FIB is unavailable, the BGP routes cannot be used for route selection or guiding message forwarding.
[0085] See also Figure 4 , combined with Figure 1 In the application scenario shown, an embodiment of the present application provides a method for processing routing, the method comprising:
[0086] 401. When a network device disables the BMP capability, a BMP message is generated, where the BMP message includes indication information that the network device has disabled the BMP capability.
[0087] 402. The network device sends the BMP message to the BMP server to trigger the BMP server to delete the BGP routing information received from the network device and stored by the BMP server.
[0088] When the network device disables the BMP capability, a second BMP message is sent to the BMP server to trigger the BMP server to cancel the monitoring of the BGP routes of the network device. The network device disables the BMP capability, which means that the network device no longer needs the BMP server to monitor the BGP routes of the network device. After the BMP server receives the message of disabling the BMP capability of the network device, the BGP route monitoring of the network device is canceled, that is, the BMP server deletes the BGP route information received from the network device, which can save the storage resources of the BMP server.
[0089] See also Figure 5 , combined with Figure 1 In the application scenario shown in FIG. 1 , the present application embodiment provides a BMP server 500, wherein Figure 5 The BMP server 500 in can execute Figure 2 In the method of the embodiment shown, the BMP server 500 may be Figure 2 , Figure 3 or Figure 4 The BMP server in the embodiment. The BMP server 500 includes:
[0090] An establishing unit 501 is used to establish a BMP session with a network device;
[0091] A receiving unit 502, configured to receive BGP routing information sent by the network device through the BMP session established by the establishing unit 501;
[0092] The storage unit 503 is used to store the BGP routing information received by the receiving unit 502;
[0093] A timer unit 504 is used to start a timer in response to receiving the BGP routing information, wherein the duration of the timer is greater than a time interval for the network device to periodically send a BMP message to the BMP server through a BMP session, wherein the time interval is a time difference between two adjacent BMP messages sent by the network device to the BMP server, and the BMP message includes the BGP routing information sent by the network device to the BMP server;
[0094] The processing unit 505 is used to delete the BGP routing information stored in the BMP server when the timer times out, and the duration from starting the timer to the timer timing out is equal to the duration.
[0095] Optionally, the processing unit 505 is further configured to restart the timer when receiving the BMP message.
[0096] Optionally, the receiving unit 502 is further configured to receive a message of disabling the BMP capability of the network device sent by the network device;
[0097] The processing unit 505 is further configured to cancel BGP route monitoring of the network device after the receiving unit 502 receives the message of disabling the BMP capability of the network device.
[0098] See also Figure 6 , combined with Figure 1 In the application scenario shown, the present application embodiment provides a network device 600, wherein Figure 6 The network device 600 in the embodiment may execute Figure 3 The network device 600 may be Figure 2 or Figure 3 The network device 600 includes:
[0099] An establishing unit 601 is used to establish a BMP session with a BMP server;
[0100] A setting unit 602, configured to set an identifier for a route introduced into a private network routing table of the network device;
[0101] The processing unit 603 is configured to, when generating a first BMP message, traverse the private network routing table and add the route with the identifier set to the first BMP message;
[0102] The sending unit 604 is configured to send the first BMP message to the BMP server through the BMP session to trigger the BMP server to monitor the route in the BMP message.
[0103] Optionally, the sending unit 604 is further configured to send a second BMP message to the BMP server when the network device 600 disables the BMP capability, so as to trigger the BMP server to cancel monitoring of the BGP route of the network device.
[0104] See also Figure 7 , combined with Figure 1 In the application scenario shown, the present application embodiment provides a network device 700, wherein Figure 7 The network device 700 in the embodiment may execute Figure 5 The network device 700 may be Figure 2 , Figure 3 or Figure 4 The network device 700 includes:
[0105] The generating unit 701 is used to generate a BMP message when the network device 700 disables the BMP capability, wherein the BMP message includes indication information that the network device has disabled the BMP capability;
[0106] The sending unit 702 is used to send the BMP message to the BMP server to trigger the BMP server to delete the BGP routing information received from the network device and stored by the BMP server.
[0107] See also Figure 8 , a BMP server 800 provided in an embodiment of the present application, wherein Figure 8 The BMP server 800 in can execute Figure 2 The method of the embodiment shown. The BMP server 800 can be Figure 2 or Figure 3 BMP server in the embodiment. BMP server 800 includes a processor 801, a network interface 802 and a memory 803. Processor 801 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.
[0108] The memory 803 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).
[0109] The network interface 802 may include a common physical interface, which may be an Ethernet interface or an Asynchronous Transfer Mode (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.
[0110] The memory 803 can be used to store the program code and data of the BMP server 800, and the processor 801 is used to call the program instructions in the memory 803 to execute Figure 2 The specific execution steps of the method shown in the embodiment can be found in the aforementioned embodiment and will not be repeated here.
[0111] See also Fig. 9 , a schematic diagram of a structure of a network device 900 provided in an embodiment of the present application. The network device 900 provided in this embodiment can be applied to Figure 3 In the method of the embodiment shown, the function of the network device is realized. The network device 900 can be Figure 2 or Figure 3 The network device in the embodiment. The network device 900 includes a processor 901, a network interface 902, and a memory 903. The processor 901 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.
[0112] The memory 903 may be, but is not limited to, a CAM, such as a TCAM or a RAM.
[0113] The network interface 902 may include a common physical interface, which may be an Ethernet interface or an ATM interface. The processor 901, the network interface 902 and the memory 903 may be integrated into one or more independent circuits or hardware, such as ASIC.
[0114] The memory 903 can be used to store program codes and data of the network device 900, and the processor 901 is used to call the program instructions in the memory 903 to execute Figure 3 The specific execution steps of the method in the illustrated embodiment can be referred to the aforementioned embodiment and will not be described in detail here.
[0115] See also Fig.10 , a schematic diagram of the structure of a network device 1000 provided in an embodiment of the present application. The network device 1000 provided in this embodiment can be applied to Figure 4 In the method of the embodiment shown, the function of the network device is realized. The network device 1000 can be Figure 2 , Figure 3 or Figure 4The network device in the embodiment. The network device 1000 includes a processor 1001, a network interface 1002, and a memory 1003. The processor 1001 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.
[0116] The memory 1003 may be, but is not limited to, a CAM, such as a TCAM or a RAM.
[0117] The network interface 1002 may include a common physical interface, which may be an Ethernet interface or an ATM interface. The processor 1001, the network interface 1002 and the memory 1003 may be integrated into one or more independent circuits or hardware, such as ASIC.
[0118] The memory 1003 can be used to store program codes and data of the network device 1000, and the processor 1001 is used to call the program instructions in the memory 1003 to execute Figure 4 The specific execution steps of the method in the illustrated embodiment can be referred to the aforementioned embodiment and will not be described in detail here.
[0119] See also Fig.11 , the embodiment of the present application provides a routing detection system 1100, the system comprising: a network device 1101 and a BMP server 1102, wherein,
[0120] The network device 1101 is used to establish a BMP session with the BMP server 1102, set an identifier for the route introduced into the private network routing table of the network device, generate a first BMP message, the first BMP message includes a Border Gateway Protocol BGP routing information set, the BGP routing information set includes the route in the private network routing table to which the identifier is added, and send the first BMP message to the BMP server through the BMP session;
[0121] The BMP server 1102 is used to receive the first BMP message sent by the network device 1101, store the routing information in the BGP routing information set in the first BMP message, and monitor the routing information in the BGP routing information set.
[0122] Optionally, the network device 1101 is further configured to send a second BMP message to the BMP server 1002 when the network device 1101 disables the BMP capability, wherein the second BMP message includes indication information that the network device has disabled the BMP capability;
[0123] The BMP server 1102 is further configured to receive the second BMP message, and after determining according to the indication information that the second BMP message includes information indicating that the network device has disabled the BMP capability, delete the BGP routing information sent by the network device 1101 stored in the BMP server 1102.
[0124] Optionally, the network device 1101 may be Figure 2 , Figure 3 , Figure 6 or Fig. 9 In the embodiment shown, the first network device, the BMP server 1102 may be Figure 2 , Figure 3 , Figure 5 or Figure 8 The BMP server in the illustrated embodiment.
[0125] 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.
[0126] 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 processing routing, characterized in that: The method comprises: The Border Gateway Protocol Monitoring Protocol (BMP) server receives a message of disabling the BMP capability of the network device sent by the network device; the message of disabling the BMP capability of the network device includes indication information that the BMP capability of the network device has been disabled; After receiving the message of disabling the BMP capability of the network device, the BMP server deletes the Border Gateway Protocol BGP routing information from the network device stored on the BMP server.
2. The method according to claim 1, characterized in that Before the BMP server receives the network device disabling BMP capability message sent by the network device, the method further includes: The BMP server establishes a BMP session with the network device; The BMP server receives and stores the BGP routing information sent by the network device through the BMP session.
3. The method according to claim 2, characterized in that The method further comprises: In response to receiving the BGP routing information, the BMP server starts a timer, the duration of the timer is greater than the time interval of BMP messages periodically sent by the network device to the BMP server through the BMP session, the time interval being the time difference between two adjacent BMP messages sent by the network device to the BMP server, the BMP message including the BGP routing information sent by the network device to the BMP server; When the timer times out, the BMP server deletes the BGP routing information received from the network device and stored by the BMP server, and the duration from starting the timer to the timer timing out is equal to the duration.
4. The method according to claim 3, characterized in that The method further comprises: When the BMP server receives the BMP message within the time interval of the BMP message periodically sent by the network device to the BMP server through the BMP session, the timer is restarted.
5. The method according to any one of claims 1 to 3, characterized in that: The BMP message is a BMP route monitoring Route Monitoring message.
6. A method for processing routing, characterized in that: The method comprises: The network device establishes a BMP session with a Border Gateway Protocol Monitoring Protocol (BMP) server; The network device generates a first BMP message, the first BMP message including part of the routes in the routing table of the network device; the part of the routes corresponds to a special identifier; the part of the routes includes routes introduced into the private network routing table of the network device; the private network to which the routes introduced into the private network routing table of the network device belong is different from the private network to which the routes in the private network routing table of the network device belong; The network device sends the first BMP message to the BMP server through the BMP session to trigger the BMP server to monitor the route in the first BMP message.
7. The method according to claim 6, characterized in that The partial route includes: The private network route sent to the network device by the user boundary CE device connected to the network device; or, the private network route sent to the network device by the backbone network boundary PE device that establishes a Border Gateway Protocol BGP neighbor with the network device, or, the public network route stored in the network device.
8. The method according to any one of claims 6-7, characterized in that: The network device belongs to a virtual private network.
9. The method according to any one of claims 6-7, characterized in that: The method further comprises: The network device sends a second BMP message to the BMP server, where the second BMP message includes indication information that the network device has disabled the BMP capability.
10. The method according to any one of claims 6-7, characterized in that: The network device generates a first BMP message, including: The network device obtains part of the routes in the routing table of the network device and generates the first BMP message.
11. A Border Gateway Protocol Monitoring Protocol (BMP) server, characterized in that: The BMP server includes: A receiving unit, configured to receive a message of disabling the BMP capability of the network device sent by the network device; the message of disabling the BMP capability of the network device includes indication information that the BMP capability of the network device has been disabled; The processing unit is used to delete the Border Gateway Protocol BGP routing information from the network device stored on the BMP server after the receiving unit receives the message of disabling the BMP capability of the network device.
12. The BMP server according to claim 11, characterized in that: The BMP server also includes a establishing unit and a storage unit; The establishing unit is used to establish a BMP session with the network device; The receiving unit is further used to receive the BGP routing information sent by the network device through the BMP session established by the establishing unit; the storage unit is used to store the BGP routing information received by the receiving unit.
13. The BMP server according to claim 11 or 12, characterized in that: The BMP server also includes a timer unit; The timer unit is used to start a timer in response to receiving the BGP routing information, the duration of the timer is greater than the time interval of the BMP messages periodically sent by the network device to the BMP server through the BMP session, the time interval is the time difference between two adjacent BMP messages sent by the network device to the BMP server, and the BMP message includes the BGP routing information sent by the network device to the BMP server; The processing unit is also used to delete the BGP routing information received from the network device and stored by the BMP server when the timer times out, and the duration from starting the timer to the timer timing out is equal to the duration.
14. The BMP server according to claim 13, characterized in that: The processing unit is further configured to restart the timer when the BMP server receives the BMP message within a time interval of the BMP messages periodically sent by the network device to the BMP server through the BMP session.
15. A network device, characterized in that: The network device comprises: an establishing unit, configured to establish a BMP session with a Border Gateway Protocol Monitoring Protocol (BMP) server; A processing unit, configured to generate a first BMP message, wherein the first BMP message includes part of the routes in the routing table of the network device; the part of the routes corresponds to a special identifier; the part of the routes includes routes introduced into the private network routing table of the network device; the private network to which the routes introduced into the private network routing table of the network device belong is different from the private network to which the routes in the private network routing table of the network device belong; A sending unit is used to send the first BMP message to the BMP server through the BMP session to trigger the BMP server to monitor the route in the first BMP message.
16. The network device according to claim 15, characterized in that: The sending unit is further configured to send a second BMP message to the BMP server to trigger the BMP server to cancel monitoring of the BGP routes received from the network device.
17. The network device according to claim 15 or 16, characterized in that: The processing unit is further configured to obtain part of the routes in the routing table of the network device and generate the first BMP message.
18. A system for processing routing, characterized in that: The system includes: a Border Gateway Protocol Monitoring Protocol (BMP) server and a network device, wherein: The network device is used to establish a BMP session with the BMP server, generate a first BMP message, the first BMP message includes part of the routes in the routing table of the network device, the part of the routes corresponds to a special identifier, the part of the routes includes routes introduced into the private network routing table of the network device, the private network to which the routes introduced into the private network routing table of the network device belong is different from the private network to which the routes in the private network routing table of the network device belong; and send the first BMP message to the BMP server through the BMP session; The BMP server is used to receive the first BMP message sent by the network device, store the route in the first BMP message, and monitor the route in the stored first BMP message; The network device is further configured to send a second BMP message to the BMP server, wherein the second BMP message includes indication information that the network device has disabled the BMP capability; The BMP server is further configured to receive the second BMP message, and after determining according to the indication information that the second BMP message includes that the BMP capability of the network device has been disabled, delete the BGP routing information received from the network device and stored by the BMP server.
19. The system according to claim 18, characterized in that The BMP server is the BMP server described in any one of claims 11-14.
20. The system according to claim 18, characterized in that The network device is the network device described in any one of claims 15-17.
21. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the method according to any one of claims 1 to 10.
22. A Border Gateway Protocol Monitoring Protocol (BMP) server, the BMP server comprising: A processor and a memory, characterized in that the memory is used to store program code, and the processor is used to call the program code in the memory so that the BMP server executes the method described in any one of claims 1-5.
23. A network device, comprising: A processor and a memory, characterized in that the memory is used to store program code, and the processor is used to call the program code in the memory so that the network device executes the method described in any one of claims 6-10.
