How CIDR Works
CIDR was a dramatic break from tradition in that it completely abandoned the rigid classes of addresses.
The original IPv4 address architecture used an 8-bit network number for Class A addresses, a 16-bit
network number for Class B addresses, and a 24-bit number for Class C addresses. CIDR replaced these
categories with a more generalized network prefix. This prefix could be of any length rather than just 8,
16, or 24 bits. This allows CIDR to craft network address spaces according to the size of a network
instead of force-fitting networks into presized network address spaces.
Each CIDR-compliant network address is advertised with a specific bit mask. This mask identifies the
length of the network prefix. For example, 192.125.61.8/20identifies a CIDR address with a 20-bit
network address. The IP address can be any mathematically valid address regardless of whether that
address was originally part of the Class A, B, or C range! CIDR-compliant routers look at the number
after the /to determine the network number. Therefore, the former Class C address 192.125.61.8
previously had a network number of 192.125.61and a host number of 8. As a Class C address, you
could provide addresses for a maximum of 254 hosts within the network. Using CIDR, the architectural
limitations of the 8-bit boundaries between address components is eliminated. To better understand how
this works, it is necessary to translate the decimal number to binary.
CIDR was a dramatic break from tradition in that it completely abandoned the rigid classes of addresses.
The original IPv4 address architecture used an 8-bit network number for Class A addresses, a 16-bit
network number for Class B addresses, and a 24-bit number for Class C addresses. CIDR replaced these
categories with a more generalized network prefix. This prefix could be of any length rather than just 8,
16, or 24 bits. This allows CIDR to craft network address spaces according to the size of a network
instead of force-fitting networks into presized network address spaces.
Each CIDR-compliant network address is advertised with a specific bit mask. This mask identifies the
length of the network prefix. For example, 192.125.61.8/20identifies a CIDR address with a 20-bit
network address. The IP address can be any mathematically valid address regardless of whether that
address was originally part of the Class A, B, or C range! CIDR-compliant routers look at the number
after the /to determine the network number. Therefore, the former Class C address 192.125.61.8
previously had a network number of 192.125.61and a host number of 8. As a Class C address, you
could provide addresses for a maximum of 254 hosts within the network. Using CIDR, the architectural
limitations of the 8-bit boundaries between address components is eliminated. To better understand how
this works, it is necessary to translate the decimal number to binary.