Network summarization — Supernetting and wildcard masks

by David Davis on August 21, 2007

Supernetting was created as a way to solve the problem of routing tables growing beyond our current ability to manage the exhaustion of Class B network address space. Much like one area code represents an aggregation of telephone numbers in an area, supernetting allows one routing table entry to represent an aggregation of networks. If you need to enter a static route to several subnetted networks, you can use network summarization to reference them all in one route. Just the same, you need to understand how to read routes received from other providers. You must also know how to create an access list that references these multiple networks in a single summarized statement. In this tip, you’ll learn more about the IP addressing-related topics of network summarization, supernetting and wildcard masks.

Note: this article originally appeared at www.searchnetworking.com

Introduction to network summarization terminology

The term “route aggregation” is just another way of saying “network summarization.” Supernetting, on the other hand, is the process of taking multiple networks and making a single larger network (very similar to summarization and aggregation). But what, specifically, are summarization and aggregation?

For video training on subnetting and supernetting, checkout my favorite Cisco CCNA / CCDA video training!

Network summarization is the act of taking two or more IP networks and using a single IP network to represent them all. This is possible because of classless inter-domain routing (CIDR). CIDR eliminates the need for a fixed-length subnet mask (FLSM) associated with our IP networks. This goes back to the old standard of having to have a certain subnet mask for classes of IP networks. Because everyone uses CIDR today, we can use variable-length subnet masks (VLSMs). This means we have the luxury of adding or subtracting bits from our subnet mask to allow us to either subnet our network further (by adding bits) or supernet our network (by taking bits away). Let’s find out more.

What is network summarization (aka route aggregation)?

Say that I have IP networks 1.1.1.0 /24, 1.1.2.0 /24 and 1.1.3.0 /24. All of these networks have the subnet mask of 255.255.255.0 (hence, the /24). (See Binary-to-decimal conversion for more information on how this is calculated.) This means that if I take away bits from the subnet mask, I can encompass both of these networks with a single IP network and subnet mask. For example, I could say that these networks are represented by the IP address 1.1.0.0 with the subnet mask 255.255.0.0. With that statement, I have summarized or aggregated the three networks and am now representing them with a single IP address and subnet.

However, this is just an example; I did this very inefficiently. I actually summarized many other networks besides the three in question. I summarized all networks that fit into this range 1.1.{0-255}.{0-255}. To summarize only my three networks as efficiently as possible, I would use IP network 1.1.0.0 with subnet mask 255.255.252.0. This encompasses all three IP networks: 1.1.1.0, 1.1.2.0 and 1.1.3.0.

This can, of course, be done on a network calculator, but it is not hard to do by hand either. Here is an example:

Third octet of each IP and subnet mask

000000 01 = 1
000000 10 = 2
000000 11 = 3
111111 00 = 252

Using network summarization on a router

No matter the name that you give it, you need to know how to use network summarization/aggregation on a router. To do this, you will represent the IP networks with a single IP address and either a subnet mask or a wildcard mask.

For video training on subnetting and supernetting, checkout my favorite Cisco CCNA / CCDA video training!

Here is an example of using a subnet mask to summarize the same three networks in OSPF:

Router(config)# router ospf 1
Router(config-router)# area 1 range 1.1.0.0 255.255.252.0

As you can see, I just made an entry to summarize all three networks using the “range” command. The range command is used to summarize other OSPF networks. The same example can be applied to summarizing networks received from a different router protocol like Routing Information Protocol (RIP). Here’s an example with the “summary-address” command:

Router(config-router)# summary-address 1.1.0.0 255.255.252.0

In both these cases, we have summarized or aggregated the network.

What are wildcard masks?

Wildcard masks are just another way to represent a subnet mask. Don’t let how they look scare you off. You can easily convert a subnet mask into a wildcard mask. A wildcard mask is simply all the 1s in a subnet mask (when in binary form) turned into 0s, and all the 0s turned into 1s.

Here’s an example:

Say that I have the same subnet mask as above, 255.255.252.0. This subnet mask in binary is:

11111111 11111111 11111100 00000000

To convert this to a wildcard mask, I simply turn all 1s into 0s and all 0s into 1s, then convert back to decimal.

For video training on subnetting and supernetting, checkout my favorite Cisco CCNA / CCDA video training!

