Category Archives: ipv4

Subnet conversion quick reference

Bitmask (Bits) Dotted Decimal Hexadecimal Binary
/0 0.0.0.0 0x00000000 00000000 00000000 00000000 00000000
/1 128.0.0.0 0x80000000 10000000 00000000 00000000 00000000
/2 192.0.0.0 0xc0000000 11000000 00000000 00000000 00000000
/3 224.0.0.0 0xe0000000 11100000 00000000 00000000 00000000
/4 240.0.0.0 0xf0000000 11110000 00000000 00000000 00000000
/5 248.0.0.0 0xf8000000 11111000 00000000 00000000 00000000
/6 252.0.0.0 0xfc000000 11111100 00000000 00000000 00000000
/7 254.0.0.0 0xfe000000 11111110 00000000 00000000 00000000
/8 255.0.0.0 0xff000000 11111111 00000000 00000000 00000000
/9 255.128.0.0 0xff800000 11111111 10000000 00000000 00000000
/10 255.192.0.0 0xffc00000 11111111 11000000 00000000 00000000
/11 255.224.0.0 0xffe00000 11111111 11100000 00000000 00000000
/12 255.240.0.0 0xfff00000 11111111 11110000 00000000 00000000
/13 255.248.0.0 0xfff80000 11111111 11111000 00000000 00000000
/14 255.252.0.0 0xfffc0000 11111111 11111100 00000000 00000000
/15 255.254.0.0 0xfffe0000 11111111 11111110 00000000 00000000
/16 255.255.0.0 0xffff0000 11111111 11111111 00000000 00000000
/17 255.255.128.0 0xffff8000 11111111 11111111 10000000 00000000
/18 255.255.192.0 0xffffc000 11111111 11111111 11000000 00000000
/19 255.255.224.0 0xffffe000 11111111 11111111 11100000 00000000
/20 255.255.240.0 0xfffff000 11111111 11111111 11110000 00000000
/21 255.255.248.0 0xfffff800 11111111 11111111 11111000 00000000
/22 255.255.252.0 0xfffffc00 11111111 11111111 11111100 00000000
/23 255.255.254.0 0xfffffe00 11111111 11111111 11111110 00000000
/24 255.255.255.0 0xffffff00 11111111 11111111 11111111 00000000
/25 255.255.255.128 0xffffff80 11111111 11111111 11111111 10000000
/26 255.255.255.192 0xffffffc0 11111111 11111111 11111111 11000000
/27 255.255.255.224 0xffffffe0 11111111 11111111 11111111 11100000
/28 255.255.255.240 0xfffffff0 11111111 11111111 11111111 11110000
/29 255.255.255.248 0xfffffff8 11111111 11111111 11111111 11111000
/30 255.255.255.252 0xfffffffc 11111111 11111111 11111111 11111100
/31 255.255.255.254 0xfffffffe 11111111 11111111 11111111 11111110
/32 255.255.255.255 0xffffffff 11111111 11111111 11111111 11111111

IPv4 quick reference

Prefix Bits IP Addresses /24s /16s /8s Subnet Mask
/32 0 1       255.255.255.255
/31 1 2       255.255.255.254
/30 2 4       255.255.255.252
/29 3 8       255.255.255.248
/28 4 16       255.255.255.240
/27 5 32       255.255.255.224
/26 6 64       255.255.255.192
/25 7 128       255.255.255.128
/24 8 256 1     255.255.255.0
/23 9 512 2     255.255.254.0
/22 10 1,024 4     255.255.252.0
/21 11 2,048 8     255.255.248.0
/20 12 4,096 16     255.255.240.0
/19 13 8,192 32     255.255.224.0
/18 14 16,384 64     255.255.192.0
/17 15 32,768 128     255.255.128.0
/16 16 65,536 256 1   255.255.0.0
/15 17 131,072 512 2   255.254.0.0
/14 18 262,144 1,024 4   255.252.0.0
/13 19 524,288 2,048 8   255.248.0.0
/12 20 1,048,576 4,096 16   255.240.0.0
/11 21 2,097,152 8,192 32   255.224.0.0
/10 22 4,194,304 16,384 64   255.192.0.0
/9 23 8,388,608 32,768 128   255.128.0.0
/8 24 16,777,216 65,536 256 1 255.0.0.0
/7 25 33,554,432 131,072 512 2 254.0.0.0
/6 26 67,108,864 262,144 1,024 4 252.0.0.0
/5 27 134,217,728 524,288 2,048 8 248.0.0.0
/4 28 268,435,456 1,048,576 4,096 16 240.0.0.0
/3 29 536,870,912 2,097,152 8,192 32 224.0.0.0
/2 30 1,073,741,824 4,194,304 16,384 64 192.0.0.0
/1 31 2,147,483,648 8,388,608 32,768 128 128.0.0.0
/0 32 4,294,967,296 16,777,216 65,536 256 0.0.0.0