The /31 subnet
A /31 subnet uses the mask 255.255.255.254 and holds 2 addresses, 2 of them usable.
A /31 covers two IPv4 addresses and, under RFC 3021, both are usable. The mask is 255.255.255.254, so it is the standard choice for point-to-point links where a full /30 would waste two addresses on network and broadcast.
On a /31 there is no separate broadcast address; the two hosts simply talk to each other. Router vendors have supported /31 links for years, and they halve the address cost of every point-to-point circuit.
Below you can see the exact network, broadcast, and host range for any /31 you enter, calculated instantly in your browser.
Calculate a /31 network
Accepts CIDR (192.0.2.0/24), IP + mask (192.0.2.0 255.255.255.0), or a bare IP (defaults to /24).
11000000.00000000.00000010.0000000011111111.11111111.11111111.11111110Example: 192.0.2.0/31
Taking 192.0.2.0/31 as a worked example, the block breaks down like this:
| Network address | 192.0.2.0 |
|---|---|
| Usable range | 192.0.2.0 - 192.0.2.1 |
| Broadcast address | 192.0.2.1 |
| Total addresses | 2 |
| Usable hosts | 2 |
| Size | 1/128 of a class C block |
Frequently asked questions
What is the subnet mask for a /31?
A /31 uses the subnet mask 255.255.255.254. Its wildcard mask, used in access lists, is 0.0.0.1.
How many hosts are in a /31 subnet?
A /31 has 2 total addresses and 2 usable hosts (the total minus the network and broadcast addresses, except for /31 and /32).
What is a /31 used for?
Point-to-point link (RFC 3021). It is equivalent to 1/128 of a class C block.
How do I calculate a /31 network?
Set the host bits to zero for the network address and to one for the broadcast address. The calculator on this page does it for any /31 block you enter.