You split off a new subnet, announce it over BGP, and part of the internet can reach it while the rest cannot. Upstream says the session is fine and the route is being sent. The usual cause is that the prefix is RPKI-invalid, and networks that drop invalid routes discard it without any error on your side. Most often the ROA for your larger block exists but its max length does not allow the more-specific prefix you just announced.
This guide covers how to check that from the command line, how to audit every prefix you announce, and how to make the check a quarterly task so the next subnet does not go missing the same way.
What the validator compares
A Route Origin Authorization (ROA) is a signed object that you create in your RIR's RPKI system (or your own delegated RPKI). It says that a given prefix may be originated by a given autonomous system number (ASN), up to a given max length. Validators download all ROAs and turn them into simple rules called VRPs (validated ROA payloads). Routers that do Route Origin Validation (ROV) compare each BGP announcement against those rules. The states are defined in RFC 6811.
- 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.
The second state is the trap. Once you create any ROA for your block, every announcement inside that block must match a ROA. Suppose your ROA says 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
The quickest outside check uses RIPEstat's public API. It validates a prefix and origin pair against the global RPKI data and returns the ROAs that matched. You need curl and jq. The example uses the documentation prefix and ASN, so substitute your own:
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}'
Read two things in the result. The status tells you whether the route is valid, invalid, or unknown (unknown is RIPEstat's word for NotFound). The list of validating ROAs shows which ROA covered the prefix, with its origin and max length. If the status is invalid and a ROA listed with your ASN has a max length shorter than the prefix you announced, you have found the problem. If the ROA lists a different ASN, the problem is the origin, not the length.
If you run your own relying-party software, you can ask it the same question so you are not relying on a third party. Routinator, for example, has a 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:
routinator validate --asn AS64500 --prefix 2001:db8:100::/48
The two sources will not always agree right after a change. Each validator refreshes on its own schedule, and RIPEstat may briefly show a different picture than your local cache. That timing matters when you check a fix, as described below.
Audit every prefix you announce
One prefix is easy to check. The reason subnets get silently dropped is that nobody compares the full list of announcements against the ROAs after the network grows. This script asks RIPEstat for every prefix currently seen originated by your ASN, validates each one, and prints one line per prefix. It only reads data and makes no changes:
#!/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"
done
Anything that does not say valid deserves a look. Unknown means no ROA covers the prefix, which is a gap but not a drop risk today. Invalid means some networks are discarding the route right now.
This audit has a blind spot. It only lists prefixes that RIPE's route collectors can see. A subnet that is invalid and filtered by most networks may show up in the collector data only partly, or not at all. The authoritative list of what you intend to announce is your own router configuration or IPAM (IP address management) records, not a public collector. For a complete audit, export the prefixes from your BGP configuration and feed that list into the same validation loop in place of the announced-prefixes call. The RIPEstat list is still useful as a cross-check, because it catches prefixes you announce without realizing it.
The same loop works before an announcement. When someone plans to bring up a new subnet, validate the planned prefix and ASN first. If the answer is invalid, fix the ROA and wait for it to propagate before the route goes live, rather than finding out from user reports afterwards.
Raise the max length or add a specific ROA
Once you know a max length is too short, there are two ways to fix it, and they are not equal.
The quick fix is to raise the max length on the existing ROA, for example from /32 to /48 on the IPv6 block. Every more-specific prefix down to that length becomes valid for your ASN, including subnets you have not announced yet. The cost is security. An attacker can announce one of those unused more-specifics with your ASN forged as the origin, and validators will mark it valid. Because routers prefer the more-specific route, that attack works against the very prefixes you meant to protect. RFC 9319 covers this and recommends that operators avoid a max length longer than the prefixes they actually announce.
The tighter fix is to keep the covering ROA as it is and add a separate ROA for the exact new prefix, with its max length equal to its own length. You end up with more ROA objects to manage. In return, every ROA describes something you really announce, and unused space stays protected.
As a rule of thumb, prefer specific ROAs for anything you announce long term. A wider max length can make sense when you deliberately de-aggregate at short notice, for example for traffic engineering or DDoS diversion. In that case, record the decision so the next quarterly review does not undo it.
If the problem is the origin ASN rather than the length, add a ROA for the correct ASN. A prefix can have more than one ROA, so a mitigation provider's ASN can be authorized alongside yours. Remove the old-ASN ROA only after the new announcement validates. Deleting a ROA is not destructive in the usual sense, but if you remove the wrong one, prefixes that are working now become invalid, so double-check before you delete.
Confirm the fix and repeat it each quarter
A ROA change is not instant. The new object has to be published, picked up by validators on their next refresh, and pushed to routers over RTR (the RPKI-to-router protocol). How long that takes depends on your RIR or hosted RPKI system and on each network's validator settings, so assume it can take a while. Re-run the single-prefix check until RIPEstat shows the route as valid. Then check that it is reachable from outside. A looking glass at a network known to drop invalid routes is a good test, as is a simple 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.