Content
Introduction
The CIDR notation consists of a dotted decimal notation with a bit mask. The bit mask specifies the number of consecutive ones in the binary notation of the subnet mask associated with the IP address. The consecutive ones are the leftmost bits in the subnet mask.
For example, the IP address represented in CIDR notation as 10.217.123.7/20 indicates that the associated subnet mask contains 20 consecutive ones. As a result, the remaining 12 bits from the original 32 bits must be zeros.
IP addresses in CIDR notation are derived from the number of bits from the IP address that make up the network identifier, and are represented in the form /x. Thus, a network identifier consisting of 10 bits is represented as /10.
CIDR and IP address classes
An IP address represented in CIDR notation may correspond to a Class A, Class B, or Class C IP address.
CIDR | Class | Hosts in the Network |
---|---|---|
/8 | A | 16.777.214 |
/16 | B | 65.534 |
/24 | C | 254 |
The number of hosts is the number of available addresses minus 2 addresses for the net-ID and the subnet mask (first and last address of the subnet).
So if I want to split a subnet, a look at the old classes can help me. If I have e.g. a number of hosts smaller than 254 I can choose the class A net (CIDR /24) or a smaller CIDR net.
Further Information
Related articles