An IPv4 address consists of 32 bits. Each string of numbers separated by the period consists of 8 bits, represented by 0 to 255 in numerical forms.
CIDR is a group of IP addresses that are allocated to the customer when they demand a fixed number of IP addresses. When compared to classful addressing, there is no waste of IP addresses in CIDR because only the number of IP addresses requested by the customer is allocated.
CIDR notation
- The network address is a series of numerical digits pointing to the network’s unique identifier
- The host address is a series of numbers indicating the host or individual device identifier on the network
- A suffix that indicates network identifier bits in a specified format
In the preceding example (172.31.12.0/24), 24 bits are used for the network address, leaving 8 bits (32 minus 24) for host addresses. When you have 8 bits available for host addresses, the range of numbers you can create is 2^8 = 256 (from 00000000 to 11111111)
This means that the actual range of IP addresses described in our example is 172.31.12.0 to 172.31.12.255.
References