Ad slot — header (728x90)

/30 vs /31: Which Subnet Size Should You Use?

Last reviewed: May 2026

Both /30 and /31 are common choices, and the right one depends less on host counts than on where the block sits in your wider plan. Here is the direct comparison, then the practical guidance.

Side by side

PrefixTotal IPsUsable (standard)AWS usableAzure usableGCP usableTypical use
/3042n/an/an/aClassic point-to-point link
/3122n/an/an/aModern point-to-point link (RFC 3021)

AWS and Azure reserve 5 addresses per subnet; GCP reserves 4. Those columns are what you can actually assign to workloads.

Use a /30 when…

Legacy equipment, or any device whose firmware predates RFC 3021 support. A /30 wastes two of its four addresses on network and broadcast, but it is universally understood and will never surprise you on an old platform.

Use a /31 when…

Modern router-to-router and firewall-to-firewall links. RFC 3021 allows both addresses in a /31 to be used as host addresses, because a point-to-point link has no need for a broadcast address. Across a large WAN this halves the address consumption of your link estate.

The gotcha

Watch outNeither works as a cloud subnet. AWS and Azure enforce a /28 minimum, so /30 and /31 are on-premises and virtual-appliance constructs. They still matter in cloud designs for VPN tunnel interfaces and transit links between virtual routers.
Rule of thumbSize for the host count you expect in two years, then check it against the provider-adjusted column above — not the textbook one. Running out of addresses in a live subnet means rebuilding it, because neither AWS nor Azure lets you resize a subnet in place.
Compare any two prefixes in the calculator →

Where these fit in a cloud plan

Prefix choice is a downstream decision. Start from the VPC or VNet block, divide it per region and per availability zone, and only then choose subnet sizes. The Cloud VPC & VNet CIDR Planning Guide covers that top-down process, and the free subnet finder will tell you which of these sizes actually fits in the space you have left.

Frequently Asked Questions

Is a /30 better than a /31?

Neither is better in the abstract. A /30 has more usable addresses and a /31 conserves address space. Choose based on expected host count, provider minimums for the service involved, and how much room the parent block has left.

How many /31 subnets fit in a /30?

Exactly 2, because the prefix difference is 1 bit and 2^1 = 2.

Why do AWS and Azure show fewer usable hosts?

Both reserve five addresses in every subnet: the network address, the default gateway, two for internal DNS and future use, and the broadcast address. GCP reserves four. A /30 therefore yields fewer assignable addresses in cloud than the textbook figure.

Related Guides

Ad slot — footer (728x90)