tip
~/geeksubnet/masks/30

/30 subnet mask: 255.255.255.252

Every value on this page is reproducible in the calculator.

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.

/30 at a glance

CIDR prefix/30
Subnet mask255.255.255.252
Mask in binary11111111.11111111.11111111.11111100
Wildcard (inverse) mask0.0.0.3
Host bits2
Total addresses4
Usable hosts2
Block size (magic number)4 in octet 4

Every /30 inside 192.168.1.0/24

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.

NetworkFirst hostLast hostBroadcast
192.168.1.0/30192.168.1.1192.168.1.2192.168.1.3
192.168.1.4/30192.168.1.5192.168.1.6192.168.1.7
192.168.1.8/30192.168.1.9192.168.1.10192.168.1.11
192.168.1.12/30192.168.1.13192.168.1.14192.168.1.15
192.168.1.16/30192.168.1.17192.168.1.18192.168.1.19
192.168.1.20/30192.168.1.21192.168.1.22192.168.1.23
192.168.1.24/30192.168.1.25192.168.1.26192.168.1.27
192.168.1.28/30192.168.1.29192.168.1.30192.168.1.31

The magic number for /30

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.

Where a /30 shows up in practice

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.

Frequently asked questions

How many hosts are in a /30?

A /30 holds 4 addresses in total. After reserving the network and broadcast addresses, 2 are usable by hosts.

What is the subnet mask for /30?

The /30 subnet mask is 255.255.255.252 in dotted-decimal notation.

What is the wildcard mask for /30?

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.

What is /30 in binary?

The /30 mask written out bit by bit is 11111111.11111111.11111111.11111100: 30 ones followed by 2 zeros.

How many /30 subnets fit in a /24?

A /24 splits into 64 subnets of /30.

Neighbouring masks: /29 is one bit shorter and holds twice as many addresses. /31 is one bit longer and holds half as many.
full cheat sheet subnetting basics open the calculator