CN106878175B - BGP route processing method and device and BGP equipment - Google Patents

BGP route processing method and device and BGP equipment Download PDF

Info

Publication number
CN106878175B
CN106878175B CN201710189086.0A CN201710189086A CN106878175B CN 106878175 B CN106878175 B CN 106878175B CN 201710189086 A CN201710189086 A CN 201710189086A CN 106878175 B CN106878175 B CN 106878175B
Authority
CN
China
Prior art keywords
signaling
optimal route
bgp
network interface
protocol module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710189086.0A
Other languages
Chinese (zh)
Other versions
CN106878175A (en
Inventor
余清炎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201710189086.0A priority Critical patent/CN106878175B/en
Publication of CN106878175A publication Critical patent/CN106878175A/en
Application granted granted Critical
Publication of CN106878175B publication Critical patent/CN106878175B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion

Landscapes

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

Abstract

The invention discloses a Border Gateway Protocol (BGP) routing processing method, a device and BGP equipment. The method comprises the following steps: when the BGP protocol module issues the optimal route to the network interface driver, the BGP protocol module uniquely identifies the issued optimal route; after successfully printing the optimal route issued by the BGP protocol module to network interface hardware, the network interface driver records the identification information of the current optimal route and judges a first signaling trigger condition; when a first signaling triggering condition is met, the network interface drives to send a first signaling to the BGP protocol module, otherwise, the first signaling is not sent; the first signaling is used for notifying the identification information of the optimal route which is successfully refreshed; and the BGP protocol module advertises the optimal route corresponding to the identification information of the optimal route which is successfully refreshed and is advertised by the first signaling to the neighbor. The invention can solve the problem of short flow interruption in the flow back-switching process, reduce the frequency of driving the reverse notification and the length of the message, and simultaneously reduce the impact on the existing network and complete the flow switching as soon as possible.

Description

BGP route processing method and device and BGP equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a BGP (Border Gateway Protocol) routing processing method, an apparatus, and a BGP device.
Background
The BGP (border gateway protocol) is a dynamic routing protocol that can be used not only between different ASs (Autonomous systems) but also within the same AS. The currently used version of BGP is BGP-4, and BGP-4 is widely used by ISPs (Internet Service providers) as a standard for Internet external routing protocols.
When a BGP device works, it mainly does two things after it receives a route sent by an upstream neighbor: firstly, the optimal route in the dynamic routing protocol learned by the equipment is refreshed to the driver to guide the flow forwarding, and secondly, the optimal route in the dynamic routing protocol learned by the equipment is announced to the neighbor. Ideally, in order to ensure that traffic is not lost, the optimal route needs to be advertised to the neighbor after the optimal route is successfully refreshed. In practical application, the overall performance and efficiency of the device can be reduced strictly according to an ideal situation, and in order to improve the performance and efficiency of the device, the route cannot be notified to the neighbor after the route refreshing drive is successful, however, the situation that the optimal route is notified to the neighbor first and then the route refreshing drive is performed easily occurs, and in the process of flow switching, the situation that the flow is already led to the optimal route, but the route refreshing drive is not successful and cannot be forwarded temporarily occurs, and short-time flow interruption can be caused.
Disclosure of Invention
The invention provides a BGP (border gateway protocol) routing processing method, a device and BGP equipment, which are used for solving the problem of short flow interruption in the flow back-off process.
According to an aspect of the present invention, there is provided a BGP route processing method, including:
when the BGP protocol module issues the optimal route to the network interface driver, the BGP protocol module uniquely identifies the issued optimal route;
after successfully printing the optimal route issued by the BGP protocol module to network interface hardware, the network interface driver records the identification information of the current optimal route and judges a first signaling trigger condition;
when a first signaling triggering condition is met, the network interface driver sends a first signaling to a BGP protocol module, otherwise, the first signaling is not sent; the first signaling is used for notifying the identification information of the optimal route which is successfully refreshed;
and the BGP protocol module informs the neighbor of the optimal route corresponding to the identification information of the optimal route which is successfully refreshed and is informed by the first signaling according to the received first signaling.
Optionally, the method further comprises:
the BGP protocol module caches the optimal route issued to the network interface drive and the identification information thereof in a data structure;
and after receiving the first signaling sent by the network interface driver and notifying the neighbor of the refreshed optimal route notified by the first signaling, the BGP protocol module deletes the optimal route notified to the neighbor and the identification information of the optimal route from the data structure.
Optionally, the first signaling triggering condition is set based on a number threshold and/or a timing time threshold of the optimal routes that are successfully brushed down.
Optionally, when the number of the successfully refreshed optimal routes reaches a preset number threshold, triggering to send the first signaling; or
When the interval time after the first signaling is triggered and sent for the previous time reaches a preset time threshold, triggering and sending the first signaling; or
And triggering and sending the first signaling when the number of the successfully brushed optimal routes reaches a preset number threshold or the interval time after the first signaling is triggered and sent for the previous time reaches a preset time threshold.
Optionally, the uniquely identifying the issued optimal route includes: carrying out unique identification on the issued optimal route through a global serial number, and accumulating the global serial number according to a preset step length;
the identification information of the successfully refreshed optimal route announced by the first signaling comprises a sequence number of the last successfully refreshed optimal route;
the BGP protocol module, according to the received first signaling, notifying an optimal route corresponding to the identifier information of the optimal route that has been successfully flushed notified by the first signaling to a neighbor, including: and the BGP protocol module generates BGP update messages of the sequence number of the last successfully refreshed optimal route advertised by the first signaling and all optimal routes corresponding to the sequence numbers before the sequence number according to the received first signaling and advertises the sequence number to the neighbor.
In accordance with another aspect of the present invention, there is provided an BGP route processing apparatus, which includes a BGP protocol module and a network interface driver,
the BGP protocol module is used for uniquely identifying the issued optimal route when the optimal route is issued to the network interface drive; receiving a first signaling sent by the network interface driver, and notifying an optimal route corresponding to the identification information of the successfully refreshed optimal route of the network interface driver notified by the first signaling to a neighbor according to the received first signaling;
the network interface driver is used for recording the identification information of the current optimal route and executing the judgment of a first signaling triggering condition after successfully printing the optimal route issued by the BGP protocol module to network interface hardware; when a first signaling triggering condition is met, sending a first signaling to the BGP protocol module, otherwise, not sending the first signaling; the first signaling is used for notifying the identification information of the optimal route which is successfully refreshed.
Optionally, the BGP protocol module is further configured to cache the optimal route sent to the network interface driver and the identification information thereof in the data structure; and after receiving the first signaling sent by the network interface driver and notifying the neighbor of the optimal route advertised by the first signaling and refreshed successfully, deleting the optimal route advertised to the neighbor and the identification information of the optimal route from the data structure.
Optionally, the first signaling triggering condition is set based on a number threshold and/or a timing time threshold of the optimal routes that are successfully brushed down; the following three situations are included:
when the number of the successfully refreshed optimal routes reaches a preset number threshold, triggering and sending the first signaling; or
When the interval time after the first signaling is triggered and sent for the previous time reaches a preset time threshold, triggering and sending the first signaling; or
And triggering and sending the first signaling when the number of the successfully brushed optimal routes reaches a preset number threshold or the interval time after the first signaling is triggered and sent for the previous time reaches a preset time threshold.
Optionally, the uniquely identifying, by the BGP protocol module, the issued optimal route includes: carrying out unique identification on the issued optimal route through a global serial number, and accumulating the global serial number according to a preset step length;
the network interface drives a first signaling sent to the BGP protocol module to contain a sequence number of a last successfully refreshed optimal route;
the BGP protocol module is specifically configured to generate, according to the received first signaling, a BGP update packet for announcing to a neighbor the sequence number of the last successfully refreshed optimal route advertised by the first signaling and all optimal routes corresponding to sequence numbers before the sequence number.
According to another aspect of the present invention, there is provided a BGP device including the BGP route processing apparatus.
The invention has the beneficial effects that:
an optimal route is refreshed to a network interface hardware layer in an asynchronous mode between a BGP protocol layer and a network interface driving layer of BGP equipment, the refreshing driving time sequence and the notification time sequence of BGP route processing are ensured, and the problem of short flow interruption in the flow switching process is prevented; only when the preset triggering condition is met, the network interface driver informs the BGP protocol module of the identification information of the successfully refreshed optimal route, so that the frequency and the message length of the BGP protocol module which is reversely informed by the network interface driver can be reduced, the consumption of system resources is avoided, the system is prevented from being blocked, and meanwhile, the impact on the existing network is reduced as much as possible and the switching of the flow is completed as soon as possible.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
FIG. 1 is an idealized timing diagram of a BGP routing process;
FIG. 2 is a BGP routing processing exception timing diagram;
FIG. 3 is a schematic diagram of a BGP routing processing application for networking;
FIG. 4 is a schematic diagram illustrating BGP neighbor failure when BGP routing processing is applied in networking;
fig. 5 is a schematic view of traffic interruption after failure recovery of a BGP neighbor when BGP routing processing application performs networking;
FIG. 6 is a schematic diagram of a routing delay delivery mechanism;
fig. 7 is a schematic flowchart of a BGP route processing method according to an embodiment of the present invention;
fig. 8 is a functional structure diagram of a BGP route processing apparatus according to an embodiment of the present invention;
fig. 9 is a schematic hardware structure diagram of a BGP device according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Ideally, in order to ensure that traffic is not lost, when processing the BGP route, the BGP route needs to be refreshed successfully on the optimal route, and then the optimal route is notified to the neighbor. Fig. 1 is an idealized timing diagram of a BGP routing process. As shown in fig. 1, when a BGP protocol of a device receives a large number of routes, ideally, the driving for the downward brushing and the notification of the route should be performed according to the time sequence shown in fig. 1, that is, after the driving for the downward brushing is successful, the driving for the downward brushing and the notification of the route are performed to the neighboring routes, so as to ensure that traffic is not lost. However, in order to maintain the high performance of the BGP device, the current mainstream manufacturers do not wait for the successful flushing driver to perform the route advertisement. Therefore, under certain conditions (such as large routing amount, uneven scheduling, or uneven load of CPUs of upstream and downstream devices or difference in processing performance), the optimal route is firstly notified to the opposite end, and then the driving table entry is flushed. Fig. 2 is a BGP route handling exception timing diagram. As shown in fig. 2, route 3 has been advertised, but has not yet been down-brushed, which would result in traffic not being passed if the BGP device received the traffic for route 3.
This may occur if it occurs in some specific networking applications, with a brief interruption of traffic. Fig. 3 is a schematic diagram of a BGP routing processing application for networking. As shown in fig. 3, the solid line in fig. 3 indicates that two neighboring devices establish a BGP neighbor relationship. Routes on the RTA are issued to the RTE through two paths, RTA- > RTC- > RTD- > RTE and RTA- > RTB- > RTE. On an RTE, there are two routes issued from the RTA, assuming that routes learned by RTB have higher priority than routes learned by neighbor RTDs, the latter being a backup of the former. Fig. 4 is a schematic diagram illustrating BGP neighbor failure of a BGP routing processing application during networking. As shown in fig. 4, if a BGP neighbor between an RTA and an RTB fails, the RTB needs to advertise a withdrawal message for this part of the route to the RTE. After receiving the withdrawal message of the routes, the RTE re-prefers and selects the route from RTD to switch the flow to the link of RTA- > RTC- > RTD- > RTE. Fig. 5 is a schematic diagram of traffic failure after BGP neighbor failure recovery when the BGP routing processing application performs networking. As shown in FIG. 5, if the neighbor relationship between RTA and RTB is restored, RTA re-advertises the route to RTB, which advertises it to RTE, and the traffic switches back to RTB because the route learned from RTB on RTE is better. However, if the RTB is driven by first advertising a route and then by flushing, during the process of traffic switching, traffic is already introduced to the RTB, but the RTB cannot be forwarded for a while, which results in a short traffic interruption.
In order to meet the requirement of ensuring both the performance of the system and the ideal timing sequence of BGP route processing, a synchronous processing method, i.e., a simple route delay transmission mechanism, is easily conceivable. In the application shown in fig. 5, if the RTB is delayed to send, the RTB can complete the flushing process within the delay time, so that the RTB can be driven to flush first, and receive the ideal timing sequence of the route after the RTE, thereby ensuring that the traffic from the RTE is not lost. Fig. 6 is a schematic diagram of a routing delay delivery mechanism. However, under the pure delay sending mechanism, if there is no backup link, assuming that each device adopts the delay sending mechanism (assuming that 5 seconds of sending are delayed), the RTE actually delays for 15 seconds to receive the route, and this delay time is affected by the devices passing in the middle, and the more devices, the longer the delay time is. It is also conceivable to use an asynchronous processing method, i.e. to configure a command with two parameters, one being the routing policy when a new route is first issued and one being the delay latency when the route is again issued with the original attributes, on the upstream device (e.g. RTB and RTD in fig. 3) forming the backup or equivalent device (e.g. RTE in fig. 3). Although the problem in fig. 6 can be solved to a certain extent, the upstream device needs to send two routes back and forth, and when the amount of routes is large, a large amount of BGP messages are generated in the network, which causes a burden on the network; and the latter route is delayed for a period of time to be sent, so that the time for switching the flow can be delayed, and the requirements of other specific scenes cannot be met.
In summary, the BGP routes can be handled with the ideal timing shown in fig. 1 without causing traffic disruption. However, if the BGP route downward flush driver adopts a synchronization processing manner to ensure the timing sequence in fig. 1, the system may be blocked due to synchronization, thereby reducing the performance of the entire system; if the BGP route is refreshed to the driver in an asynchronous processing mode, the driver reversely informs the BGP of the route after each successful refreshing, and then the BGP sends the route to the neighbor equipment, the driver reversely informs the driver to consume a large amount of system resources, thereby reducing the performance of the whole system.
Based on the above thought, the technical scheme of the invention is provided. The design concept of the invention is as follows: the BGP protocol layer and the network interface driving layer of the BGP equipment still adopt an asynchronous mode to brush down the optimal route to the network interface hardware layer, when the BGP protocol module issues the optimal route to the network interface driver, the issued optimal route is subjected to unique identification, the network interface driver records the current identification information after brushing down the network interface hardware each time, only when a preset trigger condition is met, the network interface driver informs the BGP protocol module of the identification information of the successfully brushed down optimal route, and then the BGP protocol module informs the neighbor of the optimal route corresponding to the identification information of the successfully brushed down optimal route. In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Referring to fig. 7, a flowchart of a BGP route processing method according to an embodiment of the present invention is shown. As shown in fig. 7, the method includes:
step S710, when the BGP protocol module issues the optimal route to the network interface driver, the BGP protocol module uniquely identifies the issued optimal route.
The method for identifying the unique identifier is not particularly limited, for example, a serial number or other identifiers other than the serial number may be used, as long as the uniqueness of the identifier of each issued optimal route can be ensured.
Step S720, after the network interface driver successfully downloads the optimal route issued by the BGP protocol module to the network interface hardware, the network interface driver records the identification information of the current optimal route and executes the judgment of the first signaling trigger condition.
In order to ensure the timing sequence of the downward brushing drive and the notification timing sequence of the BGP route processing and prevent the problem of transient traffic interruption during the traffic cutback process, it is necessary to successfully brush the optimal route issued by the BGP protocol module to the network interface hardware by the network interface drive and then notify the issued optimal route to the neighbor. Therefore, the embodiment sets the first signaling triggering condition, records the identification information of the current optimal route after the optimal route is successfully printed on the network interface hardware, and executes the judgment of the first signaling triggering condition, and the network interface driver will reversely notify the BGP protocol module only when the first signaling triggering condition is satisfied.
It should be noted that, the first signaling triggering condition may be set according to the overall requirements of the scheme. The first signaling triggering condition may be set only based on the number of the optimal routes successfully issued, for example, the number of the optimal routes successfully issued by the hardware is up to a preset number threshold; or, the setting is based on time only, for example, when the interval time from the previous trigger to send the first signaling reaches a preset time threshold; or, the first signaling trigger condition is defined from two aspects based on the number of the successfully issued optimal routes and the time setting, and the first signaling trigger condition is considered to be satisfied as long as both satisfy one of the first signaling trigger condition and the time setting.
Step S730, when the first signaling triggering condition is met, the network interface drives to send the first signaling to the BGP protocol module, otherwise, the first signaling is not sent; the first signaling here is used to advertise the identification information of the optimal route that has been flushed successfully.
The network interface driver performs the reverse notification only when the first signaling triggering condition is met, so that the frequency of the reverse notification of the network interface driver can be reduced, the interaction times between the network interface driver and the BGP protocol module are reduced, and the first signaling is only used for notifying the identification information of the successfully refreshed optimal route and can also reduce the message length.
Step S740, the BGP protocol module notifies the neighbor of the optimal route corresponding to the identifier information of the optimal route that has been successfully flushed and notified by the first signaling according to the received first signaling.
The BGP protocol module only notifies the neighbor of the optimal route corresponding to the identification information of the optimal route that has been successfully flushed, notified by the first signaling, after receiving the first signaling sent by the network interface driver. Therefore, the issued optimal route is notified to the neighbor after the network interface hardware is successfully flushed, the ideal time sequence of BGP route processing is ensured, the problem of temporary flow interruption in the flow back-switching process is avoided, the network load is reduced to a certain extent, the impact on the network is reduced, and the fast and timely flow switching is ensured.
In summary, the invention performs the unique identifier for the issued optimal route, adds the unique identifier information when the route is flushed to the network interface driver under the BGP protocol module, and adopts an asynchronous processing mode to ensure that the issued optimal route is notified to the neighbor after the network interface hardware is successfully flushed, thereby ensuring the flushing driving time sequence and the notification time sequence of the BGP route processing, and also reducing the frequency of the network interface driver reversely notifying the BGP protocol module and the length of the message, avoiding the consumption of system resources, and preventing the system from being blocked.
In an embodiment of the present invention, in order to facilitate that, after receiving a first signaling sent by a network interface driver, a BGP protocol module can timely and quickly find an optimal route corresponding to identification information of an optimal route in which network interface hardware has been successfully flushed in the first signaling, the method shown in fig. 7 further includes:
the BGP protocol module caches the optimal route sent to the network interface driver along with its identification information in a data structure, such as a linked list, a stack, an array, a tree, and the like, which is not specifically limited herein, as long as the BGP protocol module can implement the private data storage and query function on the data structure.
Meanwhile, in order to ensure the availability of the space resources of the data structure, the method shown in fig. 7 further includes: and after receiving the first signaling sent by the network interface driver and notifying the refreshed optimal route notified by the first signaling to the neighbor, the BGP protocol module deletes the optimal route notified to the neighbor and the identification information of the optimal route from the data structure.
In one embodiment of the present invention, the first signaling triggering condition in step S720 of the method shown in fig. 7 is set based on a number threshold and/or a timing time threshold of the optimal routes that are successfully brushed down. The number threshold and the time threshold may be set based on a comprehensive consideration of factors such as the size of the buffer space to be driven and the efficiency of the flush route, and the present disclosure is not particularly limited.
For example, the number threshold may be set to M, where M is a positive integer greater than or equal to 2, and when the number of the successfully brushed optimal routes reaches M, it is determined that the first signaling triggering condition is met, and a first signaling is triggered to be sent; the time threshold may be set to 1 second, and when the interval time from the previous trigger of sending the first signaling reaches 1 second, it is considered that the first signaling trigger condition is satisfied, and the first signaling is triggered to be sent.
Specifically, the first signaling trigger condition may be embodied in the following three cases:
(1) the first signaling triggering condition is only to trigger the sending of the first signaling when the number of the successfully refreshed optimal routes reaches a preset number threshold.
(2) The first signaling triggering condition is only that the first signaling is triggered to be sent when the interval time after the first signaling is triggered to be sent for the previous time reaches a preset time threshold.
(3) The first signaling triggering condition is that when the number of the successfully refreshed optimal routes reaches a preset number threshold or the interval time from the previous triggering of sending the first signaling reaches a preset time threshold, the first signaling is triggered to be sent.
In an embodiment of the present invention, a unique serial number is identified for each issued optimal route by using a serial number, and the serial numbers are accumulated according to a preset step size, and when the preset step size is 1, the serial numbers may be continuous numbers, and when the preset step size is greater than 1, for example, 2 or 3, the serial numbers may also be discontinuous numbers. Specifically, the uniquely identifying the issued optimal route in step S710 includes: and carrying out unique identification on the issued optimal route through a global serial number, and accumulating the global serial number according to a preset step length. For example, each time the BGP protocol module issues an optimal route, the value of the sequence number is incremented by 1. Specifically, the current serial number is 0, when the BGP protocol module issues an optimal route, the serial number becomes 1, and the serial number 1 is used as the identifier of the optimal route issued this time; when the BGP protocol module issues another optimal route, the sequence number becomes 2, and the sequence number 2 is used as the identifier of the optimal route issued this time. The global sequence number is set, and the serial number is accumulated according to the preset step length to identify the issued optimal route, so that the identification uniqueness of the issued optimal route can be ensured. In consideration of the problem of serial number overflow, a sufficient number of bits can be set, and the serial number is initialized to 0 when the equipment is started each time, or when the serial number is about to overflow, the synchronous reset processing is carried out on the serial number after a successfully refreshed route is successfully sent to a neighbor.
In the above example, the identification information of the successfully flushed optimal route advertised by the first signaling may only include the sequence number of the last successfully flushed optimal route, or may also include the sequence number of each successfully flushed optimal route.
In order to further shorten the length of the packet, the identification information of the successfully flushed optimal route notified by the first signaling only contains the sequence number of the last successfully flushed optimal route. Then, after the BGP protocol module receives the first signaling that only contains the sequence number of the last successfully flushed optimal route, because the sequence number is the unique identifier of each issued optimal route, the BGP protocol module can uniquely determine the optimal route that needs to be sent to the neighbor according to the first signaling, and will generate a BGP update message to notify the neighbor of the sequence number of the last successfully flushed optimal route advertised by the first signaling and all optimal routes corresponding to the sequence numbers before the sequence number. Therefore, the step S740, in which the BGP protocol module advertises, to the neighbor, the optimal route corresponding to the identifier information of the optimal route that has been successfully flushed and advertised by the first signaling according to the received first signaling, includes: and the BGP protocol module generates BGP update messages according to the received first signaling, and informs the sequence number of the last successfully refreshed optimal route announced by the first signaling and all optimal routes corresponding to the sequence numbers before the sequence number of the last successfully refreshed optimal route to the neighbor.
In a specific embodiment of the present invention, a BGP route processing method includes:
A. when the BGP protocol module issues the optimal route to the network interface driver, a global serial number is configured for the issued optimal route;
B. and when the BGP protocol module issues an optimal route, adding 1 to the value of the serial number, refreshing the serial number added with 1 and the optimal route to a network interface driver, and correspondingly caching the serial number added with 1 and the issued optimal route in a data structure.
C. And the network interface driver records the serial number of the current optimal route after successfully printing the optimal route issued by the BGP protocol module to network interface hardware, judges whether a first signaling trigger condition is met, does not send a first signaling if the first signaling trigger condition is not met, and sends the current serial number to the BGP protocol module after the first signaling trigger condition is met.
The triggering condition here may be that a difference between a sequence number of the current optimal route recorded after the network interface driver flushes the network interface hardware successfully and a sequence number recorded at the previous time of uploading reaches a predetermined number threshold. For example, the predetermined number interval is 2, that is, every 2 serial numbers, if the current serial number recorded is 5, the serial number recorded at the last transmission is 4, and 5-4 is not 1, which does not satisfy the predetermined number interval 2, the driver does not send the first signaling; if the current sequence number is driven to be 6, and the sequence number recorded in the last uploading process is 4, 6-4 is 2, which meets the preset number interval 2, then the driver sends the sequence number 6 to the BGP protocol module.
The triggering condition here may also be that an interval time from the previous triggering to send the first signaling reaches a preset time threshold, and this embodiment may perform the judgment of the triggering condition based on time through a timer. For example, the preset time threshold is 1 second, the time for triggering the first signaling to be sent last time is 13:00:00, and then when the time is 13:00:01, the first signaling is triggered to be sent.
Preferably, the triggering condition here may also be a combination of the two triggering conditions, as long as both of them satisfy one of the two triggering conditions, both of which may be considered to satisfy the first signaling triggering condition, and trigger the sending of the first signaling.
D. And the BGP protocol module generates BGP update messages for all the optimal routes corresponding to the sequence number before and the sequence number of the last successfully refreshed optimal route announced by the first signaling in the data structure according to the received first signaling and announces the BGP update messages to the neighbors.
The BGP route processing method according to the present invention is described below by way of a specific example. The scene is as follows: and carrying out unique identification on the issued optimal route by adopting a global serial number (the initial value is 0), wherein the first signaling triggering condition is that a preset time threshold is 1 second and a preset quantity threshold is 2. The BGP routing processing steps are as follows:
(1) and starting a timer to start timing. And in the 1 st second, the BGP protocol module issues an optimal route 1, adds 1 to the global serial number, the global serial number is 1 at the moment because the initial value of the global serial number is 0, and the BGP protocol module flushes the serial number 1 and the optimal route 1 to a network interface driver and hangs the serial number 1 and the route on a linked list to be sent.
(2) And in the 1 st second, the BGP protocol module issues the optimal route 2 again, adds 1 to the global serial number, and at the moment, the global serial number is 2, and the BGP protocol module flushes the serial number 2 and the optimal route 2 to a driver and hangs the serial number 2 and the route on a linked list to be sent.
(3) The network interface driver receives the sequence number 1 and the optimal route 1, records the current sequence number as 1 after the hardware is successfully flushed, and judges whether a first signaling triggering condition is met. Because the currently determined sequence number is 1 and does not meet the triggering condition of the preset number threshold 2, a first signaling does not need to be sent to the BGP protocol module at this time.
(4) And the network interface driver receives the optimal route 2, records the current serial number as 2 after the network interface hardware is successfully refreshed, and judges whether a first signaling triggering condition is met. At this time, if the serial number 2 is judged to meet the triggering condition of the preset number threshold 2, a first signaling containing the serial number 2 is sent to the BGP protocol module; and resetting the timer after the first signaling is sent, and restarting timing.
(5) The BGP protocol module receives a serial number 2 uploaded by a network interface driver, removes the serial number 2, a serial number 1 before the serial number 2 and all optimal routes corresponding to the serial numbers 1 and 2 from a linked list to be sent, namely empties the linked list to be sent, and generates BGP update messages for the removed optimal route 1 and the optimal route 2 and sends the BGP update messages to all neighbors.
(6) In the 2 nd and 3 rd seconds, although the BGP protocol module does not receive any optimal route, the timer still counts time and automatically clears zero after the preset time is reached; at the 4 th second, the timer restarts timing, the BGP protocol module issues an optimal route 3, adds 1 to the global sequence number, the global sequence number is 3 at this time, the BGP flushes the sequence number 3 and the optimal route 3 to the network interface driver, and hangs the sequence number 3 and the optimal route on a linked list to be sent;
(7) and the network interface driver receives the optimal route 3, records the current serial number as 3 after the hardware is successfully flushed, and judges whether a first signaling triggering condition is met. Because the currently determined sequence number is 3, and the triggering condition of the preset number threshold 2 is not met (i.e. 3-2 is not equal to 2), it is not necessary to send the first signaling to the BGP protocol module at this time.
(8) When the timer reaches 1 second, the network interface driver still does not receive new optimal routing information, and although the triggering condition of the preset number threshold 2 is not met at the moment, the triggering condition that the timer reaches 1 second is met, the network interface driver still sends a first signaling containing a sequence number 3 to the BGP protocol module.
(9) The BGP protocol module receives the sequence number 3 notified by the network interface driver, removes all the optimal routes corresponding to the sequence number 3 and the previous sequence numbers (only the optimal route 3 at this time, because the optimal route 1 and the optimal route 2 have been removed before) from the linked list to be sent, generates BGP update messages, and sends the BGP update messages to the neighbors.
It should be noted that, when the network interface driver sends the first signaling to the BGP protocol module in the 1 st second, the timer has restarted timing, but neither the network interface driver receives a new optimal route in the 2 nd second nor the 3 rd second, and then after the timer times out for 1 second, the network interface driver may make a judgment, and it judges that the latest recorded serial number 2 has been sent to the BGP protocol module, and at this time, the network interface driver may not perform processing even if the timer reaches a predetermined time. Or after the timer counts 1 second, the network interface driver can send the last recorded serial number to the BGP protocol module, and the BGP protocol module does not process if it determines that there is no optimal route to be sent in the to-be-sent chain table. And after the timer reaches the preset time, the timer is cleared and restarted.
Corresponding to the method, the invention also provides a BGP route processing device which can be applied to BGP equipment.
Referring to fig. 8, functionally, the BGP route processing device 80 may include: a BGP protocol module 810 and a network interface driver 820.
A BGP protocol module 810, configured to uniquely identify an optimal route issued to the network interface driver 820 when the optimal route is issued to the network interface driver 820; receiving a first signaling sent by the network interface driver 820, and according to the received first signaling, notifying the neighbor of the optimal route corresponding to the identification information of the successfully refreshed optimal route by the network interface driver notified by the first signaling;
a network interface driver 820, configured to record identification information of a current optimal route and execute a judgment of a first signaling trigger condition after successfully printing the optimal route issued by the BGP protocol module 810 onto network interface hardware; when a first signaling triggering condition is met, sending a first signaling to the BGP protocol module 810, otherwise, not sending the first signaling; the first signaling is used for notifying the identification information of the optimal route which is successfully refreshed.
It should be noted that, the BGP protocol module in the present invention may perform functions that include, in addition to the functions defined in the present application, a BGP protocol function specified in the BGP protocol.
In an embodiment of the present invention, the BGP protocol module 810 is further configured to cache the optimal route sent to the network interface driver and the identification information thereof in a data structure; after receiving the first signaling sent by the network interface driver 820 and notifying the neighbor of the optimal route advertised by the first signaling and having been flushed successfully, the optimal route advertised to the neighbor is deleted from the data structure together with the identification information thereof.
In one embodiment of the invention, the first signaling trigger condition is set based on a number threshold and/or a timing time threshold of the optimal routes that were successfully brushed down. The following three situations are included:
when the number of the successfully refreshed optimal routes reaches a preset number threshold, triggering and sending a first signaling; or
When the interval time after the first signaling is triggered and sent for the previous time reaches a preset time threshold, triggering and sending the first signaling; or
And triggering to send the first signaling when the number of the successfully brushed optimal routes reaches a preset number threshold or the interval time after the first signaling is triggered and sent for the previous time reaches a preset time threshold.
In an embodiment of the present invention, the uniquely identifying the delivered optimal route by the BGP protocol module includes: carrying out unique identification on the issued optimal route through a global serial number, and accumulating the global serial number according to a preset step length; the network interface driver 820 sends a first signaling to the BGP protocol module 810, where the first signaling includes a sequence number of the last successfully flushed optimal route;
the BGP protocol module 810 is specifically configured to generate, according to the received first signaling, a BGP update packet for notifying the neighbor of the sequence number of the last successfully flushed optimal route advertised by the first signaling and all optimal routes corresponding to sequence numbers before the sequence number of the last successfully flushed optimal route.
For the BGP route processing apparatus embodiment, since it basically corresponds to the method embodiment, refer to the partial description of the method embodiment for relevant points. The BGP route processing apparatus embodiments described above are merely illustrative, and the units described as separate elements may or may not be physically separate, may be located in one place, or may be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Referring to fig. 9, a schematic hardware structure diagram of a BGP device according to an embodiment of the present invention is provided. As shown in fig. 9, the BGP device 90 includes the BGP route processing apparatus 80 shown in fig. 8.
The BGP route processing apparatus 80 provided by the present invention may be implemented by software, or may be implemented by hardware, or a combination of hardware and software. For example, in the case of a software implementation, machine-executable instructions corresponding to BGP route processing device 80 in non-volatile memory 50 may be read into memory 40 for execution by processor 10. From the hardware aspect, in addition to the processor 10, the internal bus 20, the network interface 30, the memory 40, and the nonvolatile memory 50 shown in fig. 9, other hardware may be included according to the actual functions of the BGP device, which is not described again.
In various embodiments, the non-volatile memory 50 may be: a storage drive (e.g., hard disk drive), a solid state drive, any type of storage disk (e.g., compact disk, DVD, etc.), or similar storage medium, or a combination thereof. The memory 40 may be: RAM (random access memory), volatile memory, nonvolatile memory, and flash memory.
Further, the non-volatile memory 50 and the memory 40 serve as machine-readable storage media on which machine-executable instructions corresponding to the BGP route processing device 80 executed by the processor 10 may be stored.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
In summary, according to the technical solution of the present invention, when issuing an optimal route to a network interface driver, a BGP protocol module uniquely identifies the issued optimal route; after successfully printing the optimal route issued by the BGP protocol module to network interface hardware, the network interface driver records the identification information of the current optimal route and judges a first signaling trigger condition; when the first signaling triggering condition is met, the network interface driver sends the first signaling to the BGP protocol module, and the first signaling is not sent after the refreshing drive of each route is successful, so that the frequency of reverse notification can be reduced, and the first signaling is only used for notifying the identification information of the successfully refreshed optimal route, so that the message length can be reduced; and the BGP protocol module informs the neighbor of the optimal route corresponding to the identification information of the optimal route which is successfully refreshed and is informed by the first signaling according to the received first signaling. Therefore, the BGP protocol layer and the network interface driving layer of the BGP equipment adopt an asynchronous mode to brush the optimal route to the network interface hardware layer, so that the brushing driving time sequence and the notification time sequence of BGP route processing are ensured, and the problem of short flow interruption in the flow back-switching process is prevented; only when the preset triggering condition is met, the network interface driver informs the BGP protocol module of the identification information of the successfully refreshed optimal route, so that the frequency and the message length of the BGP protocol module which is reversely informed by the network interface driver can be reduced, the consumption of system resources is avoided, the system is prevented from being blocked, and meanwhile, the impact on the existing network is reduced as much as possible and the switching of the flow is completed as soon as possible.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (9)

1. A BGP (Border gateway protocol) routing processing method is characterized by comprising the following steps:
when the BGP protocol module issues the optimal route to the network interface driver, the BGP protocol module uniquely identifies the issued optimal route;
after successfully printing the optimal route issued by the BGP protocol module to network interface hardware, the network interface driver records the identification information of the current optimal route and judges a first signaling trigger condition;
when a first signaling triggering condition is met, the network interface driver sends a first signaling to a BGP protocol module, otherwise, the first signaling is not sent; the first signaling is used for notifying the identification information of the optimal route which is successfully refreshed;
the BGP protocol module informs the neighbor of the optimal route corresponding to the identification information of the optimal route which is successfully refreshed and is informed by the first signaling according to the received first signaling;
the first signaling trigger condition is set based on a number threshold and/or a timing time threshold of optimal routes that are successfully brushed down.
2. The method of claim 1, wherein the method further comprises:
the BGP protocol module caches the optimal route issued to the network interface drive and the identification information thereof in a data structure;
and after receiving the first signaling sent by the network interface driver and notifying the neighbor of the refreshed optimal route notified by the first signaling, the BGP protocol module deletes the optimal route notified to the neighbor and the identification information of the optimal route from the data structure.
3. The method of claim 1,
when the number of the successfully refreshed optimal routes reaches a preset number threshold, triggering and sending the first signaling; or
When the interval time after the first signaling is triggered and sent for the previous time reaches a preset time threshold, triggering and sending the first signaling; or
And triggering and sending the first signaling when the number of the successfully brushed optimal routes reaches a preset number threshold or the interval time after the first signaling is triggered and sent for the previous time reaches a preset time threshold.
4. The method of claim 1,
the unique identifier for the issued optimal route comprises: carrying out unique identification on the issued optimal route through a global serial number, and accumulating the global serial number according to a preset step length;
the identification information of the successfully refreshed optimal route announced by the first signaling comprises a sequence number of the last successfully refreshed optimal route;
the BGP protocol module, according to the received first signaling, notifying an optimal route corresponding to the identifier information of the optimal route that has been successfully flushed notified by the first signaling to a neighbor, including: and the BGP protocol module generates BGP update messages of the sequence number of the last successfully refreshed optimal route advertised by the first signaling and all optimal routes corresponding to the sequence numbers before the sequence number according to the received first signaling and advertises the sequence number to the neighbor.
5. The BGP routing processing device is characterized by comprising a BGP protocol module and a network interface driver,
the BGP protocol module is used for uniquely identifying the issued optimal route when the optimal route is issued to the network interface drive; receiving a first signaling sent by the network interface driver, and notifying an optimal route corresponding to the identification information of the successfully refreshed optimal route of the network interface driver notified by the first signaling to a neighbor according to the received first signaling;
the network interface driver is used for recording the identification information of the current optimal route and executing the judgment of a first signaling triggering condition after successfully printing the optimal route issued by the BGP protocol module to network interface hardware; when a first signaling triggering condition is met, sending a first signaling to the BGP protocol module, otherwise, not sending the first signaling; the first signaling is used for notifying the identification information of the optimal route which is successfully refreshed;
the first signaling trigger condition is set based on a number threshold and/or a timing time threshold of optimal routes that are successfully brushed down.
6. The apparatus of claim 5, wherein the BGP protocol module is further configured to cache the optimal route sent to the network interface driver in a data structure together with its identification information; and after receiving the first signaling sent by the network interface driver and notifying the neighbor of the optimal route advertised by the first signaling and refreshed successfully, deleting the optimal route advertised to the neighbor and the identification information of the optimal route from the data structure.
7. The apparatus of claim 5, wherein the first signaling trigger condition is set based on a number threshold and/or a timing time threshold for optimal routes that are successfully brushed down; the following three situations are included:
when the number of the successfully refreshed optimal routes reaches a preset number threshold, triggering and sending the first signaling; or
When the interval time after the first signaling is triggered and sent for the previous time reaches a preset time threshold, triggering and sending the first signaling; or
And triggering and sending the first signaling when the number of the successfully brushed optimal routes reaches a preset number threshold or the interval time after the first signaling is triggered and sent for the previous time reaches a preset time threshold.
8. The apparatus of claim 5,
the BGP protocol module uniquely identifying the issued optimal route includes: carrying out unique identification on the issued optimal route through a global serial number, and accumulating the global serial number according to a preset step length;
the network interface drives a first signaling sent to the BGP protocol module to contain a sequence number of a last successfully refreshed optimal route;
the BGP protocol module is specifically configured to generate, according to the received first signaling, a BGP update packet for notifying a neighbor of a sequence number of a last successfully flushed optimal route advertised by the first signaling and all optimal routes corresponding to sequence numbers before the sequence number.
9. A BGP device, characterized in that it comprises a BGP route processing means according to any of claims 5-8.
CN201710189086.0A 2017-03-27 2017-03-27 BGP route processing method and device and BGP equipment Active CN106878175B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710189086.0A CN106878175B (en) 2017-03-27 2017-03-27 BGP route processing method and device and BGP equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710189086.0A CN106878175B (en) 2017-03-27 2017-03-27 BGP route processing method and device and BGP equipment

Publications (2)

Publication Number Publication Date
CN106878175A CN106878175A (en) 2017-06-20
CN106878175B true CN106878175B (en) 2020-03-06

Family

ID=59173639

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710189086.0A Active CN106878175B (en) 2017-03-27 2017-03-27 BGP route processing method and device and BGP equipment

Country Status (1)

Country Link
CN (1) CN106878175B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109005110B (en) * 2018-08-29 2021-05-28 新华三技术有限公司合肥分公司 Method and device for generating aggregation route
CN111491339B (en) * 2019-01-28 2022-05-31 阿里巴巴集团控股有限公司 Network switching method, device, equipment and storage medium
CN114338505B (en) * 2021-12-01 2023-06-27 杭州迪普科技股份有限公司 Route calculation method, device, storage medium and computer equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102769570A (en) * 2012-07-30 2012-11-07 杭州华三通信技术有限公司 Route notification method and equipment
CN103973558A (en) * 2014-05-21 2014-08-06 杭州华三通信技术有限公司 Route advertisement method and device
CN105915457A (en) * 2016-04-29 2016-08-31 清华大学 Route verification based boarder gateway protocol route updating method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102769570A (en) * 2012-07-30 2012-11-07 杭州华三通信技术有限公司 Route notification method and equipment
CN103973558A (en) * 2014-05-21 2014-08-06 杭州华三通信技术有限公司 Route advertisement method and device
CN105915457A (en) * 2016-04-29 2016-08-31 清华大学 Route verification based boarder gateway protocol route updating method

Also Published As

Publication number Publication date
CN106878175A (en) 2017-06-20

Similar Documents

Publication Publication Date Title
CN106878175B (en) BGP route processing method and device and BGP equipment
CN106686561B (en) Method and apparatus for supporting mobile terminated short message delivery
CN101102312B (en) A network communication data processing method, network communication system and client
CN101459573B (en) Method, router and communication network for router smoothly restarting
US20140010110A1 (en) Preventing loss of virtual machine network profiles
EP1896980A2 (en) Preserving sessions in a wireless network
US11310147B2 (en) Advertising route
CN105812287A (en) Effective circuits in packet-switched networks
US20130028258A1 (en) Cached routing service
CN109756429B (en) Bandwidth allocation method and device
CN100459585C (en) Method for avoiding route equipment frequent switchover state and one type route equipment
CN102045234B (en) Buffering and overtime processing methods of route address mapping information as well as tunnel router
Wang et al. A improved Prophet routing based on congestion level of nodes in DTN
EP2804352B1 (en) Method and apparatus for processing residual information
JP6683711B2 (en) System and method for supporting an efficient virtual output queue (VOQ) packet flushing scheme in a networking device
CN108521611B (en) Anti-jitter video data access method and computer equipment
CN113904845B (en) Attack flow statistics method and device
US10469445B2 (en) Method for communication between network device and terminal device, network device, and terminal device
CN115378815A (en) Data recovery method, device, network equipment and storage medium
CN105610708A (en) Method for realizing multicast FRR in TRILL network and RB equipment
JP6737286B2 (en) Communication predicting apparatus, communication predicting method, and recording medium storing computer program
CN107395523B (en) Control method and network architecture
CN101304379A (en) Method and apparatus for deciding BGP route
CN102647733A (en) Dynamic adjusting method of PS (Packet Switch) permanent timer and RNC (Radio Network Controller)
CN108781170A (en) A kind of configuration device and method

Legal Events

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