Infrastructure · 30% of the exam

eBGP

External BGP peerings: how they form, what makes them different from iBGP, and the defaults that trip people up in the lab.

Updated August 12, 2026

eBGP is how your autonomous system talks to everyone else’s. The mechanics are simple enough to configure in four lines, and subtle enough to fail in a dozen ways — most of them down to defaults you only learn by hitting them.

Forming the peering

An eBGP session runs between routers in different autonomous systems. By default the peer must be directly connected, because IOS sets the TTL on eBGP packets to 1:

R1(config)# router bgp 65001
R1(config-router)# neighbor 10.1.12.2 remote-as 65002
R1(config-router)# address-family ipv4 unicast
R1(config-router-af)#  neighbor 10.1.12.2 activate

Peering to a loopback instead? Then you need ebgp-multihop (or disable-connected-check for a single hop) plus a route to that loopback — BGP will not find it for you.

Verify before you troubleshoot

R1# show bgp ipv4 unicast summary
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.12.2       4 65002      42      44        8    0    0 00:31:12            3

A numeric value under State/PfxRcd means the session is established and you are receiving that many prefixes. Anything else — Idle, Active, OpenSent — is a state, not a count, and tells you where the handshake stopped.

The defaults worth memorizing

  • Next-hop is rewritten to the sending router on eBGP, but left untouched on iBGP. This is why next-hop-self exists.
  • AS path gets your ASN prepended on the way out, which is also BGP’s loop prevention: a router rejects any route already carrying its own ASN.
  • Administrative distance is 20 for eBGP versus 200 for iBGP, so an external path beats an internal one before the best-path process even matters.

In the lab, always confirm which side is supposed to advertise. Half of all “BGP is broken” tickets are a missing network statement, not a broken peering.

Related reading on the blog: BGP best path selection.