IP allocation is no simple thing, especially with the increasing threat of running out of IPv4 address space online. However, concepts such as CIDR help slow the growth of routing tables across the Internet and extend the life of IPv4 addresses. In this article, learn what CIDR is, how CIDR notation and CIDR blocks relate, and why this new addressing system is superior.
What is CIDR?
Classless Inter-Domain Routing (CIDR) is a network concept designed to oversee the allocation of IP addresses. Introduced in 1993, CIDR replaces the previous outdated classful network addressing system. Generally, classful addressing involves three classes: class A, class B, and class C.
With CIDR, there's no wasted IP addresses. A customer is only allocated a certain number of IP addresses, and a person in need of IPs must purchase the IP address allocator from the service provider.
Because CIDR isn't bound by class, it can organize IP addresses into subnets. This means it performs the task of subnetting, which saves a lot of IP addresses. CIDR makes networks more efficient and helps delay the exhaustion of the IPv4 address system.
How does CIDR work?
Classless Inter-Domain Routing is based on VLSM (variable-length subnet masking), which is an efficient way of subnetting real networks. This concept allows all subnet masks to have varying sizes, according to the user's requirement.
A subnet mask splits an IP address of a device into a host and network addresses. That way, you can identify which part of an IP address belongs to your device and which part belongs to the network.
A CIDR IP address features two sets of numbers: the network prefix, which is the network address, and the suffix, which indicates the number of bits in the entire CIDR address. An example of a CIDR IP address is 184.108.40.206/16. We can determine the network prefix, which is 220.127.116.11, and the suffix, which is /16.
With IPv4 addresses, 32 bits is the maximum limit. In our example, the 16 bits represents network addresses while the remaining 16 bits stands for a pool of host addresses available. CIDR conserves IP addresses by flexibly granting control over the size of subnets assigned to a business.
The rules of CIDR are as follows:
- All IP addresses allocated must be continuous; the Internet service provider will provide them in sequence to slow down the wastage of IPv4 addresses.
- The size of the CIDR block should be power of 2; if the number of an IP address is odd, then it’s invalid.
- Use CIDR blocks only for notion purposes.
What’s the purpose of CIDR?
CIDR was introduced as an alternative to traditional subnetting. Its objective was to help solve the scalability issues present with class-based IP addressing. The old classful routing system that included classes A, B, and C came with inefficiencies in address use as well as IP routing. This then led to rapid exhaustion of IPv4 addresses at an alarming rate.
CIDR improves the allocation of IP addresses by designating a much higher number of unique IP addresses.
Problems with class-based IP addressing
The original classful network system came with inefficiencies that depleted the stock of IP addresses, despite the three classes in existence. Each class had a different number of host identifiers:
- Class A, with over 16 million host identifiers
- Class B, with 65,535 host identifiers
- Class C, with 254 host identifiers
In this old method, you could choose any of these classes to define the size of your networks and determine how small or big you needed your network to be subnetted. For example, a user could have Class A with over 16 million host identifiers or Class B with 65,536 host identifiers. You could also choose from the Class C networks, each with 254 hosts on a single network.
However, the problem with the classful routing system would often occur when an organization needed more than 254 hosts per network. It would immediately push the organization into class B rather than class C. Therefore, this pushed many organizations into class B with a need for far fewer than 65,535 host identifiers.
For example, if an organization required 350 addresses, the remaining number of addresses in class B - 16,186 addresses - would go to waste. No other organization or entity can use them. Situations such as these depleted IPv4 addresses unnecessarily fast.
CIDR fixed this IPv4 efficiency issue with its classless-based subnetting system. Organizations no longer need to take over an excess amount of IPv4 addresses and are able to easily subnet instead.
What is CIDR notation?
CIDR notation compactly represents a subnet mask. Specifically, it indicates an IP address or the size of the subnet. CIDR notation consists of an IP address and ends with a forward slash followed by a number in a format like this:
a.b.c.d / n
N is the IP network prefix, representing the number of network bits. The development of CIDR notation gave a flexible way of defining subnets. Especially in comparison to the old class system, Classless Inter-Domain Routing helps define the networks for their proper sizes.
What are CIDR blocks?
CIDR blocks are groups of IP addresses, all of which share an initial sequence of bits and matching prefixes. When multiple CIDR blocks combine to form a larger network, it's called supernetting.
IP addresses that contain the same number of bits and address prefixes become a part of the same CIDR block. The length of the prefix determines the size of the block; therefore, a shorter CIDR prefix indicates more IP addresses and a bigger block, whereas a longer prefix supports fewer addresses, and therefore forms a smaller block.
The Internet Assigned Numbers Authority (IANA) is responsible for handling CIDR blocks. It issues large blocks to regional internet registries (RIRs). Bigger geographical areas like North America, Europe and Africa use these large blocks of IP addresses.
Then, the RIRs subdivide these blocks into smaller blocks to allocate to Local Internet Registries (LIRs). The blocks can be divided several times into subnets until they reach the end user. The size of blocks allocated to the end users, however, depends on the number of individual addresses the users require.
Most end users receive blocks from their ISPs. On other hand, organizations that use multiple blocks can receive provider-independent blocks directly from RIR.
Frequently asked questions
What are IPv4 CIDR blocks?
They are blocks of IP addresses that follow the IPv4 standard. IPv4 addresses with the same number of bits and identical network prefix belong to the same CIDR block.
What are IPv6 CIDR blocks?
They are blocks of IP addresses that follow the IPv6 standard. IPv6 was developed in 1998 with the sole purpose of overcoming the problem of IPv4 address exhaustion. While IPv4 contains 32-bit addresses, IPv6 addresses use 128 bits.
Is CIDR the same as an IP address?
Though Classless Inter-Domain Routing addresses look nearly like a normal IP addresses, they end with a slash followed by a number (/n). The number represents the number of network bits.
What are subnet masks?
A subnet mask is a 32-bit address that divides an IP into two parts – the network address and the host address.