Subnet calculator › CIDR /31

/31 subnet mask (255.255.255.254)

A /31 uses the first 31 bits for the network and the remaining 1 bits for hosts: 2 addresses, 2 usable hosts.

CIDR notation/31
Subnet mask255.255.255.254
Wildcard mask0.0.0.1
Binary mask11111111.11111111.11111111.1111111|0
Hex mask0xFFFFFFFE
Total addresses2 (21)
Usable hosts2 · No network or broadcast address; both are usable (RFC 3021).
Block size The fourth octet changes in steps of 2

What is a /31 used for?

/31 address range examples

Splitting 192.168.1.0/24 into /31 gives 128 subnets. The first 8 are shown.

NetworkUsable rangeBroadcast
192.168.1.0/31 192.168.1.0 ~ 192.168.1.1 -
192.168.1.2/31 192.168.1.2 ~ 192.168.1.3 -
192.168.1.4/31 192.168.1.4 ~ 192.168.1.5 -
192.168.1.6/31 192.168.1.6 ~ 192.168.1.7 -
192.168.1.8/31 192.168.1.8 ~ 192.168.1.9 -
192.168.1.10/31 192.168.1.10 ~ 192.168.1.11 -
192.168.1.12/31 192.168.1.12 ~ 192.168.1.13 -
192.168.1.14/31 192.168.1.14 ~ 192.168.1.15 -

Try it in the calculator →

Splitting a /31 further

Split intoSubnetsHosts each
/32 2 1

How many /31s fit in a larger block

Other prefixes