How many /30 networks fit
| Parent block | Relationship |
|---|---|
| /8 | 4,194,304 × /30 fit inside one /8 |
| /16 | 16,384 × /30 fit inside one /16 |
| /24 | 64 × /30 fit inside one /24 |
64 × /30 = one /24. Two /31s fit in the same space as one /30.
Worked example: 10.255.0.14/30
A WAN link interface shows 10.255.0.14/30. What address should the router at the other end use?
- The mask is 255.255.255.252. The fourth octet (252) is the "interesting" one — the first that is not 255.
- Block size = 256 − 252 = 4. Networks start at multiples of 4 in the fourth octet: 0, 4, 8, …
- The fourth octet of 10.255.0.14 is 14. 14 ÷ 4 = 3 remainder 2, so the block starts at 3 × 4 = 12.
- Network = 10.255.0.12. Broadcast = 12 + 4 − 1 = 15, giving 10.255.0.15.
- Usable hosts: 10.255.0.13 to 10.255.0.14, which is 22 − 2 = 2 addresses.
Same thing in binary (network bits | host bits):
Address 00001010.11111111.00000000.000011|10 Mask 11111111.11111111.11111111.111111|00 Network 00001010.11111111.00000000.000011|00
Where /30 is used in real networks
-
Router-to-router links
Each WAN or core link gets its own /30. Many ISPs still hand customers a /30 for the hand-off: one address for their router, one for yours.
-
Tunnel interfaces
GRE and IPsec VTI tunnels are point-to-point, so a /30 (or /31) per tunnel is common. AWS Site-to-Site VPN uses /30 inside addresses from 169.254.0.0/16 for each tunnel.
Common /30 mistakes
- Using a /30 when both ends support /31. A /30 wastes half its addresses on network and broadcast. In large fabrics with hundreds of links, /31s save a lot of space.
- Setting the far end to the broadcast address. For 10.255.0.14/30 the block is .12 to .15; usable ends are .13 and .14, and .15 is broadcast.
/30 FAQ
How many usable hosts are in a /30?
2. A /30 has 4 addresses: for 10.255.0.12/30 that is .12 (network), .13 and .14 (the two router ends) and .15 (broadcast).
Why use a /30 instead of a /31?
Compatibility. Almost every device supports /30. /31 (RFC 3021) is supported by modern routers but some older gear, firewalls and host operating systems don't handle it.
What is the wildcard mask for /30?
0.0.0.3. OSPF example: network 10.255.0.12 0.0.0.3 area 0.