breakitdown

What does /31 mean?

Answer

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.

Try

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).

19211000000000000000200000010000000000
31 network bits 1 host bit
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

or

2 subnets.

SubnetUsable rangeHostsBroadcast
192.0.2.0/32192.0.2.0 – 192.0.2.01–
192.0.2.1/32192.0.2.1 – 192.0.2.11–

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

Related explainers

← CIDR calculator