Welcome

First of all, may I welcome you to my site. My name is Chris and I'm from the UK and work as a Systems Engineer for Cisco. This blog was initially created to post up my subnetting technique but has now got more stuff to do with attaining Cisco certifications. Either way I really hope that the content is sufficent for your needs and I look forward to hearing your feedback. If you find that the content really helps you please feel free to donate using the PayPal link on the right.

To view the index of all my articles please click here.

Showing posts with label summary routes. Show all posts
Showing posts with label summary routes. Show all posts

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.

Posted byChris Bloomfield at 13:48 3 comments  

Complex Route Summarization

I've already posted about route summarization but I found this interesting technique for calculating complex route summaries at http://www.sadikhov.com/forum from member MarkinManchester. Thanks Mark!

Sometimes you are asked to filter a complex set of routes using as few lines as possible. Here we will examine a way to calculate the subnet and wildcard for such a scenario. With some practice, you should be able to calculate any set in 5 minutes or less. It is also recommend to test your results in a lab setting, using loopbacks and distribute-lists.

For example, say we are asked to filter the following routes using a one-line filter:

102.17.63.0
126.22.61.0
111.22.57.0
125.33.101.0

First, make a table as shown:















Then, enter the decimal digits from the first octet in the left-hand column. Convert each number to binary. You can use Windows Calculator set to Scientific Mode to do the conversion if you so wish.















In the binary area, first check the octet then column by column, apply the following rules:


  1. If the entire octet is 0, the subnet is 0 for that octet, and the mask is 255 for that octet.
  2. Else If the column is all 0’s, the subnet is 0, and the mask is 0
  3. Else If the column is all 1’s, the subnet is 1, and the mask is 0
  4. Else the column is a mixture of 1’s and 0’s, the subnet is 0, and the mask is 1.


For the first octet the table should look like:















Convert the binary Subnet and Wildcard Mask to decimal to complete the table:















So far, our filter looks like: 100.xxx.xxx.xxx 27.xxx.xxx.xxx

For the second octet the completed table should look like:















Our summary address now looks like: 100.0.xxx.xxx 27.55.xxx.xxx


For the third octet the completed table should look like:















Our summary address now looks like: 100.0.33.xxx 27.55.94.xxx

Now the last octet for all addresses is zero so the subnet address must be 0 in the last octet and the wilcard mask must be 255 in the last octet.

Our completed summary address looks like: 100.0.33.0 27.55.94.255

Apply this technique as you wish, for example:

access-list 1 permit 100.0.33.0 27.55.94.255

This is a great technique for reducing something complex into easier computation so hats off to Mark again for turning me on to this.

Posted byChris Bloomfield at 19:47 5 comments