Here’s the conversion to a wildcard in binary:

00000000 00000000 00000011 11111111

Then, here’s the conversion of that same wildcard in binary to decimal:

0.0.3.255

Wildcard masks are used in access lists. So, say that I wanted to permit the same three networks we listed above and deny all others. Here is an example of an access control list (ACL) that would do that, using a wildcard mask:

Router(config)# access-list 1 permit 1.1.0.0 ?
  A.B.C.D  Wildcard bits
  log      Log matches against this entry
  

Router(config)# access-list 1 permit 1.1.0.0 0.0.3.255
Router(config)# access-list 1 deny any

With this ACL, all three of our networks (1.1.1.0, 1.1.2.0 and 1.1.3.0) are permitted and all other networks are denied. For video training on subnetting and supernetting, checkout my favorite Cisco CCNA / CCDA video training!

Article summary

Here is what we have learned:

  • An introduction to network summarization terminology, including network summarization, route aggregation, supernetting, CIDR and VLSM.
  • How to use network summarization on a router with the OSPF routing protocol (in two different ways).
  • What wildcard masks are, and how to use them in a Cisco IOS access list.

For a FREE HappyRouter.com Video on how to configure and use Cisco IOS Access-lists (ACL), click here

{ 9 comments… read them below or add one }

Jitendra 12.13.08 at 11:01 am

Respected
David Davis Sir. Ur training stuff is very good. I usaly visit petri.com and windowsnetworking.com I am from India bangalore. Where we can clearly
understand things through ur screen shots based articals. Thank u very much
sir it has been helped to us where we are in IT Filed.

B E S T O F L U C K T O U SIR
WISH U HAPPY X MAS

Thank You
Jitendra

Suraj kumar 03.05.09 at 8:44 am

Although i refered different book but i could not figure out this topic The summarization but thanks to Sir David Davis
I got clear my topic through this web site
Thank you so much.

KUNDAN SHINDE 05.03.09 at 12:49 am

Respected
David Davis Sir. Ur training stuff is very good. I usaly visit petri.com and happyrouter.com I am from India mumbai. Where we can clearly
understand things through ur screen shots based articals and video . Thank u very much
sir it has been helped to us where we are in IT Filed.
how I can download the this video ,help me sir
Regards,

Kundan Shinde

Vikas Chauhan 07.09.10 at 2:20 am

Dear Sir,

Thanks a lot for your useful artical.

Sheejanarayanan 07.29.10 at 4:58 am

Sir….

Thank you very much.I reffered so many sites to find an easy method for route summarization.Now from you it is clear.

php3397 10.12.10 at 4:41 am

well since i could really benefit from this article its my duty to compliment the author .

thank you sir , you really helped me with supernets .

FleszPolska 07.19.11 at 6:58 am

I have found easy way to calculate network summarization
Lets take as an example the range of IPs

172.16.128.0-172.16.159.255

We see that the network mask will have to affect 3rd octet.
The easy way it to subtract 128 from 159. Lets see

159-128=31

Now subtract 31 from 255

255-31=224

There we go, this is our 3rd octet in the subnet mask

172.16.128.0
255.255.224.0

Another example

Summarize networks 100.16.0.0 100.17.0.0 100.18.0.0 100.19.0.0
19-16=3
255-3=252
Our subnet mask is 255.252.0.0 for network 100.16.0.0

sourav 11.17.11 at 2:37 am

Hello FleszPolska ,

please check out this with your rule, it does not work,
i think its better and sound way to do it with binaries.
check out this example

192.168.98.0 11000000 10101000 01100010 00000000
192.168.99.0 11000000 10101000 01100011 00000000
192.168.100.0 11000000 10101000 01100100 00000000
192.168.101.0 11000000 10101000 01100101 00000000
192.168.102.0 11000000 10101000 01100110 00000000
192.168.105.0 11000000 10101000 01101001 00000000

answer comes out to be
subnet mask is 255.255.240.0.

but your method show 255.255.248.0

some thing is wrong.
check out..

Rafael 07.11.12 at 2:52 am

I know the post was made long ago but I just have to say it still helping many people out there… ( myself mainly included! ).

Thanks a lot!

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Previous post:

Next post: