Pcornel
Networking · Routing › BGP

iBGP vs eBGP Deep Reference

Cheat sheet · https://pcornel.dk/topic.php?topic=229

Back to the Topic

Answer

eBGP runs between different autonomous systems, iBGP inside one. eBGP prepends its AS to the AS_PATH, sets itself as next hop and expects a directly connected peer. iBGP changes neither AS_PATH nor next hop, does not pass routes learned from one iBGP peer on to another, and its routes have administrative distance 200 instead of 20.

Remember

A route learned from an iBGP peer is never advertised to another iBGP peer — so every iBGP router needs a session to every other (full mesh) or a route reflector. iBGP leaves the next hop unchanged: use next-hop-self on the edge. Peer iBGP between loopbacks with update-source, so the session survives a link failure. LOCAL_PREF exists only on iBGP sessions.

First checks

show ip bgp neighbors <ip> | include link → internal link or external link. show ip bgp <prefix> → internal/external on the path and its next hop. show ip route <next-hop> → can this router reach it.

Commands

neighbor <peer> update-source <interface>
Uses a chosen local interface/address as the source for a BGP session.

Verify in this order

route learned over eBGP on the edge → advertised to every iBGP peer (next-hop-self) → each internal router needs its own iBGP session to the edge or a route reflector → next hop resolves through the IGP → installed with AD 200 → passed on only to eBGP peers

Where it usually breaks

underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path

iBGP vs eBGP Deep Reference operational reference

BoundaryKnown-good for iBGP vs eBGP Deep ReferenceSuspicious signatureNext proof
Input/sessionCorrect peer, source, AF and route contextSession/source/input state disagreesExact peer/source/prefix detail
Policy/protocolthe different propagation and path-handling rules of iBGP and eBGP, including ASN relationship, next-hop behavior, AS_PATH handling, iBGP full-mesh pressure and the rule that ordinary iBGP-learned routes are not simply re-advertised to another iBGP peer matches intended designiBGP speakers lack a full-mesh or route-reflector path, an iBGP-learned route is expected to propagate directly to another iBGP peer, NEXT_HOP is preserved but unreachable internally, the wrong update-source creates a peer-identity mismatch, or an eBGP/iBGP classification error leads to incorrect policy expectationsCompare policy/attributes/propagation
Route/forwardingExpected result reaches RIB/FIBControl-plane state exists but installed path disagreesRIB/FIB/CEF + next-hop proof
ClosureOriginal workload passes for explained reasonSymptom moved, was bypassed or state was forcedRegression/failover test

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=229

Confirmation

Confirm action

Continue?