A network, and every address in it.
Work out a subnet's mask, wildcard, broadcast and usable range from its CIDR, for IPv4 and IPv6, and split it, in your browser. What /24 means; nothing sent.
By Suraj Kumar5 min read
A network written as 192.168.1.0/24 says where it starts and how many of its bits are fixed. The Subnet calculator works out the rest, for IPv4 and IPv6, and splits it into equal parts.
The number after the slash.
In CIDR notation (RFC 4632) the prefix counts the bits that name the network. An IPv4 address has 32, so a /24 leaves 8 for its addresses: 256 of them, from 192.168.1.0 to 192.168.1.255. Its mask is 255.255.255.0, the 24 ones written as an address, and its wildcard 0.0.0.255, the opposite.
Type an address that is inside a network, such as 192.168.1.130/25, and the calculator says where the network starts, 192.168.1.128. A mask can be typed in place of the prefix, 192.168.1.0 255.255.255.0, and a wildcard too.
Which addresses a host can have.
In IPv4 the first address names the network and the last is the broadcast, so a /24 has 254 usable addresses, .1 to .254. A /31 is the exception: RFC 3021 lets it be a point-to-point link, with both addresses usable and no broadcast. A /32 is one address.
IPv6 has no broadcast. The first address of a subnet is the Subnet-Router anycast address (RFC 4291), so it is left out of the usable range, except in a /127, which RFC 6164 sets aside for point-to-point links, and a /128. These follow Python's ipaddress, which the calculator's answers were checked against.
Halves, and halves of halves.
Turn on Split it into equal subnets and choose how many. A /24 into 4 gives four /26 of 64 addresses each, starting at .0, .64, .128 and .192. Every split halves a network, so a count that is not a power of two is rounded up: 6 becomes 8 subnets of /27, and the page says so.
Up to 1,024 subnets are made, and the first 256 listed; Copy as text has them all, with the details above them.
IPv6, written short.
IPv6 addresses are 128 bits, so a /64 holds 18,446,744,073,709,551,616 addresses. They are worked out as BigInts, so even a /0 is exact. Addresses are written as RFC 5952 sets out: small letters, no leading zeros, and the longest run of zero groups as ::, so 2001:0db8:0000:0000:0001:0000:0000:0001 is 2001:db8::1:0:0:1.
The calculator also names the kind of network it is inside: private (RFC 1918), shared address space (RFC 6598), loopback, link-local, multicast or documentation, and for IPv6 unique local (RFC 4193) and the documentation prefix 2001:db8::/32 (RFC 3849).
Nothing leaves your browser.
Everything is worked out on your device as you type: no address you type is sent anywhere, looked up or kept.
Further reading
- RFC 4632: Classless Inter-domain Routing (CIDR) (opens in a new tab)
- RFC 4291: IP Version 6 Addressing Architecture (opens in a new tab)
- RFC 3021: Using 31-Bit Prefixes on IPv4 Point-to-Point Links (opens in a new tab)
- RFC 6164: Using 127-Bit IPv6 Prefixes on Inter-Router Links (opens in a new tab)
- RFC 5952: A Recommendation for IPv6 Address Text Representation (opens in a new tab)
- RFC 1918: Address Allocation for Private Internets (opens in a new tab)
- Python: ipaddress (opens in a new tab)
Topics: subnet calculator · cidr calculator · subnet mask · wildcard mask · ipv6 subnet · usable hosts · split a subnet
A little less theory. A little more doing.
Try it on your own terms, with a free browser tool.
Try the tool