Pcornel
Networking · Routing › BGP › iBGP vs eBGP Deep Reference

Next-Hop-Self

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

Back to the Topic

Answer

next-hop-self advertises the local router as NEXT_HOP for eligible updates to a neighbor. Use it at an AS edge when internal routers cannot resolve the external next hop. On a Cisco RR, rewriting reflected iBGP next hops requires the documented all keyword on releases that support it.

Remember

Configuration presence does not prove an update was regenerated or accepted. A changed attribute proves the local path view, not global convergence. Reachable recursion and CEF programming are necessary local checks, not proof of a working end-to-end flow.

First checks

show ip bgp 203.0.113.0/24
show ip route 192.0.2.2
show ip route 10.0.0.1
show ip route 203.0.113.0
show ip cef 203.0.113.0/24
show ip bgp rib-failure

Compare path detail on the receiving peer before/after the intended advertisement change. Inspect the advertised NEXT_HOP there, then its recursive route and CEF entry. RIB-failure concerns installation of a selected route; it is not synonymous with unreachable NEXT_HOP.

Commands

show ip route [prefix]
Display IPv4 routing table.
show bgp ipv4 unicast rib-failure
Display BGP paths that were not installed in the IP routing table due to RIB-selection conditions.

Verify in this order

transport → session/AF → accepted path → next-hop resolution → best path → RIB → CEF → bounded traffic

Where it usually breaks

  • Established but inaccessible next hop: transport succeeds while route recursion fails.
  • RR still sends external-edge next hop after next-hop-self: the route was learned through iBGP and reflected; inspect all support and design.
  • New next hop is reachable but traffic dies at RR: RR is not able or intended to forward that destination.
  • Best BGP path absent from RIB: inspect a lower-distance static/IGP winner rather than assuming next-hop-self failed.

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

Confirmation

Confirm action

Continue?