/30 Subnet Mask
A /30 subnet mask is 255.255.255.252. It has 4 addresses, 2 usable hosts and the wildcard mask 0.0.0.3.
| CIDR prefix | /30 |
|---|---|
| Subnet mask | 255.255.255.252 |
| Wildcard mask | 0.0.0.3 |
| Binary mask | 11111111.11111111.11111111.11111100 |
| Total addresses | 4 |
| Usable hosts | 2 |
| Block size | 4 (fourth octet) |
Example: 192.168.1.0/30
| Network address | 192.168.1.0 |
|---|---|
| First usable host | 192.168.1.1 |
| Last usable host | 192.168.1.2 |
| Broadcast address | 192.168.1.3 |
Where /30 subnets start
/30 networks start on multiples of 4 in the fourth octet (0, 4, 8, 12, …). A /24 holds 64 /30 subnets, and a /16 holds 16,384.
How to calculate a /30 subnet
- Host bits: 32 − 30 = 2.
- Total addresses: 22 = 4.
- Usable hosts: 4 − 2 = 2, because the network and broadcast addresses can't be assigned to hosts.
- Subnet mask: 30 one-bits followed by 2 zero-bits. The fourth octet is 252 (256 − 4), which gives 255.255.255.252.
- Wildcard mask: 255.255.255.255 − 255.255.255.252 = 0.0.0.3.
When to use a /30
A /30 gives 2 usable hosts and is the traditional choice for point-to-point links between routers. A /31 (RFC 3021) is the modern alternative that wastes no addresses.
Updated . Calculate any network with the subnet calculator, or compare all prefixes in the subnet cheat sheet.