Pcornel
Networking · Infrastructure

Dual-Homed eBGP

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

Back to the Topic

Answer

Dual-homed eBGP connects to two ISPs (or two links to one ISP) for redundancy. BGP policy decides which link carries outbound traffic (local preference, weight) and influences inbound traffic (AS-path prepending, MED, more-specific prefixes).

Remember

Never become a transit AS: advertise only your own prefixes (ip as-path access-list permitting ^$ or a prefix-list out). Outbound: set local preference on routes from the preferred ISP. Inbound: prepend on the backup link; providers may honour communities. Test failover by shutting each session.

First checks

  • show ip bgp summary — state and prefixes received.
  • show ip bgp neighbors <ip> advertised-routes — what you announce.
  • show ip bgp neighbors <ip> routes — what you accept.
  • show ip bgp <prefix> — AS path, next hop, best.
  • show ip route bgp — installed routes.

Commands

show ip bgp summary
Display BGP peer state and prefix counts.
show ip bgp [prefix]
Inspect BGP paths and attributes.
show ip bgp neighbors 192.0.2.1 advertised-routes
show ip bgp 0.0.0.0
show ip bgp

Verify in this order

two eBGP sessions up → only own prefixes advertised → local preference picks the outbound exit → prepending/MED shapes inbound → failure of one ISP moves traffic to the other

Where it usually breaks

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

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

Confirmation

Confirm action

Continue?