Network guide

What is a subnet mask?

Reviewed 10 September 2026 · 5-minute read

An IPv4 subnet mask marks the network bits of an address. CIDR expresses the same boundary as a prefix length: 255.255.255.0 corresponds to /24.

Mask and prefix examples

CIDRIPv4 maskTotal addresses
/16255.255.0.065,536
/24255.255.255.0256
/30255.255.255.2524

Total addresses are not always the same as conventionally usable host addresses; network design and special rules matter.

Finding a network boundary

A bitwise AND of an IPv4 address and its mask produces the network address. Prefix-aware tools handle this more safely than mental decimal arithmetic.

What about IPv6?

IPv6 normally uses prefix lengths such as /64 rather than dotted-decimal masks. The idea—leading network bits followed by interface or subnet bits—is similar.

Sources and review boundary

Sources were checked on 10 September 2026. Network assignments, software interfaces, provider policies and database results can change.