IP subnetting: subnet, CIDR, VLSM and IPv6 tools
Subnetting splits an address block into smaller networks. The prefix length, the /24 in 192.168.1.0/24, says how many leading bits identify the network; the remaining bits number the hosts. It decides how many devices fit in each network, which addresses are usable, and whether two networks overlap.
The tools below run in your browser, so internal address plans never leave your machine.
Updated · How we write and check guides
Calculate a subnet
An IPv4 /n prefix leaves 32 − n host bits, so the block holds 2^(32 − n) addresses. In an ordinary subnet the first address is the network address and the last is the broadcast address, which leaves 2^(32 − n) − 2 usable hosts. Point-to-point /31 links (RFC 3021) and single-host /32 routes are the exceptions.
| Prefix | Subnet mask | Addresses | Usable hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
Split and plan address space (VLSM)
Variable-length subnet masking gives each network only the size it needs instead of one fixed size for all. Allocate the largest subnets first, from the start of the block, so the smaller ones pack in after them without gaps or overlaps, and leave room to grow.
Splits a CIDR block into equal child subnets with network, broadcast and range columns.
Summarize routes and check for overlaps
Route summarization (supernetting) merges contiguous networks into one shorter prefix: 192.168.0.0/24 and 192.168.1.0/24 become 192.168.0.0/23. It keeps routing tables and firewall rules short.
Before adding a network, check that it doesn't overlap an existing one. Overlapping ranges send traffic to the wrong place, often only some of the time, which makes the fault hard to trace.
IPv6 addresses
IPv6 addresses are 128 bits, written as eight groups of four hexadecimal digits. Leading zeros in a group can be dropped and one run of all-zero groups can be replaced with ::, so 2001:0db8:0000:0000:0000:0000:0000:0001 is written 2001:db8::1. RFC 5952 recommends lowercase and this shortest form.
A /64 is the standard size for a single network segment; sites typically receive a /48 or /56 to divide into /64s.
Expands and compresses sample IPv6 addresses into a notation reference table.
More tools in Network & Email.