What a network mask is and why you need it
A network mask (also called a subnet mask) is a number that tells your computer which part of an IP address refers to the network and which part refers to individual devices on that network. If you have an IP address like 192.168.1.50, the network mask determines whether that address belongs to a network of 256 devices, 65,536 devices, or some other size.
You need the network mask to understand what other devices your computer can reach directly without going through a router. It also matters if you are setting up a new device, troubleshooting a connection, or configuring network hardware. The mask is not something you calculate from the IP address alone — it depends on how your network administrator set up the network.
Key Takeaways
- The network mask is not determined by the IP address itself; you must find it from your device's network settings or ask your network administrator.
- On Windows, open Command Prompt and type ipconfig to see your IP address and subnet mask listed together.
- On Mac or Linux, open Terminal and type ifconfig or ip addr to view the network mask alongside your IP address.
- Common network masks are 255.255.255.0 for small office networks and 255.255.0.0 for larger ones, but the mask your network uses depends on its design.
- If you cannot find the mask in your device settings, contact your network administrator or check the router's admin panel.
Finding the network mask on Windows
Open Command Prompt by pressing the Windows key, typing cmd, and pressing Enter. Type ipconfig and press Enter. Your screen will show a list of network connections.
Look for the connection you are using — usually labeled "Ethernet" if you are plugged in with a cable, or "Wireless LAN adapter" if you are on Wi-Fi. Next to "IPv4 Address" you will see your IP address. Directly below it, "Subnet Mask" shows your network mask as four numbers separated by periods, like 255.255.255.0.
If you see multiple network connections listed, find the one with an IP address that starts with the same numbers as your computer's address. That is the active connection, and its subnet mask is the one you need.
Finding the network mask on Mac
Open Terminal by pressing Command + Space, typing terminal, and pressing Enter. Type ifconfig and press Enter. Your screen will show information for each network interface on your Mac.
Find the connection you are using. For Wi-Fi, look for the section labeled "en0" or similar. For Ethernet, look for "en1" or "en2". Within that section, you will see "inet" followed by your IP address. On the next line, "netmask" shows your network mask in hexadecimal format, like 0xffffff00.
To convert that hexadecimal mask to the standard format (like 255.255.255.0), you can use an online converter or ask your network administrator. Alternatively, open System Preferences, click Network, select your connection, and click Advanced — the subnet mask appears in standard format on the TCP/IP tab.
Finding the network mask on Linux
Open a terminal window. Type ip addr and press Enter. Your screen will display all network interfaces and their settings.
Find the connection you are using and look for the line starting with "inet". Your IP address appears after "inet", followed by a slash and a number like /24. That number is the network mask in CIDR notation — /24 means the first 24 bits of the address define the network, which equals 255.255.255.0 in standard format.
If you prefer to see the mask in standard format, type ifconfig instead. The output shows "Mask:" followed by the network mask as four numbers separated by periods. Not all Linux distributions include ifconfig by default, so ip addr is more reliable.
Understanding common network masks
Network masks follow a pattern. The most common ones are 255.255.255.0 (used in small offices and homes), 255.255.0.0 (used in larger organizations), and 255.0.0.0 (used in very large networks). Each mask allows a different number of devices on the network.
A mask of 255.255.255.0 means your network can have up to 254 usable device addresses. A mask of 255.255.0.0 allows up to 65,534 devices. The exact mask your network uses depends on how it was designed, not on your IP address. Two devices with the same IP address range might use different masks if they are on different networks.
If your mask looks unusual — like 255.255.255.128 or 255.255.252.0 — your network administrator has set up a custom size. Write down the exact mask you see and keep it for reference when configuring other devices or troubleshooting connection problems.
Checking the router's network settings
If you cannot find the network mask on your device, you can check the router itself. Open a web browser and type your router's IP address into the address bar — usually 192.168.1.1 or 192.168.0.1. Log in with your router's username and password (often printed on the router's label).
Navigate to the LAN settings or Network settings section. The subnet mask appears there alongside the router's IP address. This mask applies to all devices connected to that router, so it is the network mask for your entire local network.
If you do not know the router's IP address or login credentials, contact your network administrator or the person who set up your network. They can tell you the network mask directly without you needing to access the router.
Frequently Asked Questions
Can I figure out the network mask just from looking at an IP address?
No. An IP address like 192.168.1.50 does not tell you the network mask on its own. The same IP address range could use a mask of 255.255.255.0, 255.255.0.0, or something else entirely depending on how the network was designed. You must check your device settings or ask your administrator.
What does the slash number mean in addresses like 192.168.1.0/24?
The slash number is CIDR notation, a shorthand for the network mask. /24 means the first 24 bits of the address define the network, which equals 255.255.255.0 in standard format. /16 equals 255.255.0.0, and /8 equals 255.0.0.0. You may see either format depending on where you look.
My network mask shows as 0xffffff00 on my Mac. What does that mean?
That is hexadecimal format. 0xffffff00 converts to 255.255.255.0 in standard format. Most network tools and documentation use the standard format, so you may want to convert it for reference. Online converters can do this instantly, or your network administrator can confirm the standard format for you.
Do all devices on my network have the same network mask?
Yes, all devices connected to the same router or network segment use the same network mask. If you find the mask on one device, that is the mask for your entire local network. Different networks (like your home network and your workplace network) may use different masks.