A BGP session is in one of the following states at any moment in time:
Idle
This is the state of a BGP session when it is administratively disabled with the shutdown command, indicated with (Shutdown). In this state no incoming TCP connection is accepted from the peer. When the session is administratively enabled it transitions out of the Idle state immediately. When the session is restarted automatically it may not leave the Idle state immediately if damp-peer-oscillations is configured, damp-peer-oscillations holds a session in the Idle state for exponentially increasing amounts of time if the session is unstable and resets frequently.
Connect
This is the state of a BGP session when the router, acting in Active mode, is attempting to establish an outbound TCP connection with the remote peer.
Active
This is the state of a BGP session when the router is listening for an inbound TCP connection attempt from the remote peer.
OpenSent
This is the state of a BGP session when the router has sent an OPEN message to its peer in reaction to successful setup of the TCP connection and is waiting for an OPEN message from the peer.
OpenConfirm
This is the state of a BGP session after the router has received an acceptable OPEN message from the peer and sent a KEEPALIVE message in response and is waiting for a KEEPALIVE message from the peer. TCP connection collision procedures may be performed at this stage. For more details, see the RFC 4271, A Border Gateway Protocol 4 (BGP-4).
Established
This is the state of a BGP session after the router has received a KEEPALIVE message from the peer. In this state BGP can advertise and withdraw routes by sending UPDATE messages to its peer.