Share:
Notifications
Clear all

BGP states

1 Posts
1 Users
0 Likes
24 Views
(@kajal)
Posts: 172
Estimable Member
Topic starter
 

BGP (Border Gateway Protocol) uses a finite state machine (FSM) to manage the state of a BGP session between peers. Each state represents a different phase in the establishment and maintenance of the BGP connection. Here are the main BGP states:

1. Idle

  • Description: This is the initial state where the BGP process is not actively attempting to establish a connection with a peer.
  • Transition: Moves to the Connect state when a connection attempt is made.

2. Connect

  • Description: In this state, BGP is attempting to establish a TCP connection to the peer. It waits for a connection to be established.
  • Transition: Moves to the Active state if the TCP connection fails or to the OpenSent state if the connection is successful.

3. Active

  • Description: The BGP process is actively trying to establish a TCP connection with the peer. It means that BGP has not yet been able to establish a connection and is retrying.
  • Transition: Moves to the Connect state if the connection is not successful and back to Idle if the connection attempts continue to fail.

4. OpenSent

  • Description: BGP has sent an OPEN message to the peer and is waiting for an OPEN message from the peer in response.
  • Transition: Moves to the OpenConfirm state when a valid OPEN message is received from the peer.

5. OpenConfirm

  • Description: BGP has received an OPEN message from the peer and is waiting for a KEEPALIVE message to confirm that the session can be established.
  • Transition: Moves to the Established state when a KEEPALIVE message is received. Moves to the Idle state if a NOTIFICATION message is received indicating an error.

6. Established

  • Description: The BGP session is fully established. Both peers have exchanged OPEN messages, and the session is active. In this state, BGP messages (UPDATE, KEEPALIVE, and NOTIFICATION) can be exchanged.
  • Transition: Moves to the Idle state if a NOTIFICATION message is received indicating an error or if the session is manually shut down. Moves to the Active state if the connection is lost and needs to be re-established.

Summary of Transitions:

  • Idle → Connect: When starting to establish a BGP session.
  • Connect → Active: If the TCP connection fails; retrying connection.
  • Active → Connect: Retries to establish TCP connection.
  • Connect → OpenSent: TCP connection established; sending OPEN message.
  • OpenSent → OpenConfirm: Valid OPEN message received.
  • OpenConfirm → Established: KEEPALIVE message received.
  • Established → Idle: Error detected or session shutdown.
  • Established → Active: Connection lost and needs re-establishment.
 
Posted : 14/09/2024 8:02 pm
Share: