Field note / addressing bench
Find the range.
Then choose the route.
An IPv4 prefix fixes the leading bits of an address. A routing table selects the most specific matching prefix before comparing the metrics used in this simplified example.
Do not subtract two from every range
On an ordinary /24 broadcast subnet, reserving the network and directed-broadcast addresses leaves 254 host addresses. A /31 has two total addresses; on a point-to-point link both can identify endpoints. A /32 specifies exactly one address and commonly appears as a host route. A /0 matches all 2³² IPv4 addresses; that mathematical range is not a claim that all of them are assignable hosts.
Sources: RFC 4632 section 3.1, and RFC 3021 section 2.1 for point-to-point /31 behavior.
A high metric can still win
| Destination | Metric |
|---|---|
| 0.0.0.0/0 | 1 |
| 10.20.0.0/16 | 10 |
| 10.20.20.0/24 | 50 |
Try 10.20.21.80 and then 192.0.2.10. The first selects /16; the second falls back to /0. Metrics here break equal-prefix ties, then stable route IDs break equal-metric ties. Real routing platforms also distinguish route sources and policies; this table does not simulate those decisions or equal-cost multipath.
Background: RFC 1812 section 5.2.4. The public-address example 192.0.2.10 is within the RFC 5737 documentation range. The tool performs no network requests.