/31 Subnet: Mask 255.255.255.254

A /31 subnet has a subnet mask of 255.255.255.254 and contains 2 addresses, both usable as a point-to-point link (RFC 3021). 128 /31 networks fit inside a single /24.

CIDR notation /31
Subnet mask 255.255.255.254
Wildcard mask 0.0.0.1
Mask in binary 11111111.11111111.11111111.11111110
Total addresses 2 (2^1)
Usable hosts 2
Host bits 1

Usable hosts in a /31 by platform

Cloud providers reserve more than the usual two addresses per subnet, so the same /31 gives you fewer usable IPs in the cloud than on a standard LAN.

Platform Reserved IPs Usable hosts
Standard (network + broadcast) 0 2
AWS VPC 0 2
Microsoft Azure VNet 0 2
Google Cloud VPC 0 2
Oracle Cloud VCN 0 2

Good to know

A /31 (RFC 3021) gives exactly 2 usable addresses with no network or broadcast reservation, designed for point-to-point links to save address space.

How a /31 is calculated

Want to split a /31 into smaller subnets, see every address range, or plan a VLSM layout? Open the free subnet calculator →