Home > Networking Tips > Routing and Switching > Network summarization -- Supernetting and wildcard masks
Networking Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ROUTING AND SWITCHING

Network summarization -- Supernetting and wildcard masks


David Davis
03.20.2007
Rating: -3.89- (out of 5)


Routing and switching news, advice and technical information
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


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. (From WhatIs.com.)

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.

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?

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.

Related tips
Working with VLSM

IP addressing and subnetting: What network administrators need to know
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.

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.

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.

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 help calculating IP address summarizations, see the online CIDR/VLSM supernetting calculator.

About the author:
David Davis (CCIE #9369, CWNA, MCSE, CISSP, Linux+, CEH) has been in the IT industry for 15 years. Currently, he manages a group of systems/network administrators for a privately owned retail company and authors IT-related material in his spare time. He has written more than 50 articles, eight practice tests and three video courses and has co-authored one book. His Web site is HappyRouter.com.

Thanks to Gary Fairclough for checking our math! - Editor

Rate this Tip
To rate tips, you must be a member of SearchNetworking.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Routing and Switching
Routing with NAT traversal and UPnP
Secure Cisco routers against IOS flaw attack
Configure WAN protocols on a Layer 3 switch
How routers work
Routing: Five common, easily avoided errors
Router Expert: Building a WLAN proxy server, implementing ASR
Router Expert: Building a WLAN proxy server, implementing WPAD
Cisco IOS IP routing -- dynamic routing
Cisco IOS IP routing: Static routes
Migrating to MPLS, part 2

IP Addressing
Why are IPv6's IP addresses in hexadecimal formatting?
Prevent IP address conflicts on your wireless network by managing DHCP scopes
Get IPv6 skills now rather than later
How can I check connectivity and ping between sites?
Can I connect to my wireless network and wired LAN simultaneously?
How to subnet: Subnetting calculations and shortcuts
How do IP addresses work on Layer 2 switches?
What is the procedure for assigning network addresses?
Core network services: Breaking down the disconnect
IP address management -- from 'Network troubleshooting and diagnostics'

Network Architecture and Topology
How to route L3 switches for a serial LAN design
Virtualization and the network a hot topic at Interop
Keeping it green: Design principles for efficient network architectures
Craft a green IT action plan
How green is my network? -- A look at the cost-savings benefit of green IT
Cisco re-thinks Layer 8 networking with green components
Server virtualization and the network: Site consolidation's impact on latency
Green networking: Energy efficient upgrades can cut costs
Upgrade your network: Network evolution and roadmap
Server virtualization: FAQ for network pros
Network Architecture and Topology Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
32-bit IP addressing  (SearchNetworking.com)
fixed-length subnet mask  (SearchNetworking.com)
forest-and-tree model  (SearchNetworking.com)
GARP (Generic Attribute Registration Protocol)  (SearchNetworking.com)
routing table  (SearchNetworking.com)
subnet  (SearchNetworking.com)
subnet mask  (SearchNetworking.com)
Transport Services Access Point  (SearchNetworking.com)
variable-length subnet mask  (SearchNetworking.com)
wildcard mask  (SearchNetworking.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsWebcastsWhite PapersNetworking Product Trials
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2000 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts