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:

172.16.1.0/24
172.16.2.0/24
172.16.3.0/24
172.16.4.0/24
172.16.5.0/24

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

aggregate-address 172.16.0.0 255.255.248.0

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 172.16.0.0 255.255.248.0 null 0

And BGP will begin advertising this route.

Now, let’s say an IP packet with a destination address of 172.16.2.54 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: 172.16.2.0/24. 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!

Laz

1 Like