Bgp Neighbor state machines

I was practicing BGP and faced lot of confusion in the Neighbor ship states of Idle, connect and Active. As per FSM the router transitions from idle to connect and then active but i see state flapping between idle and active and vice versa when i do any miscofig , also i have lot of consfusion over Bgp connect retry timer. Can anyone help me understand the FSM part specifically Idle connect and active states.

Comments

  • JoeMJoeM ✭✭✭

    Here is how I was finally able to show this state with a debug.

    First we must understand what the CONNECT vs ACTIVE states are:

    RFC 1771
    Idle state:
    In this state BGP refuses all incoming BGP connections.

    Connect state:
    In this state BGP is waiting for the transport protocol connection to be completed.

    Active state:
    In this state BGP is trying to acquire a peer by initiating a
    transport protocol connection.

    Okay, we can see the definitions as...
    IDLE=refuse all connections
    CONNECT="wait" for connection (passive)
    ACTIVE="ininiate" a connection to a neighbor (active).
    .
    .
    .
    So what can we do with a debug output? Let's try this command.

    neighbor 10.0.0.100 transport connection-mode passive

    debug ip bgp 10.0.0.100
    clear ip bgp 10.0.0.100
    .
    .
    DEBUG RESULT:
    \removed debug of clearing neighbor\
    BGP: nbr global 10.0.0.100 Active open failed - TCP session must be opened passively
    BGP: nbr global 10.0.0.100 Active open failed - TCP session must be opened passively
    BGP: 10.0.0.100 passive open to 10.0.0.1
    BGP: 10.0.0.100 passive went from Idle to Connect
    \removed initiation by remote neighbor\
    BGP: 10.0.0.100 passive went from Connect to OpenSent

Sign In or Register to comment.