/31 Subnet Mask
A /31 prefix means the subnet mask is 255.255.255.254. It has 1 host bits, giving 2 total addresses and 2 usable hosts.
/31 at a glance
| Property | Value |
|---|---|
| CIDR prefix | /31 |
| Subnet mask | 255.255.255.254 |
| Wildcard mask | 0.0.0.1 |
| Total addresses | 2 |
| Usable hosts | 2 (RFC 3021 point-to-point) |
| Host bits | 1 |
How it is calculated
A /31 sets the first 31 bits to 1 (network) and the remaining 1 bits to 0 (host). Usable hosts = 21 − 2 = 2 (special case)..
The wildcard mask 0.0.0.1 is the inverse — used in Cisco ACLs and OSPF network statements.
Frequently asked questions
What is a /31 subnet mask?
A /31 equals 255.255.255.254 in dotted decimal (wildcard 0.0.0.1). It provides 2 total addresses and 2 usable hosts.
How many hosts are in a /31?
A /31 has 1 host bits, so it supports 2 usable hosts.
What is the wildcard mask for /31?
The wildcard (inverse) mask for /31 is 0.0.0.1, used in Cisco ACLs and OSPF statements.
Related
Learn networking hands-on
Master IP addressing, subnetting and Cisco configuration on real lab devices with placement support at Attila Technologies, Ahmedabad.