CN114221896B - BGP route oscillation suppression method and device - Google Patents

BGP route oscillation suppression method and device Download PDF

Info

Publication number
CN114221896B
CN114221896B CN202111331662.3A CN202111331662A CN114221896B CN 114221896 B CN114221896 B CN 114221896B CN 202111331662 A CN202111331662 A CN 202111331662A CN 114221896 B CN114221896 B CN 114221896B
Authority
CN
China
Prior art keywords
route
period
suppression
count value
value
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
CN202111331662.3A
Other languages
Chinese (zh)
Other versions
CN114221896A (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.)
New H3C Big Data Technologies Co Ltd
Original Assignee
New H3C Big Data 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 New H3C Big Data Technologies Co Ltd filed Critical New H3C Big Data Technologies Co Ltd
Priority to CN202111331662.3A priority Critical patent/CN114221896B/en
Publication of CN114221896A publication Critical patent/CN114221896A/en
Application granted granted Critical
Publication of CN114221896B publication Critical patent/CN114221896B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/028Dynamic adaptation of the update intervals, e.g. event-triggered updates

Landscapes

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

Abstract

The application provides a method and a device for suppressing BGP route oscillation, wherein the method comprises the following steps: starting a first route inhibit period cycle; calculating a plurality of suppression periods in the first route suppression period cycle, wherein the suppression periods are used for reducing the times of sending a plurality of route update messages by the network equipment, and each route update message issues the same route; judging whether the network equipment has route oscillation in a preset time period; if the route oscillation does not occur, ending the circulation of the first route inhibition period and starting the circulation of the second route inhibition period; if the route oscillation occurs, judging whether the duration of the current suppression period is equal to the preset duration of the preset time period; and if so, ending the first route inhibition period circulation and starting the second route inhibition period circulation.

Description

