iBGP vs eBGP
Compare BGP sessions inside one autonomous system with sessions between autonomous systems.
| Dimension | iBGP | eBGP | What it means in practice |
|---|---|---|---|
| Peers | Same AS number. | Different AS numbers. | remote-as equal to the local AS makes the session iBGP. |
| Administrative distance | 200. | 20. | An IGP route (110 or 90) beats an iBGP route to the same prefix. |
| Next hop | Not changed by default; use next-hop-self on border routers. | Set to the advertising router. | An unreachable next hop keeps iBGP routes out of the RIB. |
| Loop prevention | Routes from one iBGP peer are not sent to another (full mesh or route reflectors needed). | AS_PATH loop check. | Route reflectors replace the full mesh in larger networks. |
| TTL and source | Usually between loopbacks with update-source; TTL not limited. | Directly connected by default (TTL 1). | Use ebgp-multihop or ttl-security for eBGP between loopbacks. |
| Verification | show ip bgp summary; check next-hop reachability. | show ip bgp summary; show ip bgp neighbors <ip> advertised-routes | Established with 0 prefixes received usually means policy or missing network statements. |