VulCode

CIDR subnet calculator

From an address with a mask, get the range, broadcast, hosts and subnets.

Category
For developers
Price
free

The tool starts in your browser.

Everything is calculated in your browser. Nothing you type is sent to our server.

How to use it in three steps

The tool as a schematic with this page's example. Each step's number stands where you take it: in the fields, at the result or outside the tool.

CIDR subnet calculator
What you enter
192.168.1.0/24
  1. Enter an address with a mask, such as 192.168.1.0/24.

What you get
Mask 255.255.255.0 Host range 192.168.1.1 - 192.168.1.254 (254) Broadcast 192.168.1.255
  1. Read the range, broadcast and host count.

  2. Split the network into smaller subnets if needed.

Eight addresses through the subnet calculator

The first address of a network and the last, the broadcast, are not hosts, except in /31 and /32 networks. An address typed from inside a network is brought back to its proper form, the one that goes into firewall rules.

Address and maskExpectedWhat the tool returnsResult
Address and mask192.168.1.0/24the example from the tool's description
Expected254 hosts, the network and broadcast addresses outside them
What the tool returnsnetwork 192.168.1.0/24, hosts 192.168.1.1 - 192.168.1.254 (254), private (RFC 1918)
As expected
Address and mask192.168.10.37/26an address inside the network
ExpectedThe network's proper form 192.168.10.0/26, 62 hosts
What the tool returnsnetwork 192.168.10.0/26, hosts 192.168.10.1 - 192.168.10.62 (62), private (RFC 1918)
As expected
Address and mask10.0.0.1 255.255.255.0a dotted mask
ExpectedThe same as /24
What the tool returnsnetwork 10.0.0.0/24, hosts 10.0.0.1 - 10.0.0.254 (254), private (RFC 1918)
As expected
Address and mask10.0.0.0/31a point-to-point link
ExpectedTwo addresses, both usable (RFC 3021)
What the tool returnsnetwork 10.0.0.0/31, hosts 10.0.0.0 - 10.0.0.1 (2), private (RFC 1918)
As expected
Address and mask203.0.113.7/32a single address
ExpectedOne host, the address itself
What the tool returnsnetwork 203.0.113.7/32, hosts 203.0.113.7 - 203.0.113.7 (1), public
As expected
Address and mask100.64.0.1/10an address from the provider
ExpectedCarrier-grade NAT, not a public address (RFC 6598)
What the tool returnsnetwork 100.64.0.0/10, hosts 100.64.0.1 - 100.127.255.254 (4194302), carrier-grade NAT (RFC 6598)
As expected
Address and mask256.1.1.1/24a number above 255
ExpectedAn error with an explanation
What the tool returnsAn IPv4 address is four numbers from 0 to 255 separated by dots.
As expected
Address and mask10.0.0.0 255.0.255.0a mask with a gap
ExpectedAn error with an explanation
What the tool returnsA mask is a prefix from 0 to 32 or a contiguous dotted mask, such as 255.255.255.0.
As expected

8 of 8 cases as expected

Questions