/31 Subnet
About /31 Networks
Point-to-point link (RFC 3021) — no broadcast address (2 addresses). A /31 subnet uses the mask 255.255.255.254 and provides 2 usable host addresses out of 2 total IPs.
Example /31 Networks
| Network | Broadcast | First Host | Last Host |
|---|---|---|---|
| 10.0.0.0/31 | 10.0.0.1 | 10.0.0.0 | 10.0.0.1 |
| 172.16.0.0/31 | 172.16.0.1 | 172.16.0.0 | 172.16.0.1 |
| 192.168.0.0/31 | 192.168.0.1 | 192.168.0.0 | 192.168.0.1 |
| 192.168.1.0/31 | 192.168.1.1 | 192.168.1.0 | 192.168.1.1 |
| 8.8.8.0/31 | 8.8.8.1 | 8.8.8.0 | 8.8.8.1 |
Splitting a /31 Into Smaller Subnets
A /31 divides evenly into any longer prefix. Each row shows how many subnets of that size fit inside one /31, and how many usable hosts each of them carries.
| Subnet Size | How Many Fit | Mask | Usable Hosts Each |
|---|---|---|---|
| /32 | 2 × /32 | 255.255.255.255 | 1 |
How Many /31 Subnets Fit in a Larger Network
The same arithmetic read the other way: how many /31 subnets you get when you carve up each of the next larger prefixes.
Adjacent CIDRs
Larger network
/30
Mask: 255.255.255.252
Total IPs: 4
Usable Hosts: 2
Smaller network
/32
Mask: 255.255.255.255
Total IPs: 1
Usable Hosts: 1
Comparing sizes? The full /0 to /32 cheat sheet table puts every prefix side by side.
Frequently Asked Questions
What is a /31 subnet?
A /31 subnet uses the subnet mask 255.255.255.254 with 2 usable host addresses and 2 total IP addresses. It has 31 network bits and 1 host bits.
How many hosts in a /31 network?
A /31 network supports 2 usable hosts out of 2 total IP addresses. The usable range excludes the network address and broadcast address (though /31 subnets are a special case).
What subnet mask does /31 use?
A /31 subnet uses the mask 255.255.255.254 (wildcard mask 0.0.0.1). This means the first 31 bits identify the network and the remaining 1 bits identify hosts.
How many /32 subnets are in a /31?
One /31 splits into 2 /32 subnets, each with mask 255.255.255.255 and 1 usable hosts. Every prefix longer than /31 divides it evenly — the full table is above.
How many /31 subnets are in a /30?
A /30 holds 2 /31 subnets. Each step to a shorter prefix doubles that count, because one bit moves from the host portion of the address to the network portion.
Standards
The figures on this page follow from the following specifications rather than from convention.
- RFC 4632 — Classless Inter-Domain Routing (CIDR)
Defines the /31 prefix notation used throughout this page, and the address-aggregation model that replaced classful addressing.
- RFC 950 — Internet Standard Subnetting Procedure
The original definition of the subnet mask, and of the network and broadcast addresses excluded from the usable host count.
- RFC 3021 — Using 31-Bit Prefixes on IPv4 Point-to-Point Links
Why a /31 carries two usable addresses rather than none: on a point-to-point link there is no broadcast address to reserve.
- RFC 1918 — Address Allocation for Private Internets
Reserves 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, the ranges most /31 subnets are carved from in practice.