The /30 prefix means the first 30 bits of the address identify the network and the remaining 2 identify the host. Written out, the mask is 255.255.255.252, in binary 11111111.11111111.11111111.11111100, and its Cisco wildcard or inverse form is 0.0.0.3. It covers 4 addresses, of which 2 can be given to hosts.
| CIDR prefix | /30 |
|---|---|
| Subnet mask | 255.255.255.252 |
| Mask in binary | 11111111.11111111.11111111.11111100 |
| Wildcard (inverse) mask | 0.0.0.3 |
| Host bits | 2 |
| Total addresses | 4 |
| Usable hosts | 2 |
| Block size (magic number) | 4 in octet 4 |
A 192.168.1.0/24 contains 64 subnets of /30. Here are the first 8, which is enough to see the pattern: each one starts 4 after the last in octet 4.
| Network | First host | Last host | Broadcast |
|---|---|---|---|
| 192.168.1.0/30 | 192.168.1.1 | 192.168.1.2 | 192.168.1.3 |
| 192.168.1.4/30 | 192.168.1.5 | 192.168.1.6 | 192.168.1.7 |
| 192.168.1.8/30 | 192.168.1.9 | 192.168.1.10 | 192.168.1.11 |
| 192.168.1.12/30 | 192.168.1.13 | 192.168.1.14 | 192.168.1.15 |
| 192.168.1.16/30 | 192.168.1.17 | 192.168.1.18 | 192.168.1.19 |
| 192.168.1.20/30 | 192.168.1.21 | 192.168.1.22 | 192.168.1.23 |
| 192.168.1.24/30 | 192.168.1.25 | 192.168.1.26 | 192.168.1.27 |
| 192.168.1.28/30 | 192.168.1.29 | 192.168.1.30 | 192.168.1.31 |
Take the interesting octet of the mask, the one that is neither 255 nor 0. For /30 that is 252 in octet 4. Subtract it from 256:
256 - 252 = 4
That is the block size. Every /30 network address is a multiple of 4 in octet 4, so you can list them by counting: 0, 4, 8, 12, and so on. No binary needed once you know the number.
A /30 gives exactly 2 usable addresses, one for each end of a point-to-point link. For decades this was how every WAN circuit and router-to-router connection was addressed, at the cost of burning four addresses to use two.
A /30 holds 4 addresses in total. After reserving the network and broadcast addresses, 2 are usable by hosts.
The /30 subnet mask is 255.255.255.252 in dotted-decimal notation.
The wildcard mask, also called the inverse mask, is 0.0.0.3. It is the bitwise inverse of 255.255.255.252 and is what Cisco access lists and OSPF network statements expect.
The /30 mask written out bit by bit is 11111111.11111111.11111111.11111100: 30 ones followed by 2 zeros.
A /24 splits into 64 subnets of /30.