MAC address vs IP address: What’s the difference?
MAC address vs IP address: One is a unique hardware identifier, while the other identifies a device's network connection. Learn more with BlueCat.
Read moreA subnet mask is a 32-bit value that separates network bits from host bits in an IPv4 address, enabling devices to determine whether traffic should be delivered locally or routed remotely. Subnet masks are configured on nearly all IPv4 interfaces via DHCP or static configuration and are essential for correct network operation, as misconfigurations cause routing failures, security policy violations, and hard-to-trace connectivity issues. Proper subnet mask management through IPAM systems helps organizations avoid overlapping subnets, plan capacity, and maintain consistent security boundaries across networks.
A subnet mask works by a bitwise comparison. Each bit set to 1 in the mask marks a bit of the address as part of the network prefix, and each bit set to 0 marks a host bit.
The same mask can be written in CIDR prefix notation, where 255.255.255.0 becomes /24. The number of host bits determines how many addresses a subnet holds, and in IPv4 the first address (network) and last address (broadcast) are normally not assigned to hosts. IPv6 uses a prefix length instead of a dotted mask.
A host with a mask longer than its neighbors treats some local peers as remote and sends their traffic to the default gateway. Symptoms include intermittent reachability, where only some hosts on the same VLAN respond.
A host with a mask shorter than the real subnet believes distant addresses are on-link and sends ARP requests instead of using the gateway. Those destinations time out, and the problem often appears for only one address range.
Two routers or hosts on the same link configured with different masks disagree on the subnet boundary. This can cause one-way traffic and routing adjacency failures that look like a cabling or firewall fault.
A DHCP scope that hands out the wrong subnet mask spreads the error to every client that leases from it. Fixing the scope does not correct existing leases until they renew.
Typing a value with non-contiguous one bits, such as 255.0.255.0, is rejected by many systems or gives unpredictable results on others. Valid masks are a run of ones followed by zeros.