A /31 network has 1 host bit, 2 addresses and 2 usable hosts. It is 1/128 of a /24.
A /31 has only 2 addresses and, per RFC 3021, both are usable hosts: there is no network or broadcast address on a point-to-point link. Cisco, Juniper, Linux and most modern gear support it, and AWS Direct Connect accepts /30 or /31 BGP peer addresses.
| Network | Network address | First usable | Last usable | Broadcast | Next /31 | |
|---|---|---|---|---|---|---|
| 10.0.0.0/31 | 10.0.0.0 | 10.0.0.0 | 10.0.0.1 | none | 10.0.0.2/31 | calculate |
| 172.16.0.0/31 | 172.16.0.0 | 172.16.0.0 | 172.16.0.1 | none | 172.16.0.2/31 | calculate |
| 192.168.1.0/31 | 192.168.1.0 | 192.168.1.0 | 192.168.1.1 | none | 192.168.1.2/31 | calculate |
| 203.0.113.0/31 | 203.0.113.0 | 203.0.113.0 | 203.0.113.1 | none | 203.0.113.2/31 | calculate |
The /31 boundary falls in the fourth octet, so /31 networks start every 2 in that octet
(128 per /24):
0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, ....
| Smaller block | How many |
|---|---|
| /32 | 2 |
| Into | Subnets | Usable hosts each |
|---|---|---|
| /32 | 2 | 1 |
| Platform | Allowed subnet sizes | /31 allowed? | Usable after reservation |
|---|---|---|---|
| AWS VPC | /16 to /28 | No | - |
| Azure VNet | /2 to /29 | No | - |
| Google Cloud VPC | /4 to /29 | No | - |
Cloud providers reserve addresses in every subnet (first four and the last address (network, VPC router, DNS, future use, broadcast) on AWS), so the usable count there differs from the classic 2^n - 2.