BGP route oscillation suppression method and device
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method and an apparatus for suppressing BGP route oscillation.
Background
At present, when the route in the networking is changed, the network device will issue a route update message to the neighbor network device, and the network device receiving the route update message recalculates the route and modifies the route table. The route concussion refers to the phenomenon that a certain route in a route table is repeatedly eliminated and reappeared, and is caused by the network equipment receiving a plurality of route update messages aiming at the same route and issued by a neighbor network.
Border gateway protocol (english: border Gateway Protocol, abbreviated: BGP) is a dynamic routing protocol that can be used between different ases AS well AS within the same AS. BGP provides highly reliable connectivity, flexible routing, and diverse route propagation control strategies. And BGP may be the bearer protocol to communicate control information for many other protocols.
BGP is typically deployed in a complex network environment where BGP routes change quite frequently, potentially causing route concurrency. The repeated calculation of the route caused by the route oscillation consumes a great deal of bandwidth resources and CPU resources of the network equipment, and the normal operation of the network can be affected in severe cases. In addition, because BGP automatically propagates routes, network traffic disruption caused by route oscillation is diffused into other network devices in the network, thereby further increasing the hazard. Therefore, how to suppress BGP route oscillation to reduce its impact on the network is an indispensable key technology.
When BGP routes oscillate, the network device may continuously send reachable messages and revocation messages of the same route to neighbor network devices. The network device may suppress BGP route concurrency by limiting the frequency of sending route update messages.
For example, the network device sets the time interval for issuing the same route to be 10s. After the network device issues the first route update message carrying the route 8.8.8.8/32 to the neighboring network device, the network device issues the second route update message carrying the route 8.8.8.8/32 to the neighboring network device again at least after 10s, no matter how many times the route 8.8.8.8/32 oscillates within the 10s.
In practical network applications, the BGP route oscillation may change, and along with the change of BGP route oscillation frequency, the time interval in which the network device issues the same route should also change, so as to meet different requirements of networking. For example, when the BGP route oscillation frequency is high, the network device should set a large time interval to prevent the route change generated by the route oscillation from being too frequent; when the oscillation frequency of the BGP route is low, a small time interval should be set to prevent the normal route update from being inhibited.
However, the conventional method of limiting the route update message transmission frequency can only set a fixed time interval, cannot adapt to the changing network, and is not flexible enough.
Disclosure of Invention
In view of this, the present application provides a method and apparatus for suppressing BGP route oscillation, so as to solve the problem that the existing method for limiting the sending frequency of the route update message cannot adapt to the changing networking and is not flexible enough.
In a first aspect, the present application provides a method for suppressing BGP route oscillation, where the method is applied to a network device, and the network device has sent a first route update message, and the method includes:
starting a first route inhibit period cycle;
calculating a plurality of suppression periods in the first route suppression period cycle, wherein the suppression periods are used for reducing the times of sending a plurality of route update messages by the network equipment, and each route update message issues the same route;
judging whether the network equipment has route oscillation in a preset time period;
if the route oscillation does not occur, ending the circulation of the first route inhibition period and starting the circulation of the second route inhibition period;
if the route oscillation occurs, judging whether the duration of the current suppression period is equal to the preset duration of the preset time period;
and if so, ending the first route inhibition period circulation and starting the second route inhibition period circulation.
In a second aspect, the present application provides an apparatus for suppressing BGP route oscillation, where the apparatus is applied to a network device, and the network device has sent a first route update message, and the apparatus includes:
a starting unit for starting the first route inhibit period cycle;
a calculating unit, configured to calculate a plurality of suppression periods in the first route suppression period cycle, where the suppression periods are used to reduce the number of times that the network device sends a plurality of route update messages, where each route update message issues the same route;
the first judging unit is used for judging whether the network equipment has route oscillation or not in a preset time period;
the starting unit is further configured to end the first route suppression cycle and start a second route suppression cycle if no route oscillation occurs;
the second judging unit is used for judging whether the duration of the current inhibition period is equal to the preset duration of the preset time period if the route oscillation occurs;
the starting unit is further configured to end the first route suppression period cycle and start the second route suppression period cycle if the first route suppression period cycle and the second route suppression period cycle are equal to each other.
In a third aspect, the present application provides a network device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor to cause the processor to perform the method provided in the first aspect of the present application.
Therefore, by applying the method and the device for suppressing BGP route oscillation provided by the present application, after the network device sends the first route update message, a first route suppression cycle is started; in the first route inhibition period cycle, the network equipment calculates a plurality of inhibition periods, wherein the inhibition periods are used for reducing the times of sending a plurality of route update messages by the network equipment, and each route update message issues the same route; the network equipment judges whether routing oscillation occurs in the network equipment within a preset time period; if the routing oscillation does not occur, the network equipment finishes the circulation of the first routing inhibition period and starts the circulation of the second routing inhibition period; if the route oscillation occurs, the network equipment judges whether the duration of the current suppression period is equal to the preset duration of the preset time period; if so, the network device ends the first route suppression period cycle and starts a second route suppression period cycle.
Therefore, according to the change of the networking state, the network equipment continuously adjusts the frequency of issuing the route update message of the same route, thereby realizing the dynamic suppression of the route oscillation and reducing the difficulty of deployment. The method solves the problems that the existing method for limiting the route update message sending frequency can not adapt to the networking in the change and is not flexible enough.
Drawings
Fig. 1 is a flowchart of a method for suppressing BGP route oscillation provided in an embodiment of the present application;
fig. 2 is a block diagram of a BGP route oscillation suppression device provided in an embodiment of the present application;
fig. 3 is a hardware structure of a network device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to 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 some aspects of the present application as detailed in the accompanying claims.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present 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 will also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the corresponding listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first message may also be referred to as a second message, and similarly, a second message may also be referred to as a first message, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
The method for suppressing BGP route oscillation provided in the embodiment of the present application is described in detail below. Referring to fig. 1, fig. 1 is a flowchart of a method for suppressing BGP route oscillation provided in an embodiment of the present application. The method is applied to a network device, which may be embodied as a router. The method for suppressing BGP route oscillation provided in the embodiment of the present application may include the following steps.
Step 110, starting a first route inhibit period loop.
Specifically, the network device establishes BGP neighbors with other network devices within the network and mutually publishes the learned routing information. After the network device sends the first route update message to the BGP neighbor, the first route suppression cycle is started.
In this embodiment of the present application, the route suppression period includes a plurality of suppression periods in a cycle, and the duration of each suppression period may be the same or different, and the duration is calculated according to the number of route oscillation times of the network device itself. The process of the network device starting from entering the first withholding period until a fallback occurs for the duration of the withholding period is referred to as a withholding period cycle.
It should be noted that, the network device includes an intelligent timer, and the intelligent timer can complete the steps involved in the embodiments of the present application.
Step 120, in the first route suppression period cycle, calculating a plurality of suppression periods, where the suppression periods are used to reduce the number of times that the network device sends a plurality of route update messages, where each route update message issues the same route.
Specifically, according to the description of step 110, after the network device starts the first route suppression period cycle, a plurality of suppression periods are calculated within the route suppression period cycle. Each suppression period is used for reducing the times that the network equipment sends the route update message, and each route update message issues the same route.
Further, in the first route suppression period cycle, the network device calculates a plurality of suppression periods by:
the network device obtains a preset initial Count (Count) value and a current Count value of a current suppression period, and judges whether a difference value between the current Count value and the initial Count value is equal to 0.
If the minimum duration of the preset minimum suppression period is equal to 0, the network equipment takes the minimum duration of the preset minimum suppression period as the duration of the current suppression period; if the value is greater than 0, the network device calculates a first value, wherein the first value is the sum of the minimum duration and a second value, the second value is the product of a preset penalty increment and a third value, and the third value is the power of N of 2. Where N is the difference between the current Count value and the initial Count value.
The network equipment judges whether the first value is smaller than the maximum duration of a preset maximum inhibition period; if the value is smaller than the current suppression period, the network equipment takes the first value as the duration of the current suppression period; if not, the network device takes the maximum duration as the duration of the current suppression period.
The minimum duration represents the minimum suppression period of the network device transmitting the same route, and is also the duration of the first suppression period.
The longest duration, representing the maximum withholding period for the network device to send the same route, is also the longest duration for which one withholding period can last.
Penalty increases affect the rate of increase of the quench period at the time of calculation.
Further, the specific process of the network device obtaining the current Count value of the current suppression period is as follows:
if the current suppression period is the first suppression period, the network equipment takes the initial Count value as the current Count value; if the current suppression period is not the first suppression period, the network device calculates the current Count value according to the previous Count value of the previous suppression period of the current suppression period.
The initial Count value is also the sum of the times of actually sending the route update message of the same route in each suppression period by the network device in one route suppression period cycle, and is the same as the initial Count value.
Further, the network device calculates the current Count value according to the previous Count value of the previous suppression period of the current suppression period, and the specific process is as follows:
in the previous suppression period, the network device determines whether the number of times itself is ready to send the route update message of the same route is greater than the previous Count value.
If the value is larger than the first value, the network equipment takes the sum value of the previous Count value and the fourth value as the current Count value; if not, the network device takes the previous Count value as the current Count value.
Wherein the fourth value is specifically 1; in one route suppression period cycle, the sum of the number of times the network device actually transmits route update messages of the same route in each suppression period is the same as the initial Count value.
It should be noted that, in this embodiment of the present application, after each suppression period is over, the network device may send the route update message 1 more time (the number of times that the network device actually sends the route update message is not counted in this sending), so as to trigger to enter the next suppression period. For example, after the first suppression period is over, the network device sends the route update message 1 more time, and enters the second suppression period after sending.
In the embodiment of the application, the network equipment flexibly suppresses the release of the same route according to the oscillation times of the BGP route. If the oscillation times are more, the inhibition time of the same route release is prolonged; if the oscillation times are small, the suppression time of the same route release tends to be stable or the suppression time is reduced so as to adapt to the changing network.
And 130, judging whether the network equipment has route oscillation within a preset time period.
Specifically, according to the description of step 120, after the network device calculates and passes through a plurality of suppression periods, it is determined whether a routing oscillation has occurred in itself within a preset period of time.
If the routing oscillation does not occur, the network device executes step 140; if the routing oscillation has occurred, the network device performs step 150.
In this embodiment of the present application, the preset duration of the preset time period is equal to the maximum duration of the foregoing preset maximum suppression period. The preset time period may span two or more suppression periods, or within a certain suppression period.
And 140, if the routing oscillation does not occur, ending the first routing inhibition period circulation and starting a second routing inhibition period circulation.
Specifically, according to the description of step 130, if the network device itself does not generate the route oscillation within the preset period, after the current suppression period is ended, the network device ends the first route suppression period cycle, and starts the second route suppression period cycle.
That is, the current suppression period is the end of the first route suppression period cycle, and the next suppression period is the start of the second route suppression period cycle.
Meanwhile, the network device takes the initial Count value as the Count value of the next suppression period, and calculates the duration of the next suppression period according to the description of the foregoing step 120. In the embodiment of the application, the network device takes the minimum duration of the minimum suppression period as the duration of the next suppression period.
And 150, if the routing oscillation occurs, judging whether the duration of the current suppression period is equal to the preset duration of the preset time period.
Specifically, according to the description of step 130, if the network device itself has undergone the routing oscillation within the preset time period, the network device determines whether the duration of the current suppression period is equal to the preset duration of the preset time period.
If the duration of the current suppression period is equal to the preset duration of the preset time period, the network device executes step 160; if the duration of the current suppression period is not equal to the preset duration of the preset time period, the network device calculates a plurality of suppression periods again, and repeatedly executes the foregoing step 130.
The process of calculating the plurality of suppression periods again by the network device is the same as the process of calculating the plurality of suppression periods described in step 120, and will not be repeated here.
And step 160, if the first route inhibition period circulation is ended, and the second route inhibition period circulation is started.
Specifically, according to the description of step 150, if the duration of the current suppression period is equal to the preset duration of the preset time period, after the current suppression period is ended, the network device ends the first route suppression period cycle, and starts the second route suppression period cycle.
That is, the current suppression period is the end of the first route suppression period cycle, and the next suppression period is the start of the second route suppression period cycle.
Meanwhile, the network device takes the initial Count value as the Count value of the next suppression period, and calculates the duration of the next suppression period according to the description of the foregoing step 120. In the embodiment of the application, the network device takes the minimum duration of the minimum suppression period as the duration of the next suppression period.
Therefore, by applying the method for suppressing BGP route oscillation provided in the present application, after the network device sends the first route update message, the first route suppression cycle is started; in the first route inhibition period cycle, the network equipment calculates a plurality of inhibition periods, wherein the inhibition periods are used for reducing the times of sending a plurality of route update messages by the network equipment, and each route update message issues the same route; the network equipment judges whether routing oscillation occurs in the network equipment within a preset time period; if the routing oscillation does not occur, the network equipment finishes the circulation of the first routing inhibition period and starts the circulation of the second routing inhibition period; if the route oscillation occurs, the network equipment judges whether the duration of the current suppression period is equal to the preset duration of the preset time period; if so, the network device ends the first route suppression period cycle and starts a second route suppression period cycle.
Therefore, according to the change of the networking state, the network equipment continuously adjusts the frequency of issuing the route update message of the same route, thereby realizing the dynamic suppression of the route oscillation and reducing the difficulty of deployment. The method solves the problems that the existing method for limiting the route update message sending frequency can not adapt to the networking in the change and is not flexible enough.
The method for suppressing BGP route oscillation provided in the embodiment of the present application is described in detail below. Taking the example that the maximum duration (max-update-interval) of the maximum suppression period is 100s, the minimum duration (min-update-interval) of the minimum suppression period is 10s, the initial Count value is 3, and the penalty increment (penalty increment) value is 7, the network device starts a first route suppression period cycle, and calculates a plurality of suppression periods in the first route suppression period cycle, wherein the specific process is as follows:
the network device calculates a first suppression period. The network device takes the initial Count value as a first Count value of a first suppression period. Since the difference between the first Count value and the initial Count value is equal to 0, the network device takes the minimum duration 10s as the duration of the first suppression period.
The network device enters a first suppression period. In the first suppression period, each time the network device generates BGP route oscillation, the network device prepares (or refers to try and pre-send) 1 first route update message, and the first route update message sent each time carries the same route. Assume that in the embodiment of the present application, in the first suppression period, the network device generates BGP route concurrency for 4 times, and at this time, the number of times that the network device prepares to send the first route update message is 4 times.
However, since the initial Count value is configured to be 3, the number of times the network device actually transmits the first route update message is 3. Meanwhile, since the number of times the network device prepares to send the first route update message is greater than the first Count value, the second Count value of the second suppression period calculated by the network device is the sum of the first Count value and 1, i.e. 3+1=4.
The network device calculates a duration of the second suppression period. The network device obtains the second Count value and the initial Count value, and judges whether the difference value between the second Count value and the initial Count value is equal to 0. Due to 4-3>0, the network device obtains the first value in accordance with the manner in which the first value was calculated in the previous embodiment.
In the embodiment of the present application, the first value is 10+7x2 (4-3) =24s. Since 24s <100s, the network device takes 24s as the duration of the second suppression period.
It is understood that when the network device is within the first quench period, the network device may calculate a second Count value for the second quench period and a duration of the second quench period.
It should be noted that, in this embodiment of the present application, after each suppression period is over, the network device may send the route update message 1 more time (the number of times that the network device actually sends the route update message is not counted in this sending), so as to trigger to enter the next suppression period. For example, after the first suppression period is over, the network device sends the route update message 1 more time, and enters the second suppression period after sending.
The network device enters a second suppression period. In the second suppression period, each time the network device generates BGP route oscillation, the network device prepares (or refers to try and pre-send) 1 first route update message, and the first route update message sent each time carries the same route. It is assumed that in the embodiment of the present application, in the second suppression period, the network device generates BGP route concurrency for 5 times, and at this time, the number of times that the network device prepares to send the first route update message is 5 times.
However, since the initial Count value is 3 and the network device has actually sent 3 times of the first route update messages in the first suppression period (it should be noted that, if the network device has actually sent 1 time of the first route update messages in the first suppression period, the network device sends 1 time of the first route update messages after the first suppression period is over, and the network device may actually send 2 times of the first route update messages in the subsequent suppression period), the number of times the network device actually sends the first route update messages is 0 time in the second suppression period. Meanwhile, since the number of times the network device prepares to send the first route update message is greater than the second Count value, the third current Count value of the third suppression period calculated by the network device is a sum value of the second Count value and 1, i.e. 4+1=5.
The network device calculates a duration of the third suppression period. The network device obtains a third current Count value and an initial Count value, and judges whether the difference value between the third current Count value and the initial Count value is equal to 0. Due to 5-3>0, the network device obtains the first value in accordance with the manner in which the first value was calculated in the previous embodiment.
In the embodiment of the present application, the first value is 10+7x2++5-3) =38s. Since 38s <100s, the network device takes 38s as the duration of the third suppression period.
Similarly, the fourth Count value of the fourth suppression period calculated by the network device is 5, and the duration of the fourth suppression period is 38s; the fifth Count value of the fifth suppression period is 6 and the duration of the fifth suppression period is 66s; the sixth Count value of the sixth suppression period is 7 and the duration of the sixth suppression period is 122s.
At this point, the network device takes 100s as the duration of the sixth suppression period, as 122s >100 s. That is, after the sixth suppression period ends, the first route suppression period cycle ends, and the second route suppression period cycle starts. The seventh suppression period calculated by the network device is the first suppression period in the second route suppression period cycle, and the duration of the first suppression period will fall back to 10s.
Based on the same inventive concept, the embodiment of the application also provides a device for suppressing BGP route oscillation, which corresponds to the method for suppressing BGP route oscillation. Referring to fig. 2, fig. 2 is a block diagram of a BGP route oscillation suppression device according to an embodiment of the present application. The apparatus is applied to a network device, the network device having sent a first route update message, the apparatus comprising:
a starting unit 210 for starting a first route inhibit period cycle;
a calculating unit 220, configured to calculate a plurality of suppression periods in the first route suppression period cycle, where the suppression periods are used to reduce the number of times that the network device sends a plurality of route update messages, where each route update message issues the same route;
a first judging unit 230, configured to judge whether a routing oscillation has occurred in the network device within a preset period of time;
the starting unit 210 is further configured to end the first route suppression period cycle and start the second route suppression period cycle if no route oscillation occurs;
a second judging unit 240, configured to judge whether the duration of the current suppression period is equal to the preset duration of the preset time period if the routing oscillation has occurred;
the starting unit 210 is further configured to end the first route suppression period cycle and start the second route suppression period cycle if the first route suppression period cycle and the second route suppression period cycle are equal.
Optionally, the calculating unit 220 and the first determining unit 230 are further configured to calculate a plurality of suppression periods again if they are not equal, and repeatedly perform the step of determining whether the network device has sent a routing oscillation within a preset period of time.
Optionally, the computing unit 220 specifically includes: an obtaining subunit (not shown in the figure) configured to obtain a preset initial Count value and a current Count value of a current suppression period;
a first judging subunit (not shown in the figure) for judging whether the difference between the current Count value and the initial Count value is equal to 0;
a processing subunit (not shown in the figure) configured to take, if equal to 0, a preset minimum duration of the minimum suppression period as a duration of the current suppression period;
a calculating subunit (not shown in the figure) configured to calculate a first value if the first value is greater than 0, where the first value is a sum of the minimum duration and a second value, where the second value is a product of a preset penalty increment and a third value, where the third value is a power of N of 2, and where N is a difference between the current Count value and the initial Count value;
a second judging subunit (not shown in the figure) for judging whether the first value is smaller than a preset maximum duration of the maximum suppression period;
the processing subunit (not shown in the figure) is further configured to take the first value as a duration of the current suppression period if the first value is smaller than the first value; and if not, taking the maximum duration as the duration of the current inhibition period.
Optionally, the acquiring subunit (not shown in the figure) is specifically configured to take the initial Count value as the current Count value if the current suppression period is the first suppression period;
and if the current suppression period is not the first suppression period, calculating the current Count value according to the previous Count value of the previous suppression period of the current suppression period.
Optionally, the acquiring subunit (not shown in the figure) is further specifically configured to determine, in the previous suppression period, whether the number of times the network device prepares to send the route update message of the same route is greater than the previous Count value;
if the value is larger than the current Count value, taking the sum value of the previous Count value and the fourth value as the current Count value;
and if not, taking the prior Count value as the current Count value.
Optionally, in one route suppression period cycle, the sum of the number of times the network device actually transmits the route update message of the same route in each suppression period is the same as the initial Count value.
Optionally, the preset duration of the preset time period is equal to the maximum duration.
Therefore, by applying the method and the device for suppressing BGP route oscillation provided by the present application, after the network device sends the first route update message, a first route suppression cycle is started; in the first route inhibition period cycle, the network equipment calculates a plurality of inhibition periods, wherein the inhibition periods are used for reducing the times of sending a plurality of route update messages by the network equipment, and each route update message issues the same route; the network equipment judges whether routing oscillation occurs in the network equipment within a preset time period; if the routing oscillation does not occur, the network equipment finishes the circulation of the first routing inhibition period and starts the circulation of the second routing inhibition period; if the route oscillation occurs, the network equipment judges whether the duration of the current suppression period is equal to the preset duration of the preset time period; if so, the network device ends the first route suppression period cycle and starts a second route suppression period cycle.
Therefore, according to the change of the networking state, the network equipment continuously adjusts the frequency of issuing the route update message of the same route, thereby realizing the dynamic suppression of the route oscillation and reducing the difficulty of deployment. The method solves the problems that the existing method for limiting the route update message sending frequency can not adapt to the networking in the change and is not flexible enough.
Based on the same inventive concept, the embodiment of the present application further provides a network device, as shown in fig. 3, including a processor 310, a transceiver 320, and a machine-readable storage medium 330, where the machine-readable storage medium 330 stores machine executable instructions capable of being executed by the processor 310, and the processor 310 is caused by the machine executable instructions to perform the BGP route oscillation suppression method provided by the embodiment of the present application. The BGP route oscillation suppression device shown in fig. 2 may be implemented by using a network device hardware structure shown in fig. 3.
The computer readable storage medium 330 may include a random access Memory (in english: random Access Memory, abbreviated as RAM) or a nonvolatile Memory (in english: non-volatile Memory, abbreviated as NVM), such as at least one magnetic disk Memory. Optionally, the computer readable storage medium 330 may also be at least one storage device located remotely from the aforementioned processor 310.
The processor 310 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; it may also be a digital signal processor (English: digital Signal Processor; DSP; for short), an application specific integrated circuit (English: application Specific Integrated Circuit; ASIC; for short), a Field programmable gate array (English: field-Programmable Gate Array; FPGA; for short), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In this embodiment, the processor 310 is enabled to implement the processor 310 itself and invoke the transceiver 320 to execute the BGP route oscillation suppression method described in the foregoing embodiment of the present application by reading the machine-executable instructions stored in the machine-readable storage medium 330.
In addition, the present embodiment provides a machine-readable storage medium 330, where the machine-readable storage medium 330 stores machine-executable instructions that, when invoked and executed by the processor 310, cause the processor 310 itself and the invoking transceiver 320 to perform the BGP route oscillation suppression method described in the foregoing embodiments of the present application.
The implementation process of the functions and roles of each unit in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present application. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The method content of the BGP route oscillation suppression device and the machine-readable storage medium embodiments is basically similar to the method embodiments, so the description is relatively simple, and the relevant points are referred to in the part description of the method embodiments.
The foregoing description of the preferred embodiments of the present invention is not intended to limit the invention to the precise form disclosed, and any modifications, equivalents, improvements and alternatives falling within the spirit and principles of the present invention are intended to be included within the scope of the present invention.

