IP Addresses & Routing

RPKI: Putting Signatures on Internet Routes

Understand route origin authorizations, validation states and how to publish and check RPKI data without cutting off your own network.

Key takeaways

  • A Route Origin Authorization (ROA) says which autonomous system may originate a prefix, and how specific the announcement may be.
  • Validation gives every route one of three states: valid, invalid or not found.
  • Routers don't do the cryptography; a separate validator does it and hands them a simple list.
  • Publishing a wrong ROA can make your own legitimate routes invalid, so plan before you sign.
  • Origin validation does not prove the AS path is genuine.

RPKI, the Resource Public Key Infrastructure, lets the holder of a block of internet addresses publish a cryptographically signed statement saying which network is allowed to originate it. Other networks can check incoming routes against those statements and reject the ones that contradict them.

It solves one specific problem well: a network announcing addresses that belong to someone else, whether by accident or on purpose. It does not verify the whole route a packet will travel. Knowing exactly where that line falls is most of what you need to understand it.

The problem it addresses

BGP, the protocol that carries routes between networks, accepts announcements without proof. If a network claims to originate 203.0.113.0/24, a neighbor that doesn't filter will believe it. That is the mechanism behind many hijacks.

Older defenses rely on Internet Routing Registry entries, which are databases where operators describe their routing intentions. They are useful, but their accuracy varies and some allow anyone to add records with little verification. RPKI ties authority to the same chain that allocates the addresses in the first place.

How the chain of trust works

Addresses and AS numbers are handed out hierarchically. IANA delegates large blocks to the five Regional Internet Registries, which allocate to providers and organizations, some of which delegate further. See autonomous systems and AS numbers for how those numbers are assigned.

RPKI mirrors that structure with certificates. Each Regional Internet Registry operates a trust anchor. Below it, resource certificates state that a particular key holds particular addresses and AS numbers. The holder can then use that key to sign objects about those resources. The architecture is described in RFC 6480.

Unlike a website certificate, a resource certificate doesn't care much about a name. It answers a narrower question: does the signer have authority over these numbers?

What a ROA contains

A Route Origin Authorization is the signed object most operators deal with. It holds three essential pieces: a prefix, the AS number permitted to originate it, and an optional maximum length.

What an example ROA says
198.51.100.0/22 1 AS64500 2 maxLength 23 3 Signature 4 Prefix The block of addresses being authorized. 1 Origin AS The only network this statement allows to originate the block. 2 Maximum length Announcements may be as specific as a /23, and no more specific. 3 Proof Signed under a certificate that chains to a registry trust anchor. 4 198.51.100.0/22 1 AS64500 2 maxLength 23 3 Signature 4 Prefix The block of addresses being authorized. 1 Origin AS The only network this statement allows to originate the block. 2 Maximum length Announcements may be as specific as a /23, and no more specific. 3 Proof Signed under a certificate that chains to a registry trust anchor. 4

Documentation address space and AS number, for illustration.

If you omit the maximum length, only the exact prefix is authorized. Several ROAs may cover the same prefix with different origins, which is normal when a network and a protection service both need to announce it.

A ROA for AS0 is a special case. Since AS0 may not originate routes, it declares that a block should not be announced by anyone.

The maximum length trap

It is tempting to set a generous maximum length, such as 24 on a /16, so that you never have to edit it again. That weakens the protection. Someone forging your AS number at the end of a path could announce any unused /24 inside your block, and it would pass validation. Because it is more specific than your real route, it would attract the traffic.

RFC 9319 recommends authorizing only the prefixes you actually announce. Create separate ROAs for each, and use maximum length sparingly.

The three validation states

When a router compares a BGP announcement with the validated data, the result is one of three states, defined for origin validation in RFC 6811.

How an announcement gets its state
Does any ROA cover this prefix? YES Keep checking it. If not, the state is NotFound. 1 NO Does a covering ROA match the origin AS and allow this length? YES Valid: the announcement agrees with a signed authorization. 2 NO Covered but not matched If a ROA covers the prefix and none matches, the route is Invalid. Does any ROA cover this prefix? 1 IF YES Keep checking it. If not, the state is NotFound. NO Does a covering ROA match the origin AS and allow this length? 2 IF YES Valid: the announcement agrees with a signed authorization. NO Covered but not matched If a ROA covers the prefix and none matches, the route is Invalid.

Read the first step carefully: when no ROA covers the prefix at all, the answer is NotFound, and the second question never applies. Networks that practice validation typically accept NotFound routes, because large parts of the internet have not published ROAs. They reject Invalid ones.

State Meaning Usual treatment
Valid A ROA matches the origin and length Accept
NotFound No ROA covers the prefix Accept
Invalid Covered, but origin or length disagrees Reject

Some operators first give invalid routes a low preference instead of rejecting them. That helps little against a more specific hijack, because longest prefix match still sends traffic along the bad route if it is in the table at all.

