Traditional BGP has no built-in way to cryptographically verify whether an autonomous system is authorized to originate an IP prefix. Operators can filter with prefix lists, AS_PATH filters and IRR data, but those filters are only as good as the data behind them, and plenty of networks don’t apply them consistently. Without the right routing policies and validation, an incorrect or malicious announcement can spread across the Internet within minutes. The 2008 incident where Pakistan Telecom’s more-specific announcement of a YouTube prefix leaked globally is still the classic example.
RPKI (Resource Public Key Infrastructure) fills that gap for the most common case. It gives address holders a cryptographic way to say “this prefix may only be originated by this ASN,” and gives routers a way to check BGP announcements against those statements.
Is RPKI a BGP thing or an ASN thing?
Both are involved, but RPKI is a BGP security technology. ASNs are one of its two key inputs.
- What it protects: BGP route announcements. The point is to let networks identify, and if they choose, reject routes that weren’t authorized.
- What it binds together: an IP prefix and the ASN authorized to originate it. That binding is called a Route Origin Authorization (ROA).
- Where it’s heading: ASPA (Autonomous System Provider Authorization) adds records about AS-to-AS provider relationships, so routers can evaluate the AS_PATH and not just the origin. Its goal is still BGP security.
Think of the ASN as the name on an ID card and RPKI as the system that issues and checks those cards. BGP is where the cards get checked.
Who does what
It’s easy to blur these together, so it’s worth separating them before going further. In particular, validating a route and acting on that result are two different steps.
| Component | Responsibility |
|---|---|
| RPKI | Cryptographic certification of who holds which IP prefixes and ASNs |
| ROA | Authorizes an ASN to originate specific prefixes |
| Validator | Checks the signed RPKI objects and produces validated data |
| RTR | Delivers validated data from the validator to routers |
| ROV | Assigns each route a validation state: Valid, Invalid or NotFound |
| Routing policy | Decides what happens to the route based on that state (and everything else) |
The building blocks
RPKI is an X.509 certificate hierarchy that follows the way IP addresses and ASNs are allocated. Each of the five Regional Internet Registries (RIRs) runs a trust anchor. The RIR issues resource certificates to its members that list the Internet number resources they hold authority over. That’s authority to use the resources in routing, not legal ownership.
The member’s certificate authority (CA) doesn’t sign ROAs directly. For each ROA or ASPA object, the CA issues an end-entity (EE) certificate covering the relevant Internet number resources, and the associated private key signs the object. For a ROA, the authorized prefixes must fall within the EE certificate’s resources; the authorized ASN itself isn’t listed in the EE certificate. In practice the RIR portal handles all of this for you, but it’s why validators talk about “EE certificates” in their logs.

| Object | What it does | Who creates it |
|---|---|---|
| Trust Anchor Locator (TAL) | Tells a validator where to fetch an RIR’s root certificate and which public key to expect. | Each RIR; bundled with validator software |
| Resource certificate | Certifies that the holder has authority over specific prefixes and ASNs. | The RIR (or a parent CA) for each member |
| ROA | Authorizes one ASN to originate one or more prefixes, each with an optional maxLength. |
The address holder, in the RIR portal or its own CA |
| AS0 ROA | Signals that a prefix should not be originated. Useful for space you hold but don’t route. It isn’t an unconditional block: a route can still be Valid if another covering VRP authorizes its origin ASN and prefix length. | The address holder |
| Manifest and CRL | List every object a CA has published and every certificate it has revoked, so objects can’t be silently removed or replayed. | Each CA, automatically |
| ASPA | Lists the upstream providers of an ASN, so routers can evaluate AS_PATHs for leaks. Still an IETF draft. | The ASN holder |
Most networks use hosted RPKI: the RIR runs the CA and you create ROAs in its web portal. Larger operators sometimes run delegated RPKI, operating their own CA (NLnet Labs’ Krill is a common choice) under the RIR’s certificate.
How RPKI data reaches your routers
Routers don’t do the cryptography. That work happens on a separate server called a relying party or validator, which you run yourself.
- Publish. RIRs and delegated CAs publish signed objects in public repositories.
- Validate. Your validator downloads everything (over RRDP, with rsync as a fallback), checks each signature back to the trust anchors, and turns valid ROAs into Validated ROA Payloads (VRPs). Each VRP is just a prefix, a maxLength and an origin ASN. Valid ASPA objects become a separate set of provider-authorization data.
- Enforce. Your routers pull that data from the validator over the RPKI-to-Router (RTR) protocol, assign each received route a validation state, and apply your import policy before best-path selection.

