Monday, 5 January 2026

BGP States

 BGP (Border Gateway Protocol) forms a neighbor relationship in well-defined states. Knowing these states helps a lot in real-time troubleshooting.


1️⃣ Idle
BGP process starts
Router waits before attempting a connection
No packets exchanged yet

📌 If stuck here → Neighbor IP wrong / ACL / BGP not enabled

2️⃣ Connect
TCP 3-way handshake (port 179) initiated
Router tries to establish TCP session

📌 If stuck here → Network reachability issue, firewall blocking TCP 179

3️⃣ Active
TCP connection failed
Router retries connection again
📌 Frequent Active state →
❌ IP reachability issues
❌ Wrong source interface
❌ BGP peer not configured

4️⃣ OpenSent
TCP connection established
Router sends OPEN message
AS number
Router ID
Hold time

📌 Failure here → AS mismatch / authentication issue

5️⃣ OpenConfirm
OPEN message received from neighbor
Waiting for KEEPALIVE

📌 Failure here → Timer mismatch / authentication / capability mismatch

6️⃣ Established ✅
BGP neighbor relationship is UP
Routes (NLRI) are exchanged

🎯 Goal state
👉 show ip bgp summary shows Established

🛠️ Real Troubleshooting Tip
If BGP keeps flapping between Active ↔ Idle:
Check:
ping neighbor
telnet neighbor 179
Source interface
AS number
MD5 authentication
Firewall / ACL

No comments:

Post a Comment

🔥 The Hidden Risk of “Wide Open” Internal Policies — And How To Remove Them Safely

In one of my recent projects, I noticed a wide open internal traffic policy in place. Later, I was asked to work on this issue and remove th...