What is a subnet mask? 255.255.255.0 and /24 explained
Read subnet masks with worked /24 and /26 examples. Find the network address, broadcast address and usable host range.
What the mask tells a device
With a mask of 255.255.255.0, the first 24 bits identify the network, written /24. A computer at 192.168.1.20/24 treats a printer at 192.168.1.30 as local and 192.168.2.30 as a different network. Matching subnets do not override guest Wi-Fi isolation, VLAN boundaries or firewall rules. Record both devices’ addresses and masks before changing settings.
Work through /24 and /26
For 192.168.1.70/24, the network is 192.168.1.0, the broadcast is .255 and the usual host range is .1–.254. A /26 splits the last octet into blocks of 64. The number 70 sits in the 64–127 block.
- Network: 192.168.1.64
- Usable range: 192.168.1.65–192.168.1.126
- Broadcast: 192.168.1.127
Under /26, .130 belongs to a different subnet and normally requires a router.
Count usable addresses
IPv4 has 32 bits. A /26 leaves six host bits, so 2⁶ gives 64 addresses. In a conventional subnet, 62 remain after reserving the network and broadcast addresses. A router may use one of those addresses. A /31 can use both ends on a suitable point-to-point link, while /32 identifies one address.
Set up a printer without an IP conflict
Check a working device’s address, mask and default gateway. Confirm the subnet, then reserve an address through DHCP or use a free address assigned by your administrator. Copying another device’s address can cause intermittent failures. Print a test page from the network where the printer will actually be used.
Subnet calculator
Enter 192.168.1.70/26 and compare the network and host range with the worked example.
Open the tool