| Protocol | Runs between | Transport | Standard |
|---|---|---|---|
| RRDP | Repository → validator | HTTPS (TCP 443) |
RFC 8182 |
| rsync | Repository → validator (fallback) | TCP 873 |
RFC 6480 and related |
| RTR v1 | Validator → router | IANA-registered TCP 323; many validators default to 3323 or 8282. SSH and TLS transports also exist. |
RFC 8210 |
| RTR v2 | Validator → router, adds ASPA data | Same as RTR v1 | draft-ietf-sidrops-8210bis |
Validator software
| Software | Maintainer | Notes |
|---|---|---|
| Routinator | NLnet Labs | Written in Rust. Has a built-in RTR server and HTTP API, plus Prometheus metrics. |
| rpki-client | OpenBSD project | Written in C, very strict about the standards. Outputs VRP files; pair it with StayRTR (or OpenBGPD) to serve RTR. |
| FORT | NIC México / LACNIC | Written in C, with a built-in RTR server. |
| StayRTR | Community fork of Cloudflare’s GoRTR | An RTR server only. Reads a VRP JSON file and serves it to routers. |
When validators fail
If all of a router’s RTR sessions fail, it keeps using the validation data it already has until the expiration timers run out. After that, routes that were Valid or Invalid fall back to NotFound. Under the usual reject-Invalid-only policy, that’s a fail-open condition: reachability is preserved, but origin validation protection is gone, and nothing visibly breaks to tell you.
That’s why you should run at least two validators, ideally different implementations on different hosts, point every router at both, and monitor:
- RTR session state on every router
- VRP counts, with alerts on sudden drops or jumps
- Repository synchronization errors on the validators
- How fresh the validated data is, compared with the RTR expiration timers
- Differences in output between your validator implementations
Route Origin Validation (ROV)
Once a router has VRPs, it assigns every received route one of three states, as defined in RFC 6811 and clarified in RFC 8481. The origin AS is the rightmost ASN in the AS_PATH.

| State | Meaning | Recommended policy |
|---|---|---|
| Valid | At least one VRP covers the prefix, matches the origin AS, and allows the prefix length. | Accept, subject to your normal import filters |
| Invalid | One or more VRPs cover the prefix, but none of them match both the origin AS and the length. | Reject |
| NotFound | No VRP covers the prefix. Usually that means no ROA exists, but a ROA may also have expired, failed validation, or not reached your validator yet. | Accept, subject to your normal import filters. Rejecting NotFound would cut off a large share of the Internet. |
Valid doesn’t mean “safe to accept.” A Valid route still has to pass your prefix filters, AS_PATH filters, max-prefix limits and everything else in your import policy.
Worked examples
Assume the only relevant VRP is 198.18.0.0/22, maxLength 22, origin AS64500.
| Announced prefix | Origin AS | Result | Why |
|---|---|---|---|
198.18.0.0/22 |
AS64500 |
Valid | Prefix, length and origin all match. |
198.18.0.0/22 |
AS64511 |
Invalid | The prefix is covered but the origin AS is wrong. This is a classic hijack or fat-finger. |
198.18.1.0/24 |
AS64500 |
Invalid | The origin is right, but /24 is longer than the maxLength of 22. Your own deaggregation or DDoS-mitigation announcements fail here if you haven’t planned for them. |
198.18.0.0/21 |
AS64500 |
NotFound | The /22 VRP doesn’t cover a shorter /21. |
192.0.2.0/24 |
AS64500 |
NotFound | No VRP covers this prefix. |
What it looks like when a hijack is blocked

Many networks filter IPv4 announcements longer than /24, which is why the example uses a /22 aggregate and a /24 more-specific. Networks that accept and install the unauthorized /24 will forward matching traffic toward it by longest-prefix match, no matter how good the AS_PATH of the legitimate /22 is. Networks that enforce reject-Invalid prevent the unauthorized route from being selected locally or propagated to their downstream neighbors. That’s also why creating ROAs helps you even if you never enforce ROV yourself: other networks do the enforcing.
The maxLength trap
It’s tempting to create one ROA like 198.18.0.0/22 maxLength 24 “just in case” you ever need to announce more-specifics. That opens a hole.

