A /30 subnet mask is 255.255.255.252. It uses 30 of IPv4's 32 bits for the network, leaving 2 host bits, which gives 4 total addresses and 2 usable hosts. The first address is the network address and the last is the broadcast address, so a /30 is the classic choice for a point-to-point link between two routers.
Key takeaways
- A /30 is 255.255.255.252, with 4 addresses, 2 usable hosts, and a wildcard mask of 0.0.0.3.
- The two usable addresses go to the two ends of a point-to-point link; the network and broadcast addresses cannot be assigned to hosts.
- For a new point-to-point link, a /31 saves addresses, but a /30 is still the safe default on equipment that does not support RFC 3021.
A /30 is the smallest subnet that still behaves like a normal subnet: four addresses, two of them usable, one for each end of a link. It is the mask network engineers reach for when two routers need to talk to each other and nothing else needs an address.
What is a /30 subnet mask?
A /30 subnet mask is 255.255.255.252, written in CIDR notation as /30. It uses 30 of IPv4's 32 bits for the network portion, leaving 2 bits for host addresses, which gives 4 total addresses and 2 usable hosts.
The "/30" is the prefix length: the number of leading bits that identify the network. The mask is those 30 bits written as ones, followed by two zeros: 11111111.11111111.11111111.11111100, which in dotted decimal is 255.255.255.252. The wildcard mask, the inverse used in access lists, is 0.0.0.3.
Subnets in a /30 always start every four addresses in the last octet: .0, .4, .8, .12, and so on. That block size of four is the gap between one /30 network address and the next.
How many hosts does a /30 support?
A /30 supports 2 usable hosts. It has 4 total addresses, but the first is the network address and the last is the broadcast address, so only the two in the middle can be assigned to devices.
The formula is the same for every prefix: host bits equal 32 minus the prefix, total addresses equal 2 raised to the host bits, and usable hosts equal total addresses minus 2. For a /30, that is 32 minus 30 equals 2 host bits, 2 to the power of 2 equals 4 addresses, and 4 minus 2 equals 2 usable hosts.
A common mistake is to count four hosts. Assigning the network or broadcast address to a host interface can break connectivity or produce an invalid configuration, so the usable count is two, not four.
How does the /30 mask work in binary?
In binary, a /30 is 30 one bits followed by 2 zero bits. The last octet, 252, is 11111100: the six ones continue the network portion, and the two zeros allow four address combinations.
Take 192.168.1.0/30. The address in binary ends 00000000, the mask ends 11111100, and the two host bits can be 00, 01, 10 or 11. Those give .0, .1, .2 and .3. The host bits 00 and 11 are reserved as the network and broadcast addresses, leaving 01 and 10 — .1 and .2 — for the two routers.
In hexadecimal, the /30 mask is FF.FF.FF.FC and the wildcard is 00.00.00.03. You will rarely need the hex form, but it appears in some vendor documentation and in DigiCert's subnet mask cheat sheet, which lists a /30 as 64 subnets of a Class C network with 2 hosts each.
What is a worked example of a /30 subnet?
Take 10.0.0.0/30. The network address is 10.0.0.0, the broadcast address is 10.0.0.3, and the two usable addresses are 10.0.0.1 and 10.0.0.2. Give .1 to one router and .2 to the other, and the link is up.
Take 192.168.1.128/30, a block in the middle of a larger range. The network address is 192.168.1.128, the usable hosts are 192.168.1.129 and 192.168.1.130, and the broadcast is 192.168.1.131. The next /30 starts at 192.168.1.132.
To find the range for any address, round the last octet down to the nearest multiple of four. For 192.168.1.150, the block starts at .148: network 192.168.1.148, hosts .149 and .150, broadcast .151. You can check your own public address first with our what is my IP tool if you are unsure which network you are on.
/30 vs /31 vs /29 vs /28: which should you use?
Choose by how many hosts you need, then add two for the network and broadcast addresses — except on a /31, where that rule does not apply. Each extra prefix bit halves the block.
| Prefix | Subnet mask | Wildcard | Total addresses | Usable hosts | Typical use |
|---|---|---|---|---|---|
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 | Point-to-point link |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 | Point-to-point link, RFC 3021 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | Small office or DMZ |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | Small subnet |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | Department or VLAN |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | Home or office network |
A /31 is the modern alternative for a point-to-point link. RFC 3021 allows a /31 on point-to-point links, where the network and broadcast addresses are not needed, so both addresses go to the routers and half the space is saved. Splitting one /30 into two /31 links gains addresses: the /30 has 2 usable hosts, while the two /31s have 4 between them.
Use a /31 only if both ends support it. Older equipment, some ISPs and some firewall firmware do not, and will reject a /31 as invalid. A /30 works everywhere, which is why it remains the safe default.
When should you use a /30 subnet?
Use a /30 when exactly two devices need to talk to each other and nothing else will ever join that network. The classic cases are router-to-router links, router-to-firewall links, and WAN connections where your ISP assigns you a small block for the link itself.
ISPs often hand out a /30 for the link between their router and yours, then route a larger block, such as a /29, over it for your usable addresses. That is normal: the /30 is the road, and the larger block is the traffic on it.
Do not use a /30 for a network that might grow. Two hosts is a hard ceiling, and renumbering a link later is more work than choosing a /29 at the start. If a third device might join, use a /29, which gives six usable hosts.
How do you configure a /30 link?
Configure matching /30 details on both ends, then verify routes and test communication in both directions. The steps are the same on most routers and firewalls, with different menus.
- Pick the block. Choose a /30 network address, for example 192.168.1.0/30, that does not overlap any existing subnet.
- Assign the hosts. Give one end .1 and the other .2, both with the mask 255.255.255.252.
- Set the routes. Each side needs a route to the networks behind the other side, pointing at the far end's /30 address.
- Test both ways. Ping from each side to the other, then ping a host behind the far router. A link that works in one direction only usually has a missing return route.
- Document it. Record the block, the two addresses, which device holds each, and what it connects. Undocumented /30 links are a common source of confusion during outages.
Cloud providers add their own rules: AWS, for example, reserves five addresses per subnet, so a /30 in a VPC would leave no usable host addresses. Check your provider's documentation before carving small subnets in the cloud.
What are the common /30 mistakes?
The most common mistake is assigning the network or broadcast address to a host. In 192.168.1.0/30, .0 and .3 are not usable, and using them can break connectivity or be rejected outright.
Other frequent mistakes include choosing a block that overlaps an existing subnet, so traffic goes to the wrong place; forgetting the return route, so pings work one way only; and using a /31 on equipment that does not support RFC 3021, which leaves the link down with an unhelpful error.
Finally, do not confuse the prefix with the host count. The "/30" describes network bits, not devices. A /30 has 2 hosts, a /29 has 6, and a /24 has 254 — the number after the slash goes up as the number of hosts goes down. The same care with addresses applies at home: our guide to how to secure your Wi-Fi covers the network most readers actually run.
The bottom line
A /30 is 255.255.255.252, with four addresses and two usable hosts — one for each end of a point-to-point link. That is all it is, and that is why it works: the smallest normal subnet, with nothing wasted and nothing to grow into.
Use it for router-to-router links, remember that the first and last addresses are reserved, and reach for a /31 only when both ends support RFC 3021. Before you expose any of it to the internet, check what your network actually shows the world with our free DNS lookup.
Frequently asked questions
What is the subnet mask for a /30?
The subnet mask for a /30 is 255.255.255.252. Its wildcard mask is 0.0.0.3, and in binary the last octet is 11111100. It has 4 total addresses and 2 usable hosts.
How many usable hosts are in a /30 subnet?
Two. A /30 has 4 total addresses, but the first is the network address and the last is the broadcast address, so only the two middle addresses can be assigned to devices.
What is a /30 subnet used for?
A /30 is traditionally used for a point-to-point link between two routers or firewalls, where only two addresses are needed. It wastes no more space than necessary while keeping a network and broadcast address.
What is the difference between /30 and /31?
A /30 has 4 addresses and 2 usable hosts, with network and broadcast addresses. A /31 has 2 addresses and both are usable, because RFC 3021 removes the network and broadcast addresses on point-to-point links. A /31 saves half the space, but not all equipment supports it.
Can I assign the network or broadcast address to a host in a /30?
No, not normally. Assigning the first address, such as 192.168.1.0 in 192.168.1.0/30, or the last address, such as 192.168.1.3, to a host can break connectivity or produce an invalid configuration on most equipment.
How many /30 subnets fit in a /24?
64. A /24 has 256 addresses, and each /30 uses 4 of them, so 256 divided by 4 is 64 subnets. A /24 splits into 64 /30 networks, each with 2 usable hosts.
Is a /30 good for a home network?
No. A /30 only supports two devices, so it is far too small for a home network with phones, laptops, printers and smart devices. A home network normally uses a /24, which supports 254 usable hosts.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against subnet mask cheat sheets from DigiCert, ComputingForGeeks and ShowMyIP, and the CIDR and RFC 3021 rules for /30 and /31.
How we write and fact-check →