21/08/2025
BGP Neighbor States Explained:
In BGP (Border Gateway Protocol), the neighbor state (also called peer state) shows the status of the BGP session between two routers.
BGP goes through several finite states before reaching a stable session.
Here are the BGP neighbor states in order:
1. Idle
Initial state.
BGP is waiting for the neighbor configuration.
If something is wrong (ACL, TCP issue, wrong IP/AS), the router may remain here.
2. Connect
BGP is trying to establish a TCP (port 179) connection to the neighbor.
If successful → goes to OpenSent.
If not successful → goes to Active.
3. Active
BGP is actively trying again to connect to the neighbor.
If successful → goes to OpenSent.
If it fails repeatedly → back to Idle.
(If a session stays long in Active, it usually means there’s a connectivity problem).
4. OpenSent
TCP connection is established.
BGP sends an OPEN message to the neighbor.
Waiting to receive the OPEN message from the peer.
5. OpenConfirm
Both sides exchanged OPEN messages.
Now waiting for a KEEPALIVE message from the neighbor.
6. Established
Session is fully up! 🎉
BGP peers exchange UPDATE messages (routing information).
This is the state you want to see for a healthy BGP neighbor.
---
📌 Quick Troubleshooting Tips:
Idle / Active → likely connectivity, ACL, or wrong config (IP/AS mismatch).
OpenSent / OpenConfirm → usually authentication or parameter mismatch.
Established → Good, routing info exchanged.
Follow NetSec Academy for more.