Subnet masks turn one IPv4 address into a network plan.
Pick an address and prefix, then watch the mask preserve network bits, clear host bits, and produce the network, broadcast, usable range, and route decision that an IoT gateway or host uses.
32 bitsIPv4 address width
/n prefixn network bits
IP AND maskNetwork address
TryLoad Sensor VLAN /26 and press Step to apply the mask to its IPv4 address.
ObserveThe Network address, Broadcast address, Usable hosts, and Device fit settle at 62 usable addresses for /26.
ExplainA /26 fixes 26 network bits and leaves 6 host bits, yielding 64 addresses minus the network and broadcast endpoints.
Technical boundariesThe workbench covers contiguous IPv4 masks and conventional subnets; DHCP reservations, VRFs, overlapping routes, IPv6, directed-broadcast policy, point-to-point exceptions, and routing-table convergence are excluded.
Ordinary host count: 2^(host bits) - 2, which is the same as 2^(32 - prefix) - 2.
Common mistakes
Do not treat `/24` as a classful rule. CIDR prefixes can cut across any octet. Also do not subtract two from `/31` or `/32` when the design is a point-to-point link or host route.
Try the sensor VLAN
Use `/26` and notice that 192.168.10.66 and 192.168.10.1 are not in the same subnet. A gateway address should sit inside the same range.
Test a small subnet
Select the `/29` preset and raise device demand above 6. The capacity diagnosis should switch from fit to overrun.
Check edge cases
Select `/31` and `/32`. The workbench changes the usable-host rule so point links and single-host routes are not marked incorrectly.
Why the broadcast address is IPv4-specific
In ordinary IPv4 subnets, the all-host-ones address is the directed broadcast address. IPv6 does not use broadcast, so this page keeps the calculation explicitly scoped to IPv4.
Why /31 and /32 are special
For ordinary IPv4 LAN subnets, network and broadcast are not assigned to hosts. RFC 3021 allows both addresses in a /31 on point-to-point links because there is no broadcast need on that two-endpoint link. A /32 identifies exactly one IPv4 address, commonly as a host route.
How to size an IoT subnet
Pick the smallest subnet that fits devices, gateways, management addresses, and growth. Then separate high-bandwidth cameras, control systems, low-rate sensors, and guest or vendor devices into different prefixes so policy and broadcast domains stay clear.