What is a /30 subnet? 4 IPs for a point to point link

By TechCompare · Updated · How we check

The mask 255.255.255.252 leaves 4 total IPv4 addresses, with 2 usable for the two ends of a point to point link.

A /30 is the block for a single link: 4 addresses at 255.255.255.252, and 2 of them usable. That's exactly enough for the two ends of a point to point link, such as a pair of routers or firewalls that connect only to each other.

CIDR
/30
Total addresses
4
2 usable for hosts
Subnet mask
255.255.255.252

CIDR reference table

Every IPv4 prefix from /8 to /32 with its subnet mask, wildcard mask and address counts. Pick a prefix to open its page or the calculator.

PrefixSubnet maskWildcard maskTotal addressesUsable hosts
/8255.0.0.00.255.255.25516,777,21616,777,214
/9255.128.0.00.127.255.2558,388,6088,388,606
/10255.192.0.00.63.255.2554,194,3044,194,302
/11255.224.0.00.31.255.2552,097,1522,097,150
/12255.240.0.00.15.255.2551,048,5761,048,574
/13255.248.0.00.7.255.255524,288524,286
/14255.252.0.00.3.255.255262,144262,142
/15255.254.0.00.1.255.255131,072131,070
/16255.255.0.00.0.255.25565,53665,534
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30This page255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122
/32255.255.255.2550.0.0.011

Usable hosts are the total minus the network address and the broadcast address. A /31 is the exception: it has neither, so both addresses work as hosts on a point to point link (RFC 3021). A /32 is a single address. The wildcard mask is the subnet mask with every bit flipped, and Cisco IOS access lists and OSPF network commands use it.

How this is calculated

Only 2 host bits remain in a /30, which is 2^2 = 4 addresses. The network and broadcast addresses take the two that aren't usable. Consecutive links step through the last octet by 4. The first four blocks are .0-.3, .4-.7, .8-.11, .12-.15.

A worked example makes the numbering clear. A link on 10.0.0.0 uses the usable pair 10.0.0.1 to 10.0.0.2. The next link, on 10.0.0.4, uses 10.0.0.5 to 10.0.0.6. Both blocks sit in the 10/8 private range from RFC 1918. The wildcard mask is 0.0.0.3, the form access lists use to match a block like these.

Verdict

Use a /30 when a link has exactly two ends. If a third device could ever join that segment, a /29 is the next size up, and it holds 6 usable addresses.

RFC 3021 allows a /31 on point to point links in a very limited way, where both devices support it. A /31 holds 2 addresses and uses all of them for the two ends, with no network or broadcast address to skip. This calculator counts 2 usable addresses for a /31 and 1 for a /32, so the numbers here match the tool.

Neither cloud accepts a /30. AWS's smallest subnet is a /28, and Azure's is a /29, so a /30 is out of range for both.

More Subnet scenarios

/24 subnet (255.255.255.0)
A /24 subnet, written as 255.255.255.0 in dotted-decimal notation, provides 256 total addresses with 254 usable for hosts (one reserved for the network address and one for broadcast).
View details
/16 subnet (255.255.0.0)
A /16 subnet, written as 255.255.0.0, provides 65,536 total addresses with 65,534 usable for hosts.
View details
/28 subnet (255.255.255.240)
A /28 subnet, written as 255.255.255.240, provides 16 total addresses with 14 usable on a conventional IPv4 subnet.
View details

Frequently asked questions

How many usable IPs are in a /30?
2 usable out of 4 total. The network address and the broadcast address take the other two. For the first example link, the usable pair is 10.0.0.1 to 10.0.0.2.
Can I use a /31 instead of a /30?
Yes, on a point to point link where both devices support it. RFC 3021 limits the practice to those links. A /31 uses both of its addresses, while a /30 skips two.
Does AWS or Azure support a /30 subnet?
No. AWS's smallest IPv4 subnet is a /28, and Azure's is a /29. The smallest cloud option is a /29 in Azure or a /28 in AWS.
What is the wildcard mask for a /30?
0.0.0.3. Only the last two bits vary inside the block, so a rule with this wildcard matches the four addresses in it.