BGP Finite State Machine Reference
Cheat sheet · https://pcornel.dk/topic.php?topic=213
Answer
The BGP finite state machine shows how a session comes up: Idle → Connect → Active (retrying TCP) → OpenSent → OpenConfirm → Established. A peer stuck in Active or Idle usually has a TCP, reachability or configuration problem.
Remember
Idle: not trying (no route to the peer, neighbor shutdown, or waiting after an error). Connect/Active: trying to open TCP — Active means the attempts are failing, not that the session works. OpenSent/OpenConfirm: TCP is up and the OPEN messages are being checked; flapping between Active and OpenSent points to a rejected OPEN (wrong AS, authentication). Only Established exchanges routes.
First checks
show ip bgp summary → the state word and Up/Down time. show ip bgp neighbors <ip> | include BGP state|Last reset → why it last went down. show tcp brief | include 179 → is there a TCP session at all. ping <peer> source <local peering address>.
Commands
show bgp ipv4 unicast summary- BGP peer state and prefix counts.
show ip bgp summary
Verify in this order
Idle → route to peer exists → Connect: TCP 179 attempt → fails: Active (retry) → TCP up: OpenSent → OPEN accepted: OpenConfirm → keepalive: Established → stuck in Active = reachability/source/ACL; bouncing at OpenSent = AS or authentication
Where it usually breaks
underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path
BGP Finite State Machine Reference operational reference
| Boundary | Known-good for BGP Finite State Machine Reference | Suspicious signature | Next proof |
|---|---|---|---|
| Input/session | Correct peer, source, AF and route context | Session/source/input state disagrees | Exact peer/source/prefix detail |
| Policy/protocol | BGP finite-state progression from Idle through Connect, Active, OpenSent and OpenConfirm to Established, with transport, OPEN negotiation and reset-reason boundaries kept separate matches intended design | persistent Active because TCP cannot complete, repeated OpenSent/OpenConfirm resets from ASN/authentication/capability disagreement, short Established uptime caused by transport instability, or an operator clearing the neighbor without preserving the reset reason and first failed state transition | Compare policy/attributes/propagation |
| Route/forwarding | Expected result reaches RIB/FIB | Control-plane state exists but installed path disagrees | RIB/FIB/CEF + next-hop proof |
| Closure | Original workload passes for explained reason | Symptom moved, was bypassed or state was forced | Regression/failover test |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=213