IP/CIDR Reference
This article aims to provide information about IP addresses, subnets, and CIDR notation.
In TCP/IP networking, an IP address is a value assigned to a device on a network for purposes of communication. There are currently two types of addresses, IPv4 (for example, 1.160.10.240) and IPv6 (for example, 2001:0db8:85a3:0000:0000:8a2e:0370:7334).
- IPv4 addresses are 32-bit integers represented in groups of four (4), separated by periods (.). Integers within each group range from 0 to 255. The IPv4 addressing scheme allows for a total of 232 (approximately 4 billion) addresses.
- IPv6 addresses are 128-bit integers represented in hexadecimal, separated by colons (:).
For the purposes of this particular article, we will focus primarily on
IPv4 addresses.
The following is reference table shows all valid CIDR lengths, their associated subnets, class, and supported capacity.
CIDR Length | Mask | # Networks | Host Capacity |
/1 | 128.0.0.0 | 128 A | 2,147,483,392 |
/2 | 192.0.0.0 | 64 A | 1,073,741,696 |
/3 | 224.0.0.0 | 32 A | 536,870,848 |
/4 | 240.0.0.0 | 16 A | 268,435,424 |
/5 | 248.0.0.0 | 8 A | 134,217,712 |
/6 | 252.0.0.0 | 4 A | 67,108,856 |
/7 | 254.0.0.0 | 2 A | 33,554,428 |
/8 | 255.0.0.0 | 1 A | 16,777,214 |
/9 | 255.128.0.0 | 128 B | 8,388,352 |
/10 | 255.192.0.0 | 64 B | 4,194,176 |
/11 | 255.224.0.0 | 32 B | 2,097,088 |
/12 | 255.240.0.0 | 16 B | 1,048,544 |
/13 | 255.248.0.0 | 8 B | 524,272 |
/14 | 255.252.0.0 | 4 B | 262,136 |
/15 | 255.254.0.0 | 2 B | 131,068 |
/16 | 255.255.0.0 | 1 B | 65,024 |
/17 | 255.255.128.0 | 128 C | 32,512 |
/18 | 255.255.192.0 | 64 C | 16,256 |
/19 | 255.255.224.0 | 32 C | 8,128 |
/20 | 255.255.240.0 | 16 C | 4,064 |
/21 | 255.255.248.0 | 8 C | 2,032 |
/22 | 255.255.252.0 | 4 C | 1,016 |
/23 | 255.255.254.0 | 2 C | 508 |
/24 | 255.255.255.0 | 1 C | 254 |
/25 | 255.255.255.128 | 2 subnets | 124 |
/26 | 255.255.255.192 | 4 subnets | 62 |
/27 | 255.255.255.224 | 8 subnets | 30 |
/28 | 255.255.255.240 | 16 subnets | 14 |
/29 | 255.255.255.248 | 32 subnets | 6 |
/30 | 255.255.255.252 | 64 subnets | 2 |
/31 | 255.255.255.254 | 0 | 0 |
/32 | 255.255.255.255 | 1/256 C | 1 |
The following is a table showing addresses that are officially reserved.
Class | Allocation | Start | End | Hosts | Info/Comments |
A | 10.0.0.0/8 | 10.0.0.0 | 10.255.255.255 | 16,777,216 | a single Class A network number |
B | 172.16.0.0/12 | 172.16.0.0 | 172.31.255.255 | 1,048,544 | 16 contiguous Class B network numbers |
C | 192.168.0.0/16 | 192.168.0.0 | 192.168.255.255 | 65,534 | 256 contiguous Class C network numbers |
Special thanks to Ray Smith's website from 1996, located at www.rjsmith.com/CIDR-Table.html for the Reference Table and the majority of the information regarding CIDR that is found on this page.