What does /31 mean?
A /31 has 2 addresses, and on a point-to-point link both are usable hosts. RFC 3021 removed the network and broadcast addresses for /31 links, because a link with exactly two ends does not need them. The netmask is 255.255.255.254.
Worked example: 192.0.2.0/31. Type any block to compare.
192.0.2.0/31 is 2 addresses: 192.0.2.0 to 192.0.2.1. A /31 is a point-to-point link: both addresses are usable (RFC 3021).
- Network
192.0.2.0- First usable
192.0.2.0- Last usable
192.0.2.1- Broadcast
none (/31)- Addresses
2- Usable hosts
2- Netmask
255.255.255.254- Wildcard (ACL) mask
0.0.0.1- Historic class
C- Range type
Documentation (TEST-NET-1) · not routed on the internet
Special-purpose range
Documentation (TEST-NET-1) 192.0.2.0/24 RFC 5737
Reserved for examples in documentation and books. Never assigned to a real host.
Split it into subnets
2 subnets.
| Subnet | Usable range | Hosts | Broadcast |
|---|---|---|---|
192.0.2.0/32 | 192.0.2.0 – 192.0.2.0 | 1 | – |
192.0.2.1/32 | 192.0.2.1 – 192.0.2.1 | 1 | – |
Is this IP in the range?
Range to CIDR blocks
What to know
With classic rules, a /31 would have zero usable hosts (2 addresses minus network and broadcast). RFC 3021 (2000) changed that for point-to-point links: in 192.0.2.0/31, one router uses 192.0.2.0 and the other 192.0.2.1.
Compared with /30, /31 halves the address space used by router-to-router links. Networks with thousands of links, such as data center fabrics and ISP backbones, use /31 routinely.
Gotchas
- Only use /31 on point-to-point links. On a shared Ethernet segment with more devices, it does not work.
- Some older devices and software still treat the even address as a network address and refuse it. Check both ends support RFC 3021 before switching.
- Some subnet calculators still show "0 usable hosts" for /31. This one follows RFC 3021.
Related explainers
- What does /30 mean?A /30 has 4 addresses and 2 usable hosts, netmask 255.255.255.252. The traditional size for...
- What does /32 mean?A /32 is one IPv4 address: netmask 255.255.255.255, no network or broadcast. Used in firewall and security...
- IPv4 subnet cheat sheetEvery IPv4 prefix length from /0 to /32 with its netmask, total addresses and usable hosts. How to read...