Subnetting (IPv4)

Subnet Masks

ClassIP RangeBinary IP Range
A255.0.0.0 11111111.00000000.00000000.00000000
B 255.255.0.0 11111111.11111111.00000000.00000000
C 255.255.255.0 11111111.11111111.11111111.00000000
Ones (1's) are network bits.
Zeros (0's) are node bits (assignable address bits).

Max. Hosts (Per Class)

ClassValid Addresses
A16,777,216 (2^24)
B65,536 (2^16)
C256 (2^8)

Classless Inter Domain Routing (CIDR) Table

BitsSubnet MaskSubnetsHosts
8255.0.0.0116,777,216
16255.255.0.025665,534
24255.255.255.0 65,536254
25255.255.255.128131,072126
26255.255.255.192262,14462
27255.255.255.224524,28830
28255.255.255.2401,048,57614
29255.255.255.2482,097,1526
30255.255.255.2524,194,3042

Binary Subnet Representation

DecimalBinaryBits
.128 100000001
.192110000002
.224111000003
.240111100004
.248 111110005
.252111111006
.254111111107
.255111111118