Introduction to TCP/IP

Previous Topic Next Topic

Supernetting and Classless Interdomain Routing

With the recent growth of the Internet, it became clear to the Internet authorities that the class B network IDs would soon be depleted. For most organizations, a class C network ID does not contain enough host IDs and a class B network ID has enough bits to provide a flexible subnetting scheme within the organization.

The Internet authorities devised a new method of assigning network IDs to prevent the depletion of class B network IDs. Rather than assigning a class B network ID, InterNIC assigns a range of class C network IDs that contain enough network and host IDs for the organization's needs. This is known as supernetting. For example, rather than allocating a class B network ID to an organization that has up to 2,000 hosts, the InterNIC allocates a range of eight class C network IDs. Each class C network ID accommodates 254 hosts, for a total of 2,032 host IDs.

Although this technique helps conserve class B network IDs, it creates a new problem. Using conventional routing techniques, the routers on the Internet now must have eight class C network ID entries in their routing tables to route IP packets to the organization. To prevent Internet routers from becoming overwhelmed with routes, a technique called Classless Interdomain Routing (CIDR) is used to collapse multiple network ID entries into a single entry corresponding to all of the class C network IDs allocated to that organization.

Conceptually, CIDR creates the routing table entry: [Starting Network ID, count], where Starting Network ID is the first class C network ID and the count is the number of class C network IDs allocated. In practice, a supernetted subnet mask is used to convey the same information. To express the situation where eight class C network IDs are allocated starting with network ID 220.78.168.0:

Starting Network ID 220.78.168.0 11011100 01001110 10101000 00000000
Ending Network ID 220.78.175.0 11011100 01001110 10101111 00000000


Note that the first 21 bits (underlined) of all the above Class C network IDs are the same. The last three bits of the third octet vary from 000 to 111. The CIDR entry in the routing tables of the Internet routers becomes:

Network ID Subnet Mask Subnet Mask (binary)
220.78.168.0 255.255.248.0 11111111 11111111 11111000 0000000

In network prefix or CIDR notation, the CIDR entry is 220.78.168.0/21.

A block of addresses using CIDR is known as a CIDR block.


note-icon

Note

Because subnet masks are used to express the count, class-based network IDs must be allocated in groups corresponding to powers of 2.

In order to support CIDR, routers must be able to exchange routing information in the form of [Network ID, Network Mask] pairs. RIP for IP version 2, OSPF and BGPv4 are routing protocols that support CIDR. RIP for IP version 1 does not support CIDR.

Address Space Perspective

The use of CIDR to allocate addresses promotes a new perspective on IP network IDs. In the above example, the CIDR block [220.78.168.0, 255.255.248.0] can be thought of in two ways:

In the latter perspective, IP network IDs lose their class-based heritage and become separate IP address spaces, subsets of the original IP address space defined by the 32-bit IP address. Each IP network ID (class-based, subnetted, CIDR block), is an address space in which certain bits are fixed (the network ID bits) and certain bits are variable (the host bits). The host bits are assignable as host IDs or, using subnetting techniques, can be used in whatever manner best suits the needs of the organization.

© 1985-2000 Microsoft Corporation. All rights reserved.