VLSM – Variable Length Subnet Masking. Several new methods of addressing were created so that usage of IP space was more efficient. The first of these methods is called Variable-Length Subnet Masking (VLSM). Subnetting had long been a way to better utilize address space. Subnets divide a single network into smaller pieces. This is done by taking bits from the host portion of the address to use in the creation of a “sub” network. For example, take the class B network 22.214.171.124. The default network mask is 255.255.0.0, and the last two octets contain the host portion of the address. To use this address space more efficiently, we could take all eight bits of the third octet for the subnet.
One drawback of subnetting is that once the subnet mask has been chosen, the number of hosts on each subnet is fixed. This makes it hard for network administrators to assign IP space based on the actual number of hosts needed. For example, assume that a company has been assigned 126.96.36.199 and has decided to subnet this by using eight bits from the host portion of the address. Assume that the address allocation policy is to assign one subnet per department in an organization. This means that 254 addresses are assigned to each department. Now, if one department only has 20 servers, then 234 addresses are wasted.
Using variable-length subnet masks (VLSM) improves on subnet masking. VLSM is similar to traditional fixed-length subnet masking in that it also allows a network to be subdivided into smaller pieces. The major difference between the two is that VLSM allows different subnets to have subnet masks of different lengths. For the example above, a department with 20 servers can be allocated a subnet mask of 27 bits. This allows the subnet to have up to 30 usable hosts on it.
CIDR – Classless Inter-Domain Routing. CIDR is also called supernetting. It’s an IP addressing scheme that replaces the older system based on classes A, B, and C. With CIDR, a single IP address can be used to designate many unique IP addresses. A CIDR IP address looks like a normal IP address except that it ends with a slash followed by a number, called the IP prefix. For example: 188.8.131.52/16
The IP prefix specifies how many addresses are covered by the CIDR address, with lower numbers covering more addresses. An IP prefix of /12, for example, can be used to address 1,048,576 former Class C addresses.
CIDR addresses reduce the size of routing tables and make more IP addresses available within organizations.
Comparing CIDR to VLSM
CIDR and VLSM 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, a mid-level ISP, a low-level ISP, and a private organization’s network.