What a subnet mask is and why you need to see yours

A subnet mask is a string of numbers that tells your device which part of your network address identifies your local network and which part identifies individual devices on that network. It looks like an IP address — something like 255.255.255.0 — but it works differently. You need to see your subnet mask when you're troubleshooting network problems, setting up a new device, or checking whether two devices can talk to each other directly.

Your device already has a subnet mask assigned to it. You're not creating one or changing a setting — you're just looking at what's already there. The steps differ depending on whether you use Windows, Mac, or Linux, but the information you're looking for is the same.

Key Takeaways

  • On Windows, open Command Prompt and type ipconfig to see your subnet mask listed as "Subnet Mask" next to your IP address.
  • On Mac, go to System Settings, click Network, select your connection, and look for "Subnet Mask" in the TCP/IP tab.
  • On Linux, open a terminal and type ip addr or ifconfig to see your subnet mask in CIDR notation (the /24 at the end of your address).
  • Your subnet mask stays the same unless you manually change your network settings or your router reassigns it.
  • A standard home network usually has a subnet mask of 255.255.255.0, but yours may be different depending on your network setup.

Finding your subnet mask on Windows

The fastest way on Windows is through Command Prompt. Right-click the Start button, select "Command Prompt (Admin)" or "Windows PowerShell (Admin)", and type ipconfig then press Enter. You'll see a list of all your network connections.

Look for the connection you're using — usually "Ethernet" if you're plugged in with a cable, or "Wireless LAN adapter" if you're on Wi-Fi. Under that connection, you'll see "IPv4 Address", "Default Gateway", and "Subnet Mask". The subnet mask is the line you need. Write it down or take a screenshot if you need it for later.

If you prefer not to use Command Prompt, you can also find it in Settings. Go to Settings > Network & Internet > Wi-Fi (or Ethernet), click your connection name, scroll down to "IP settings", and click "Edit". Change the dropdown from "Automatic (DHCP)" to "Manual" — you don't need to change anything, just view it. Your subnet mask appears in the "Subnet mask" field. Click away without saving to leave your settings unchanged.

Finding your subnet mask on Mac

On Mac, open System Settings and click "Network" in the sidebar. You'll see a list of connection types on the left. Click the one you're using — "Wi-Fi" for wireless or "Ethernet" for a wired connection.

Once you've selected your connection, click the "Details" button (or sometimes labeled "Advanced"). A new window opens. Click the "TCP/IP" tab at the top. Your subnet mask appears in the field labeled "Subnet Mask". It's usually a four-part number like 255.255.255.0.

If you're using an older version of macOS, the steps are slightly different: go to System Preferences instead of System Settings, and the button may say "Advanced" instead of "Details". The TCP/IP tab is in the same place once you open it.

Finding your subnet mask on Linux

On Linux, open a terminal window. Type ip addr and press Enter. You'll see output for each network connection on your system. Look for the connection you're using — usually "eth0" for Ethernet or "wlan0" for Wi-Fi.

Next to "inet" you'll see an IP address followed by a slash and a number, like 192.168.1.100/24. That number after the slash is your subnet mask in CIDR notation. The /24 means your subnet mask is 255.255.255.0. If you see /16, that's 255.255.0.0. If you see /8, that's 255.0.0.0. Most home networks use /24.

If ip addr doesn't work on your system, try ifconfig instead. Look for "Netmask" in the output — it will be displayed in the standard four-part format like 255.255.255.0.

Understanding what your subnet mask means

Once you have your subnet mask, you might wonder what it actually does. The subnet mask divides your IP address into two parts: the network part and the host part. If your IP is 192.168.1.50 and your subnet mask is 255.255.255.0, the first three numbers (192.168.1) identify your network, and the last number (50) identifies your device on that network.

This matters when you're checking whether two devices can reach each other without going through a router. If two devices have the same network part, they're on the same subnet and can communicate directly. If the network parts are different, they need a router to talk to each other. You don't usually need to calculate this yourself — it's mostly useful information when you're reading network documentation or troubleshooting with IT support.

When your subnet mask changes

Your subnet mask stays the same most of the time. It only changes if you manually reconfigure your network settings or if your router is set to hand out different subnet masks to different devices (which is rare). If you check your subnet mask today and check it again in a month, it will almost certainly be the same.

The one exception is if you're using DHCP (which most home networks do) and your router reboots or you reconnect to the network. Your device might get a new IP address, but the subnet mask usually stays the same. If you're troubleshooting a network problem and your subnet mask has changed unexpectedly, that's a sign something unusual is happening with your router or network configuration.

Frequently Asked Questions

What should my subnet mask be?

Most home and small office networks use 255.255.255.0. Larger networks or special setups may use 255.255.0.0 or 255.0.0.0. If you're not sure whether yours is correct, check what your router is set to — the documentation that came with your router usually lists the default subnet mask, or you can log into your router's admin page to see it.

Can I change my subnet mask myself?

Yes, but you usually shouldn't unless you know what you're doing. Changing your subnet mask incorrectly can break your network connection. If you need to change it, do it through your router's settings rather than on individual devices — that way all your devices stay in sync. Your router's manual or support page explains how to access those settings.

Why do I need to know my subnet mask?

You need it when troubleshooting network problems, setting up a new device on your network, or checking whether two devices can reach each other. IT support may also ask for it when you're reporting a network issue. Most of the time your device handles it automatically and you don't need to think about it.

Is my subnet mask the same as my IP address?

No. Your IP address identifies your specific device on the network. Your subnet mask identifies which devices are on the same local network as you. They look similar — both are four numbers separated by dots — but they do different things.

What if I can't find my subnet mask using these steps?

Make sure you're looking at the right network connection — if you're on Wi-Fi, don't look at the Ethernet settings. If you're still stuck, restart your device and try again. If your device isn't connected to a network at all, it won't have a subnet mask to display. Connect to your network first, then follow the steps for your operating system.