Claims (4)

1. A method for suppressing BGP route oscillation, wherein the method is applied to a network device, and the network device has sent a first route update message, the method includes:
starting a first route inhibit period cycle;
calculating a plurality of suppression periods in the first route suppression period cycle, wherein the suppression periods are used for reducing the times of sending a plurality of route update messages by the network equipment, and each route update message issues the same route;
judging whether the network equipment has routing oscillation in a preset time period, wherein the preset duration of the preset time period is equal to the maximum duration of the maximum suppression period;
if the route oscillation does not occur, ending the circulation of the first route inhibition period and starting the circulation of the second route inhibition period;
if the route oscillation occurs, judging whether the duration of the current suppression period is equal to the preset duration of the preset time period;
if the route inhibition period circulation is equal to the first route inhibition period circulation, ending the first route inhibition period circulation and starting the second route inhibition period circulation;
wherein, in the first route suppression period cycle, calculating a plurality of suppression periods specifically includes: acquiring a preset initial Count value and a current Count value of a current inhibition period; judging whether the difference value between the current Count value and the initial Count value is equal to 0; if the minimum duration is equal to 0, taking the preset minimum duration of the minimum suppression period as the duration of the current suppression period; if the value is greater than 0, calculating a first value, wherein the first value is the sum of the minimum duration and a second value, the second value is the product of a preset penalty increment and a third value, the third value is the power of N of 2, and N is the difference value between the current Count value and the initial Count value; judging whether the first value is smaller than the maximum duration of a preset maximum inhibition period or not; if the current suppression period is smaller than the preset value, taking the first value as the duration of the current suppression period; if not, taking the maximum duration as the duration of the current inhibition period;
the obtaining the current Count value of the current suppression period specifically includes: if the current inhibition period is the first inhibition period, the initial Count value is used as the current Count value; if the current suppression period is not the first suppression period, calculating the current Count value according to the previous Count value of the previous suppression period of the current suppression period;
the calculating the current Count value according to the previous Count value of the previous suppression period of the current suppression period specifically includes: in the previous suppression period, judging whether the number of times that the network equipment prepares to send the route update message of the same route is larger than the previous Count value; if the value is larger than the current Count value, taking the sum value of the previous Count value and the fourth value as the current Count value; if not, taking the previous Count value as the current Count value;
in one route inhibition period cycle, the summation of the times of actually sending route update messages of the same route in each inhibition period by the network equipment is the same as the initial Count value; after each quench period is over, the network device sends a route update message 1 more time.
2. The method according to claim 1, wherein the method further comprises:
if not, calculating a plurality of suppression periods again, and repeatedly executing the step of judging whether the network equipment has sent route oscillation within a preset time period.
3. A BGP route oscillation suppression apparatus, the apparatus being applied to a network device, the network device having sent a first route update message, the apparatus comprising:
a starting unit for starting the first route inhibit period cycle;
a calculating unit, configured to calculate a plurality of suppression periods in the first route suppression period cycle, where the suppression periods are used to reduce the number of times that the network device sends a plurality of route update messages, where each route update message issues the same route;
the first judging unit is used for judging whether the network equipment has route oscillation in a preset time period, and the preset duration of the preset time period is equal to the maximum duration of the maximum suppression period;
the starting unit is further configured to end the first route suppression cycle and start a second route suppression cycle if no route oscillation occurs;
the second judging unit is used for judging whether the duration of the current inhibition period is equal to the preset duration of the preset time period if the route oscillation occurs;
the starting unit is further configured to end the first route suppression period cycle and start the second route suppression period cycle if the first route suppression period cycle and the second route suppression period cycle are equal;
wherein, the computing unit specifically includes: the acquisition subunit is used for acquiring a preset initial Count value and a current Count value of a current suppression period; a first judging subunit, configured to judge whether a difference between the current Count value and the initial Count value is equal to 0; the processing subunit is used for taking the minimum duration of the preset minimum suppression period as the duration of the current suppression period if the minimum duration is equal to 0; a calculating subunit, configured to calculate a first value if the first value is greater than 0, where the first value is a sum of the minimum duration and a second value, the second value is a product of a preset penalty increment and a third value, the third value is an nth power of 2, and N is a difference between the current Count value and the initial Count value; the second judging subunit is used for judging whether the first value is smaller than the maximum duration of the preset maximum inhibition period; the processing subunit is further configured to take the first value as a duration of the current suppression period if the first value is less than the first value; if not, taking the maximum duration as the duration of the current inhibition period;
the obtaining subunit is specifically configured to take the initial Count value as the current Count value if the current suppression period is a first suppression period; if the current suppression period is not the first suppression period, calculating the current Count value according to the previous Count value of the previous suppression period of the current suppression period;
the obtaining subunit is further specifically configured to determine, in the previous suppression period, whether the number of times that the network device is ready to send a route update message of the same route is greater than the previous Count value; if the value is larger than the current Count value, taking the sum value of the previous Count value and the fourth value as the current Count value; if not, taking the previous Count value as the current Count value;
in one route suppression period cycle, the summation of the times of the network device actually sending the route update message of the same route in each suppression period is the same as the initial Count value; after each quench period is over, the network device sends a route update message 1 more time.
4. The apparatus of claim 3, wherein the computing unit and the first determining unit are further configured to, if they are not equal, recalculate a plurality of suppression periods and repeatedly perform the step of determining whether the network device has sent a routing oscillation within a predetermined time period.
CN202111331662.3A 2021-11-11 2021-11-11 BGP route oscillation suppression method and device Active CN114221896B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111331662.3A CN114221896B (en) 2021-11-11 2021-11-11 BGP route oscillation suppression method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111331662.3A CN114221896B (en) 2021-11-11 2021-11-11 BGP route oscillation suppression method and device