Who does the checking

Routers are not asked to download certificates and verify signatures. That work belongs to a relying party validator, ordinary software running on a server.

The validator fetches published objects from repositories, starting from the trust anchors. It checks signatures, expiry and revocation, then produces a plain list of authorized combinations of prefix, maximum length and origin AS. Routers receive that list over the RPKI-to-Router protocol (RFC 8210) and apply their own policy to it.

Operators normally run at least two validators. If validator data becomes unavailable and the cached list expires, routes fall back to NotFound. This failing-open behavior means a validator outage reduces protection without cutting off connectivity.

Publishing ROAs safely

If you hold address space, creating ROAs is usually done in your registry's portal, which can host the signing keys for you. Some larger organizations run their own certificate authority software instead.

Work through it in order:

  1. Inventory what you announce. Compare your router configuration with what public route collectors see. Include IPv6, backup sites and anything a cloud or protection provider announces on your behalf.
  2. Identify every origin. Customers using your address space with their own AS numbers need their own ROAs.
  3. Create ROAs for the most specific routes too. If you announce both a /22 and some /24s inside it, each needs to be covered.
  4. Check the result. Use a validator or a public lookup to confirm each route shows as valid.
  5. Add monitoring. Alert when a route becomes invalid or an object nears expiry.

The classic mistake is to sign the aggregate and forget a more specific announcement. The moment the ROA propagates, that smaller route is invalid and some networks stop accepting it. Changes take a while to reach validators, so allow for delay both when publishing and when correcting.

What RPKI does not protect

Origin validation answers who may originate a prefix. It says nothing about the rest of the path.

A network that places your AS number at the end of a forged path passes origin checks, though a tight maximum length limits what it can do. A route leak, where a genuine route with a genuine origin is passed to the wrong neighbors, also validates cleanly.

Further work addresses these gaps. ASPA lets a network publish its list of providers so that implausible paths can be flagged. BGPsec (RFC 8205) signs the path hop by hop, but it requires support along the way and has seen very little use. Check your vendor and registry documentation for what is available to you, since this area is still developing.

RPKI also doesn't encrypt anything or protect DNS. DNS has its own signing system, DNSSEC, which is unrelated despite the similar idea.

Turning on validation in your own network

Enabling rejection of invalid routes protects you and your customers from others' mistakes. Before doing it:

  • Confirm your router software supports the router protocol and that its defects are patched.
  • Run in observation mode first and review which routes would be dropped, and how much traffic goes to them.
  • Decide whether you carry a default route. If you do, rejected specifics may still be reached through it, which softens both the risk and the protection.
  • Keep a documented way to make a temporary exception, since a partner will eventually publish a wrong ROA.
  • Treat internal routes carefully so that private announcements of your own space aren't dropped by accident.

If you buy transit and don't run BGP, ask your provider whether it signs its prefixes and drops invalid routes. The answer matters for your reachability, and it is a fair item in a vendor review.

Keeping ROAs healthy over time

Signing once is the easy part. Networks change, and every change to what you announce is also a potential change to what you need to authorize.

Build the ROA step into your ordinary procedures. Before announcing a new prefix or a more specific one, publish the authorization and give it time to reach validators. Before moving a block to a different origin AS, add a ROA for the new origin while keeping the old one, move the announcement, and only then remove the old statement. When you stop announcing something for good, retire its ROA so it doesn't remain as an unused permission.

Watch for the less obvious sources of change too:

  • Address transfers. When a block moves between holders or registries, the old certificates and ROAs stop applying and new ones must be created.
  • Protection services. If a DDoS protection provider may announce your prefix during an attack, authorize its AS in advance. Discovering the gap mid-attack is a bad time.
  • Cloud migrations. Bringing your own addresses to a cloud platform usually involves a specific ROA that the provider documents.
  • Hosted versus delegated setups. If you run your own certificate authority software, its publication server and renewals become services you must keep alive.

A short quarterly comparison of announced routes against published ROAs catches most drift before it matters.

The trade-off worth knowing

RPKI puts the registries in a position of some influence: revoking or damaging a certificate could affect how a network's routes are judged. Operators and registries discuss this openly, and the failing-open treatment of missing data softens it, though an incorrect ROA still has direct effect. Supporters point out that the previous alternative was accepting claims with no proof at all.

For most address holders, publishing accurate ROAs costs little beyond care and upkeep, and it closes off the most common kind of mistaken origin. The care is the important part: treat each ROA as live routing configuration, review it whenever your announcements change, and monitor it as you would any other certificate-based system that can expire or be misissued.

Written for 4Internet with AI writing tools and not reviewed line by line by a person. Check anything you rely on with the maker, provider or standard concerned. Report an error.

Keep reading

All 45 articles in IP Addresses & Routing →

Latest news on this topic