In this post, we will talk about an important and mostly used command of BGP. This command is used under the BGP process in the router and the usage is like below:
neighbor {ip-address | peer-group-name} next-hop-self
In the routing, route advertisement is a common term. And for the route advertisement, the next hop is common. A route is advertised via its next hop ip address. This means that, “You can come to me via this door”.
In BGP configuration, route advertisement is also done between external peers. During this advertisement, the non directly connected routers to this external peer, the IBGP peers, need to learn how to go to the advertised route. Because without any information, they can not go to an unknown place. And their routing table do not have this information.
To give this information to the IBGP peers, “next-hop-self” command is used. Let’s see how, with a configuration example.
The topology used for this next-hop-self command is below:
In this topology, Router A1 and Router B1 are external BGP peers. And the Router A2 and Router B2 are their internal BGP peers. Router A2 advertises its 20.0.0.0/24 network with the next hop 10.0.0.1 (ip address of Router A1’s external interface).Because of the fact that, this 10.0.0.1 ip address is not in the routing table of Router B2, it do not know this route.
This is also like the same for Router B2’s 40.0.0.0/24 route advertisement. This time Router B2 will send 40.0.0.0/24 route with the next hop 10.0.0.2. And the Router A2 will not know this route. Because Router A2 do not know anything about the 10.0.0.2 route.
Leave a Reply