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

CIDRMaskHostsUse Case
/32255.255.255.2551Single host
/24255.255.255.0254Small office
/16255.255.0.065,534Campus network
/8255.0.0.016.7MLarge ISP

Try It

Use our Subnet Calculator or IP Range Calculator to practice subnet math.