Skip to main content
WorldIP.io
Glossary

What is a subnet mask?

A subnet mask is a 32-bit number that separates an IP address into its network and host portions. It does the same job as CIDR's prefix-length notation but written in the more verbose dotted-decimal form.

Examples:

  • /24 CIDR ≡ 255.255.255.0 subnet mask — first 24 bits network, last 8 bits host
  • /16 CIDR ≡ 255.255.0.0 — first 16 bits network
  • /8 CIDR ≡ 255.0.0.0 — first 8 bits network (entire Class A)

Usage: when a device wants to send a packet, it ANDs its own IP with its subnet mask to find its network address, then ANDs the destination IP the same way. If the two networks match, the destination is local (send directly); otherwise route via the default gateway.

Modern tools default to CIDR notation (/24) instead of subnet masks (255.255.255.0), but both describe the same thing.

More IPv4 terms

Look it up in the real world

WorldIP.io tracks every allocated IPv4 address, ASN, CIDR block, and organization on the Internet. Start exploring:

Share