Blog Post View


What is CIDR?

Before we can discuss CIDR (Classless Inter-Domain Routing), we need to understand what IP address is, how it is divided (subnetting), and what versions of IP addresses are available. Currently, there are IPv4 (version 4) and IPv6 (version 6) addresses. IPv4 was introduced in 1980, and it is a 32-bit number having a total of about 4.3 million addresses. With the prosperity of the Internet and smart devices joining the network, 4.3 million IP addresses weren't enough to connect all devices available worldwide, and hence 128-bit IPv6 address was invented in 1998. For each computer, smartphone, tablet, and IoT devices joining the Internet, the number of IP addresses available within IPv4 wasn't enough to connect all devices.

The traditional IPv4 address was classified as class A, class B and class C; and entire block of class A, class B or class C IP addresses were assigned to ISPs and corporations. The classful routing system was inefficient in allocating IP addresses amongst organizations as class A, class B, and class C blocks are a predefined set of IP addresses that cannot further break down into smaller units. The classful address blocks are defined as follows:

  • Class A: 8-bit network address and 24-bit host address having 16,777,216 IP addresses.
  • Class B: 16-bit network address and 16-bit host address having 65,534 IP addresses.
  • Class C: 24-bit network address and 8-bit host address having 256 IP addresses.

As you can see from the above, the entire 16,777,216 IP addresses are assigned to a single organization registering a class A network. This is a very inefficient allocation of IP addresses, especially when more and more devices are joining the Internet. To efficiently allocate the IP addresses into smaller blocks, CIDR (Classless Inter-Domain Routing) was invented in 1993. This is 5 years before IPv6 was introduced.

What is CIDR?

The introduction of CIDR extended the lifespan of IPv4 as well as the growth of routing tables. CIDR is only applicable to IPv4 addresses, and significantly improves the allocation of IP blocks in smaller chunks. For example, if a small business requires only 6 IP addresses, the smallest allocation in the classful system would be a class C assigning 255 IP addresses to this organization instead of 6. With the CIDR allocation system, a block of 8 IP addresses would be assigned to this small business enhancing the way how IPs are allocated.

How does CIDR work?

When setting up a network, a subnet mask is used to break the IP address into a network address and a host address. The 32-bit IP address is broken into 2-parts, and the first part becomes the network address and the tail end becomes the host address. The subnet mask is used to mask the host address, and the network address can be revealed. CIDR uses variable-length subnet masking (VLSM), so that it can mask any number of bits instead of 8-bit chunks in a classful system. CIDR notation is used in the following manner: Network Address / # of bits used in the network. For example, 192.168.1.0/24 is identical to class A network beginning at 192.168.1.0. The /24 is class C, /25 would be half of that which is 128 hosts, /26 would be 64 hosts in a subnetwork.

The table below is the reproduction of the CIDR network table provided in the various articles within our website.

Class Network Address Number of Hosts Netmask
CIDR /4 240,435,456 240.0.0.0
CIDR /5 134,217,728 248.0.0.0
CIDR /6 67,108,864 252.0.0.0
CIDR /7 33,554,432 254.0.0.0
A /8 (1-126) 16,777,216 255.0.0.0
CIDR /9 8,388,608 255.128.0.0
CIDR /10 4,194,304 255.192.0.0
CIDR /11 2,097,152 255.224.0.0
CIDR /12 1,048,576 255.240.0.0
CIDR /13 524,288 255.248.0.0
CIDR /14 262,144 255.252.0.0
CIDR /15 131,072 255.254.0.0
B /16 (128-191) 65,534 255.255.0.0
CIDR /17 32,768 255.255.128.0
CIDR /18 16,384 255.255.192.0
CIDR /19 8,192 255.255.224.0
CIDR /20 4,096 255.255.240.0
CIDR /21 2,048 255.255.248.0
CIDR /22 1,024 255.255.252.0
CIDR /23 512 255.255.254.0
C /24 (192-223) 256 255.255.255.0
CIDR /25 128 255.255.255.128
CIDR /26 64 255.255.255.192
CIDR /27 32 255.255.255.224
CIDR /28 16 255.255.255.240
CIDR /29 8 255.255.255.248
CIDR /30 4 255.255.255.252

Note: (1) 127 Network Address reserved for loopback test. (2) Class D (224-247, Multicast) and Class E (248-255, Experimental) are not intended to be used in public operation.

Conclusion

CIDR was introduced in the IPv4 system to efficiently allocate the IP addresses into smaller blocks, and improve the efficiency of IP distribution to prolong the life of IPv4. IPv6 is now being actively used along with the IPv4 and eliminated the IP exhaustion issues, but CIDR is still being actively used to efficiently manage subnetworks within IPv4 space.


Share this post

Comments (0)

    No comment

Leave a comment

All comments are moderated. Spammy and bot submitted comments are deleted. Please submit the comments that are helpful to others, and we'll approve your comments. A comment that includes outbound link will only be approved if the content is relevant to the topic, and has some value to our readers.


Login To Post Comment