Need to know your subnet mask? Here's how to find it on any device.
Windows
Method 1: Command Prompt
ipconfig
Look for "Subnet Mask" under your active adapter:
IPv4 Address. . . . . . . . . . : 192.168.1.100 Subnet Mask . . . . . . . . . . : 255.255.255.0
Method 2: Settings App
- Open Settings → Network & Internet → Status
- Click "Properties" under your WiFi/Ethernet
- Scroll to "Network profile"
- See "Subnet prefix length"
macOS
Method 1: Terminal
ifconfig
Look for "netmask":
en0: flags=... inet 192.168.1.100 netmask 0xffffff00 ...
Method 2: System Settings
- Open System Settings → Network
- Select your active connection
- Click "Details"
- See "Subnet"
Linux
Terminal
ip addr show # or ip a
Look for "inet" and "netmask":
inet 192.168.1.100/24 brd 192.168.1.255 scope global enp0s3
Quick Reference
| CIDR | Subnet Mask |
|---|---|
| /24 | 255.255.255.0 |
| /25 | 255.255.255.128 |
| /26 | 255.255.255.192 |
| /16 | 255.255.0.0 |