DMVPN Phase 1 default

Topic DMVPN Phase 1 BGP Configuration: Hub should only advertise a default route to spokes

Could you please explain #ip route Null0 & Why do we need ip route Null0 when we have created prefix list & route map.
As Null0 will drop all packet that matches

Hub(config)#ip route Null0
Hub(config)#ip prefix-list DEFAULT_ROUTE permit
Hub(config)#route-map SPOKE_ROUTERS permit 10
Hub(config-route-map)#match ip address prefix-list DEFAULT_ROUTE

Hello Hemant.

Although I am not Rene or Laz, I’ll do my best to explain this to you.

Remember that we can advertise any routes into BGP by using the network command as long as they are in the routing table. This includes for example OSPF routes, directly connected routes and even static routes.

What ip route Null0 does is that it creates a default static route and adds it into the routing table. This static route points to the Null0 interface which says that anything that matches it should be dropped.

Since this default route is now in the routing table, it can be advertised into BGP, which is what Rene did.

Rene also accompanied it with a prefix list/route-map combination to ensure that only this default route will be advertised to the peers. As you can see, the prefix list only permits specifically the default route -

Now to answer your question, won’t the Null0 static route cause all traffic to end up being dropped? Because it points to the Null0 interface.

Let’s review the topology again:

After Rene issued the configuration, the spokes had only the default route in their routing table.

The hub, however, still has the specific routes to the networks behind the spokes ( and along with the Null0 route.

Remember that routing is done based off the longest prefix length. So when there are multiple matching routes, the route with the longest prefix length will be used to forward the traffic. Because of this, whenever the spokes use the default route to forward something to the Hub, the Hub will check its routing table and find the following entries:

If the packet is destined to a network behind Spoke1 or Spoke2, the hub will use the specific entries to forward the packet.

So, for example, if the hub receives a packet destined to, it will use the BGP route for

Since these specific entries are being used, the spokes can happily reach the networks behind eachother, no traffic will be dropped.

The Null0 route will only be used if neither the entry or entry match the received packet. So if I was to generate a packet destined to, for example, this would match only the Null0 route and would be dropped, which makes sense because such network does not exist in our diagram.

So while the spokes will have and only use the default route, the hub will route based off the most specific prefix match.

If anything is still unclear, please let me know.


Thanks for the great explanation. I have understood now the need of Null0 and prefix list- route map.

1 Like

Hello Hemant

I believe that @davidilles did an excellent job in explaining the use of the Null0 route. Just to summarize, the purpose of creating the Null0 route is not to perform routing, but to simply satisfy the requirement of a route being in the routing table before it can be advertised using BGP. More info can be found at this NetworkLessons note on the topic.

I hope this has been helpful!


P.S. Thanks again David for your contribution!