Publications (2)

Publication Number Publication Date
CN114221896A CN114221896A (en) 2022-03-22
CN114221896B true CN114221896B (en) 2023-12-26

Family

ID=80696947

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111331662.3A Active CN114221896B (en) 2021-11-11 2021-11-11 BGP route oscillation suppression method and device

Country Status (1)

Country Link
CN (1) CN114221896B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227262A (en) * 2008-02-20 2008-07-23 中兴通讯股份有限公司 System and method of route inhibiting
US9491092B1 (en) * 2014-09-30 2016-11-08 Juniper Networks, Inc. Apparatus, system, and method for preventing unintentional forwarding reconfiguration in network environments
CN106656608A (en) * 2016-12-27 2017-05-10 北京华为数字技术有限公司 Method for inhibiting interface oscillation, and routing device
CN108696433A (en) * 2018-07-24 2018-10-23 新华三技术有限公司 Route flapping suppressing method and BGP routing devices
CN110611614A (en) * 2019-07-31 2019-12-24 贵阳忆联网络有限公司 Method and system for inhibiting BGP neighbor oscillation
CN112965831A (en) * 2021-02-18 2021-06-15 新华三信息安全技术有限公司 Method and device for inhibiting repeated smoothing of data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227262A (en) * 2008-02-20 2008-07-23 中兴通讯股份有限公司 System and method of route inhibiting
US9491092B1 (en) * 2014-09-30 2016-11-08 Juniper Networks, Inc. Apparatus, system, and method for preventing unintentional forwarding reconfiguration in network environments
CN106656608A (en) * 2016-12-27 2017-05-10 北京华为数字技术有限公司 Method for inhibiting interface oscillation, and routing device
CN108696433A (en) * 2018-07-24 2018-10-23 新华三技术有限公司 Route flapping suppressing method and BGP routing devices
CN110611614A (en) * 2019-07-31 2019-12-24 贵阳忆联网络有限公司 Method and system for inhibiting BGP neighbor oscillation
CN112965831A (en) * 2021-02-18 2021-06-15 新华三信息安全技术有限公司 Method and device for inhibiting repeated smoothing of data

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BGP路由摆动抑制机制与路径探索;周婵;贵州教育学院学报(04);全文 *
D. McPherson ; TCB ; V. Gill ; AOL Time Warner, Inc. ; D. Walton ; A. Retana ; Cisco Systems, Inc. ; .Border Gateway Protocol (BGP) Persistent Route Oscillation Condition.IETF rfc3345.2002,全文. *
带路径探索检测的RCN路由抖动抑制算法;牟晓玲;张大方;曾彬;毕夏安;;计算机应用(11);全文 *

