Supernetting is best illustrated with an example. Let’s say that we wanted to aggregate the 8 network addresses between 220.127.116.11 and 18.104.22.168. In order to do this, we need to find a subnet mask value that makes all 8 network addresses appear to be on the same single network. Remember the ANDing process? By the time we’re done, we should be able to AND together any two addresses in that range of 8 networks, and come up with the exact same value.
Recall that when subnetting, we stole bits from the host portion of an address, moving from left to right. When we’re supernetting, we’re going to do the opposite – instead of stealing bits from the host portion, we’re going to steal low-order bits from the network portion. So this time, we’re going to steal bits from right to left.
How many bits do we need to supernet 8 networks? Unlike with subnetting, we don’t subtract 2 this time. In this case we need 3 bits, since 23 is 8.
Recall also that by default, a Class B address has a subnet mask of 255.255.0.0 (or /16). If we steal 3 bits from the network portion of the subnet mask, we end up with the mask shown below.
Supernetting really is no more difficult than that. Instead of stealing host bits, we steal network bits. If you look at Figure 5-28, notice that each of my 8 network IDs appear to be on the exact same network when I use a mask of 255.248.0.0, or /13. As such, the range can now be designated as 22.214.171.124/13. This value aggregates all addresses between 126.96.36.199 and 188.8.131.52.
Think about why CIDR is so important. Small ISPs are the customers of larger ISPs, who may in turn be the customer of a Tier 1 network provider like WorldCom or AT&T. In cases like this, where a major ISP may have many smaller ISPs as customers, supernetting allows many networks to be reached through a single or smaller number of routing table entries. Just keep in mind that a large ISP is likely aggregating many Class B or C blocks of addresses together.
If you want a supernetting shortcut, just go back to the subnetting shortcut table that we looked at previously. Imagine that you wanted to supernet together 4 Class B addresses. You would simply look in the Range Multiples row, find the value of 4, and then look up. Supernetting 4 Class B addresses together is accomplished using a mask of /14, or 255.252.0.0. Just remember which way you’re stealing bits!
Tip: Remember that if you are asked to summarize routing table entries on an exam, what you are really being asked to do is supernet the networks into a single routing table entry.
It’s really important to remember that only certain contiguous ranges will work together when supernetting. For example, if you had the network address 184.108.40.206 and wanted to supernet it with 8 other ranges, you would need to determine the correct 8 ranges that the 220.127.116.11 network can be aggregated with. The easiest way to do this is to AND the 18.104.22.168 network address with the 255.248.0.0 subnet mask (since we already know that supernetting 8 class B addresses uses this mask). The answer from the ANDing process will show you the beginning of the range.
Since the network ID becomes 22.214.171.124 after the ANDing process, we now know that the 126.96.36.199 network ID must be aggregated with the 8 network IDs that span from 188.8.131.52 up to 184.108.40.206.
CIDR use is not limited to the public Internet. It can also be used on internal company networks to aggregate routes behind a smaller number of routing table entries. For example, imagine that the subnets 220.127.116.11/24 through 18.104.22.168/24 all exist behind one router. Instead of adding entries for all eight networks in the routing table, a single entry could be added for network 22.214.171.124/21 instead. In effect, the address 126.96.36.199/21 “summarizes” all eight networks into one network routing table entry. This technique, known as route summarization, is also used by some routing protocols to reduce the number of networks that they need to advertise to other routers. Route summarization is looked at in more detail in Chapter 8. Ultimately, techniques like route summarization make routing faster and more efficient, and are especially useful within large organizations.
Tip: For more information on Classless Interdomain Routing, see RFC 1519.