RPKI (Resource Public Key Infrastructure) is the system that cryptographically proves who holds which IP prefixes and AS numbers. A prefix holder signs a ROA stating which AS may announce the prefix, and other networks use route origin validation (ROV) to check the BGP routes they receive against that data. You need both sides: ROAs protect your prefixes, and ROV protects your network from other people's bad announcements.
What RPKI solves
BGP does not check, on its own, whether a network is entitled to announce the prefix it is announcing. A misconfigured router announcing someone else's prefix, or a deliberate hijack, can pull traffic somewhere it should not go.
RPKI origin validation answers one question: "Is this AS authorised to originate this prefix?" It does not validate the rest of the AS path. IRR-based prefix filters and max-prefix limits are therefore still needed once RPKI is in place.
Key concepts
- Resource certificate: issued by the RIR (the RIPE NCC for Europe, the Middle East and parts of Central Asia) to the resource holder, covering its prefixes and ASNs.
- ROA (Route Origin Authorisation): a signed object saying "this AS may announce this prefix, up to this length". It contains the prefix, origin ASN and maxLength.
- RPKI validator: fetches data from the RPKI repositories, checks the signatures and produces the list of validated ROA payloads (VRPs).
- RTR protocol: carries the VRP list to routers. The current version is defined in RFC 8210.
- ROV: the router comparing each route with the VRP list. The validation states are defined in RFC 6811.
Step 1: create ROAs for your own prefixes
The RIPE NCC offers hosted RPKI, where it manages certificates and keys on behalf of resource holders. ROAs are created in the RPKI dashboard of the RIPE NCC portal. If your PI resources came through a sponsoring LIR, agree with them how ROAs will be managed.
- Take inventory: list every AS that announces your prefixes. That includes not only your own ASN but also a DDoS scrubbing provider, or customers announcing your address space from their own AS.
- Create a ROA for every prefix–origin pair: a forgotten origin makes that announcement invalid, and other networks will drop it.
- Keep maxLength tight: if you announce a /22, set maxLength to 22. If you also announce the /24s, create separate ROAs for them. An overly broad maxLength leaves room for forged more-specific announcements that spoof your AS.
- Consider AS0 ROAs for unused prefixes: an AS0 ROA states that no AS should announce that prefix.
- Verify: use looking glasses and RPKI status tools to confirm your announcements show as valid.
RTBH warning: if you blackhole an attacked IP by announcing a /32, that route is longer than your ROA's maxLength and may be treated as invalid. Check in advance how your upstream exempts blackhole announcements from ROV.
Step 2: enable ROV at the edge
For ROV, the router receives the VRP list from an RPKI validator over RTR. It compares each route with the list and assigns one of three states:
| State | Meaning | Typical action |
|---|---|---|
| Valid | A VRP covers the prefix; origin AS and prefix length match | Accept |
| Invalid | A VRP covers the prefix, but the origin AS or length doesn't match | Reject |
| Not-found | No VRP covers the prefix | Accept under normal policy |
Not-found is not an error: prefixes that have no ROA yet sit in this state and should be accepted as usual.
Designing the policy
- Drop invalid: reject invalid routes on every eBGP neighbour, including transit, IX and customer sessions.
- Accept not-found: otherwise you lose a large part of the routing table.
- Preferring valid is optional: some operators give valid routes a higher local-preference. This can override the traffic engineering you built with communities and prepends, so use it with care; most networks simply drop invalid.
- Roll out in stages: first just tag routes with a community according to their state, and watch how many are invalid and whether they are still reachable through a default route. Then start dropping.
Operational details
- Validator redundancy: use at least two independent validator sources for RTR.
- Fail-open behaviour: if validator data is lost and the router's cache expires, routes become not-found rather than invalid. Traffic keeps flowing but protection is gone, so monitor validator health and the VRP count.
- Clock accuracy: validators check certificate validity periods, so their clocks must be right.
- Don't forget IPv6: ROAs and ROV are configured separately for IPv4 and IPv6.
Common mistakes
- Forgetting the DDoS provider's or a customer's AS in the ROA and invalidating your own prefix.
- Setting maxLength wider than needed.
- Enabling ROV and never watching the invalid route count.
- Treating RPKI as a replacement for prefix filters.
For how multihoming and RPKI fit together, see BGP multihoming and RPKI for small ISPs.
With CoreGate BGP Edge Gateway
CoreGate BGP Edge Gateway performs RPKI route origin validation of incoming routes itself, so you don't need to deploy a separate validator. Invalid announcements are rejected automatically, and IRR-based and manual prefix filters, community-based policy, BFD and FlowSpec run on the same platform. Peer state, prefix counts and change history are visible from the central management system. We also help you create ROAs for your own prefixes with the RIPE NCC.