Open the Wi‑Fi details on almost any phone or laptop and you will see a line that looks like 255.255.255.0. It sits next to your IP address and router address. That number is the subnet mask. It quietly decides which devices your phone treats as "in the house" and which ones it sends out through the router.
This guide explains what a subnet mask is, how to read common values, where to find yours, and what goes wrong when it is set incorrectly. Like the router address, it only matters inside your home network. It has nothing to do with the public IP shown on the What Is My IP homepage.
Short answer
A subnet mask tells a device which part of an IP address is the shared "network" part and which part identifies the individual device. On a typical home network the mask is 255.255.255.0, also written as /24. That means: every address that starts with the same first three numbers as yours, such as 192.168.1.x, is local. Anything else is not, and gets handed to the default gateway.
Reading 255.255.255.0 in plain terms
An IPv4 address has four numbers, for example 192.168.1.23. The mask lines up with those four numbers:
| Address | 192 |
168 |
1 |
23 |
|---|---|---|---|---|
| Mask | 255 |
255 |
255 |
0 |
| Meaning | network | network | network | device |
A 255 means "this part must match for two devices to be neighbours." A 0 means "this part can be anything; it picks the device." So with 255.255.255.0, your laptop at 192.168.1.23 and your printer at 192.168.1.50 are on the same local network. A server at 192.168.2.10 is not, even though it looks similar.
The short form /24 says the same thing in bits: the first 24 bits are the network part. Router menus and Android often use this "slash" style.
With /24 there are 256 possible values for the last number, but two are reserved: .0 names the network itself and .255 is the broadcast address. That leaves 254 usable addresses, one of which is normally the router. For a home, that is plenty.
Common masks you might see at home
| Mask | Short form | Usable addresses | Where it shows up |
|---|---|---|---|
255.255.255.0 |
/24 |
254 | Almost every home router by default |
255.255.0.0 |
/16 |
65,534 | Some routers using 10.x or 172.x ranges, larger setups |
255.255.255.128 |
/25 |
126 | Hand-split networks, some business gear |
If your device shows something other than 255.255.255.0, it is not automatically wrong. What matters is that every device on the network uses the same mask as the router. Public vs Private IP Address Explained covers the private ranges these masks are applied to.
How the IP, mask, and gateway work together
When your phone joins Wi‑Fi, DHCP usually hands it three local settings in one go: an IP address, a subnet mask, and a default gateway. What Is DHCP on Home Internet? explains that hand-out.
Each time the phone sends something, it does a quick check:
- Take the destination address and compare its network part (using the mask) with its own network part.
- Same network? Send it directly across the Wi‑Fi or cable to that device. This is how casting to a TV or printing works.
- Different network? Send it to the default gateway, your router, which forwards it toward the internet.
So the mask is the rule, and the gateway is where "not local" traffic goes. The gateway itself must sit inside your subnet. A router at 192.168.1.1 works as a gateway for 192.168.1.23/24. A gateway at 192.168.2.1 would be unreachable from that device.
How to find your subnet mask
Check the active Wi‑Fi or Ethernet connection, not a disconnected adapter.
- Windows: Command Prompt →
ipconfig. Under your active adapter, look for Subnet Mask. - Mac: System Settings → Network → Wi‑Fi or Ethernet → Details → TCP/IP. The Subnet Mask field sits under the IP address.
- iPhone or iPad: Settings → Wi‑Fi → info button next to your network → Subnet Mask under IPv4 address.
- Android: Settings → Network & internet → Wi‑Fi → network details. Many versions show a prefix length such as
24instead of a dotted mask. Menus vary by brand. - Router admin page: the LAN or DHCP settings list the mask the router hands out. Open it via the gateway address in a browser.
Your device's mask and the router's LAN mask should match.
What a wrong subnet mask breaks
Problems usually come from a manual setting or a second router.
Manual static IP with the wrong mask
When you type a fixed IP into a computer, NAS, or camera, you also type the mask. If the network is /24 but you enter 255.255.0.0, the device thinks addresses like 192.168.5.9 are local. It tries to reach them directly instead of via the router, and those requests fail. If you enter a mask that is too narrow, such as 255.255.255.128, some real neighbours look "remote" and local discovery can break. Copy the mask from a working device or the router's LAN settings.
Printer or TV "disappears"
Device discovery for printers, speakers, and casting generally only works within one local network. If the printer sits on 192.168.0.x and your laptop is on 192.168.1.x, both have internet, but they cannot find each other.
Two routers, two subnets
This is the most common home cause. The ISP's box hands out 192.168.1.x, and your own router behind it hands out 192.168.0.x. Devices on each side live in different subnets. Fix it by putting one of them in bridge or access-point mode, so one router runs DHCP and one subnet covers the house.
What about IPv6?
IPv6 does not use dotted masks. It uses a prefix length only, and home LANs almost always use /64. You rarely need to change it. IPv4 vs IPv6 for Normal Users explains the two address types.
What the subnet mask is not
- Not something websites see. They see your public address, which the homepage shows. IP Lookup tells you about a public IP; it cannot read your local mask.
- Not your WAN settings. The router's internet-side address has its own mask from your ISP. What Is a WAN IP Address? covers that side.
- Not a firewall. Separate subnets are not a security wall by themselves. Guest Wi‑Fi isolation is a router feature.
Bottom line
A subnet mask draws the boundary of your home network. With the usual 255.255.255.0 (/24), every address sharing your first three numbers is a neighbour you can reach directly, and everything else goes through the default gateway. Leave it on automatic, make sure every device matches the router, and check the mask first when a printer vanishes or a hand-configured device cannot talk to anything.
