BGP - Finite State Machine (FSM)

The BGP Finite State Machine (FSM) is a model used to describe the various states and processes involved in a BGP routing session. BGP is the protocol that manages how packets are routed across the Internet through the exchange of routing and reachability information between edge routers. The BGP FSM is crucial for understanding how BGP establishes and maintains connections between these routers.

The BGP FSM consists of several states. The following diagram describes the progression through these states:


  1. Idle: The initial state where BGP waits to start a BGP session.
  2. Connect: In this state, a TCP connection is initiated with a peer.
  3. Active: If the TCP connection fails, the BGP process moves to the Active state, where it retries the connection.
  4. OpenSent: Once the TCP connection is successful, an OPEN message is sent to the peer, and the state moves to OpenSent.
  5. OpenConfirm: In this state, the router waits for an acknowledgment of the OPEN message.
  6. Established: The final state, where peers exchange UPDATE messages and routing information. This is the only state where BGP peers exchange routing information.

Transitions between these states are triggered by either the expiration of timers, user commands, or the reception of BGP messages. The FSM model helps in understanding the behavior of BGP sessions and in troubleshooting BGP-related issues.


Links to this page: