A fast detection method for satellite network link interruption based on BGP protocol
By adjusting the time of the Keepalive timer in the BGP protocol, if the neighbor's Keepalive message is not received, the timer will be immediately resented and shortened, which solves the problem that the BGP peer cannot detect link state changes in time, and achieves rapid convergence of BGP routing and reduced data loss.
Patent Information
- Application Number
- CN202411672171.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-04-04
AI Technical Summary
In the existing BGP protocol, BGP neighbors remain for too long, resulting in the BGP peer being unable to detect changes in the link state between them and their neighbors in time, affecting the convergence speed of network routing, and may cause routing failure and data loss.
By adjusting the Keepalive timer time, if the peer does not receive the Keepalive message from the neighbor peer within the Keepalive timer time, the Keepalive message will be resent immediately and the timer time will be reset to a shorter value until the message is not received three consecutive times.
It realizes that the BGP peer can detect changes in link state in time, shorten the convergence time of BGP routing, and reduce the risk of data loss.
Smart Images

Figure CN119766690A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of satellite communication, and in particular to a BGP protocol-oriented satellite network link interruption rapid discovery method. Background Art
[0002] BGP (Border Gateway Protocol) is a dynamic routing protocol used between AS (Autonomous System) to achieve interconnection between autonomous systems. An autonomous system AS is a group of routers running under the same network operator, and the routers in the same AS run the same routing protocol. Two BGP routers (BGP speakers) that can exchange routing information are BGP neighbors, and routers that establish a BGP neighbor relationship are called BGP peers. BGP connections are established between peers based on the TCP protocol, and routing information can be exchanged after the BGP connection is established. When a BGP peer receives routing information, it performs route aggregation and route selection according to the route screening policy of the BGP protocol, generates the optimal routing table, and sends it to the switch; at the same time, it generates route interaction messages according to the route update policy of the BGP protocol and distributes them to its neighbor peers.
[0003] In order to maintain the BGP peer connection relationship, after the connection is established, the BGP peer periodically sends Keepalive messages to the neighbor peer to monitor whether the TCP connection is alive. The Keepalive message sending period (the default value is 60 seconds) is specified by the Keepalive timer. The implementation of the Keepalive timer is based on the TCP timer mechanism. The Keepalive timer is implemented through the TCP protocol keepalive timer.
[0004] If a BGP peer does not receive the Keepalive message periodically sent by its neighbor peer for three consecutive times, it considers that the TCP connection between the two has been disconnected, and then sends a Notification message with the error code set to 4 (this error code indicates that the Keepalive timer has timed out) to the neighbor peer, and closes the BGP connection between the two. This mechanism is used to maintain the BGP peer connection relationship and ensure the timely exchange of BGP routing information.
[0005] In the above peer connection maintenance mechanism of the BGP protocol, there is a problem that the BGP neighbor hold time is too long (three Keepalive message sending cycles, with a default duration of 180 seconds), resulting in the BGP peer being unable to detect the change in the link state between it and the neighbor in a timely manner, thereby affecting the network routing convergence speed. In this case, when the link is interrupted due to a fault or other reasons, the BGP peer needs a long time to discover the change in the link state, resulting in a large delay in route recalculation and routing table update, which may cause route failure and further lead to data loss problems during the data forwarding process. In a satellite network, satellites have high dynamicity and are affected by the space environment at the same time, resulting in frequent changes in inter-satellite and satellite-ground links. Therefore, it is extremely important for BGP to quickly detect link interruptions. Summary of the Invention
[0006] The purpose of the present invention is to provide a method for quickly detecting satellite network link interruptions for the BGP protocol in view of the above deficiencies of the prior art, so as to solve the problem that the long BGP neighbor hold time causes the BGP peer to fail to detect the change in the link state between it and the neighbor in a timely manner, resulting in slow BGP routing convergence speed and data loss.
[0007] To achieve the above purpose, the technical solution adopted by the present invention is as follows:
[0008] A method for quickly detecting satellite network link interruptions for the BGP protocol includes the following steps:
[0009] (1) The peer sets the Keepalive timer time to the normal sending cycle T0 of the Keepalive message and sends the Keepalive message to the neighbor peer at a cycle of T0.
[0010] (2) If the peer does not receive the Keepalive message from the neighbor peer within the Keepalive timer time T0, it immediately resends the Keepalive message to the neighbor peer, resets the Keepalive timer time to T1, where T1 < T0, and continues to send the Keepalive message to the neighbor peer at a cycle of T0 starting from the current sending time.
[0011] (3) If the peer receives a Keepalive message from the neighboring peer before the Keepalive timer T1 times out, it resets the Keepalive timer to T0. At the same time, it determines whether the Keepalive message reception interval is less than T0. If so, it immediately sends a Keepalive message in reply and continues to send Keepalive messages to the neighboring peer with T0 as the starting point. Otherwise, it continues to send Keepalive messages to the neighboring peer with T0 as the starting point.
[0012] (4) If a peer fails to receive a Keepalive message from a neighboring peer within the Keepalive timer for three consecutive times, it sends a Notification message containing a Keepalive timer expiration error code to the neighboring peer and closes the BGP connection.
[0013] Compared with the prior art, the present invention has the following advantages:
[0014] 1. The implementation steps of the method of the present invention are all based on the existing messages of the BGP protocol and are compatible with the existing BGP protocol.
[0015] 2. The present invention overcomes the shortcomings of the original mechanism that the BGP neighbor retention time is long and the routing convergence speed is slow when the link is interrupted, so that the present invention can detect the change of the link status in time and realize the rapid convergence of the routing.
[0016] 3. In the present invention, the link interruption can be determined when the Keepalive timer times out, and compared with the link interruption discovery process of the original BGP protocol, the signaling interaction load is not increased. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flow chart of the present invention.
[0018] Figure 2 It is a timing diagram of the present invention. DETAILED DESCRIPTION
[0019] The present invention will be further described below in conjunction with the accompanying drawings.
[0020] A satellite network link interruption fast detection method for BGP protocol, such as Figure 1 and Figure 2 As shown, the following steps are included:
[0021] (1) The peer sets the Keepalive timer to the normal Keepalive message sending period T0, and sends Keepalive messages to its neighboring peers at a period of T0.
[0022] (2) If the peer does not receive the Keepalive message from the neighbor peer within the Keepalive timer time T0, it immediately resends the Keepalive message to the neighbor peer, resets the Keepalive timer time to T1 (T1 < T0), and continues to send Keepalive messages to the neighbor peer at a period of T0 starting from the current sending time.
[0023] (3) If the peer receives the Keepalive message from the neighbor peer before the Keepalive timer time T1 times out, it resets the Keepalive timer time to T0. At the same time, it determines whether the receiving interval of the Keepalive message is less than T0. If so, it immediately sends a Keepalive message for reply and continues to send Keepalive messages to the neighbor peer at a period of T0 starting from the current sending time. Otherwise, it continues to send Keepalive messages to the neighbor peer at a period of T0 starting from the current receiving time.
[0024] (4) If the peer fails to receive the Keepalive message from the neighbor peer three consecutive times within the Keepalive timer time (i.e., one T0 and two T1s), it sends a Notificiation message containing the Keepalive timer timeout error code to the neighbor peer and closes the BGP connection.
[0025] The implementation principle of the present invention is as follows:
[0026] After the link between BGP peers is interrupted, the BGP peer that experiences the Keepalive timer timeout temporarily sends the Keepalive message in advance and changes the Keepalive timer time (less than the normal sending period of the Keepalive message). After receiving the Keepalive message, the peer determines that the received Keepalive message is a temporarily reissued Keepalive message through the receiving interval of the Keepalive message, and immediately sends a Keepalive message for reply. If the peer fails to receive the Keepalive message from the neighbor peer three consecutive times within the Keepalive timer, it determines that the link is interrupted, sends a Notificiation message to the neighbor peer, and closes the BGP connection to achieve rapid discovery of link interruption.
[0027] The following is a more specific example:
[0028] A method for rapid discovery of satellite network link interruption for BGP protocol, still see Figure 1 and Figure 2 , including the following steps:
[0029] Step 1: The peer sets the initial Keepalive timer T0 to 60 seconds and sends Keepalive messages to its neighboring peers at a period of 60 seconds.
[0030] Step 2: If the peer does not receive the Keepalive message from the neighboring peer within the initial Keepalive timing T0, it immediately resends the Keepalive message to the neighboring peer and resets the Keepalive timer to T1 = 10 seconds. Starting from the current sending time, it continues to send Keepalive messages to the neighboring peer at a period of 60 seconds.
[0031] Step 3: If the peer receives a Keepalive message from the neighboring peer before the reset Keepalive timer times out (i.e., T1 times out), the Keepalive timer is reset to 60 seconds; at the same time, it determines whether the reception interval of the Keepalive message is less than 60 seconds. If so, it immediately sends a Keepalive message in reply, and continues to send Keepalive messages to the neighboring peer with a period of 60 seconds starting from the current sending time; otherwise, it continues to send Keepalive messages to the neighboring peer with a period of 60 seconds starting from the current receiving time.
[0032] Step 4: If the Keepalive timer of a BGP peer times out three times in a row (i.e., one T0 and two T1s), a Notification message with an error code set to 4 (the error code indicates that the Keepalive timer has timed out) is sent to the neighboring peer, and the BGP connection between the two is closed.
[0033] The Keepalive timing and the time advance of temporarily reissuing the Keepalive message of the present invention can be changed according to actual conditions without affecting the effect of the link interruption discovery mechanism proposed by the present invention.
[0034] In summary, the present invention can support the BGP protocol in the case of link failure, shorten the keep-alive time of the BGP peer connection, detect the change of the link status in time, and promote the rapid convergence of the route.
Claims
1. A method for quickly discovering satellite network link interruption based on BGP protocol, characterized in that: It includes the following steps: (1) The peer sets the Keepalive timer to the normal sending period T0 of the Keepalive message and sends the Keepalive message to the neighbor peer at a period of T0; (2) If the peer does not receive the Keepalive message from the neighbor peer within the Keepalive timer time T0, it immediately resends the Keepalive message to the neighbor peer, resets the Keepalive timer time to T1 (T1 < T0), and continues to send the Keepalive message to the neighbor peer at a period of T0 starting from the current sending time; (3) If the peer receives the Keepalive message from the neighbor peer before the Keepalive timer time T1 times out, it resets the Keepalive timer time to T0; meanwhile, it judges whether the receiving interval of the Keepalive message is less than T0. If so, it immediately sends a Keepalive message for reply and continues to send the Keepalive message to the neighbor peer at a period of T0 starting from the current sending time. Otherwise, it continues to send the Keepalive message to the neighbor peer at a period of T0 starting from the current receiving time; (4) If the peer fails to receive the Keepalive message from the neighbor peer within the Keepalive timer time for three consecutive times, it sends a Notificiation message containing the Keepalive timer timeout error code to the neighbor peer and closes the BGP connection.