Consider the below diagram:

1.)  Next-Hop for locally originated routes is in an AS.

Example: Next-Hop for R2’s local prefix is

R2#sh ip bgp | i
BGP table version is 8, local router ID is
*>    0   32768     i

2.) BGP next-hop points to external BGP peer address.(default behavior) and BGP next-hop doesn’t change for all iBGP peers in that AS.

We have created full mesh peering in AS 200 (.i.e. Neighborship b/w R2-R3 and R2-R4 on loopback address).

Example: Next-Hop for on R1 shows to be (R1’s eBGP Peer IP address).
The Next-Hop will remain same on R4.

R1#sh ip bgp | i
*>    0   0    100  i

R4#sh ip bgp | i
*>    0   0    100  i

3.) If we don’t advertise in BGP on R1 and R2, the prefix will become unreachable on R3 and R4 as the next-hop becomes unreachable.

Output from R4:

R4#sh ip bgp | i
* i     0   100   0    100 i
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:
Success rate is 0 percent (0/5)

4.) Solution to this proble is “Next-Hop-Self”.

Configure neighbors R3 and R4 with “next-hop-self” command.  With this, R2 will not advertise as next-hop for prefix to R3 and R4,  but will advertise its own loopback address

R2(config)#router bgp 100
R2(config-router)#neighbor next-hop-self
R2(config-router)#neighbor next-hop-self

Now the prefix becomes reachable. See the difference in Next-Hops for prefix given in scenario 3 and  next-hop given below from R4.

R4#sh ip bgp | i
*>i    0    100   0    100    i

 5.) For IBGP neighborships formed on Loopback IPs, BGP next-hop points to loopback interface of IBGP peer if next-hop-self feature is configured with the peering.

 6.) Route Reflectors doesn’t change the next-hop of the advertised prefix. They only act as the router copiers.

7.) Next-Hop only changes at eBGP peering.

Next Hop will change when prefix is advertised from AS 200 (R4) to AS500 (R5). Please see the output from R5 for prefix


R5#sh ip bgp | i
*>    0     200  100     i

Hope you have enjoyed reading this Post. Please share your feedback if you liked this post. You can also write to us on