Pages

Friday, May 17, 2013

1.5 BGP NEXT HOP SELF

Use the BGP "neighbor <IP> next-hop-self" command in order to avoid using static routes on R1.
(Remember the static route which was created in the post 1.4 so that the next-hop i.e. 5.5.5.5 could be reachable.)

Preconfiguration :  Whatever has been configured until the last post (i.e. 1.4 Injecting IGP into BGP)

So what is this BGP NEXT_HOP_SELF ???
As seen in the last post, when EBGP routes are being advertised to an IBGP peer, the next-hop address of the route is left unchanged. This is the default behavior.
Now, according to this behavior, R1's next-hop address to 60.0.0.0/8 was 5.5.5.5, which was not initially reachable. We created a static route on R1 for ensuring that the path to 5.5.5.5 is available.

(Note : The BGP route can only be a best route i.e. it will enter the routing table, if the next-hop is accessible/reachable.)

However, creating static routes is not always a feasible option. (It would be a nightmare to create static routes, if R2 had, say 50 peers each with wholly different subnet!!!!!!!)

BGP NEXT HOP SELF comes to our rescue, here!!!

What is BGP NEXT HOP SELF all about ???
When BGP NEXT HOP SELF is configured, the next-hop attribute gets modified, no matter to whichever peer (IBGP/EBGP) you are advertising the routes to.

In our case, when R2 advertises the 60.0.0.0 route to R1 with the next-hop-self configuration, R1's next-hop address to 60.0.0.0 becomes 10.0.0.2 (R2's physical IP address i.e. the IP address on which the BGP peering with R1 has been made.)

R2 configuration



R2(config)#router bgp 100

R2(config-router)#neighbor 10.0.0.1 next-hop-self


R4 configuration 

R4(config)#router bgp 100

R4(config-router)#neighbor 20.0.0.1 next-hop-self

R4(config-router)#end

R4#
*May 15 13:04:37.660: %SYS-5-CONFIG_I: Configured from console by console


Now after this configuration, you no longer need the static route on R1.


R1 configuration

R1(config)#no ip route 5.5.5.5 255.255.255.255

R1(config)#no ip route 6.6.6.6 255.255.255.255

(The static route to 6.6.6.6 was created for the routes coming from AS 40 via R4.)

Now let us check R1's output

 
BGP NEXT HOP SELF
Fig 1.5.1
From Fig 1.5.1, see the Next Hop column of the "show ip bgp" output.
You will see that all the routes are best routes and the Next Hop address is now 10.0.0.2, which is the directly connected subnet, hence already in the routing table.
All other attributes remain the same 
 





1 comment:

  1. This Is All About Networking ...: 1.5 Bgp Next Hop Self >>>>> Download Now

    >>>>> Download Full

    This Is All About Networking ...: 1.5 Bgp Next Hop Self >>>>> Download LINK

    >>>>> Download Now

    This Is All About Networking ...: 1.5 Bgp Next Hop Self >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete