/30 vs /31 — Subnet Comparison

A /30 subnet is larger than a /31. Every additional bit in the prefix halves the address space — the 1-bit difference between these two means /30 has 21 = 2 times as many addresses.

/30

2 usable hosts — point-to-point link

Full reference →
Total IPs 4
Usable Hosts 2
Subnet Mask 255.255.255.252
Wildcard Mask 0.0.0.3

Typical Uses

  • WAN point-to-point link between routers
  • BGP peering session
  • Dedicated leased line addressing
/31

2 host addresses — RFC 3021 P2P

Full reference →
Total IPs 2
Usable Hosts 2
Subnet Mask 255.255.255.254
Wildcard Mask 0.0.0.1

Typical Uses

  • Point-to-point link (more efficient than /30)
  • Router interface addressing with RFC 3021 support
  • BGP peering links

Key Differences

more IPs in /30 than /31
2
/31 subnets fit inside one /30
1
bit of difference in prefix length

How 2 /31 Subnets Divide a /30

Example using 10.0.0.0/30 as the parent block.

# CIDR Network First Usable Last Usable Broadcast Hosts
1 10.0.0.0/31 10.0.0.0 10.0.0.0 10.0.0.1 10.0.0.1 2
2 10.0.0.2/31 10.0.0.2 10.0.0.2 10.0.0.3 10.0.0.3 2

FAQ

What is the difference between /30 and /31?

A /30 has 2 usable hosts and a /31 has 2. The subnet masks differ: /30 uses 255.255.255.252 while /31 uses 255.255.255.254. Every additional bit in the prefix halves the number of addresses — so the 1-bit gap means /30 is exactly 2× larger.

How many /31 subnets fit in a /30?

Exactly 2 /31 subnets fit perfectly inside one /30 with no wasted space. To split a /30 into /31s, just increment the last 1 bit of the network address for each new subnet.

Which should I choose?

/30 is typically used for: WAN point-to-point link. /31 is better for: Modern P2P links (RFC 3021). Choose the smallest prefix that comfortably fits your host count — over-allocating wastes address space, but under-allocating means painful renumbering later.

Related Comparisons