Troubleshooting BGP Route Advertisement

Hello Tuyen

It’s not a matter of priority, but more a matter of specific routes. For example, let’s say you have the following routes in your routing table:

Now you want to share these routes via BGP, using the aggregate-address command. You put in the following command in your BGP configuration:


This results in BGP attempting to send this prefix to its neighbors. But because there is no exact match in the routing table, it does not. So you add the following static route:

ip route null 0

And BGP will begin advertising this route.

Now, let’s say an IP packet with a destination address of arrives at the router. What will happen? This destination address will be compared with the entries in the routing table. Which one will it match? The most specific match is: This is because this match has a subnet mask (or prefix) of /24 while the static null route we installed has a subnet mask (or prefix) of /21.

It is not a matter of priority, but a matter of how specific a match it is based on the subnet mask or prefix of the particular routing table entry.

I hope this has been helpful!


1 Like