What the validator compares
- Valid: a VRP covers the prefix, the origin ASN matches, and the prefix length is within the max length.
- Invalid: at least one VRP covers the prefix, but none matches on both origin ASN and length.
- NotFound: no VRP covers the prefix at all.
2001:db8::/32, origin AS64500, max length /32, and you then announce 2001:db8:100::/48. The /48 is covered by the ROA but is longer than its max length, so the result is Invalid, not NotFound. The IPv4 version looks the same: a ROA for a /20 with max length /20, and a new /24 carved out of it.
The deployment write-up from Sky-Cloud calls max length mismatch the most common cause. The other frequent cause is a wrong origin ASN: the ROA names an ASN other than the one actually originating the route. This happens after moving to a new ASN, or when a DDoS-mitigation provider or a customer announces the space from their own ASN. APNIC's article Cleaning up your RPKI invalid routes covers both cases.
From a support desk the symptom is confusing. Some users connect and others time out, depending on whether their ISP filters invalid routes. Customers report it as intermittent, which sends people looking at firewalls and DNS first. If you are not yet sure your existing ROAs are correct at all, start with verifying RPKI ROA status step by step and come back here for the max length part.
Check one prefix and origin pair
curl and jq. The example uses the documentation prefix and ASN, so substitute your own:
BASH
curl -s 'https://stat.ripe.net/data/rpki-validation/data.json?resource=AS64500&prefix=2001:db8:100::/48' \
| jq '{status: .data.status, roas: .data.validating_roas}'validate subcommand that takes an ASN and a prefix and checks them against its current VRP set. Run routinator validate --help first, because flags have changed between releases:
BASH
routinator validate --asn AS64500 --prefix 2001:db8:100::/48Audit every prefix you announce
BASH
#!/usr/bin/env bash
# ROA audit: validate every prefix seen originated by ASN against RPKI.
set -euo pipefail
ASN="{1:?usage:0 AS64500}"
API='https://stat.ripe.net/data'
curl -s "{API}/announced-prefixes/data.json?resource={ASN}" \
| jq -r '.data.prefixes[].prefix' \
| sort -u \
| while read -r p; do
s=(curl -s "{API}/rpki-validation/data.json?resource={ASN}&prefix={p}" | jq -r '.data.status')
printf '%s\t%s
' "p" "s"
doneRaise the max length or add a specific ROA
Confirm the fix and repeat it each quarter
ping or traceroute from a few external vantage points.
Do the review every quarter, and also whenever the network changes: a new subnet, a new upstream, a new ASN, a new mitigation provider, or a customer bringing their own space. Each of those changes what you announce without changing your ROAs. Keep the audit script next to the BGP configuration and run it against the exported prefix list. Treat any invalid result as a ticket, and record any intentionally wide max length together with the reason it exists.
The practical takeaway: before any new prefix goes live, validate it with the origin ASN that will announce it. Once a quarter, run every prefix in your config through the same check. When a max length is too short, add a specific ROA for the new prefix rather than widening the old ROA by default.