Step 6 - CIDR IP Addressing
Having spent a whole bunch of time learning about IP addresses and classes, you might be surprised that in reality they are not used anymore other than to understand the basic concepts of IP addressing.
Instead, network administrators use Classless Internet Domain Routing (CIDR), pronounced "cider", to represent IP addresses. The idea behind CIDR is to adapt the concept of subnetting to the entire Internet. In short, classless addressing means that instead of breaking a particular network into subnets, we can aggregate networks into larger supernets.
CIDR is therefore often referred to as supernetting, where the principles of subnetting are applied to larger networks. CIDR is written out in a network/mask format, where the mask is tacked onto the network address in the form of the number of bits used in the mask. An example would be 22.214.171.124/25. What is most important to understand about the CIDR method of subnetting is the use the network prefix (the /25 of 126.96.36.199/25), rather than the classful way of using the first three bits of the IP address to determine the dividing point between the network number and the host number.
The process for understanding what this means is:
- The “205” in the first octet means this IP address would normally contain 24 bits to represent the network portion of the address. With eight bits to an octet, the arithmetic is 3 x 8 = 24, or looking at it the other way around, “/24” means no bits are being borrowed from the last octet.
- But this is “/25,” which indicates it is “borrowing” one bit from the host portion of the address.
- With only one bit, there can only be two unique subnets.
- So this is the equivalent of a net mask of 255.255.255.128, where there is a maximum of 126 host addresses addressable on each of the two subnets.
So why did CIDR become so popular? Because it’s a much more efficient allocator of the IP address space. Using CIDR, a network admin can carve out a number of host addresses that’s closer to what is required than with the class approach.
For example, say a network admin has an IP address of 188.8.131.52/18 to work with. This block consists of 16,384 IP addresses. But if only 900 host addresses are required, this wastes scarce resources, leaving 15,484 (16,384 – 900) addresses unused. By using a subnet CIDR of 184.108.40.206/22 though, the network would address 1,024 nodes, which is much closer to the 900 host addresses required.