How to Check the Subnet Mask of an IP Address
Understanding your subnet mask is a fundamental networking skill — whether you're troubleshooting a connection, configuring a router, or setting up a local network. The good news is that finding it takes less than a minute on most devices, once you know where to look.
What Is a Subnet Mask and Why Does It Matter?
A subnet mask is a 32-bit number that works alongside an IP address to define two things: which part of the address identifies the network, and which part identifies the individual device (or host) on that network.
For example, a common subnet mask like 255.255.255.0 tells the network that the first three octets represent the network address, and the last octet identifies the specific device. This is how routers know whether to send traffic locally or out to the wider internet.
Without a correctly configured subnet mask, devices on the same physical network may fail to communicate — even if their IP addresses look similar.
How to Check Your Subnet Mask on Windows 🖥️
There are two reliable methods on Windows:
Method 1 — Settings (Windows 10/11):
- Open Settings → Network & Internet
- Click your active connection (Wi-Fi or Ethernet)
- Scroll to Properties or click Hardware properties
- Look for IPv4 address and Subnet mask listed together
Method 2 — Command Prompt (all Windows versions):
- Press Win + R, type cmd, and press Enter
- Type ipconfig and press Enter
- Find your active adapter and look for the Subnet Mask line
For more detail, use ipconfig /all — this shows every adapter, including virtual and inactive ones.
How to Check Your Subnet Mask on macOS
- Open System Settings (or System Preferences on older versions) → Network
- Select your active connection from the left panel
- Click Details (or Advanced on older macOS)
- Under the TCP/IP tab, you'll see Subnet Mask displayed directly
Alternatively, open Terminal and type:
This returns all interfaces with their associated subnet masks in one view.
How to Check Subnet Mask on Linux 🐧
Linux users have a few command-line options depending on the distribution and toolset installed:
- ip addr show — modern and widely supported; look for the prefix length (e.g., /24 after the IP address, which corresponds to 255.255.255.0)
- ifconfig — available on older systems; shows subnet mask explicitly
- nmcli device show — useful on systems using NetworkManager
The /24 notation is called CIDR notation — a shorthand where the number represents how many bits are used for the network portion. Understanding the translation between CIDR and dotted-decimal format is useful if you're working across different tools.
| CIDR Notation | Subnet Mask | Usable Hosts |
|---|---|---|
| /8 | 255.0.0.0 | ~16.7 million |
| /16 | 255.255.0.0 | ~65,000 |
| /24 | 255.255.255.0 | 254 |
| /28 | 255.255.240.0 | 14 |
| /30 | 255.255.255.252 | 2 |
How to Check Subnet Mask on Mobile Devices
Android: Go to Settings → Wi-Fi → tap the connected network → look for Advanced or the network details section. The subnet mask appears alongside the IP address when Static IP is configured. On DHCP, some Android versions show it; others only display it through third-party network analyzer apps.
iPhone/iPad (iOS): Go to Settings → Wi-Fi → tap the (i) icon next to your network → select Configure IP. If set to Manual, the subnet mask is visible. For DHCP connections, iOS displays it under the same menu.
Variables That Affect What You'll See
The subnet mask you find isn't arbitrary — it's assigned based on your network configuration, and several factors determine what value appears:
- DHCP vs. static IP — Most home users are on DHCP, where the router assigns the subnet mask automatically. Networks with static IPs require manual configuration, so the mask may be customized.
- Network type — Home networks almost universally use /24 (255.255.255.0). Enterprise networks often use smaller subnets (/28, /30) to segment traffic and improve security.
- Router and ISP settings — Your ISP controls the subnet mask on the WAN side of your router. Your local router controls what's assigned to devices on the LAN side.
- VPN connections — If you're connected to a VPN, your device may show a different subnet mask for the virtual adapter compared to your physical interface.
- Virtualization or containers — Developers running virtual machines or Docker may see multiple interfaces, each with its own subnet.
When the Subnet Mask Might Be Wrong
A misconfigured subnet mask is a common cause of network connectivity issues that are easy to overlook. Symptoms include being able to ping your router but not other devices, or having internet access but failing to reach local network resources.
If your subnet mask doesn't match others on the same network, devices will miscalculate whether a destination address is local or remote — and route traffic incorrectly as a result.
Checking that all devices share the same subnet mask is one of the first diagnostic steps in any local network troubleshooting workflow.
What the right subnet mask looks like for your specific situation depends on whether you're on a home network, a managed enterprise environment, or something in between — and that's a distinction worth knowing before making any changes.