/31 Subnet Mask (255.255.255.254)

/31 subnet summary
Prefix/31
Subnet mask255.255.255.254
Wildcard mask0.0.0.1
Binary mask11111111.11111111.11111111.11111110
Total addresses2
Usable hosts2
Host bits1
Subnets of /31 in a /24128
Block size2 addresses

e.g. 10.0.0.5/22 or 10.0.0.5 255.255.252.0

Subnet calculation results
Network address192.168.1.0
Broadcast addressNone (/31 point-to-point)
First usable host192.168.1.0
Last usable host192.168.1.1
Total addresses2
Usable hosts2 (point-to-point, RFC 3021)
Subnet mask255.255.255.254
Wildcard mask0.0.0.1
CIDR notation192.168.1.0/31
IP classClass C (legacy)
Address typePrivate (RFC 1918)
IP address (binary)11000000.10101000.00000001.00000000
Subnet mask (binary)11111111.11111111.11111111.11111110

■ network bits ■ host bits

Runs entirely in your browser. Nothing you enter is sent to a server.

What is a /31 subnet?

A /31 subnet uses the first 31 bits of an IPv4 address for the network and leaves 1 bits for hosts. Its subnet mask is 255.255.255.254, and it contains 2¹ = 2 addresses, of which 2 can be assigned to devices. Typical use: Point-to-point links under RFC 3021: both addresses usable, no broadcast. Use the subnet calculator above to check any /31 network.

/31 subnet example

For 192.168.1.0/31: usable hosts 192.168.1.0 – 192.168.1.1 (RFC 3021), no broadcast address, wildcard mask 0.0.0.1.

Frequently asked questions

How many usable IPs are in a /31?

2. Under RFC 3021 both addresses of a /31 can be used on a point-to-point link; there is no network or broadcast address.

What is the subnet mask for /31?

255.255.255.254, or 11111111.11111111.11111111.11111110 in binary.

How many /31 subnets are in a /24?

128 (2⁷), because a /31 uses 7 more network bits than a /24.

What is the difference between /31 and /30?

A /30 (255.255.255.252) is twice as large: 4 addresses and 2 usable hosts, spanning two consecutive /31 blocks such as 192.168.1.0–192.168.1.3.

Nearby prefixes