Neighbor Relationship
Cheat sheet · https://pcornel.dk/topic.php?topic=1133
Answer
A BGP neighbor relationship forms in steps: IP reachability to the peer, a TCP session on port 179, then OPEN messages with matching AS numbers and parameters, ending in Established. show bgp summary shows the state or the number of received prefixes.
Remember
A session needs, in order: a route to the peer's address, TCP port 179 between exactly the addresses each side has configured for the other, and agreeing AS numbers. The source address you connect from must be the address the peer has in its neighbor statement. Established with 0 prefixes is a healthy session — look at address-family activation, network statements and policy instead.
First checks
show ip bgp summary → a number in State/PfxRcd = Established; a word = not. show ip bgp neighbors <ip> | include BGP state|Last reset → state and the reason for the last reset. ping <peer> source <local peering address> → reachability with the right source.
Commands
show ip bgp summaryping <peer> source <local peering address>show tcp brief
Verify in this order
route to the peer → TCP 179 between the configured addresses → OPEN exchange (AS, hold time, capabilities, authentication) → Established → address family activated → prefixes exchanged
Where it usually breaks
underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path
BGP FSM quick reference
| State | Meaning | Next boundary |
|---|---|---|
| Idle | Initial/restart/no active session | config, peer reachability |
| Connect | Waiting on TCP connection | TCP/179 path |
| Active | Retrying transport/session | route, ACL, source, peer IP |
| OpenSent | OPEN sent/received negotiation | ASN/capabilities/auth |
| OpenConfirm | OPEN accepted; keepalive confirmation | stability/timers |
| Established | UPDATE exchange possible | exact prefix/policy/best path |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=1133