01-19-2015 11:22 AM - edited 03-07-2019 10:17 PM
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.
Solved! Go to Solution.
01-19-2015 11:45 AM
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
01-19-2015 12:40 PM
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
01-19-2015 11:45 AM
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
01-20-2015 01:07 AM
Thank you very much, this made my day. Great explanation!!
01-19-2015 12:40 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide