3 minute read

Despite its size, the Internet also suffers from a lack of space.

The IP addresses we use today (IPv4) has long been exhausted and all possible addresses, which add up to nothing more and nothing less than 4,294,967,296, are already assigned.

With CIDR, acronym for classles inter-domain routing, the address framework was expanded, but what was initially conceived as a temporary solution has been active for more than twenty years.

And given that full adoption of IPv6 is still to be expected, it seems clear to assume that CIDR will maintain its position in the coming years.

Why was CIDR developed?

Back in 1993 it became clear that the Internet was growing faster than it had been anticipated.

At that time the solution was to stop using the network classes in which the IP address space was originally divided.

When they wanted to connect to the Internet, companies or private users had to choose IP addresses of the right kind.

Each class had a different number of octets (as the number blocks of IP addresses are called) to identify the networks. The remaining octets determined how many hosts (addresses, domains) could be hosted on the network.

This classification has proven to be both impractical and inflexible.

For many companies, a network with only 254 participants is too small, and large networks alone need thousands of hosts. This led to misuse of the networks, as many companies were forced to block addresses they were not using.

In order to better respond to the needs of Internet users, it was thought to make the size of the networks more flexible, reduce the routing tables and slow down the loss of free IP addresses.

Routing tables are located on routers and help them find the route to the correct address.

From source to destination, data packets travel through many nodes. So that the router can find the optimal route, the tables record information about the routes carried out, so that, if a route has to be added for each possible destination, over time the size of the file grows exponentially.

Since addresses in CIDR format are grouped into blocks, the need to store so much information in routing tables disappears: multiple addresses are grouped into one route.

How does CIDR work?

CIDR is based on the concept of subnet masks. A mask is superimposed on an IP address thus creating a secondary network linked to the Internet. This subnet mask tells the router what portion of the IP address is reserved for hosts (for each member of the network) and which portion identifies the network.

But, if instead of adding a subnet mask, a specification or a suffix with CIDR is integrated into the IP address, it is not only visually won: in addition to subnets (subnetting), CIDR also allows the creation of supernets (supernetting). This means that networks can both be subdivided and grouped.

Supernetting could be of interest, for example, to companies with several subsidiaries that want to keep all computers on the same network, because with this technique, also known as route aggregation, they could group several networks into a single route.

This would only send data packets to one destination, no matter where the host is physically located.

The CIDR notation

Before, it was possible to deduce from an IP address which class it belonged to.

Class C networks, for example, occupied the address space 192.0.0.0 to 223.255.255.255. The subnet mask (such as 255.255.255.0, for example) overlays the IP address and determines how many hosts it can host.

In the CIDR format this information is already integrated in the same IP address as a suffix, although the basic principle remains the same: this suffix indicates which positions (or bits) of the IP address identify the network (Network ID) and automatically which bits make up the host ID area.

To understand this, let’s look at a subnet mask in binary format:

255.255.255.0 = 11111111 11111111 11111111 00000000

In CIDR notation, this subnet mask (of class C) would be equivalent to the suffix / 24, since the first 24 bits identify the network portion of the IP address (in class C the first three octets identify the network).

But the CIDR notation not only supports blocks of ones or zeros: thanks to the VLSM it is also possible to create more flexible subnets.

The / 25 mask is equivalent in binary format to 11111111 11111111 11111111 1000000, for example, and in decimal format to 255.255.255.128.