ROV only checks the origin AS, and anyone can put your ASN at the end of their AS_PATH. If your ROA allows a /24 that you don’t actually announce, an attacker can announce that /24 with a forged path ending in your ASN. It shows up as Valid, and anywhere it’s accepted, longest-prefix match sends that traffic to the attacker. With a minimal ROA, the attacker can only forge your exact /22, which then has to compete with your real route in normal BGP best-path selection instead of winning outright. RFC 9319 recommends against broad maxLength values. Explicitly authorize the prefixes you announce during normal operations, plus any you’ve planned for contingencies such as DDoS mitigation or a scheduled routing change, and nothing more.
Deploying RPKI, step by step
Step 1: Create ROAs for your address space
- Log in to your RIR portal (ARIN Online, RIPE NCC LIR Portal, MyAPNIC and so on) and turn on hosted RPKI.
- Get a list of exactly what you announce today from your routers or a looking glass, including any more-specifics and anything announced by a DDoS-scrubbing provider on your behalf.
- Create one ROA entry per prefix and origin ASN, with maxLength equal to the prefix length. Cover what you announce in normal operations and any more-specifics you’ve planned for contingencies, such as DDoS mitigation.
- If customers announce your space from their own ASNs, create ROAs authorizing their ASNs, too.
- Create AS0 ROAs for space you hold but don’t route. Remember that any other ROA covering the same space can still make a route Valid.
- Check your routes on a looking glass or an RPKI checker. They should show as Valid.
Step 2: Run your validators
A minimal Routinator setup that serves RTR on port 3323 and metrics on port 8323:
# Install from the NLnet Labs package repo, then:
routinator server --rtr 0.0.0.0:3323 --http 0.0.0.0:8323
# Spot-check one route against the current VRP set
routinator validate --asn 64500 --prefix 198.18.0.0/22
# Dump every VRP the validator currently trusts
routinator vrps --format csv
The validate example uses illustrative addresses, so against the live RPKI it may return NotFound or Invalid, depending on the validator’s current data. Substitute one of your own prefixes and ASNs to see a real result. Lock down the RTR port so only your routers can reach it, and monitor the validator like any other critical service.
Step 3: Connect routers and apply policy
Before connecting a production router to a validator, check the platform’s default origin-validation behavior. On some platforms and releases, simply establishing an RTR session changes best-path selection or route eligibility, even before you’ve written any policy. The examples below follow common published practice, but they haven’t been tested against a specific software release. Confirm them against your platform’s documentation and in a lab first.
Juniper Junos
routing-options {
validation {
group RPKI-VALIDATORS {
session 192.0.2.10 {
port 3323;
refresh-time 600;
}
session 192.0.2.11 {
port 3323;
refresh-time 600;
}
}
}
}
policy-options {
policy-statement RPKI-ROV {
term reject-invalid {
from {
protocol bgp;
validation-database invalid;
}
then {
validation-state invalid;
reject;
}
}
term mark-valid {
from {
protocol bgp;
validation-database valid;
}
then {
validation-state valid;
next policy;
}
}
then {
validation-state unknown;
next policy;
}
}
}
protocols {
bgp {
group TRANSIT {
import [ RPKI-ROV TRANSIT-IN ];
}
}
}
Cisco IOS XR
router bgp 64500
rpki server 192.0.2.10
transport tcp port 3323
refresh-time 600
!
rpki server 192.0.2.11
transport tcp port 3323
refresh-time 600
!
neighbor 198.51.100.1
remote-as 64496
address-family ipv4 unicast
route-policy EBGP-IN in
!
route-policy RPKI-ROV
if validation-state is invalid then
drop
endif
end-policy
!
route-policy EBGP-IN
apply RPKI-ROV
# ...the rest of your inbound filters...
pass
end-policy
On some older IOS XR releases you also need bgp origin-as validation enable under the address family before validation-state works in a route policy.
Cisco IOS and IOS XE
On IOS and IOS XE, validation state feeds into best-path selection as soon as an RPKI server is configured. That can cause inconsistent decisions and even routing loops between iBGP speakers. A common approach, recommended by the NLNOG BGP Filter Guide, is to turn that built-in behavior off and enforce ROV explicitly in a route-map instead:
router bgp 64500
bgp rpki server tcp 192.0.2.10 port 3323 refresh 600
bgp rpki server tcp 192.0.2.11 port 3323 refresh 600
!
address-family ipv4
bgp bestpath prefix-validate disable
neighbor 198.51.100.1 route-map EBGP-IN in
exit-address-family
!
route-map EBGP-IN deny 10
match rpki invalid
!
route-map EBGP-IN permit 20
! ...the rest of your inbound filters...
These Cisco commands do different things and aren’t interchangeable:
| Command | Effect |
|---|---|
bgp bestpath prefix-validate disable |
Stops validation state from influencing best-path selection. Operator guides use it alongside match rpki invalid in route-maps, but Cisco’s documentation describes it as disabling prefix validation more broadly. Confirm in a lab that route-map matching still works on your release. |
bgp bestpath prefix-validate allow-invalid |
Lets Invalid routes be considered for best path. Operators have reported that validation state can still influence path selection with this set. |
neighbor address announce rpki state |
Signals validation state to iBGP neighbors in an extended community. Current IETF guidance prefers having each router get its data directly from validators instead. |
Step 4: Roll out in stages
- Observe. Connect the routers and tag routes by validation state without changing which routes are accepted. On Cisco IOS XE, that means disabling the built-in best-path behavior first. Look at what would be dropped.
- Investigate. Most Invalids are stale or wrong ROAs. Contact the owners of anything important, especially customer routes.
- Enforce. Reject Invalid on transit and peering sessions first, then customer sessions. Don’t reject NotFound.
Verification commands
| Platform | Command | What it shows |
|---|---|---|
| Junos | show validation session |
RTR session state and record counts for each validator |
show validation database |
The VRPs the router has received | |
show route validation-state invalid |
Routes currently marked Invalid | |
| IOS XR | show bgp rpki server summary |
RTR session state for each validator |
show bgp 198.18.0.0/22 |
Path details, including the origin-AS validity for each path | |
| IOS XE | show bgp ipv4 unicast rpki servers |
RTR session state and record counts |
| Routinator | routinator validate --asn 64500 --prefix 198.18.0.0/22 |
The validation result for one route against the current VRPs |
Command names and output vary between software releases, so check your platform documentation.
Common mistakes
| Mistake | What happens | Fix |
|---|---|---|
| ROA created for the aggregate, but more-specifics are also announced | Your own more-specifics become Invalid and are rejected by every network enforcing ROV. | Add an explicit ROA entry for every announced prefix. |
Loose maxLength |
Forged-origin more-specifics are Valid. | Set maxLength to the prefix length and explicitly authorize only the prefixes you announce or have planned for (RFC 9319). |
| Forgetting a DDoS-scrubbing provider | Mitigation announcements from the provider’s ASN are Invalid exactly when you need them. | Create ROAs for the provider’s ASN and the prefixes it might announce, before an attack. |
| Rejecting NotFound | A large share of the Internet becomes unreachable. | Reject Invalid only. |
| Connecting IOS XE routers to a validator during “observe” mode | Best-path selection changes immediately, before any policy has been reviewed. | Configure bgp bestpath prefix-validate disable first and enforce in route-maps. |
| A single validator | When it fails, routers eventually lose their data and ROV silently fails open. | Run two or more validators, ideally different implementations, and monitor them. |
| Moving prefixes between ASNs without updating ROAs | The new origin is Invalid as soon as it’s announced. | Publish the new ROA, confirm it has reached independent validators, then move the BGP announcement. Remove the old ROA only after the migration is confirmed. RPKI changes can take much longer to propagate than BGP updates, so build that into change windows and emergency DDoS procedures. |
What ROV doesn’t do, and where ASPA fits
ROV checks one thing: whether the origin AS is authorized to originate the prefix. It doesn’t look at the rest of the AS_PATH, so it can’t catch:
- Forged-origin hijacks of exactly the prefix length in your ROA, where an attacker adds your ASN to the end of their own path.
- Route leaks, where a network passes routes to someone it shouldn’t. The classic case is a multi-homed customer re-advertising one provider’s routes to another provider. If a ROA covers the route and the origin is correct, ROV marks it Valid.
ASPA targets both. Each AS publishes a signed list of its upstream providers. Routers can then evaluate an AS_PATH against those published customer-to-provider authorizations and identify certain route leaks and forged paths that pass ROV. A normal path goes up through providers and then down through customers. A path that goes down and then back up is a leak. ASPA checks whether a path is plausible given the published relationships. It doesn’t cryptographically prove that the route actually traveled that path.

