IP addresses are described as consisting of two groups of bits in the address:
- the most significant part is the network address which identifies a whole network or subnet
- and the least significant portion is the host identifier, which specifies a particular host interface on that network.
This division is used as the basis of traffic routing between IP networks and for address allocation policies.
Classful Addressing -
- Classful network design for IPv4 sized the network address as one or more 8-bit groups, resulting in the blocks of Class A, B, or C addresses.
Class | First Byte | Network ID / Host ID (Bytes) | Theoretical IP Address Range |
Class A | 0xxx xxxx | 1 / 3 | 1.0.0.0 to 126.255.255.255 |
Class B | 10xx xxxx | 2 / 2 | 128.0.0.0 to 191.255.255.255 |
Class C | 110x xxxx | 3 / 1 | 192.0.0.0 to 223.255.255.255 |
Class D | 1110 xxxx | — | 224.0.0.0 to 239.255.255.255 |
Class E | 1111 xxxx | — | 240.0.0.0 to 255.255.255.255 |
Classless Inter-Domain Routing -
- CIDR allocates address space to Internet service providers and end users on any address bit boundary, instead of on 8-bit segments
- CIDR specifies an IP address range using a combination of an IP address and its associated network mask. CIDR notation uses the following format - xxx.xxx.xxx.xxx/n, where n is the number of (leftmost) '1' bits in the mask.
- For example, 192.168.12.0/23 applies the network mask 255.255.254.0 to the 192.168 network, starting at 192.168.12.0. This notation represents the address range 192.168.12.0 - 192.168.13.255.