FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
oarslan
Staff
Staff
Article Id 208989
Description This article describes BGP Neighbor Adjacency States.
Scope FortiGate.
Solution

BGP establishes a TCP connection with peers or adjacent routers. The Finite State Machine (FSM) is used by BGP to keep track of all BGP neighbors and the operational condition. The following states are possible for the BGP session to report:

BGP StatesBGP States
Idle: This is the initial state of BGP. In this state when a start event occurs (like configuring a new neighbor) the BGP resources will be initiated, the ConnectRetry timer will be reset and a TCP connection will be initiated to the neighbor.
In this state, BGP is also listening in case the remote peer will try to establish a connection.
When successful it moves to connect state.

 

If an error occurs the BGP process will transition to Idle state. From there the router will set a Connect timer, where it will not try to establish a BGP relationship with the declared offline member until the timer expires. Default Connect Timer FOS value 120.


Connect: In this state, BGP initiates the TCP connection. The device initiating the request uses a dynamic source port, but the destination port is always 179.
When the connection is successful an Open message is sent to the neighbor and it moves to the Open Sent state.
When it fails it moves to the Active state.

Active: The BGP process will try to establish another TCP connection with the neighbor.
When the connection is successful it will move to the Open Sent state.
When it fails it moves to Connect state.
In this state, BGP is also listening in case the remote peer will try to establish a connection.

Once the negotiated time out, still, if it fails then go back to connect or idle state based on the failure reason.

 

Open Sent: In this state, BGP is waiting for an Open message from the remote neighbor.
When an Open message is received, it will be checked for errors.

If there are no errors, BGP will start sending keepalive messages and move to the Open Confirm state.

When it is sending a keepalive it is set to hold on time, then moved to open confirm.
In this state the Hold timer is negotiated and whether EBGP or IBGP will be used.
In case there is an error in the received Open message, a Notification message is sent to the neighbor and it moves to the Idle state.

 

Open Confirm: In this state, BGP is waiting for a Keepalive message from the neighbor.
When a keepalive message is received it moves to Established state but in case a Notification message is received it moves to Idle state

 

Established: In this state the connection is fully established and Update messages with routing information are exchanged.
When a Keepalive or an Update message is received the Hold timer will reset.
If a Notification message is received the connection will close and BGP will move to the Idle state.