If you work with networking or IT, you’re probably familiar with IP subnetting. Subnetting is the process of dividing a larger network into smaller subnetworks, or subnets. This cheat sheet provides the subnet masks and number of subnets/hosts per subnet for common prefix lengths in IPv4 and IPv6.
IPv4
Prefix Length |
Subnet Mask |
Number of Subnets |
Number of Hosts per Subnet |
/8 |
255.0.0.0 |
128 |
16,777,214 |
/9 |
255.128.0.0 |
256 |
8,388,606 |
/10 |
255.192.0.0 |
512 |
4,194,302 |
/11 |
255.224.0.0 |
1,024 |
2,097,150 |
/12 |
255.240.0.0 |
2,048 |
1,048,574 |
/13 |
255.248.0.0 |
4,096 |
524,286 |
/14 |
255.252.0.0 |
8,192 |
262,142 |
/15 |
255.254.0.0 |
16,384 |
131,070 |
/16 |
255.255.0.0 |
32,768 |
65,534 |
/17 |
255.255.128.0 |
IPv6
Prefix Length |
Subnet Mask |
Number of Subnets |
Number of Hosts per Subnet |
/32 |
ffff:ffff:: |
1 |
4,294,967,294,967,296 |
/48 |
ffff:ffff:ffff:: |
65,536 |
1.2089 x 10^24 |
/56 |
ffff:ffff:ff00:: |
256 |
1.4615 x 10^16 |
/64 |
ffff:ffff:ffff:ffff:: |
1 |
18,446,744,073,709,551,616 |
/96 |
ffff:ffff:ffff:ffff:ffff:ffff:: |
65,536 |
1.2089 x 10^24 |
/112 |
ffff:ffff:ffff:ffff:ffff:ffff:ff00:: |
256 |
1.4615 x 10^16 |
/128 |
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff |
1 |
1 |