This example assumes a ROA authorizes AS64496 to originate 198.51.100.0/24. Notice that the leak is caught by AS64510’s ASPA record, not the leaking customer’s. ASPA gets stronger as more networks publish, so it’s worth creating your ASPA record even before you can enforce it.
ASPA isn’t the only leak defense. BGP Roles (RFC 9234) let two neighbors agree on their relationship when the session comes up and mark routes with an Only-to-Customer (OTC) attribute, which stops many leaks at the point where they’d happen. The two approaches complement each other.
| Capability | ROV | ASPA | BGPsec |
|---|---|---|---|
| Origin authorization | Yes | No | No (used alongside ROV) |
| Prefix-length authorization | Yes | No | No (used alongside ROV) |
| AS_PATH relationship checks | No | Yes | No |
| Cryptographic AS_PATH verification | No | No | Yes |
| Unauthorized-origin hijacks | Mitigates | No (relies on ROV) | Mitigates, with ROV |
| Forged-origin paths | No | Partially | Yes, for fully secured paths |
| Route leaks | No | Yes, for covered scenarios | Not inherently |
| Router-side cryptography | No | No | Yes, on every hop |
| Status | Standard (RFC 6811); widely deployed | IETF drafts; early deployment | Standard (RFC 8205); very little deployment |
As of late 2026, the ASPA verification and ASPA profile documents are still Internet-Drafts in the IETF SIDROPS working group, and routers need RTR v2 to receive ASPA data. Some RIRs, validators and open-source routing daemons already support ASPA, but check your vendor’s roadmap before planning enforcement.
Do enterprise networks need RPKI?
Publishing ROAs and enforcing ROV are separate decisions. Not every enterprise needs to run validators, especially if it only receives default routes from its providers. But almost every organization that originates public prefixes should publish ROAs.
| Connectivity model | Publish ROAs | Deploy ROV |
|---|---|---|
| Public ASN and provider-independent address space | Yes | Evaluate |
| Multi-homed Internet with full BGP tables | Yes | Recommended |
| Internet transit or IX peering | Yes | Recommended |
| Default-only Internet connectivity | Yes, if you originate public prefixes | Limited benefit |
| Private WAN or MPLS | Generally not applicable | Generally not applicable |
| Private cloud connectivity | Generally not applicable | Generally not applicable |
| BGP-based DDoS mitigation | Coordinate with the provider | As applicable |
RPKI belongs in an enterprise routing security architecture alongside existing controls, not in place of them. Prefix filtering, AS_PATH filtering, max-prefix limits, IRR-based filtering, routing policy and monitoring are all still needed. RPKI adds cryptographically verifiable origin authorization on top of them.
Where adoption stands in 2026
“RPKI adoption” can mean several different things, so the measures below aren’t directly comparable.
| What’s measured | Value | Source and date |
|---|---|---|
| Announced prefixes covered by a ROA | 67.16% (record high of 67.43% on June 29) | Hurricane Electric adoption report, July 26, 2026, as reported by Ipregistry |
| Routed prefixes classified as RPKI Valid | 70.3%, up from 54.0% a year earlier | IPinfo analysis of RIPE RIS and RouteViews data, September 2026 |
| Global IPv4 routes by ROV state | 60.3% Valid, 37.7% NotFound, 2.0% Invalid | APNIC, February 2026 |
| Networks rejecting Invalid routes | Most large transit providers; Sparkle (AS6762) joined in February 2026 |
IPinfo |
| ASNs publishing an ASPA record | 2.54% | Hurricane Electric adoption report, July 26, 2026, as reported by Ipregistry |
Because most large transit providers already reject Invalids, a ROA protects your prefixes today even if you never enforce ROV yourself. The reverse is also true: if you enforce ROV but haven’t created ROAs, you’re protecting everyone except yourself. Do both.
Quick checklist
- Create ROAs for every prefix you announce or have planned for contingencies, and avoid broad maxLength values.
- Include ROAs for customers’ and DDoS providers’ ASNs where needed.
- Create AS0 ROAs for unrouted space.
- Run at least two validators and monitor sessions, VRP counts and data freshness.
- Check each platform’s default ROV behavior before connecting it to a validator.
- Connect every eBGP router to both validators over RTR.
- Observe first, then reject Invalid. Don’t reject NotFound.
- Keep your existing prefix, AS_PATH and max-prefix filters in place.
- Publish your ASPA record once your RIR supports it.