cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1243
Views
0
Helpful
3
Replies

The next-hop-self command PLEASE HELP

I have a question about the next hop-self command, i have a topology with 3 routers lets say R1,R2 and R3. Know R1 and R2 are Ebgps neighbors and R2 and R3 are iBgp neighbors. Know lets say i have a loop back address or lan on R3. Do i need to configure Next-hop-self on R2 towords R1 so R1 can ping R3s lans.

I need to be able to know the Logic very well so a clear explenation would be very appreciated.

2 Accepted Solutions

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

You shouldn't need to because when R2 advertises the network to R1 the next hop should be R2.

Now if R1 was advertising a loopback to R2 and R2 passed this on to R3 then you may well need to use the command because the next hop will be R1 not R2.

So unless R3 knows how to get to R1's IP you would need to modify the next hop on R2 to be itself which R3 does know how to get to.

Jon

View solution in original post

Jon Marshall
Hall of Fame
Hall of Fame

Sorry, you did say you wanted to understand the logic.

When a BGP router advertises a route to an EBGP peer the next hop in the route is itself. By definition the receiving router must know how to get to that next hop because they are peering with BGP.

When a BGP router receives a route from an EBGP peer if it advertises it to an IBGP peer by default it does not change the next hop IP so the next hop IP is that of the originating router.

So there is a good chance that the IBGP router does not know how to get to that next hop IP.

There are a couple of solutions to this and one of them is to configure the receiving EBGP router to change the next hop IP to itself which obviously the IBGP peer knows how to get because again it has a peering.

Jon

View solution in original post

3 Replies 3

Jon Marshall
Hall of Fame
Hall of Fame

You shouldn't need to because when R2 advertises the network to R1 the next hop should be R2.

Now if R1 was advertising a loopback to R2 and R2 passed this on to R3 then you may well need to use the command because the next hop will be R1 not R2.

So unless R3 knows how to get to R1's IP you would need to modify the next hop on R2 to be itself which R3 does know how to get to.

Jon

Thank you very much, this made my day. Great explanation!!

Jon Marshall
Hall of Fame
Hall of Fame

Sorry, you did say you wanted to understand the logic.

When a BGP router advertises a route to an EBGP peer the next hop in the route is itself. By definition the receiving router must know how to get to that next hop because they are peering with BGP.

When a BGP router receives a route from an EBGP peer if it advertises it to an IBGP peer by default it does not change the next hop IP so the next hop IP is that of the originating router.

So there is a good chance that the IBGP router does not know how to get to that next hop IP.

There are a couple of solutions to this and one of them is to configure the receiving EBGP router to change the next hop IP to itself which obviously the IBGP peer knows how to get because again it has a peering.

Jon

Review Cisco Networking for a $25 gift card