Walk me through the BGP neighbor states.
Show the answer
Say this first
Idle, Connect, Active, OpenSent, OpenConfirm, Established. Idle: not trying yet, or backing off after an
error. Connect: waiting for the TCP handshake to finish. Active: the TCP attempt failed and BGP is retrying
and listening. OpenSent: TCP is up and our OPEN is sent. OpenConfirm: the peer's OPEN was accepted, waiting
for its KEEPALIVE. Established: UPDATEs flow. show ip bgp summary shows the state, or a prefix count once
the session is Established.
Go deeper
| State | What is happening | If it sticks here, suspect |
|---|---|---|
| Idle | Not attempting | Admin shutdown, max-prefix hold-down, or on IOS often no route to the neighbor at all |
| Connect | TCP SYN sent, waiting | Normally passes in milliseconds |
| Active | TCP failed, retrying and listening | Reachability, update-source, TTL, port 179 filtered, auth |
| OpenSent | OPEN sent, waiting for the peer's | Brief; bouncing back means the OPEN was rejected |
| OpenConfirm | OPEN accepted, waiting for KEEPALIVE | Brief |
| Established | Routes exchanged | Check the prefix count, not just the state |
R1# show ip bgp summary | begin Neighbor
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.255.0.2 4 64500 112 109 14 0 0 01:32:10 6
192.0.2.1 4 64496 0 0 1 0 0 never Idle (Admin)
198.51.100.1 4 64497 12 15 0 0 0 00:00:41 Active- 10.255.0.2 is Established with 6 prefixes accepted after inbound policy.
- 192.0.2.1 was shut down by an engineer (
neighbor 192.0.2.1 shutdown). - 198.51.100.1 was up earlier (it has message counters) and has been retrying TCP for 41 seconds.
They will ask next
What does Idle (PfxCt) mean?
The neighbor sent more prefixes than
maximum-prefixallows. The session is held down until the restart timer expires or someone runsclear ip bgp.The state keeps flipping between Idle and Active. What next?
Read the log. A session that reaches OpenSent and gets rejected (wrong AS, duplicate router ID, bad hold time) leaves a NOTIFICATION message that names the reason. A pure TCP failure leaves none.
Traps
- Reading Active as "active and working". It means the TCP session cannot be built.
- Calling a session healthy because it is Established. Zero prefixes received is a policy or peer problem.