Subnet Masks Explained
A subnet mask defines which portion of an IP address identifies the network and which identifies the host. Understanding subnetting is essential for network design and troubleshooting.
How Subnet Masks Work
A subnet mask like 255.255.255.0 (or /24 in CIDR notation) means the first 24 bits identify the network, and the last 8 bits identify hosts within that network. This gives 256 addresses (254 usable hosts).
CIDR Notation
CIDR (Classless Inter-Domain Routing) notation appends a prefix length to an IP: 192.168.1.0/24. The number after the slash indicates how many bits are the network portion.
Common Subnets
| CIDR | Mask | Hosts | Use Case |
|---|---|---|---|
| /32 | 255.255.255.255 | 1 | Single host |
| /24 | 255.255.255.0 | 254 | Small office |
| /16 | 255.255.0.0 | 65,534 | Campus network |
| /8 | 255.0.0.0 | 16.7M | Large ISP |
Try It
Use our Subnet Calculator or IP Range Calculator to practice subnet math.