What a network mask does and why you need it

A network mask (also called a subnet mask) tells your device which part of an IP address belongs to your local network and which part identifies individual devices on that network. When your computer sends data to another device, it uses the network mask to decide whether that device is on the same network (send directly) or on a different network (send through the router). Without the correct mask, your device cannot communicate properly with other machines on your home network.

Your network mask is not something you calculate from your IP address alone — it is a separate setting that your router assigns to your device at the same time it assigns the IP address. However, you can find what mask your device currently has by looking at your network settings, and you can understand what it means by reading the address itself.

Key Takeaways

  • Your network mask is assigned by your router and appears in your device's network settings, not in the IP address itself.
  • On Windows, open Settings > Network & Internet > WiFi (or Ethernet) > Advanced, then look for "IPv4 subnet mask".
  • On Mac, open System Settings > Network, select your connection, then click Details to find the subnet mask field.
  • Common home network masks are 255.255.255.0 (for networks with up to 254 devices) and 255.255.255.128 (for smaller networks).
  • If your mask does not match your router's settings, your device may not connect to your network properly.

Finding your network mask on Windows

On Windows 10 or 11, the fastest way to see your network mask is through the Settings app. Click the Start button, then type "Settings" and open it. Navigate to Network & Internet, then select either WiFi or Ethernet depending on how you are connected.

Under your active connection, click Advanced. Scroll down to the IPv4 section. You will see a field labeled Subnet mask — this is your network mask. It will look like four numbers separated by periods, such as 255.255.255.0. Write this down or take a screenshot if you need to compare it with your router settings.

If you prefer the command line, you can also open Command Prompt (search for "cmd"), type ipconfig, and press Enter. Look for the line labeled Subnet Mask under your active network connection. The result is the same as what you see in Settings.

Finding your network mask on Mac

On macOS, open System Settings and click Network in the sidebar. Select the connection you are using (WiFi or Ethernet), then click the Details button. In the window that opens, click the TCP/IP tab at the top.

You will see a field labeled Subnet Mask. This is your network mask. Like Windows, it appears as four numbers separated by periods. If you do not see a Details button, your connection may be set to automatic — click Edit next to the connection name instead, then look for the TCP/IP section.

Finding your network mask on Linux and Android

On Linux, open a terminal and type ip addr show or ifconfig. Look for the line that starts with "inet" under your active connection. The network mask appears after a forward slash — for example, "192.168.1.50/24". The number after the slash (24 in this case) is shorthand for the mask. You can convert it: /24 means 255.255.255.0, /25 means 255.255.255.128, and /16 means 255.255.0.0.

On Android, go to Settings > About phone > Status (or Network on some phones). Look for IP address and Subnet mask fields. Android displays the mask in the same four-number format as Windows and Mac.

Understanding what your network mask means

A network mask of 255.255.255.0 is the most common in home networks. It means your network can have up to 254 usable devices (your router takes one address, and one is reserved for broadcast). If you see 255.255.255.128, your network can have up to 126 usable devices. A mask of 255.255.0.0 is rare in home networks but allows thousands of devices.

The mask works by matching bits in your IP address. When your device sees another IP address, it applies the mask to both addresses and compares the results. If they match, the other device is on your local network. If they do not match, the data goes to your router instead. This is why a wrong mask can break communication even if the IP address itself is correct.

What to do if your network mask is wrong

If your device's network mask does not match what your router is set to use, your device may not be able to reach other machines on your network. The most common cause is manual configuration — if you typed in an IP address by hand instead of letting your router assign one automatically, you may have entered the wrong mask.

To fix this, go back to your network settings and switch to automatic IP assignment (called DHCP). On Windows, open Settings > Network & Internet > WiFi (or Ethernet) > Advanced, scroll to IPv4, and select Automatic (DHCP). On Mac, open System Settings > Network, select your connection, click Details, go to TCP/IP, and choose Using DHCP from the Configure dropdown. Your router will then assign both the correct IP address and the correct network mask automatically.

Checking your router's network mask settings

Your router's admin panel shows what network mask it is configured to use. Log into your router by opening a web browser and typing your router's IP address (usually 192.168.1.1 or 192.168.0.1 — check your router's label or manual). Enter your admin username and password, then look for a section called LAN Settings, Network Settings, or DHCP.

The mask setting in your router should match what your devices report. If your router is set to 255.255.255.0 but a device shows 255.255.255.128, that device has a manual configuration that does not match your network. Switching that device to automatic DHCP will fix the mismatch.

Frequently Asked Questions

Can I find the network mask just by looking at an IP address?

No. An IP address like 192.168.1.50 does not tell you the network mask — the mask is a separate setting assigned by your router. You must check your device's network settings or your router's configuration to find it. The IP address and mask work together, but neither one determines the other.

What does the /24 or /16 I see in Linux mean?

That is shorthand for the network mask. /24 equals 255.255.255.0, /25 equals 255.255.255.128, /16 equals 255.255.0.0, and /8 equals 255.0.0.0. The number represents how many bits of the IP address belong to the network portion. Linux and some other systems use this notation instead of writing out all four numbers.

What happens if two devices on my network have different masks?

They may not be able to communicate with each other. If one device thinks another is on a different network, it will send data through the router instead of directly. This can cause slow connections or devices not appearing in your network. All devices on the same physical network should have the same mask.

Is 255.255.255.0 always the right mask for a home network?

It is the most common, but not always required. Some home networks use 255.255.255.128 or other masks depending on how the router is configured. Check what your router is set to use, then make sure your devices match that setting. Automatic DHCP assignment handles this for you.