Network Reference · /cidr/31

The /31 prefix: 2 addresses, zero waste

A /31 has a single host bit: 2 addresses, mask 255.255.255.254. By the classical rules it would be useless — one address would name the network, the other would be broadcast, leaving nothing for hosts. RFC 3021 changed that for point-to-point links.

On a wire with exactly two endpoints, broadcast is meaningless: every packet has one possible recipient. So a /31 declares both addresses usable, and modern routers happily run interconnects this way. It halves the addressing cost of point-to-point topology compared with /30.

Prefix math
Prefix length /31
Subnet mask 255.255.255.254
Wildcard mask 0.0.0.1
Total addresses 2
Usable hosts 2

Per RFC 3021, a /31 on a point-to-point link has no network or broadcast address: both addresses are usable, so the total and usable counts are equal.

Why no broadcast is fine

Broadcast exists to reach everyone on this segment. On a segment of two, the concept collapses — the only frames that matter go to the other end. RFC 3021 formalized this back in 2000: on links numbered with /31, the all-zeros and all-ones addresses are both ordinary host addresses. ARP still resolves the neighbor as usual; nothing else changes.

Where /31s belong (and where they don't)

Use them on router interconnects, ISP handoffs, and any true point-to-point Ethernet link — most modern platforms (Cisco IOS-XE, Junos, Arista, Linux) support them without drama. Do not use them on multi-access networks: the moment a third device joins the segment, the no-broadcast assumption breaks and you are renumbering. Some cloud environments also reject /31 on interface attachments, so check before you commit.

CIDR Calculator

Run the math on 10.0.0.0/31 — or any other block

Open in calculator
Free forever No signup Runs 100% in your browser
FAQ

Frequently asked questions

How many IP addresses are in a /31?

2 in total (2^1), and both are usable on point-to-point links per RFC 3021 — there is no network or broadcast reservation.

What is the subnet mask of a /31?

255.255.255.254. Only the lowest bit of the address varies, flipping between the two endpoints.

Isn't a /31 useless without network and broadcast addresses?

On a broadcast segment, yes — which is why the classical rules forbid it. RFC 3021 carves out the point-to-point exception, where broadcast serves no purpose and both addresses identify hosts.

Can I use a /31 on a normal LAN?

No. The exception only holds when exactly two devices share the link. Put a /31 on a multi-host VLAN and addressing breaks in ways that will cost you an afternoon.