|

BGP States | Finite State Machine | BGP Part-2

BGP States, BGP Finite State Machine
Summary Insights:
  • BGP States also called BGP finite state machine (FSM).
  • The term “Peer” is used for the neighbor relation between two BGP routers same like neighbor is used in other IGP protocol. BGP is not using broadcast or multicast but using unicast mode to configure peer with other BGP device.
  • The key point  in BGP is that the peer will established with directly  & indirectly connected devices, in IGP for neighbor directly connection is necessary for neighboring.
  • BGP will passes through different BGP states to establish BGP peer & share routes with each other.

Interview Questions & Answer:

  • How many states in BGP?
  • What will be the reason if BGP is stuck in idle state?
  • Which message is sending in open sent state?
  • Open message contain which parameters?
  • BGP is working in broadcast/multicast/unicast ?
  • How many version of BGP?
  • Why BGP in connect & active state?
  • BGP is working which protocol in tranpost layer?
  • What in BGP update message ?
  • BGP attributes are sending in which message type?
  • Keepalive message is send in which state of BGP?
  • BGP Port number?
  • If two device indirectly connect how to configure BGP?

Today I will explain about BGP states & the reason when stuck in any BGP states.

BGP States:

BGP States

Below are the six BGP States:

  • Idle
  • Connect
  • Active
  • Open sent
  • Open confirm
  • Established

Keep in mind that BGP is TCP base protocol on transport layer. After TCP process completed then will start BGP negotitaiton. That’s why the first three states consist of TCP processes & last three are BGP.

BGP State Transition Flow chart:

BGP States flow, Idle,Connect,Active,Open sent & open confirm

Idle State :

This is first state of BGP in this if no neighbor is configured or tries to initiate TCP session b/w to BGP nodes.

Reason to stay in Idle state:

  • Peer IP address not reachable.
  • Some error occurred in any state of BGP.

Connect State:

When neighbor IP address is reachable then next Initiate TCP connection process.

Reason to stay in Connect state:

  • TCP session is not completed  , May be TCP port is blocked on Router by acl.
  • One side BGP configured another side no BGP configuration.

Active State:

 Start another TCP three way handshake after TCP is failed in Connect state.

Reason to stay in Active state:

  • If BGP global process is configured on both side but manually neighbor/peer not configured.
  • When TCP not completed in connect state.

Open Sent State:

After TCP session is up in connect or active state the BGP state will change to open sent. In this open message with all parameters will send as we discussed in part-1 BGP message types.

Reason to stay in Open sent state:

  • When TCP is up then it will change to open sent state and will wait for open message from peer side.

Open Confirm State:

After verification of all parameters i-e version , AS number etc and  Open message received from peer side, the state will shift to Open confirm state.

 Reason to stay in Open confirm state:

  • Open message response received from peer side in open sent state.
  • Waiting for keepalive message.

Established State:

Keepalive message is exchanged & state changed to established.in this state update & keepalive message advertising b/w peer to built routing.

Reason to stay in Established state:

  • After the verification of all parameters on both sides of BGP Routers in open confirm state.

 BGP States & troubleshooting steps:

Understanding of BGP states & message type is very important for Network engineer to troubleshoot BGP. During project implementation some time BGP is stuck in different state & routing table is not sharing.

Below points need to check:

  • Check the BGP configuration is correct on both side like Autonomous number, Authentication, Peer ip address etc.
  • Nighbor ip address which you configured in BGP mode must be reachable.
  • Check with ping command to verify if its stuck in idle state.
  • Verify IP Address in routing table if Indirectly BGP peer.
  • If its stuck in Connect or active state then check TCP process negotiation like TCP port is allowed if any acl/policy configured.
  • The physical connection verification is also important point from the transmission engineer if device installed in different geo graphical location.

BGP States learning is very important during troubleshooting of big Network Design.

To learn BGP in more details you can check BGP Packet types to learn about all five BGP message types, Without BGP attributes BGP understanding is incomplete , there are multiple attributes in BGP to manipulate traffic as per Network requirments.

Leave a Reply

Your email address will not be published. Required fields are marked *