What Is a /30 Subnet? 2 Usable Hosts, Explained
A /30 subnet holds 4 total addresses and gives you 2 usable hosts. The mask is 255.255.255.252. It exists for one main job: the point-to-point link between two routers, where one address goes on each end and nothing else needs to sit on the wire. That is the whole story, and the rest of this page is the math behind it plus the /30 vs /31 question that follows right after.
How does the /30 bit math work?
An IPv4 address is 32 bits. The number after the slash is how many of those bits belong to the network. A /30 gives 30 bits to the network and leaves 2 bits for hosts.
Two host bits produce 2^2 = 4 total addresses. Of those 4, one is the network address and one is the broadcast address. Neither can be assigned to an interface. That leaves 4 minus 2 = 2 usable hosts.
The mask follows from the same count. Thirty network bits written out in dotted decimal is 255.255.255.252. The wildcard, which is just the mask inverted, is 0.0.0.3. If you write access lists or OSPF network statements, 0.0.0.3 is the form you will type.
If you want the same arithmetic applied to any prefix, the walkthrough in how to calculate usable hosts covers the general formula, and the IP Subnet Calculator will do it instantly.
What does a /30 look like in practice?
Take 192.168.1.0/30. The block covers four consecutive addresses, and each one has a fixed role:
- 192.168.1.0 is the network address. Not assignable.
- 192.168.1.1 is usable. Put it on one router.
- 192.168.1.2 is usable. Put it on the other router.
- 192.168.1.3 is the broadcast address. Not assignable.
That is the pattern for every /30. The block always starts on a multiple of 4, the two middle addresses are yours, and the last one is broadcast. Once you have seen it a few times you stop calculating and start recognising it.
A /24 splits into sixty-four /30s. So 192.168.1.0/24 could carve up into 192.168.1.0/30, 192.168.1.4/30, 192.168.1.8/30, and so on, right up through the range. That is sixty-four separate router-to-router links out of one Class C block, which is exactly the kind of density a WAN edge needs.
Why does a /30 only have 2 usable hosts?
Because two of the four addresses are reserved by the addressing rules of IPv4, not by any vendor choice. The first address in any subnet identifies the subnet itself. The last address is the broadcast for that subnet. Those two roles are structural.
With a big subnet, losing two addresses barely registers. A /24 has 256 total and 254 usable, so the overhead is under 1%. With a /30 you have only 4 addresses to start with, so the same two reserved addresses eat half the block.
That is the tension at the heart of the /30. It is the smallest subnet that can still host two devices under classic rules, and it is also the least efficient one by percentage. Which brings us to the interesting question.
Should I use a /30 or a /31?
On a point-to-point link, a /31 does the same job in half the space. This is the /30 vs /31 comparison in one line: a /30 burns 4 addresses to deliver 2 usable, which is 50% waste, while a /31 delivers those same 2 usable addresses out of 2 total, which is 0% waste.
How? RFC 3021 makes the observation that a point-to-point link does not need a network address or a broadcast address. There are exactly two devices on the wire. Anything sent by one is received by the other. There is nothing to broadcast to, and nothing to identify beyond the two endpoints. So the two reserved roles are dropped and both addresses become assignable.
Side by side:
- /30 = mask 255.255.255.252, 4 total addresses, 2 usable, 50% of the block spent on network and broadcast.
- /31 = mask 255.255.255.254, 2 total addresses, 2 usable, 0% waste, per RFC 3021.
Both give you 2 usable addresses. The /31 just does it without the overhead. On equipment that supports it, a /31 is the more efficient modern choice for point-to-point links, and it doubles how many links you can fit in a given block.
The honest caveat
/31 support is not universal. Not every platform, and not every interface type on platforms that do support it, will accept a /31. Older gear, some virtual appliances, and certain interface types can refuse it outright or behave oddly.
There is also a human factor. Plenty of networks standardise on /30 across the board because their IPAM, their monitoring, their scripts, and their documentation all assume it. Consistency has real value when a team of people is on call at 3am. Mixing /30 and /31 across a network for a small address saving is not always a trade worth making.
So the reasonable position is this: prefer /31 for point-to-point links where your equipment supports it and your tooling is comfortable with it. Keep /30 where it does not, or where a single standard is worth more to you than the addresses. Neither answer is wrong on its own terms.
What is a /30 used for?
Router-to-router links, almost always. When two routers connect directly, whether over a WAN circuit, a fibre pair, a serial link, or a tunnel, each end needs an IP address in the same subnet so they can talk and so routing protocols can form a neighbour relationship.
Two devices, two addresses. That is all the link ever needs. Handing a two-device link a /24 would mean 254 usable addresses sitting idle behind a connection that will never hold more than two. In private space that might not hurt much, but in public space, or in a large network with hundreds of links, it is exactly the kind of sprawl that runs a block dry.
You will also see /30 on firewall-to-router handoffs, on transit links between a provider and a customer edge, and on some load balancer or VPN concentrator connections. The common thread is always the same: a segment with a known, fixed population of two.
To sketch out a whole set of these quickly, the IP Subnet Calculator will list the network, usable range, and broadcast for each block as you step through them.
How does a /30 compare to nearby prefixes?
The small end of the prefix range moves in powers of two. Each step up in prefix length halves the block:
- /28 = mask 255.255.255.240, 16 total addresses, 14 usable.
- /29 = mask 255.255.255.248, 8 total addresses, 6 usable.
- /30 = mask 255.255.255.252, 4 total addresses, 2 usable.
- /31 = mask 255.255.255.254, 2 total addresses, 2 usable (RFC 3021, point-to-point).
- /32 = a single host address. A host route, typically a loopback.
Read down that list and the shape of it is clear. A /29 gives you 6 usable, which is a fair choice for a small handful of devices such as a tiny DMZ or a few servers. A /30 narrows to the two-device link. A /31 is the same link with the fat trimmed off. A /32 is not a segment at all: it is one address, used to point a route at one specific thing.
For the full set of masks and host counts in one place, the subnet mask cheat sheet lays out every prefix from /8 down to /32.
Common mistakes with /30s
The most frequent one is picking the wrong starting address. A /30 must begin on a multiple of 4. So 192.168.1.0/30, 192.168.1.4/30, and 192.168.1.8/30 are valid. Something like 192.168.1.2/30 is not a valid network boundary, and configuring it will either be rejected or silently reinterpreted.
The second is trying to assign the network or broadcast address to an interface. In a /30, .0 and .3 of the block are off limits. Only the two middle addresses go on devices.
The third is reaching for a /30 on a segment that is not point-to-point. If a third device might ever need to join that segment, a /30 has no room for it and you will be renumbering. Size for the segment you have, not the one you wish you had.
Bottom line
A /30 subnet is 4 total addresses, 2 usable hosts, and the mask 255.255.255.252. In 192.168.1.0/30 that means .1 and .2 are yours, with .0 as the network and .3 as the broadcast. It exists to serve point-to-point router links, and it does that job well, though a /31 delivers the same 2 usable addresses in half the space where your equipment supports RFC 3021. When you need the numbers for any block without doing the bit math by hand, run it through the IP Subnet Calculator.
Related guides
- What Is a /24 Subnet? 256 Addresses, 254 Usable HostsWhat is a /24 subnet? It holds 256 total addresses and 254 usable hosts, with a 255.255.255.0 mask. See the bit math, the 192.168.1.0/24 example and how a /24 splits.
- How to Calculate Usable Hosts in a Subnet (Formula + Why You Subtract 2)How to calculate usable hosts: 2^(32 - prefix) - 2. Learn the formula, why you subtract 2 for network and broadcast, the /31 and /32 exceptions, and reverse sizing.
- How Many Hosts in a /26 Subnet? 62 Usable AddressesHow many hosts in a /26 subnet? 62 usable. A /26 has 64 total addresses, minus the network and broadcast address. Mask 255.255.255.192, bit math, and the four /26 blocks in a /24.
- What Is a Subnet Mask? 255.255.255.0 Meaning ExplainedWhat is a subnet mask? It marks which part of an IP address is the network and which is the host. Learn the 255.255.255.0 meaning, valid octets, and the AND check.