Content
Overview
The CIDR (Classless Inter-Domain Routing) is a network protocol that enables more efficient use of the network addressing system on the Internet and other networks. CIDR was created to overcome the limitations of the traditional classful addressing system. The classful addressing system had three classes: A, B, and C. Each class represented networks of different sizes. Class A networks were the largest, while class C networks were smaller. However, the classful addressing system had limitations, such as the narrow range of network addresses and the limited scalability of networks.
CIDR solves these limitations by using variable-length prefixes for network addressing instead of classes. Such prefixes allow the use of the freely allocable size of networks. For example, if there are only 2000 addresses in an address range on the Internet to an IP address is needed, CIDR allows the size of the address range to be freely selected, which can be 2000 IP addresses or any other number that meets the needs.
The use of CIDR enables more efficient network addressing and the scalability of networks. It is the basic network protocol used by industrial service providers and Internet service providers, and is used in almost every part of modern networks. Variable-length prefixes used in CIDR solve the limitations of the class-based addressing system and enable more efficient use of the network addressing system.
Examples
Some examples of CIDR notation and the IP address range that displays it:
- 192.168.0.0 / 16: This CIDR value represents the private network address range from 192.168.0.0 to 192.168.255.255.
- 10.0.0.0 / 8: This CIDR value from 10.0.0.0 to 10.255.255.255 also represents a private network address range.
- 216.58.192.0 / 19: This CIDR value represents a range of Google IP addresses from 216.58.192.0 to 216.58.223.255.
- 192.0.2.0 / 24: This CIDR value means that the IP address ranges from 192.0.2.0 to 192.0.2.255. This example is a so-called refers to the test address range, which is used during network testing.
In addition to these examples, there are of course many more address ranges, here I wanted to illustrate their display with just a few examples. The CIDR system therefore enables the efficient management of IP addresses during network communication.
Calculating ranges
Converting CIDR to IP address ranges in the Linux command line is very easy. To do this, you need to install it ipcalc command:
sudo apt-get install ipcalc
Then request an arbitrary CIDR designation:
ipcalc 192.168.0.0/16
For which the command gives the following output:
Address: 192.168.0.0 11000000.10101000. 00000000.00000000 Netmask: 255.255.0.0 = 16 11111111.11111111. 00000000.00000000 Wildcard: 0.0.255.255 00000000.00000000. 11111111.11111111 => Network: 192.168.0.0/16 11000000.10101000. 00000000.00000000 HostMin: 192.168.0.1 11000000.10101000. 00000000.00000001 HostMax: 192.168.255.254 11000000.10101000. 11111111.11111110 Broadcast: 192.168.255.255 11000000.10101000. 11111111.11111111 Hosts/Net: 65534 Class C, Private Internet
The command returns important information about the IP address range, such as the subnet mask, first and last usable IP addresses, network broadcast IP address, IP address class, and IP address type, which in the example above means a private network. For example, home routers usually assign such IP addresses.
In this example, the first usable IP address of the given CIDR range is 192.168.0.1, and the last usable IP address is 192.168.255.254.
- 646 views