Flaem

IPv4 and IPv6 subnet calculator for planning your addressing

Enter an address with a prefix or a mask to get the network address, broadcast, range, mask, wildcard and the range type under the RFCs. You can also split a block into smaller subnets and check whether an address belongs to it.

01Calculator

The network to work out

This is an example: the starting addresses are made up and come from ranges reserved for documentation (192.0.2.0/24 and 2001:db8::/32), so they belong to no real network. Enter your own and the result updates straight away.

Examples from documentation ranges

For example 192.0.2.10/24, 192.0.2.10 255.255.255.0 or 2001:db8::1/64. An address on its own counts as /32 or /128.

Does an address belong to this network

The address only, without a prefix.

192.0.2.77 belongs to 192.0.2.0/24.

Split into smaller subnets

From /25 to /32. The result is in the table below.

Bits of the entered address

24 network bits and 8 host bits.Network partHost part

02Split

Split the network into smaller subnets

Every subnet with its range and address count. Copy the list into a config or a spreadsheet.

/26 subnets: 4. Addresses in each: 64. Usable in each: 62.

SubnetFirst hostLast hostBroadcastHosts
192.0.2.0/26First host192.0.2.1Last host192.0.2.62Broadcast192.0.2.63Hosts62
192.0.2.64/26First host192.0.2.65Last host192.0.2.126Broadcast192.0.2.127Hosts62
192.0.2.128/26First host192.0.2.129Last host192.0.2.190Broadcast192.0.2.191Hosts62
192.0.2.192/26First host192.0.2.193Last host192.0.2.254Broadcast192.0.2.255Hosts62
03Prefixes

Prefixes and masks side by side

Common prefix lengths for the family of the entered address. Your prefix is marked.

PrefixMaskWildcardAddressesHosts
/8Mask255.0.0.0Wildcard0.255.255.255Addresses16,777,216Hosts16,777,214
/16Mask255.255.0.0Wildcard0.0.255.255Addresses65,536Hosts65,534
/20Mask255.255.240.0Wildcard0.0.15.255Addresses4,096Hosts4,094
/22Mask255.255.252.0Wildcard0.0.3.255Addresses1,024Hosts1,022
/23Mask255.255.254.0Wildcard0.0.1.255Addresses512Hosts510
/24Your prefixMask255.255.255.0Wildcard0.0.0.255Addresses256Hosts254
/25Mask255.255.255.128Wildcard0.0.0.127Addresses128Hosts126
/26Mask255.255.255.192Wildcard0.0.0.63Addresses64Hosts62
/27Mask255.255.255.224Wildcard0.0.0.31Addresses32Hosts30
/28Mask255.255.255.240Wildcard0.0.0.15Addresses16Hosts14
/29Mask255.255.255.248Wildcard0.0.0.7Addresses8Hosts6
/30Mask255.255.255.252Wildcard0.0.0.3Addresses4Hosts2
/31Mask255.255.255.254Wildcard0.0.0.1Addresses2Hosts2
/32Mask255.255.255.255Wildcard0.0.0.0Addresses1Hosts1
04Range types

Special-purpose ranges under IANA and the RFCs

What each block is for and whether it is reachable from the internet. The rows your network touches are marked.

RangePurposeSourceGlobally reachable
10.0.0.0/8PurposePrivate useSourceRFC 1918Globally reachableNo
100.64.0.0/10PurposeShared address space for CGNATSourceRFC 6598Globally reachableNo
127.0.0.0/8PurposeLoopbackSourceRFC 1122, 3.2.1.3Globally reachableNo
169.254.0.0/16PurposeLink-localSourceRFC 3927Globally reachableNo
172.16.0.0/12PurposePrivate useSourceRFC 1918Globally reachableNo
192.0.2.0/24Your networkPurposeDocumentationSourceRFC 5737Globally reachableNo
192.168.0.0/16PurposePrivate useSourceRFC 1918Globally reachableNo
198.18.0.0/15PurposeBenchmarkingSourceRFC 2544Globally reachableNo
198.51.100.0/24PurposeDocumentationSourceRFC 5737Globally reachableNo
203.0.113.0/24PurposeDocumentationSourceRFC 5737Globally reachableNo
224.0.0.0/4PurposeMulticastSourceRFC 5771Globally reachableDepends on the block
240.0.0.0/4PurposeReservedSourceRFC 1112, 4Globally reachableNo

The "Globally reachable" column comes from the IANA special-purpose registries. We added multicast (224.0.0.0/4, ff00::/8) and global unicast (2000::/3) from RFC 5771, RFC 4291 and the IPv6 address space registry, because those registries do not cover them.

05How to read the result

Where these addresses come from

The six rules behind the calculator. Work them out by hand in binary and you will get the same result.

Network addressaddress AND mask
Clear the host bits. 192.0.2.10/24 gives 192.0.2.0.
Broadcastnetwork address OR wildcard
Set all the host bits. For 192.0.2.0/24 that is 192.0.2.255. A /31, a /32 and all of IPv6 have no broadcast.
WildcardNOT mask
The mask with its bits inverted: 255.255.255.0 gives 0.0.0.255. Use this form in rules that ask for it.
Address count2^(address bits - prefix)
A /24 in IPv4 is 2^8, or 256 addresses, and 254 for hosts, because the network address and broadcast drop out. A /64 in IPv6 is 2^64.
IPv6 notationlowercase, no leading zeros, :: once
We show the RFC 5952 form: :: replaces the longest run of zero groups, the first one on a tie, and never a single group. We accept any valid RFC 4291 form.
Range typelongest match in the IANA registry
The address 192.0.0.8 sits in 192.0.0.0/24, but the result uses the narrower 192.0.0.8/32 entry. It goes by the entered address, and a separate note tells you when the network reaches beyond that range.

What the calculator does not check

  • Whether an address is allocated and announced in BGP
  • Conflicts with addresses already in use on your network
  • Classes A, B and C: addressing is classless (RFC 4632)
  • Reserved interface identifiers in IPv6
06Questions

Questions about the subnet calculator

Edge-case prefixes, notation and what happens to the addresses you enter.

A /30 has four addresses and two of them are usable, because the network address and broadcast drop out. A /31 has two addresses and both work, but only on a point-to-point link, as RFC 3021 describes. You save two addresses on every link.

RFC 4291 does not define one: multicast addresses do the job broadcast does in IPv4. That is why the calculator shows the first and last address of an IPv6 block rather than hosts.

After the address, add a space or a slash and the mask, for example 192.0.2.10 255.255.255.0. The calculator turns it into a prefix. If you enter a wildcard such as 0.0.0.255, it tells you which prefix that matches.

Classes went out of use with CIDR, described in RFC 4632. The prefix sets the network boundary rather than the first octet, so a class says nothing today about how large a network is.

The 100.64.0.0/10 block from RFC 6598 is meant for operators running CGNAT, and the RFC 1918 blocks are meant for internal networks. That way addresses on the operator side do not collide with the ones a customer uses at home or in an office.

It is the Globally Reachable column from the IANA registry. It says whether a block is meant to work beyond the local network. It does not say whether a given address is announced in BGP today, which the calculator does not check.

These blocks are reserved for documentation in RFC 5737 and RFC 3849, so an example never points at someone's real network. Do not use them in production.

No. Your browser does all the work. The data is stored in the page address after the # sign, and browsers do not send that part to the server, so it is not in our logs. Anyone who gets the link sees what you entered.

Sell addresses and prefixes where you already run your customers

In Flaem, IPv4 and IPv6 leasing, transit and BGP sessions work like any other service in your store. 14-day trial with every feature.