How /31 Networks Work (RFC 3021)

A /31 subnet has only two addresses. Under normal subnetting rules, one would be the network address and one the broadcast, leaving zero usable hosts — making /31 useless. RFC 3021 changes that: on point-to-point links, both addresses are assigned to interfaces and there is no broadcast. This halves the address consumption of router-to-router links compared to the traditional /30. Verify your links with the subnet calculator.

Built by a network engineerCalculations run locally in your browserNo signup requiredNetwork information is not transmitted to our servers

/30 vs /31 comparison

Property/30/31
Total addresses42
Network address1 (reserved)0 (used as host)
Broadcast address1 (reserved)0 (used as host)
Usable hosts22
Waste50%0%
StandardRFC 950RFC 3021

Why the normal rules break

Standard subnetting reserves the all-zeros and all-ones host addresses. A /30 has 2 host bits, so 00 (network) and 11 (broadcast) are reserved, leaving 01 and 10 for hosts. A /31 has only 1 host bit, so 0 and 1 would both be reserved — nothing left. RFC 3021 observes that on a point-to-point link there are exactly two endpoints and no broadcast is needed, so both addresses can be assigned directly.

/30 (4 addresses):
  .0  network   (reserved)
  .1  host A
  .2  host B
  .3  broadcast (reserved)

/31 (2 addresses):
  .0  host A   (RFC 3021 — no network/broadcast)
  .1  host B

Address savings

A network with 100 point-to-point links uses 100 × 4 = 400 addresses with /30s, but only 100 × 2 = 200 with /31s — a 50% reduction. In large service-provider and datacenter fabrics with thousands of links, this is significant.

Configuration

Cisco IOS

! /31 is supported on Cisco IOS 12.0(14)S and later
interface GigabitEthernet0/0/0
 description P2P to Router-B
 ip address 10.0.0.0 255.255.255.254
 no shutdown

! The other end
interface GigabitEthernet0/0/0
 ip address 10.0.0.1 255.255.255.254

Linux

ip addr add 10.0.0.0/31 dev eth0
# Peer uses 10.0.0.1/31

When to use /31 vs /30

ScenarioRecommendation
Router-to-router P2P (modern gear)/31
Older gear without RFC 3021 support/30
OSPF network type point-to-point/31 (or /30)
OSPF broadcast segment (multi-access)/29 or larger (not /31)
Address conservation critical/31
Need a dedicated broadcast for testing/30

OSPF and /31

OSPF treats /31 links correctly when the network type is point-to-point. On a broadcast network type, /31 is too small to hold a DR/BDR, so use a /29 or larger. To force point-to-point on an OSPF interface:

interface GigabitEthernet0/0/0
 ip address 10.0.0.0 255.255.255.254
 ip ospf network point-to-point

Caveats

  • Not for multi-access — /31 is strictly two endpoints. Never use it on a switch port facing multiple hosts.
  • Older devices — some legacy gear rejects /31; test before deploying.
  • Monitoring tools — ensure your IPAM/NMS treats .0 as a host on /31s, not a network.
  • Ping behavior — there is no broadcast to ping; ping the peer address directly.

Related guides

Technically Reviewed By

Senior Enterprise Network Engineer — 25+ years of IT and network infrastructure experience, including enterprise Cisco switching, routing, wireless, firewalls, VPN, network access control, SD-WAN, and large-scale network operations.

Last reviewed: 2026-09-02

Calculations are performed using standards-based formulas and verified against known reference values. All computation runs client-side in your browser.