myaddress.is

Learn

What is a subnet mask?

The setting that splits one IP address into "which network" and "which device on it."

A subnet mask tells a device which part of an IP address identifies the network, and which part identifies the specific device on that network. It's the piece of configuration that decides whether two devices can talk directly, or need a router in between.

Splitting an address in two

Take the address 192.168.1.42 with the common mask 255.255.255.0. That mask says the first three numbers (192.168.1) identify the network, and the last number (42) identifies the device within it. Any device sharing the same network portion is on the same local network and can be reached directly; anything outside it needs to go through a router.

CIDR notation is the shorthand

You'll often see the same idea written as 192.168.1.0/24 — the /24 is CIDR notation for "the first 24 bits are the network portion," which is exactly equivalent to a 255.255.255.0 mask. A /24 holds 256 addresses; a smaller number like /16 covers a much larger network, and a larger number like /29 a much smaller one.

Why it matters day to day

The subnet mask is why devices on your home Wi-Fi can see and talk to each other without any special setup, while reaching anything outside your network — including this site — automatically routes through your router. Misconfigured subnet settings are a common cause of devices that can reach the internet but can't see each other, or vice versa.

Read about public vs private IP addresses →