Find Network for /31 Point-to-Point
Advanced IdentifyQuestion
Given the IP address 10.255.255.1 with a /31 prefix length, identify the network address, the broadcast address (or explain why it does not apply), the two usable addresses, and the total host count. Reference RFC 3021 in your answer.
Given
{
"ip": "10.255.255.1",
"prefix": 31
}
Answer
{
"network": "10.255.255.0",
"broadcast": "N/A (point-to-point)",
"first_host": "10.255.255.0",
"last_host": "10.255.255.1",
"host_count": 2
}
Try to solve it first, then click Reveal Answer
Step-by-Step Explanation
Step 1: Convert /31 to a subnet mask
31 network bits, 1 host bit:
Binary: 11111111.11111111.11111111.11111110
Decimal: 255 .255 .255 .254
Step 2: Find the network address
Block size = 256 − 254 = 2.
Network boundaries in the last octet: 0, 2, 4, …, 254.
10.255.255.1: last octet is 1. 1 ÷ 2 = 0.5 → floor to 0 → block start = 0.
Binary verification:
IP address: 10.255.255. 1 → 00001010.11111111.11111111.00000001
Subnet mask: 255.255.255.254 → 11111111.11111111.11111111.11111110
AND ─────────────────────────────────────
Network: 10.255.255. 0 → 00001010.11111111.11111111.00000000
Step 3: The /31 exception — RFC 3021
In traditional subnetting, a /31 would leave only 2^1 − 2 = 0 usable hosts (both addresses consumed by network and broadcast), making it useless.
RFC 3021 (January 2001) defines a special case: for point-to-point links, a /31 subnet is valid and both addresses (.0 and .1) are usable as host addresses. There is no network address and no broadcast address in this context.
10.255.255.0 → assigned to Router A interface
10.255.255.1 → assigned to Router B interface
This is commonly used on router-to-router WAN links (leased lines, MPLS PE-CE links) to conserve IP address space compared to a /30 (which wastes 2 addresses on network/broadcast).
Step 4: Comparison with /30
| Attribute | /30 | /31 (RFC 3021) |
|---|---|---|
| Total addresses | 4 | 2 |
| Network address | Yes | No |
| Broadcast address | Yes | No |
| Usable hosts | 2 | 2 |
| Wasted addresses | 2 | 0 |
Summary
| Field | Value |
|---|---|
| Network | 10.255.255.0 |
| Broadcast | N/A (point-to-point per RFC 3021) |
| First host | 10.255.255.0 |
| Last host | 10.255.255.1 |
| Usable hosts | 2 |