Explain declared route selection
Compare a declared IPv4/IPv6 route table against destinations; retain longest-prefix and metric decisions, equal-rank candidates, terminal actions and every comparison.
Manually structure one static table from native route text. The tool explains the declared ranking; cache, redirects and live policy require actual system review.
No result yet
Before you start
Compare a declared IPv4/IPv6 route table against destinations; retain longest-prefix and metric decisions, equal-rank candidates, terminal actions and every comparison.
How to use this tool
- Choose paste or file mode.
- Provide declared routes and destinations.
- Inspect every comparison and all equal-rank candidates.
- Download originals and full JSON/CSV before checking actual system state.
Supported inputs and limits
Explicit paste or one UTF-8 JSON file mode; only the selected mode is processed. Raw input is at most 1 MiB. BOM, malformed UTF-8, duplicate keys and lossy numbers refuse.
1–4096 routes and 1–256 destinations; their product is at most 16384. id/interface use 1–128 UTF-16 units; metric is an integer 0–4294967295 and hopLimit an integer 0–255.
unicast, blackhole, unreachable and prohibit are supported. A unicast nextHop must have the same family. CIDR host-bit normalization is recorded; IPv4-mapped IPv6 stays IPv6.
Rank by longest prefix, then lowest metric. Keep every equal-rank candidate; order and hopLimit never resolve a tie. Mixed terminal actions remain explicit.
All complete JSON, CSV, original and copy text total at most 16 MiB. CSV prefixes formula-leading cells with an apostrophe; JSON and original preserve values. Over-budget work refuses atomically.
The declared table omits actual policy, cache, redirects, interface state and packet-level ECMP. It cannot establish or repair a live packet path.
Native route text requires manual structuring into the declared JSON fields. This tool reads one static table and cannot repair a live route, cache, redirect or policy.
Only the active paste/file source is processed. Active filenames allow 512 UTF-8 bytes and MIME labels 128; strict byte-exact originals and provenance SHA256 remain downloadable.
A whole 10-second absolute deadline starts before metadata validation and native file reading and continues through Worker loading and publication. Cancel, timeout or a source change clears every old artifact; retain the same complete source to rerun.
Complete JSON report, formula-safe CSV, original and copy total 16 MiB. Output sizes are reserved before large serialization; typed report/table JSON has a separate 16 MiB work cap. No partial output is published.
Worked example
Example input
{"routes":[{"id":"=default","cidr":"10.0.0.1/0","metric":100,"type":"unicast","nextHop":"10.0.0.1","interface":"网卡😀","hopLimit":64},{"id":"local","cidr":"10.0.0.0/24","metric":1,"type":"unicast"},{"id":"blocked","cidr":"2001:db8::/32","metric":0,"type":"blackhole"}],"destinations":["10.0.0.2","2001:db8::1","192.0.2.1"]}
Example options
{"sourceMode":"paste"}Example output
{
"schema": "neatbo-static-routes/1",
"model": "single-declared-table-longest-prefix-then-lowest-unsigned-metric",
"routeCount": 3,
"destinationCount": 3,
"comparisonCount": 9,
"routes": [
{
"index": 0,
"id": "=default",
"source": {
"id": "=default",
"cidr": "10.0.0.1/0",
"metric": 100,
"type": "unicast",
"nextHop": "10.0.0.1",
"interface": "网卡😀",
"hopLimit": 64
},
"family": "ipv4",
"network": "0.0.0.0",
"prefix": 0,
"cidr": "0.0.0.0/0",
"hostBitsNormalized": true,
"metric": 100,
"type": "unicast",
"nextHop": "10.0.0.1",
"interface": "网卡😀",
"hopLimit": 64
},
{
"index": 1,
"id": "local",
"source": {
"id": "local",
"cidr": "10.0.0.0/24",
"metric": 1,
"type": "unicast"
},
"family": "ipv4",
"network": "10.0.0.0",
"prefix": 24,
"cidr": "10.0.0.0/24",
"hostBitsNormalized": false,
"metric": 1,
"type": "unicast",
"nextHop": null,
"interface": null,
"hopLimit": null
},
{
"index": 2,
"id": "blocked",
"source": {
"id": "blocked",
"cidr": "2001:db8::/32",
"metric": 0,
"type": "blackhole"
},
"family": "ipv6",
"network": "2001:db8::",
"prefix": 32,
"cidr": "2001:db8::/32",
"hostBitsNormalized": false,
"metric": 0,
"type": "blackhole",
"nextHop": null,
"interface": null,
"hopLimit": null
}
],
"results": [
{
"index": 0,
"source": "10.0.0.2",
"family": "ipv4",
"canonical": "10.0.0.2",
"bestPrefix": 24,
"bestMetric": 1,
"decision": "forward",
"tie": false,
"selectedRouteIndexes": [
1
],
"comparisons": [
{
"routeIndex": 0,
"id": "=default",
"matched": true,
"selected": false,
"reason": "shorter-prefix"
},
{
"routeIndex": 1,
"id": "local",
"matched": true,
"selected": true,
"reason": "best-prefix-and-metric"
},
{
"routeIndex": 2,
"id": "blocked",
"matched": false,
"selected": false,
"reason": "different-family"
}
]
},
{
"index": 1,
"source": "2001:db8::1",
"family": "ipv6",
"canonical": "2001:db8::1",
"bestPrefix": 32,
"bestMetric": 0,
"decision": "blackhole",
"tie": false,
"selectedRouteIndexes": [
2
],
"comparisons": [
{
"routeIndex": 0,
"id": "=default",
"matched": false,
"selected": false,
"reason": "different-family"
},
{
"routeIndex": 1,
"id": "local",
"matched": false,
"selected": false,
"reason": "different-family"
},
{
"routeIndex": 2,
"id": "blocked",
"matched": true,
"selected": true,
"reason": "best-prefix-and-metric"
}
]
},
{
"index": 2,
"source": "192.0.2.1",
"family": "ipv4",
"canonical": "192.0.2.1",
"bestPrefix": 0,
"bestMetric": 100,
"decision": "forward",
"tie": false,
"selectedRouteIndexes": [
0
],
"comparisons": [
{
"routeIndex": 0,
"id": "=default",
"matched": true,
"selected": true,
"reason": "best-prefix-and-metric"
},
{
"routeIndex": 1,
"id": "local",
"matched": false,
"selected": false,
"reason": "outside-prefix"
},
{
"routeIndex": 2,
"id": "blocked",
"matched": false,
"selected": false,
"reason": "different-family"
}
]
}
],
"sourceInputs": [
{
"role": "routes",
"kind": "paste",
"name": "routes-pasted.json",
"mime": "application/json",
"bytes": 329,
"sha256": "8317ee00408584deebeffc4a20b9de2c0cab7cdd0e21f9790aebdc07ce730795"
}
],
"inputBytes": 329,
"sourceCount": 1
}
When something does not work
Keep the original declaration; correct addresses, fields or value ranges. Split destinations if the budget is exceeded. No partial report is delivered after failure or cancellation; retry the same input.
Frequently asked questions
Does hopLimit change ranking?
No. It is retained as an attribute but is not a ranking key in this model.
Is the first equal-rank route chosen?
No. All equal-rank candidates and action ambiguity remain; packet selection needs actual-system information.
Documentation & further reading
Related tools
IPv4 subnet and netmask calculator
Calculate IPv4 subnet boundaries and usable endpoints, or convert a netmask and prefix.
IP range to CIDR
Turn an inclusive IPv4 address range into the smallest exact list of CIDR blocks.
Aggregate CIDR blocks
Reduce an IPv4 CIDR list without changing its address coverage.
IPv4 number converter
Convert one IPv4 address between dotted decimal, unsigned integer and 32-bit binary.