Ad slot — header (728x90)

What is a /31 Subnet?

Last reviewed: May 2026

A /31 subnet contains exactly 2 IP addresses. Unlike any other subnet size, the /31 is governed by a special rule: RFC 3021 defines that both addresses in a /31 can be used as host addresses on point-to-point links, with no network address or broadcast address reserved. This makes /31 the most IP-efficient way to number a router-to-router connection.

Calculate any /31 subnet instantly →
Quick Facts: 192.168.1.0/31 Subnet mask: 255.255.255.254  ·  Wildcard: 0.0.0.1  ·  Address 0: 192.168.1.0 (router A)  ·  Address 1: 192.168.1.1 (router B)  ·  Total IPs: 2  ·  Usable hosts (RFC 3021): 2
RFC 3021 — Using 31-Bit Prefixes on IPv4 Point-to-Point Links

Published in December 2000, RFC 3021 defines that when a subnet mask of /31 is applied to a point-to-point link, the two addresses in the block are treated as host addresses — the concept of network address and broadcast address does not apply. This is supported by all modern routing platforms: Cisco IOS 12.2+, Juniper Junos, Arista EOS, Nokia SR OS, and others.

Full Breakdown

PropertyValue
Prefix length/31
Subnet mask255.255.255.254
Wildcard mask0.0.0.1
Total addresses2
Usable hosts (RFC 3021)2 — both addresses assignable on point-to-point links
Usable hosts (traditional)0 — traditional math: 21 − 2 = 0
Network addressNot applicable (per RFC 3021)
Broadcast addressNot applicable (per RFC 3021)
Binary mask11111111.11111111.11111111.11111110
AWS VPC supportNot supported — minimum is /28
/31 vs /30 — Saving Half the Address Space

A /30 has 4 addresses: 1 network + 2 hosts + 1 broadcast. Using /30 for every WAN link wastes 2 out of every 4 addresses. A /31 uses just 2 addresses for the same 2 hosts — 50% more efficient. For an ISP with thousands of point-to-point links, this saves a significant portion of the IPv4 address pool.

/31 vs /30 Side-by-Side

Property/31 (RFC 3021)/30 (traditional P2P)
Total addresses24
Usable hosts22
Wasted addresses02 (network + broadcast)
AWS VPC supportNoNo (below /28 minimum)
Modern router supportYes (IOS 12.2+, Junos, Arista)Yes (universal)
BGP session supportYes — preferred by many ISPsYes

Common Use Cases for /31 Subnets

Example: Numbering a BGP Peering Session

DeviceIP AddressRole
Router A (your ASN)203.0.113.0/31eBGP peer, interface address
Router B (peer ASN)203.0.113.1/31eBGP peer, interface address

Comparison: /31 and Nearby Small Prefixes

CIDRSubnet MaskTotal IPsUsable HostsAWS UsableTypical Use
/28255.255.255.240161411AWS minimum; small managed subnet
/29255.255.255.248863Small server cluster; mgmt VLAN
/30255.255.255.25242Traditional point-to-point link
/31255.255.255.25422 (RFC 3021)Efficient P2P link — ISP/backbone
/32255.255.255.25511 host routeLoopback, host route, anycast
Calculate /31 point-to-point subnets →

Related Guides

Ad slot — footer (728x90)