What a /30 subnet is: a point-to-point link
A /30 holds 4 addresses, exactly 2 usable. For decades it was the standard way to number a link between two routers.
At a glance
- Subnet mask
- 255.255.255.252
- Wildcard mask
- 0.0.0.3
- Total addresses
- 4
- Usable hosts
- 2
- Block size in the last octet
- 4
- Host bits
- 2 of 32
In detail
The mask is 255.255.255.252. Of the four addresses, one is the network address and one is the broadcast address, leaving precisely one for each end of the link. Half the block is spent on addresses nobody can use.
Still the safe default for router-to-router links, because every device made in the last thirty years handles it. A /31 does the same job with no waste but needs both ends to support it.
Number the links from a dedicated block so they are easy to summarise and easy to exclude from monitoring. Scattering /30s through the host space makes both harder.
Examples
10.255.0.4/30
network 10.255.0.4
router A 10.255.0.5
router B 10.255.0.6
broadcast 10.255.0.7Things that catch people out
- Valid last octets are multiples of 4. 10.255.0.5/30 is not a network address.
- A /30 per link uses four addresses to deliver two. On a network with hundreds of links that is a significant amount of address space spent on nothing.
Try it: IP Subnet Calculator
Enter any IPv4 address with a prefix or a dotted mask and get the network address, broadcast address, wildcard mask, usable host range, address class, and the hex and binary forms.
IP Subnet Calculator
LOCAL · Browser-OnlyCalculate IP subnet details, network ranges, and CIDR notation
192.168.1.0192.168.1.255255.255.255.00.0.0.255192.168.1.0/24192.168.1.1 - 192.168.1.254192.168.1.1192.168.1.254256254C0xC0A8016411000000.10101000.00000001.01100100Split into two /25 subnets
Dividing 192.168.1.0/24 one prefix deeper.
Common Subnet Masks
Related IPv4 subnets
All ipv4 subnets →What a /31 subnet is: a point-to-point link with no waste
A /31 uses the mask 255.255.255.254 and gives 2 usable addresses. What it is for and where it goes wrong.
What a /29 subnet is: eight addresses
A /29 uses the mask 255.255.255.248 and gives 6 usable addresses. What it is for and where it goes wrong.
What a /32 subnet is: a single host
A /32 uses the mask 255.255.255.255 and gives 1 usable addresses. What it is for and where it goes wrong.
What a /0 subnet is: the default route
A /0 uses the mask 0.0.0.0 and gives 4,294,967,294 usable addresses. What it is for and where it goes wrong.
What a /4 subnet is: the multicast block
A /4 uses the mask 240.0.0.0 and gives 268,435,454 usable addresses. What it is for and where it goes wrong.
What a /8 subnet is: a full class A block
A /8 uses the mask 255.0.0.0 and gives 16,777,214 usable addresses. What it is for and where it goes wrong.
Tools for this
- IP Subnet Calculator Free online IP subnet calculator - calculate IP subnet details, CIDR notation, and network address ranges
- IP Address Lookup Free online IP address lookup - find your public IP address and basic network information
- Number Base Converter Free online number base converter - convert numbers between decimal, binary, octal, and hexadecimal