Customer Service Center
Home
Knowledge Base
Contact Support
License Activation
|
Contact Support
|
License Activation
|
Spirent KB Article
Doc ID: FAQ19915
Printer Friendly
Email Article Link
What are the different BPG states?
Environment/Versions
BGP
Answer
Idle
Idle
is BGP’s first state. If BGP detects a start event where a new BGP neighbor is configured or an established BGP peering is reset, BGP will initialize some resources and reset the
ConnectRetryTimer
. Then, it tries to initiate a TCP connection to the BGP peer. It will also listen for a new connection established by a BGP peer router. If BGP succeeds in this stage, it will move to
Connect
state.
If it fails, BGP will stay in an
Idle
state. The
ConnectRetryTimer
is then set to 60 seconds and it should decrement to zero for the connection to be initiated again. If it fails again, the previous
ConnectRetryTimer
will be doubled and should be decremented to zero for a new connection to be initiated again.
Connect
In this state, BGP waits for the
three-way TCP handshake
to be completed. If it succeeds, the
ConnectRetryTimer
will be reset by the established BGP session process. An
OPEN
message to the neighbor will be sent and will proceed to the
OpenSent
state.
If it fails, the state will continue to the
Active
state. If the
ConnectRetry
timer gets to zero and the
Connect
stage is not yet completed, the
ConnectRetryTimer
will be reset and BGP will attempt a new
three-way TCP handshake
. If some other things happen, such as BGP being reset, then the state will go back to
Idle
.
Active
BGP attempts a new
three-way TCP handshake
and establishes a connection with the BGP neighbor in this state. If it succeeds, an
OPEN
message will be sent to the neighbor and the hold timer will be set to
4 minutes
. Then, the state will be changed to
OpenSent.
If the TCP connection fails and/or the
ConnectRetryTimer
gets depleted, the state will return back to
Connect
state. The
ConnectRetryTimer
will be reset as well. Again, if some other things happen, such as the BGP process being reset, the state will go back to
Idle
.
OpenSent
After sending an
OPEN
message to the neighbor, BGP waits for an
OPEN
message from the BGP neighbor as well. The
OPEN
messages are both checked and compared for errors, such as:
BGP version numbers should match.
The OPEN message AS number must match the BGP neighbor’s AS number.
The OPEN message source IP address must match the BGP neighbor’s IP address.
BGP Identifiers, Router ID (RID), must exist and should be unique.
Security Parameters
If there are no errors on the
OPEN
messages, BGP will send a
KEEPALIVE
message. The
hold time
is also negotiated using the lowest value between the two BGP routers. Then, the state will be moved to
OpenConfirm
.
If an error is found, a
NOTIFICATION
message will be sent, and the state will return to
Idle
. If the TCP session fails and gets disconnected, BGP will close the TCP connection and will reset the
ConnectRetryTimer
. The state will be back to an
Active
state. If any other event happens, the state will be moved to
Idle
.
OpenConfirm
In this state, BGP waits for
KEEPALIVE
messages from the BGP neighbor. If the BGP router receives a
KEEPALIVE
message, the state will move to an
Established
state and the BGP neighbor adjacency will be complete. If this happens, the
hold timer
will be reset as well.
If a
NOTIFICATION
message is received, or if the hold timer gets depleted, or if a stop event manifests, then the state will be back to
Idle
.
Established
Finally, the last of the BGP states, the
Established
state, is where the BGP neighbor adjacency is established. The BGP peers or BGP neighbors send
UPDATE
messages to exchange routing information. When
UPDATE
and
KEEPALIVE BGP
messages are received, the hold timer will be reset. If a
NOTIFICATION
message is received or if the
hold timer
expires, the state will move back to
Idle
.
Version
1.0
Publish Date
2022-04-13
Categories
Product : BGP
Related Articles