CIDR notation
Need to assign IPV4 address in a range?
Here is just a CIDR(Classless Inter-Domain Routing) table for my reference on practicing GCP VPC.
CIDR prefix length | Dotted Decimal Netmask | Number of Classful Networks | Number of Usable IPs | Note |
---|---|---|---|---|
/1 | 128.0.0.0 | 128 As | 2147483646 | 2^(32-1)-2 |
/2 | 192.0.0.0 | 64 As | 1073741822 | 2^(32-2)-2 |
/3 | 224.0.0.0 | 32 As | 536870910 | 2^(32-3)-2 |
/4 | 240.0.0.0 | 16 As | 268435454 | 2^(32-4)-2 |
/5 | 248.0.0.0 | 8 As | 134217726 | 2^(32-5)-2 |
/6 | 252.0.0.0 | 4 As | 67108862 | 2^(32-6)-2 |
/7 | 254.0.0.0 | 2 As | 33554430 | 2^(32-7)-2 |
/8 | 255.0.0.0 | 1 A or 256 Bs | 16777214 | 2^(32-8)-2 |
/9 | 255.128.0.0 | 128 Bs | 8388606 | 2^(32-9)-2 |
/10 | 255.192.0.0 | 64 Bs | 4194302 | 2^(32-10)-2 |
/11 | 255.224.0.0 | 32 Bs | 2097150 | 2^(32-11)-2 |
/12 | 255.240.0.0 | 16 Bs | 1048574 | 2^(32-12)-2 |
/13 | 255.248.0.0 | 8 Bs | 524286 | 2^(32-13)-2 |
/14 | 255.252.0.0 | 4 Bs | 262142 | 2^(32-14)-2 |
/15 | 255.254.0.0 | 2 Bs | 131070 | 2^(32-15)-2 |
/16 | 255.255.0.0 | 1 B or 256 Cs | 65534 | 2^(32-16)-2 |
/17 | 255.255.128.0 | 128 Cs | 32766 | 2^(32-17)-2 |
/18 | 255.255.192.0 | 64 Cs | 16382 | 2^(32-18)-2 |
/19 | 255.255.224.0 | 32 Cs | 8190 | 2^(32-19)-2 |
/20 | 255.255.240.0 | 16 Cs | 4094 | 2^(32-20)-2 |
/21 | 255.255.248.0 | 8 Cs | 2046 | 2^(32-21)-2 |
/22 | 255.255.252.0 | 4 Cs | 1022 | 2^(32-22)-2 |
/23 | 255.255.254.0 | 2 Cs | 510 | 2^(32-23)-2 |
/24 | 255.255.255.0 | 1 C | 254 | 2^(32-24)-2 |
/25 | 255.255.255.128 | 1/2 C | 126 | 2^(32-25)-2 |
/26 | 255.255.255.192 | 1/4 C | 62 | 2^(32-26)-2 |
/27 | 255.255.255.224 | 1/8 C | 30 | 2^(32-27)-2 |
/28 | 255.255.255.240 | 1/16 C | 14 | 2^(32-28)-2 |
/29 | 255.255.255.248 | 1/32 C | 6 | 2^(32-29)-2 |
/30 | 255.255.255.252 | 1/64 C | 2 | 2^(32-30)-2 |
/31 | 255.255.255.254 | 1/128 C | 0 | 2^(32-31)-2 |
/32 | 255.255.255.255 | 1/256 C | 1 | reserved |
There are some range of IPv4 address reserved for special uses. More updates coming…
blog comments powered by Disqus