Classless Addressing

CIDR (Classless InterDomain Routing) and VLSM

“Supernets” RFC’s 1517, 1518, 1519, 1520

If you can understand Subnets – you can understand supernets (CIDR).  It is the same concept, except instead of using the Network/Host boundary to the right (increase network bits, decrease host bits)  .  .  .  CIDR, or Supernetting, slides the boundary to the left (decrease network bits, increase host bits).  

More importantly, it allows any length prefix.  Prior to CIDR, the ISP's had to allocate blocks of IP addresses in /8,  /16,  or /24 Classful blocks.  Now they can hand out /20,  /17,  etc.  It allows them to carve out custom-size blocks of addresses for their customers, allowing efficient use of the available pool of addresses.

NOTE:  there are a number of established "pre-CIDR" routes that cannot be aggregated.

CIDR is Similar to VLSM

If CIDR appears to have the familiar look and feel of VLSM, you're correct! CIDR and VLSM are essentially the same thing (supernetting) since they both allow a portion of the IP address space to be recursively divided into subsequently smaller pieces. The difference is that with VLSM, the recursion is performed on the address space previously assigned to an organization and is invisible to the global Internet. CIDR, on the other hand, permits the recursive allocation of an address block by an Internet Registry to a high-level ISP, to a mid-level ISP, to a low-level ISP, and finally to a private organization's network.

Reduction of Routes

CIDR has reduced millions of Internet routes down to 70,000 routes (in 1999) – because only the large blocks need to be stored in the routing tables.  The large blocks are then subdivided by the ISP’s into smaller blocks, so the ISP will look at the host address, not the Internet routers.  For example:

As another example, suppose an ISP has one Class B address block,  200.25.x.x that they dole out blocks to customers from.  Previuusly, they would divide the entire block into 254 Class C addresses, where each block allowed 254 hosts.  But what if several customers have varying amounts of hosts?  In the following diagram four customers are served.  Customer A asks 2048 IP addresses (211).  This means the prefix will be 32-11 = 21.  The ISP takes one 200.25.16.0 /20 address block and splits it into two :

11001000.00011001.00010000.00000000                 200.25.16.0 /20

split into

11001000.00011001.00010000.00000000                 200.25.16.0  /21

11001000.00011001.00011000.00000000                 200.25.24.0  /21

You can use the first half (200.25.16.0  /21) for customer A (2048 addreses).  Then you can further split the second half, 200.25.24.0  /21 into two parts, again using the bits to help you, use the first half to give Customer B 1024 addresses, and then split the second half of that into two parts to give Customer C and D 512 addresses. 

In this way, you have taken one portion of the Class B address and served 4 customers.  You have also used the address space perfectly – without wasting anything, and without creating any “holes”

Step #1: Divide the address block 200.25.16.0/20 into two equal size slices. Each block represents one-half of the address space or 2,048 (211) IP addresses.

ISP's Block 11001000.00011001.0001 0000.00000000 200.25.16.0/20

Org A:      11001000.00011001.0001 0 000.00000000 200.25.16.0/21

Reserved:   11001000.00011001.0001 1 000.00000000 200.25.24.0/21

Step #2: Divide the reserved block (200.25.24.0/21) into two equal size slices. Each block represents one-fourth of the address space or 1,024 (210) IP addresses.

Reserved 11001000.00011001.00011 000.00000000 200.25.24.0/21

Org B:   11001000.00011001.00011 0 00.00000000 200.25.24.0/22

Reserved 11001000.00011001.00011 1 00.00000000 200.25.28.0/22

Step #3: Divide the reserved address block (200.25.28.0/22) into two equal size blocks.  Each block represents one-eight of the address space or 512 (29) IP addresses.

Reserved 11001000.00011001.000111 00.00000000 200.25.28.0/22

Org C: 11001000.00011001.000111 0 0.00000000 200.25.28.0/23

Org D: 11001000.00011001.000111 1 0.00000000 200.25.30.0/23

This allows, for example, an ISP to aggregate a number of Class C address blocks together.  CIDR has evolved to the point where ARIN (www.arin.net) has issued a number of rules for ISP’s to follow, so that these blocks are aggregated together into larger blocks in a controlled manner.

Under supernetting, the classful subnet masks are extended so that a network address and subnet mask could, for example, specify multiple Class C subnets with one address. For example, If I needed about 1000 addresses, I could supernet 4 Class C networks together:

192.60.128.0   (11000000.00111100.10000000.00000000)  Class C subnet address

192.60.129.0   (11000000.00111100.10000001.00000000)  Class C subnet address

192.60.130.0   (11000000.00111100.10000010.00000000)  Class C subnet address

192.60.131.0   (11000000.00111100.10000011.00000000)  Class C subnet address

--------------------------------------------------------

192.60.128.0   (11000000.00111100.10000000.00000000)  Supernetted Subnet address

255.255.252.0  (11111111.11111111.11111100.00000000)  Subnet Mask

192.60.131.255 (11000000.00111100.10000011.11111111)  Broadcast address

In this example, the subnet 192.60.128.0 includes all the addresses from 192.60.128.0 to 192.60.131.255. As you can see in the binary representation of the subnet mask, the Network portion of the address is 22 bits long, and the host portion is 10 bits long.

Under CIDR, the subnet mask notation is reduced to a simplified shorthand. Instead of spelling out the bits of the subnet mask, it is simply listed as the number of 1s bits that start the mask. In the above example, instead of writing the address and subnet mask as  192.60.128.0, Subnet Mask 255.255.252.0,  the network address would be written simply as  192.60.128.0/22  which indicates starting address of the network, and number of 1s bits (22) in the network portion of the address. If you look at the subnet mask in binary:

      11111111.11111111.11111100.00000000  - you can easily see how this notation works.

The use of a CIDR notated address is the same as for a Classful address. Classful addresses can easily be written in CIDR notation (Class A = /8, Class B = /16, and Class C = /24)

 Here is a reference table of common CIDR prefixes:

                             CIDR Size        Max Number of Usable Addresses    

 

/20                   4094

/21                   2046

/22                   1022

/23                   510

/24                   254                  This is also called a “Class C”

/25                   126      

/26                   62

/27                   30

/28                   14

 

 

Routing Exceptions (Grandfathering)

CIDR reduces the number of routes that must be advertised, since the ISP can simply advertise it’s own block to the Internet, and then hand off traffic to it’s customers.  But if the customer is moving to a new ISP and has IP addresses that they want to keep – the ISP can advertise that block as an exception (in addition to their own block).  Sometimes this is called “grandfathering”.