Advanced Cisco BGP features: Selective Next-hop

Below topology was used for this post, and all the configuration happened on two Cisco CSR1000v

BGP Selective Next-hop Route filtering

Imagine that you want to accept routes only from peers, which the route covering the next-hop passes specific conditions, such as prefix-length, or protocol.

In the following configuration I will only accept routes from peers, which the route covering the next-hop has a mask of less-equal to 24:

Let’s see the current BGP table:

And now the routes covering the next-hops:

Now, with the following configuration, the routes with 12.12.12.2 as next-hop, shouldn’t take part in BGP best-path selection, and the routes with 192.168.12.2 should become best.

Let’s verify:

csr1(config-router)#do s ip bg
     Network          Next Hop          Metric LocPrf Weight Path
 *>  1.1.1.1/32       0.0.0.0               0         32768   i
 *>  2.2.2.2/32       192.168.12.2          0            0    11 22 2 i
 *                    12.12.12.2            0            0    2 i
 *>  222.222.222.0/23 192.168.12.2          0            0    11 22 2 i
 *                    12.12.12.2            0            0    2 i
Share this!

Author: Mo Moghaddas

Building zeeg.me to give users more time back and make scheduling a pleasant experience.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.