BGP Next Hop Self


(Lazaros Agapides) #43

Hello Deepika

Thanks for indicating this. The * indicates that it is a valid route and that BGP is able to use it. However, in this case the next-hop is not reachable, so it should not be valid. I will let @ReneMolenaar know about this…

Thanks again…

Laz


(Durga M) #44

Rene,

When you run iBGP with multiple nodes we should use IGP protocols to advertise prefixes between the iBGP nodes since iBGP does not carry forward the prefixes to another peer when It was learned from another neighbor. please correct me if I’m wrong.


(Lazaros Agapides) #45

Hello Durga

An iBGP neighbour relationship can form between any BGP routers even if they are not directly connected. The only prerequisite is that there is a routed path between the IP addresses of the interfaces through which the relationship is formed.

Now the routed path can be established either via IGP or static routing. iBGP cannot be used because it requires the routing to form a neighbor relationship. It’s kind of like the chicken and the egg. iBGP cannot create a route for itself to create a neighbor relationship because it has no neighbor relationship to create it with.

I hope this has been helpful!

Laz


(Ray J) #46

Does eBGP change the next hop ip address to itself? or not the same as iBGP does?


(Lazaros Agapides) #47

Hello Rey

In an external BGP (eBGP) session, by default, the router does indeed change the next hop attribute of a BGP route (to its own address) when the router sends out a route. This behaviour can be changed however using the BGP Next Hop Unchanged feature. This is a command that is issued when defining a BGP neighbour. An example of this implementation is:

Router(config-router-af)# neighbor 10.0.0.100 next-hop-unchanged

I hope this has been helpful!

Laz


(Chris N) #48

Yeah, so to summarise:

Learned from eBGP -> Advertise to eBGP -> Next-hop-self automatic

Learned from eBGP -> Advertise to iBGP -> “Next-hop-self” required

Learned from iBGP -> Advertise to iBGP -> “Next-hop-self all” required


(anil t) #49

Why IBGP speaking router by default does not change next hop to its ibgp peer


(Lazaros Agapides) #50

Hello Anul

When routes are being exchanged between iBGP peers, the next hop IP address used by default is that of the router in an external AS. iBGP will not provide a next hop address of an iBGP peer. This is because within an autonomous system, it is assumed that there are routing protocols present that will allow for internal routing. The primary purpose of BGP in general is to find routes to other autonomous systems and not to route within an AS. So, a router will get a next hop IP address of the next eBGP peer because it is assumed that routing information to reach that is already available.

Now if you choose to use iBGP to route within your autonomous system, then of course you can do that, but you will need the “next hop self” command/configuration.

I hope this has been helpful!

Laz


(Fritz M) #51

Hi Rene,

Aside from this scenario, Is there other scenario that we can use BGP Next Hop Self?

What is the best practice to implementing BGP Next Hop Self?

Best Regards,
Fritz Macahilig


(Lazaros Agapides) #52

Hello Fritz

The next hop self feature is used primarily for this purpose, to allow iBGP routers to change the next hop IP address in order avoid potential reachability issues.

A slightly different scenario that comes to mind where BGP next hop self is used is when you have two internet routers running eBGP with their ISPs and iBGP between them. If the next hop self command is not implemented, then each iBGP neighbour will have the eBGP ISP as the next hop for some networks, something that you may not want for your network. The principle is the same, the scenario is somewhat different.

Best practice for using next hop self is to use it whenever an internal peer must see the iBGP peer as the next hop rather than the eBGP peer to which it may not have a route. Now you could have an IGP provide the route to that peer, however, because it is outside of the AS, it is not ideal. IGPs should function only within an AS and have only BGP operate on an interAS basis.

I hope this has been helpful!

Laz