/30 subnet explained: how many IPs it gives and when to use

Share
Two network routers are connected with an Ethernet cable on a desk.

A /30 subnet means 30 bits are fixed for the network and 2 bits are left for host addresses. In plain English, that gives you 4 total IP addresses in the block, with 2 usable addresses in most IPv4 setups. The subnet mask is `255.255.255.252`. It’s a tiny subnet, so it’s often used when you only need two endpoints, such as a router-to-router link or a small lab exercise.

What /30 actually means

CIDR notation tells you how many bits in the IPv4 address belong to the network. With /30, the first 30 bits are the network part and the last 2 bits are for hosts. Two host bits give you 2^2 = 4 total addresses in the subnet.

That also maps to the subnet mask 255.255.255.252. In binary, the last octet is 11111100, which leaves only two bits for host use. So if you see /30 in a router config, expect a block of four addresses, not four usable hosts.

How many IPs you really get in a /30

A /30 contains four addresses total:

  • 1 network address
  • 2 usable host addresses
  • 1 broadcast address

For example, take 192.168.1.0/30.

  • Network address: 192.168.1.0
  • Usable hosts: 192.168.1.1 and 192.168.1.2
  • Broadcast address: 192.168.1.3

So the usable range is 192.168.1.1 through 192.168.1.2. The network address identifies the subnet itself, and the broadcast address is reserved for the broadcast to every host in that subnet. In normal IPv4 subnetting, neither of those is assigned to a device.

When a /30 makes sense

A /30 is a common choice for point-to-point links, where only two devices need IP addresses. Think of a link between two routers, or a lab setup where one interface connects to exactly one other interface. In those cases, two usable host addresses are enough.

It also keeps address use tight. If you have many such links, smaller subnets waste fewer IPv4 addresses than larger ones. That matters in private addressing plans, small labs, and older network designs that still follow traditional IPv4 subnetting.

It is not a good choice if you need room for more than two devices on the same subnet. If you expect a router interface to serve multiple hosts, or you want space for growth, /30 is too small.

It also is not the best fit when both ends of a point-to-point link support /31. In that setup, /31 can use both addresses and avoid the network and broadcast split that a /30 still has.

Two routers are linked together with an Ethernet cable for a point-to-point connection.

What most people miss about /30 ranges

/30 subnets move in blocks of four. That means the valid network boundaries in a given address space are addresses like .0, .4, .8, .12, and so on. If you start on the wrong value, you are not describing a valid /30 network boundary.

For example, 192.168.1.5/30 does not mean the subnet starts at .5. It belongs to the block that starts at 192.168.1.4/30.

That block contains:

  • Network: 192.168.1.4
  • Usable hosts: 192.168.1.5 and 192.168.1.6
  • Broadcast: 192.168.1.7

This is where confusion usually starts in labs. People look at the address on an interface and assume it is the network address, but with CIDR the interface IP is usually just one usable address inside the block.

/30 vs /31 vs /29

These three sizes are close, but they serve different jobs.

PrefixTotal addressesUsable hostsTypical use
/3122 in point-to-point setupsRouter-to-router links when both ends support it
/3042Traditional point-to-point links and labs
/2986Small LANs or segments with a few devices

/31 is the smallest of the three, and in many point-to-point designs it can use both addresses because there is no broadcast address in that model. That makes it efficient, but it is only appropriate when both ends and the network design support it.

/30 is the classic answer if you want a tiny IPv4 subnet with two usable addresses and standard network/broadcast behavior.

/29 gives you more room. If you need more than two devices on the subnet, or you expect the segment to grow a little, /29 is usually the safer fit.

How to check a /30 in your own network

Start by finding the subnet mask or prefix length, then identify the block size. For /30, the block size is 4 in the last octet because 256 - 252 = 4.

  1. Find the nearest lower multiple of 4 in the final octet.
  2. That number is the network address.
  3. The next two addresses are usable hosts.
  4. The last address in the block is the broadcast address.

Say you have 10.0.0.14/30.

  • The nearest lower multiple of 4 is 12
  • Network: 10.0.0.12
  • Usable hosts: 10.0.0.13 and 10.0.0.14
  • Broadcast: 10.0.0.15

If you want to sanity-check a config quickly, look at the final octet. A /30 network boundary ends on .0, .4, .8, .12, and so on. If it does not, that address belongs inside one of those blocks.

Conclusion

If you see `/30`, think four addresses total, two usable hosts, and a block that moves in steps of four. That makes it a natural fit for point-to-point links and small lab networks. If you need more than two device addresses on the same subnet, move up to `/29`. If you are working on a router link and both ends support it, `/31` may be an even tighter fit.

Frequently Asked Questions

Does a /30 always have 2 usable IPs?

In standard IPv4 subnetting, yes. A `/30` has four total addresses, and two are usable host addresses. The other two are the network and broadcast addresses.

What is the subnet mask for /30?

The subnet mask is `255.255.255.252`.

Because a point-to-point link needs only two IP addresses, one for each end. A `/30` gives exactly that, with no waste beyond the reserved network and broadcast addresses.

Can I use /30 for a LAN?

Only if you need space for exactly two hosts on that subnet. For a normal LAN with multiple devices, `/30` is too small.