Skip to main content

Classless Interdomain Routing

what if i have four small ip addresses instead of one big overkill one

Classless Interdomain Routing is an addressing mechanism that allows for more complexity in address assignment within a network. It uses bits normally assigned to the Network ID in an IPv4 address to define a custom subnetwork (called borrowing bits).

In the case of medium enterprise networks, an ISP could assign a set of Class C (/24) addresses to the network instead of a big Class B (/16) address. Four /24 addresses allow for 254 times 4 or 1,016 usable IP addresses. A single /16 address allows for 65,536 addresses, which is absolute overkill. However, using 4 /24 addresses to represent a single network fills up routing tables unnecessarily, which is where CIDR (or supernetting) comes in.

CIDR allows for the registration of one network as /22 when in reality its four /24 networks aggregated together. If you had a ME network with the addresses 198.51.100.0 - 198.51.103.0 and needed to logically organize them as one network, you'd use the subnet supernet mask of 255.255.252.0, making a /22 network.

In a supernetted network (e.g. /22), the ISP's router uses the /22 prefix, not needed to store the four networks that the ME company is using. The same ANDing process is used to distinguish between networks, and the internal routers are responsible for proper routing between the four networks.

Variable Length Subnet Masks

This basically allows a network admin to guess the size a supernetted subnet should be based on the number of hosts that are going to be in that subnet. If you didn't have VLSM, you'd have to use the same size of networks for the subnets, which could be wasteful in an environment where the number of IPv4 addresses are limited.