/30 vs /31 for point-to-point links
A router-to-router link needs exactly two addresses. A /30 gives four and wastes two; a /31 gives two and wastes none.
The difference
| /30 | /31 | |
|---|---|---|
| Addresses per link | 4 | 2 |
| Usable hosts | 2 | 2 (RFC 3021) |
| Reserved addresses | 2 (network, broadcast) | 0 |
Address space used by many links
| Links | With /30 (addresses) | With /31 (addresses) | Saved |
|---|---|---|---|
| 1 | 4 | 2 | 2 |
| 10 | 40 | 20 | 20 |
| 50 | 200 | 100 | 100 |
| 100 | 400 | 200 | 200 |
| 500 | 2000 | 1000 | 1000 |
Worked example
You have 100 router-to-router links in a 10.0.0.0/24 block (256 addresses). With /30s, 100 links need 400 addresses, which does not fit. With /31s they need 200, which does, leaving 56 addresses free.
Questions
Is a /31 allowed on a point-to-point link?
RFC 3021 defines using a /31 on point-to-point links so both addresses can be used by the two ends. Check that your equipment supports it before you rely on it.
When should I still use a /30?
When a device on the link does not support /31 addressing, or when your documentation and tooling assume a network and broadcast address on every subnet.
Use it on your own numbers
Numbers on this page are calculated by formula when the site is built and are planning aids, not tax or engineering advice. How we check.