Also Published As

Publication number Publication date
CN114221896A (en) 2022-03-22

Similar Documents

Publication Publication Date Title
CN109039936B (en) Transmission rate control method, device, sending equipment and receiving equipment
CN109039746B (en) Method for detecting bidirectional forwarding path and detecting session state and processor
US20210392065A1 (en) Receive-side timestamp accuracy
US9112882B2 (en) Method and apparatus for the fast detection of connectivity loss between devices in a network
US20090154366A1 (en) Exchange of processing metric information between nodes
CN108965066B (en) Method and device for detecting transmission path
US8713097B2 (en) Adaptive period network session reservation
CN109379246B (en) Memory detection method and device
CN104660718B (en) A kind of information push method, device and push server
CN114221896B (en) BGP route oscillation suppression method and device
CN112087349B (en) Method, device and system for acquiring retransmission timeout value
US20230007606A1 (en) Method for time synchronization, method for broadcast setting, chip, electronic device, and storage medium
CN109274546B (en) Timer scheduling method and device
EP4046420A1 (en) Congestion notification to a node not yet joined to a network, resulting in a dynamic join time
US20140211604A1 (en) Method and Apparatus for the Fast Detection of Connectivity Loss Between Devices in a Network
CN117499317B (en) Link congestion control method and device, storage medium and electronic equipment
CN109905327B (en) Wireless network data transmission method, sending end and receiving end
CN113765711B (en) Network equipment keep-alive method and device
CN108141431B (en) Transmitting entity and method performed thereby for transmitting one or more data packets to a receiving entity
WO2024066311A1 (en) Method and device for determining phase difference, storage medium, and electronic device
CN111385219A (en) Method for realizing high-performance high-precision software TCP speed limit by means of hardware interruption
US11863451B2 (en) Hardware accelerated temporal congestion signals
CN113691882B (en) Method, device, equipment and storage medium for judging network condition
CN105187949A (en) Video transmission method and client
WO2024060601A1 (en) Message sending method and apparatus, and storage medium and electronic apparatus

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