Menü schliessen
Created: November 19th 2021
Last updated: November 19th 2021
Categories: IT Knowledge
Author: Elzan Ajdari

CIDR and calculate with IP addresses

Tags:  CIDR,  IP,  network,  Subnet,  subnetmask
Donation Section: Background
Monero Badge: QR-Code
Monero Badge: Logo Icon Donate with Monero Badge: Logo Text
82uymVXLkvVbB4c4JpTd1tYm1yj1cKPKR2wqmw3XF8YXKTmY7JrTriP4pVwp2EJYBnCFdXhLq4zfFA6ic7VAWCFX5wfQbCC

What does CIDR mean?

CIDR stands for Classless  Inter-Domain Routing.

What does CIDR do?

There are two different types of subnetmasks, Classful and Classless.

Classful routing just includes the class A, class B and class C network and nothing between.

Classless routing (CIDR) makes it possible to route between different classes.
For example, if you have a class C network and its to small, but you dont want class B, then you can use CIDR. 

Class C: 255.255.255.0
Class B: 255.255.0.0
CIDR: 255.255.180.0 (in that case)

So basically CIDR makes it possible to use your IP range more flexible and efficient.

How to calculate the amount of IP's I can give

It always depends on your subnetmask and your IP address.

So if your IP adress is given "77.88.99.182" and your subnetmask is set "255.255.255.224", first you will recognize, that you have got a class C network.

The 4th octet of your IP address and your subnetmask is your host share.

4th octet in binary

First of all, the IP's must be translated to binary:

77. 88. 99.182 = 1001101.1011000.1100011.101|10110
255. 255. 255.224 = 11111111.11111111.11111111.11100000

To make things easier, you will have to cut the 4th octet of your subnetmask, at the point where the ones stop.
The IP also gets divided, at the same stop where the subnetmask does.

There are 5 bits host share of your subnetmask. Because it is in binary, you will have to calculate 2⁵.

2⁵ = 32

Eventually you have got 32 IP's to distribute in your network.
The broadcast and the network itself cover 2 IP's, that means at all there are 30 more IP's to set.

What is an IP broadcast?

An IP broadcast address is the highest number in its class, for example, the broadcast address of a Class C 192.168. 16.0 network is 192.168. 16.255.