Finding a subnet mask helps a device owner understand how a local network is divided and which addresses belong to the same network segment. It is useful for troubleshooting connectivity, setting static IP addresses, configuring routers, or checking whether a device is on the correct network.
TLDR: A subnet mask can usually be found in the network details or advanced settings of a device. On Windows, macOS, and Linux, it is also available through command-line tools such as ipconfig, ifconfig, or ip addr. On Android and iPhone, the subnet mask is normally shown under the currently connected Wi-Fi network details. If a device shows a prefix length instead, such as /24, that usually equals 255.255.255.0.
What a Subnet Mask Means
A subnet mask is a set of numbers that tells a device which part of an IP address identifies the network and which part identifies the individual device. For example, a common home network may use the subnet mask 255.255.255.0. In that case, devices with addresses such as 192.168.1.10 and 192.168.1.25 are usually on the same local network.
Some systems display the subnet mask as a CIDR prefix, such as /24, instead of the dotted format. The most common conversions include:
- /24 = 255.255.255.0
- /16 = 255.255.0.0
- /8 = 255.0.0.0
- /32 = a single IP address
How to Find the Subnet Mask on Windows
On Windows, the subnet mask can be found through either the Settings app, Control Panel, or Command Prompt. The command-line method is often the quickest.
Using Command Prompt
- The user opens the Start menu.
- They type cmd and open Command Prompt.
- They enter the command:
ipconfig - They look for the active adapter, such as Wireless LAN adapter Wi-Fi or Ethernet adapter.
- The subnet mask appears beside Subnet Mask.
A typical result may show an IPv4 address, subnet mask, and default gateway. If the computer is connected to Wi-Fi, the relevant section is usually the Wi-Fi adapter. If it is connected by cable, the relevant section is usually the Ethernet adapter.
Using Windows Settings
- The user opens Settings.
- They select Network & Internet.
- They choose Wi-Fi or Ethernet, depending on the connection.
- They open the active network’s Properties.
- They review the IP information. In some versions, Windows may show a subnet prefix length instead of the subnet mask.
If Windows shows IPv4 subnet prefix length: 24, that corresponds to 255.255.255.0.
How to Find the Subnet Mask on macOS
On macOS, the subnet mask is available in System Settings and can also be found using Terminal. The graphical method is usually easier for most users.
Using System Settings
- The user opens the Apple menu.
- They select System Settings.
- They open Network.
- They choose the active connection, such as Wi-Fi or Ethernet.
- They click Details or Advanced, depending on the macOS version.
- They look under TCP/IP for the subnet mask.
Using Terminal
A technically minded user can open Terminal and run:
ifconfig
The active network interface must then be identified. For Wi-Fi on many Macs, the interface is often en0 or en1. The subnet information may appear as a hexadecimal netmask, which can be less readable than the System Settings view. For that reason, the graphical method is usually preferred.
How to Find the Subnet Mask on Linux
Linux distributions vary, but most provide both graphical network settings and terminal commands. The exact menu names may depend on whether the system uses GNOME, KDE, Cinnamon, or another desktop environment.
Using the Terminal
The most common modern command is:
ip addr
The user looks for the active interface, commonly named something like wlan0, wlp2s0, eth0, or enp3s0. The IPv4 address line may look like this:
inet 192.168.1.34/24
In this example, /24 is the subnet prefix length, which equals 255.255.255.0.
Some older systems may also support:
ifconfig
That command may show the subnet mask directly as netmask 255.255.255.0.
Using Network Settings
- The user opens the system’s Settings or Network panel.
- They select the active Wi-Fi or wired connection.
- They open the connection details.
- They review the IPv4 information for the subnet mask or prefix length.
How to Find the Subnet Mask on Android
On Android, the subnet mask is typically located in the Wi-Fi network details. However, the exact wording depends on the device manufacturer and Android version.
- The user opens Settings.
- They select Network & Internet, Connections, or a similar option.
- They tap Wi-Fi.
- They select the connected network.
- They open Advanced, Network details, or IP settings.
- They look for Subnet mask, Network prefix length, or similar IPv4 information.
If Android displays network prefix length instead of a mask, a value of 24 normally means 255.255.255.0. If the device is using mobile data rather than Wi-Fi, subnet details may not be visible in the same way because mobile networks are managed differently by the carrier.
How to Find the Subnet Mask on iPhone
On an iPhone, subnet mask information is available in the Wi-Fi settings for the connected network. This applies to iPhones and iPads using iOS or iPadOS.
- The user opens Settings.
- They tap Wi-Fi.
- They tap the information icon next to the connected network.
- They scroll to the IPv4 Address section.
- They read the value beside Subnet Mask.
In the same area, the device usually shows the IP address, router address, DNS information, and whether the IP configuration is automatic or manual. If someone is setting a static IP address, the subnet mask should match the local network configuration used by the router.
Why the Subnet Mask May Not Appear
Sometimes a device does not show the subnet mask directly. Instead, it may display a prefix length. In other cases, the user may be viewing the wrong adapter, such as a VPN adapter, virtual machine adapter, or disconnected network interface.
When checking subnet information, the user should confirm that they are viewing the active connection. A laptop may have several network adapters, but only one may be responsible for the current internet connection.
Common Reasons to Check a Subnet Mask
- Static IP setup: A correct subnet mask is needed when manually assigning an IP address.
- Network troubleshooting: Devices on different subnets may not communicate as expected.
- Router configuration: Home and office routers use subnet masks to define local network ranges.
- Printer or NAS setup: Shared devices often need to be on the same subnet as computers and phones.
- VPN diagnosis: Conflicting subnets can prevent access to remote resources.
FAQ
What is the most common subnet mask for home networks?
The most common home subnet mask is 255.255.255.0, often shown as /24.
Is a subnet mask the same as an IP address?
No. An IP address identifies a device, while a subnet mask defines which part of that address belongs to the network.
What does /24 mean?
/24 is a prefix length. It means the first 24 bits identify the network, and it is equivalent to 255.255.255.0.
Can the subnet mask be changed?
Yes, but it should only be changed when the network configuration requires it. An incorrect subnet mask can prevent a device from reaching other devices or the internet.
Why does a phone show fewer network details than a computer?
Mobile operating systems simplify network information for general users. Wi-Fi details usually show subnet information, but cellular network details are often hidden or controlled by the carrier.