BGPRouter Config

neighbor [ip] next-hop-self

Sets the router itself as the BGP next hop when advertising routes to iBGP peers.

Syntax·Router Config
neighbor <ip-address> next-hop-self

When to Use This Command

  • ASBR (AS boundary router) advertising eBGP-learned routes to iBGP peers in the same AS.
  • Preventing unreachable next-hop issues for iBGP peers who don't know the eBGP peer's IP.
  • Required when iBGP peers are not directly connected to external peers.
  • Standard practice on all eBGP-facing routers that also have iBGP peers.

Command Examples

ASBR advertising eBGP routes to iBGP peer with next-hop-self

R1(config)# router bgp 65001 R1(config-router)# neighbor 203.0.113.1 remote-as 100 R1(config-router)# neighbor 10.0.0.2 remote-as 65001 R1(config-router)# neighbor 10.0.0.2 next-hop-self
R1(config-router)#

R1 peers eBGP with 203.0.113.1 (ISP) and iBGP with 10.0.0.2 (internal router). Without next-hop-self, R2 would see 203.0.113.1 as the next hop for ISP routes — but R2 has no route to the ISP link subnet. With next-hop-self, R1 advertises itself (10.0.0.1) as next hop.

Verify next hop in iBGP peer's table

R2# show ip bgp 198.51.100.0
BGP routing table entry for 198.51.100.0/24, version 3
Paths: (1 available, best #1, table default)
  Advertised to update-groups:
     1
  100
    10.0.0.1 from 10.0.0.1 (10.0.0.1)
      Origin IGP, localpref 100, valid, internal, best

R2 sees 10.0.0.1 (R1's loopback) as the next hop for the eBGP prefix. R2 can reach 10.0.0.1 via OSPF, so the route is installed as valid and best.

Understanding the Output

No direct output. Verify on the iBGP peer with 'show ip bgp [prefix]' — the next hop should be the ASBR's IP (not the external eBGP peer's IP). Without next-hop-self, iBGP peers receive routes with an unreachable next hop and mark them as invalid.

CCNA Exam Tips

1.

CCNA exam tip: The classic iBGP failure scenario is iBGP peers receiving routes but marking them invalid because the next-hop (eBGP peer IP) is unreachable — next-hop-self fixes this.

2.

CCNA exam tip: next-hop-self is configured on the ASBR toward the iBGP peers, not toward the eBGP peer.

3.

CCNA exam tip: The alternative is to redistribute the eBGP link subnet into the IGP — but next-hop-self is cleaner and more common.

4.

CCNA exam tip: iBGP does not change the next hop when re-advertising routes — next-hop-self overrides this behavior.

Common Mistakes

Mistake 1: Applying next-hop-self on the wrong direction — it must point toward iBGP peers, not the eBGP peer.

Mistake 2: Forgetting next-hop-self in an iBGP full-mesh — routes exist in the BGP table but show as 'inaccessible' or 'invalid'.

Mistake 3: Assuming next-hop-self is automatic — it is always a manual configuration.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions