CIDR reference · IPv4

The /30 CIDR block

4 addresses, 2 usable, subnet mask 255.255.255.252.

/30 · 255.255.255.252 Open in the calculator

4 addresses, 2 usable. The traditional point-to-point link size between two routers: network, two hosts, broadcast. /31 does the same job with half the addresses.

Key numbers

Prefix length/30 (30 network bits, 2 host bits)
Subnet mask255.255.255.252
Mask in binary11111111.11111111.11111111.11111100
Wildcard mask0.0.0.3
Total addresses4
Usable hosts2 (total minus network and broadcast)
Fits in a /2464 times
Block sizeIncrements of 4 in octet 4

Example ranges

Private (RFC 1918) blocks of this size. Click one to open it in the calculator.

BlockFirst addressLast addressUsable hosts
10.0.0.0/3010.0.0.010.0.0.310.0.0.1 – 10.0.0.2
172.16.0.0/30172.16.0.0172.16.0.3172.16.0.1 – 172.16.0.2
192.168.0.0/30192.168.0.0192.168.0.3192.168.0.1 – 192.168.0.2

Usable addresses in the cloud

Cloud providers reserve a few addresses in every subnet for the router, DNS and future use, so the usable count is lower than the formula gives.

ProviderUsable in a /30Notes
AWS VPC subnetn/aNot allowed: AWS subnets must be between /16 and /28.
Azure virtual network subnetn/aNot allowed: /29 is the smallest Azure subnet.
Google Cloud subnetn/aNot allowed: /29 is the smallest primary range.

How the numbers are derived

An IPv4 address has 32 bits. A /30 uses 30 of them for the network, leaving 2 host bits, so the block has 22 = 4 addresses. The first address (all host bits 0) is the network address and the last (all host bits 1) is the broadcast address, which leaves 2 for hosts. The subnet mask is 30 ones followed by 2 zeros, written in dotted decimal as 255.255.255.252; the wildcard mask 0.0.0.3 is its inverse, used in Cisco ACLs and OSPF configuration.

FAQ

How many hosts can a /30 have?

4 addresses in total, of which 2 are usable after removing the network and broadcast addresses. Cloud providers reserve a few more: -1 usable in AWS and Azure, 0 in Google Cloud.

How many /30 subnets fit in a /24?

64. A /24 has 256 addresses and a /30 has 4, so 256 ÷ 4 = 64 blocks.