A /31 has just two addresses and, unusually, both are usable. RFC 3021 allows this on point-to-point links: with only two ends, there’s no need for a network or broadcast address. Mask 255.255.255.254. Calculators that assume the usual “minus two” rule would say zero hosts, which is wrong here. Major router vendors, including Cisco and Juniper, support /31 links.
Facts
- Prefix
- /31
- Subnet mask
- 255.255.255.254
- Wildcard mask
- 0.0.0.1
- Binary mask
- 11111111.11111111.11111111.11111110
- Total addresses
- 2
- Usable hosts
- 2
- Example range
- 192.168.1.0/31: 192.168.1.0 – 192.168.1.1
- Typical use
- Point-to-point links without a broadcast address (RFC 3021).
Try it
Try: , ,
- CIDR block
- 192.168.1.0/31
- IP range
- 192.168.1.0 – 192.168.1.1
- Addresses
- 2
- Usable hosts
- 2
- Subnet mask
- 255.255.255.254
- Wildcard mask
- 0.0.0.1
Frequently asked questions
How many hosts are in a /31?
A /31 has 2 addresses, and both are usable on point-to-point links (RFC 3021).
What is the subnet mask for /31?
/31 is 255.255.255.254 (wildcard mask 0.0.0.1). In binary that’s 31 ones followed by 1 zeros.