Octet

What is the difference between eBGP and iBGP?

Show the answer

Say this first

eBGP runs between routers in different ASes, iBGP between routers in the same AS. The protocol is the same, the rules differ. On Cisco, eBGP routes get administrative distance 20 and iBGP routes 200. eBGP peers expect to be directly connected (TTL 1), while iBGP peers usually sit several hops apart on loopbacks. eBGP adds the local AS to the path and sets itself as next hop; iBGP does neither. And a route learned over iBGP is never passed to another iBGP peer.

Go deeper

eBGPiBGP
PeersDifferent ASSame AS
Cisco AD20200
Default TTL1255
AS_PATH on sendLocal AS prependedUnchanged
NEXT_HOP on sendSet to itselfUnchanged by default
LOCAL_PREFNot sentSent
Re-advertising learned routesTo every peerNot to other iBGP peers
Loop preventionOwn ASN in AS_PATHiBGP split horizon (or RR attributes)
Cisco IOS
router bgp 64500
 neighbor 192.0.2.1 remote-as 64496
 neighbor 10.255.0.2 remote-as 64500
 neighbor 10.255.0.2 update-source Loopback0

The router decides eBGP or iBGP by comparing remote-as with its own AS. 192.0.2.1 is eBGP, 10.255.0.2 is iBGP.

Why the AD values

An eBGP route comes straight from the AS that owns the destination, so it is trusted above any IGP. An iBGP route is second-hand knowledge about an external prefix; if the IGP also knows that prefix, the IGP is closer to the truth inside your network, so iBGP's 200 loses to OSPF's 110.

Traps

  • Saying iBGP peers need a direct link. They need IP reachability, usually through the IGP.
  • Forgetting that iBGP keeps the external next hop. It is the classic reason iBGP routes are not installed.
How did you do?Book 4.1 Global Internet