Tuesday, 9 June 2009

Summary Route to Null0 - Routing Loop Prevention

Why is that when we summarise networks we see a static summary route automatically generated to Null0?

Let's assume for a minute that we didn't have this static route automatically generated for us and consider the following example.

I have a router R1 that has subnets 192.168.1.0/24, 192.168.2.0/24, 192.168.3.0/24, 192.168.4.0/24, and 192.168.5.0/24 and I decide that R1 should advertise these routes in one summary route to its neighbour at R2 via R1s Serial0/0 interface. As I am using one summary route I could summarise them down to 192.168.0.0/21 which covers 192.168.0.0 to 192.168.7.255. I also have a default route configured on R1 which points all unmatched traffic out of Serial0/0 (ip route 0.0.0.0 0.0.0.0 Serial0/0).

Now let's say that R2 receives a packet destined for 192.168.6.1/24. It will look into its routing table and see that there is a route to 192.168.0.0/16 via R1 which is the summary route sent by R1. R2 forwards this packet to R1 and then what happens? R1 has entries for 192.168.1.0 - 192.168.5.0 in its routing table but no entry for 192.168.6.0/24. So then what does it do? Remember there is a default route configured on R1 pointing to R2 so it will forward the packet back to R2. R2 will look into its routing table and forward it back to R1 ad infinitum. What we have here is a routing loop.

This is why we have the automatically generated summary route to Null0. In our example above the IOS would have generated the following entry in our routing table:

192.168.0.0/21 is a summary, 00:00:05, Null0

Now there is a route for 192.168.6.0 to 192.168.7.255 which will go to Null0 (i.e. be dropped) instead of following the default route, and in this example, creating a routing loop. All of this could be avoided by not oversummarising.

3 comments:

  1. great article chris, i was searching for sum documentation on null0, and ended up on this page via google, Please write more stuff.

    ReplyDelete
  2. Great stuff Chris. Really well explained.

    ReplyDelete
  3. Really very helpful to understand this null route fundamental..thanks

    ReplyDelete