/31 Subnet Mask (255.255.255.254)
| Prefix | /31 |
|---|---|
| Subnet mask | 255.255.255.254 |
| Wildcard mask | 0.0.0.1 |
| Binary mask | 11111111.11111111.11111111.11111110 |
| Total addresses | 2 |
| Usable hosts | 2 |
| Host bits | 1 |
| Subnets of /31 in a /24 | 128 |
| Block size | 2 addresses |
e.g. 10.0.0.5/22 or 10.0.0.5 255.255.252.0
| Network address | 192.168.1.0 | |
|---|---|---|
| Broadcast address | None (/31 point-to-point) | |
| First usable host | 192.168.1.0 | |
| Last usable host | 192.168.1.1 | |
| Total addresses | 2 | |
| Usable hosts | 2 (point-to-point, RFC 3021) | |
| Subnet mask | 255.255.255.254 | |
| Wildcard mask | 0.0.0.1 | |
| CIDR notation | 192.168.1.0/31 | |
| IP class | Class C (legacy) | |
| Address type | Private (RFC 1918) | |
| IP address (binary) | 11000000.10101000.00000001.00000000 | |
| Subnet mask (binary) | 11111111.11111111.11111111.11111110 |
■ network bits ■ host bits
| Requested hosts | CIDR | First host | Last host | Broadcast | Usable hosts |
|---|
Runs entirely in your browser. Nothing you enter is sent to a server.
What is a /31 subnet?
A /31 subnet uses the first 31 bits of an IPv4 address for the network and leaves 1 bits for hosts. Its subnet mask is 255.255.255.254, and it contains 2¹ = 2 addresses, of which 2 can be assigned to devices. Typical use: Point-to-point links under RFC 3021: both addresses usable, no broadcast. Use the subnet calculator above to check any /31 network.
/31 subnet example
For 192.168.1.0/31: usable hosts 192.168.1.0 – 192.168.1.1 (RFC 3021), no broadcast address, wildcard mask 0.0.0.1.
Frequently asked questions
How many usable IPs are in a /31?
2. Under RFC 3021 both addresses of a /31 can be used on a point-to-point link; there is no network or broadcast address.
What is the subnet mask for /31?
255.255.255.254, or 11111111.11111111.11111111.11111110 in binary.
How many /31 subnets are in a /24?
128 (2⁷), because a /31 uses 7 more network bits than a /24.
What is the difference between /31 and /30?
A /30 (255.255.255.252) is twice as large: 4 addresses and 2 usable hosts, spanning two consecutive /31 blocks such as 192.168.1.0–192.168.1.3.