What Is a /32 Subnet Mask? Single IP, Host Routes and Loopbacks
What Is a /32 Subnet Mask? (255.255.255.255)
In CIDR notation, /32 is the longest possible prefix. Its mask is 255.255.255.255: all 32 bits of the IPv4 address are network bits and no host bits are left.
So a /32 is not "a network that contains devices" like a /24 or /16; it is a block made of exactly one IP address. You will not use /32 when planning subnets, but you will see it in these places:
- Host routes in a routing table that point to a single IP
- Loopback interfaces on routers and switches (OSPF router ID, BGP peering, management access)
- Single-IP allow/deny entries in firewall rules and ACLs
- A single source or destination in cloud security group rules
The Math: Why Is There Only One Address? (2^0 = 1)
The number of addresses in a block is:
Total addresses = 2^(32 − prefix)
For /32: 2^(32 − 32) = 2^0 = 1 address. Because there is no other address in the block, there is no separate network, broadcast and host address; the single address fills every role. That is why the classic "usable hosts = 2^n − 2" formula does not apply to a /32.
Example: 203.0.113.7/32
| Field | Value |
|---|---|
| Subnet mask | 255.255.255.255 |
| Wildcard mask | 0.0.0.0 |
| Network address | 203.0.113.7 |
| Last address | 203.0.113.7 |
| Total addresses | 1 |
In binary it is obvious: 203.0.113.7 = 11001011.00000000.01110001.00000111. All 32 bits are fixed network bits; with no host bit to vary, the block cannot contain any other address.
What Is a Host Route? /32 in the Routing Table
Routers forward packets using longest prefix match: the most specific entry that matches the destination wins. A /32 is the most specific entry possible. If the table holds both 10.0.0.0/24 and 10.0.0.57/32, traffic to 10.0.0.57 always follows the /32.
You will most often meet host routes in these cases:
- Static routing:
ip route 203.0.113.7 255.255.255.255 10.0.0.2sends a single IP to a specific next hop. - Loopback advertisements in dynamic protocols: OSPF and IS-IS usually carry loopback addresses as /32s, so every router is reachable at one stable address.
- Anycast and traffic engineering: Inside an enterprise network a service address can be advertised as a /32 from several places. On the public internet most providers do not accept IPv4 prefixes more specific than /24; /32 announcements are typically internal or sent to a provider for special purposes such as DDoS blackholing (RTBH).
Loopback Interfaces and /32
A loopback is a virtual interface that is not tied to a physical port. It stays "up" as long as the device is running; a cut cable or a failed port does not affect it. Since it does not share a network with neighbours, a single /32 is the cleanest way to address it:
- OSPF router ID: On Cisco IOS, if no router ID is configured, the highest loopback IP is chosen, or the highest active interface IP if there is no loopback. OSPF advertises loopback addresses as /32 by default.
- BGP peering: Building the session on the loopback instead of a physical interface (
update-source) keeps it up when one of several paths fails. - Management access: Whichever path you come in on, you always SSH to the device at the same /32.
/32 in Firewalls, ACLs and Cloud Rules
Rules that target a single IP are the most common use of /32:
- Cisco ACL: The
hostkeyword inaccess-list 10 permit host 198.51.100.44means the same as a 0.0.0.0 wildcard, i.e. a /32. - Firewall management rules: Used to open the management interface to the administrator's IP only.
- Cloud security groups: In AWS security groups you must write a single IP in CIDR form, e.g.
198.51.100.44/32. For example, SSH (port 22) can be opened only to the office's public IP.
Note: if your source IP is dynamic (home broadband, mobile), a /32 rule breaks every time the IP changes. A VPN or identity-based access is a better fit in that case.
/30, /31 or /32? Point-to-Point Link Comparison
On point-to-point links between two routers, the prefix you choose determines how many addresses you consume:
| Prefix | Mask | Total | Usable | Typical use |
|---|---|---|---|---|
| /30 | 255.255.255.252 | 4 | 2 | Classic point-to-point link |
| /31 | 255.255.255.254 | 2 | 2 (RFC 3021) | Modern point-to-point link |
| /32 | 255.255.255.255 | 1 | One address | Host route, loopback, rule |
- /30: 2^2 = 4 addresses. The network and broadcast addresses are reserved, leaving 2 usable. Example: 10.0.0.0/30 → network 10.0.0.0, hosts 10.0.0.1–10.0.0.2, broadcast 10.0.0.3. Two addresses are wasted on every link.
- /31: 2^1 = 2 addresses. Under RFC 3021, point-to-point links have no network/broadcast split and both addresses are usable. Example: 10.0.0.0/31 → 10.0.0.0 and 10.0.0.1 go to the two routers. Address use per link is halved compared with /30.
- /32: 2^0 = 1 address. It cannot number a link that needs two ends, because there is no second address.
Rule of thumb: /31 for links (/30 if the device does not support RFC 3021), /32 for a single address.
/32 in the Subnet Calculator: Step by Step
- Open the IPv4 subnet calculator.
- Enter
192.168.1.130/32. - Check the results:
- Network address: 192.168.1.130
- Last address: 192.168.1.130 (one address, both roles)
- Subnet mask: 255.255.255.255, wildcard: 0.0.0.0
- Total addresses: 1
- In the binary view of
11000000.10101000.00000001.10000010the network/host boundary sits at the far right, after bit 32; no host bits remain. - For comparison, also run the built-in examples
10.0.0.0/31 (RFC 3021)and10.0.0.1/30 (WAN).
To see every /32 value on one page, visit the /32 subnet page. All calculations run in your browser; the addresses you enter are never sent to a server.
Frequently Asked Questions (FAQ)
How many usable hosts are in a /32? →
One address. There is no separate network or broadcast address, so the 2^n − 2 formula does not apply; a /32 is that IP address itself.
Is a /32 really a "network"? →
It is a valid one-address prefix and, as the most specific match, always wins over shorter prefixes in routing. It is not a subnet that holds devices.
Should I use /31 or /30 on a point-to-point link? →
Use /31 if your devices support RFC 3021: both addresses are usable and address consumption is halved. If they do not, /30 is the safe choice.
Isn't 255.255.255.255 a broadcast address? →
As a destination address, 255.255.255.255 is the limited broadcast address. As a mask, it means /32, a single-address block. The two uses are different.
Why give a loopback interface a /32? →
A loopback is not a physical port and shares no network with neighbours. A larger block would waste addresses; a single /32 is enough and keeps the routing table clean.