1 / 1

RPKI & BGP security · how it all fits together

Who's allowed to announce your IPs?

What if someone announced your prefixes right now? By default, BGP would believe them.

Press → or Space to advance · R read more · P present/read

24 February 2008 · 18:47 UTC

A telecom in Pakistan switched YouTube off. For the planet.

Pakistan Telecom was ordered to block YouTube at home. Its routers told the rest of the internet "YouTube lives here now," and within minutes most of the world believed them. It took about two hours to undo.

Nobody hacked anything. The network did exactly what it was designed to do.

Part 1 · How it all works

How the internet actually routes

Networks are ASes

The internet is roughly 80,000 independent networks, each with an Autonomous System number: your ISP, a cloud, a university, maybe you. Inside an AS you run whatever you like (OSPF, EIGRP, IS-IS, statics); between ASes, everyone speaks BGP.

ASes announce prefixes

An AS tells its neighbors "I can reach 192.0.2.0/24." Each neighbor adds its own AS number to the front and passes it on, so a route arrives as a prefix plus an AS path: 64530 64510 64500. The last AS is the origin. (Example numbers from the reserved ranges in RFC 5398 and RFC 6996; real ones look like AS7018 or AS13335.)

Every router picks one

Hear the same prefix from several neighbors, install only one. In order:

  1. Local Preference: set by you, per neighbor. Higher wins.
  2. Shortest AS path: breaks the tie.
  3. Then the tie-breakers (next slide).

Forwarding is separate: the most specific prefix always wins.

There is no central map. Each AS applies its own policy to what it accepts and announces, and beyond that trusts what its neighbors tell it.

Read more: eBGP, iBGP, transit and peering

eBGP and iBGP. "Everyone speaks BGP" means eBGP: the session between two different ASes, usually over a directly connected link. iBGP carries the same routes between routers inside one AS so they all agree on the exits. Everything on this page is about what crosses the eBGP edge.

Why money usually decides first. ISPs treat their neighbors in one of three ways:

  • A customer pays the ISP to carry traffic.
  • A peer swaps traffic for free (usually at an internet exchange), but only for each side's own routes and its customers' routes.
  • An upstream provider charges the ISP for transit to the rest of the internet.

When the same prefix is learned from more than one neighbor, the ISP prefers the path that's best for its bottom line: customer routes first (it gets paid), then peer routes (free), then provider routes (it has to pay). Operators enforce this by setting Local Preference higher on customer routes than peer routes, and higher on peer routes than provider routes. Because BGP checks Local Preference before AS-path length, this economic policy overrides simple hop counts. That preference order is the foundation of the Gao-Rexford model.

In practice, paid-peering deals, BGP communities, traffic-ratio rules and performance measurements often refine this baseline so operators can balance cost against latency and congestion.

Why it matters for hijacks. A hijack that arrives as a customer route beats the legitimate route arriving from a provider, even if the hijack has a longer path. That's how the 2018 Route 53 hijack spread: the attacker was a customer of a transit provider that preferred its customer's announcement. Combined with longest-prefix-match in forwarding, these are the two main levers most incidents pull.

About the AS numbers. The numbers on this page (e.g. 64500) come from the ranges reserved for documentation (64496–64511, RFC 5398) and private use (64512–65534, RFC 6996). They are never globally routable, so nothing shown here points at a real network.

Scale (autumn 2026). Roughly 80,000 ASes are visible in the global routing table, of which about 11,000 provide transit. The IPv4 table holds just over a million prefixes; the average path is under five ASes long.

Watch one announcement cross the internet

  • BGP UPDATE: prefix + AS path
  • eBGP session between two ASes
  • chosen best path
  • Each cloud is one AS: its own routers, its own IGP, its own rules
  • Tier 1 backbone: a transit network that pays nobody; it peers with the other Tier 1s and sells transit to everyone else
Read more: Tier 1, Tier 2 and Tier 3 providers

The "tiers" are informal labels for where a network sits in the money flow, and they follow directly from the customer / peer / provider relationships on the previous slide.

  • Tier 1: buys transit from nobody. It reaches the entire internet through settlement-free peering with the other Tier 1s and sells transit to everyone below. There are only a dozen or so worldwide: Lumen (AS3356), NTT (AS2914), Cogent (AS174), AT&T (AS7018), Arelion (AS1299), GTT (AS3257), Zayo (AS6461), Tata (AS6453), Deutsche Telekom (AS3320), Orange (AS5511), Verizon (AS701) and a few more. The club is defined by who refuses to pay whom, so membership is argued about.
  • Tier 2: peers where it can (at exchange points, or privately with networks of similar size) and buys transit from one or more Tier 1s for everything else. Most national and regional ISPs, cable companies and large hosting networks live here. This is what "ISP A" and "ISP B" in the animation are.
  • Tier 3: buys transit only, usually from Tier 2s, and does little or no peering: local and rural ISPs, small hosting shops. Enterprises like the ones in the animation sit below even that as stub ASes: they originate their own prefixes and carry transit for no one.

Why the hierarchy matters for routing security: announcements flow up through customer links until they reach the Tier 1 mesh, then down through provider links to everyone else. A bad announcement that a Tier 1 or big Tier 2 accepts from a customer is therefore visible to the whole planet within a minute; one that only a Tier 3 accepts stays local. The Verizon 2019 leak and the Rostelecom 2020 event both spread because a large network accepted routes from a customer without filtering them. The filters that stop that (IRR prefix lists, max-prefix limits, ROV) all sit on the customer-facing edge of the bigger network, which is why Part 5 tells you to ask your ISP what it does there.

How a router ranks routes: the best-path order

#AttributeWinsScopeWhat it's for
1WeightHigherThis router only (IOS XE and FortiOS both have it)Quick local override; never sent to anyone
2Local PreferenceHigherWhole AS via iBGP; not across eBGPPolicy: which exit the AS prefers (default 100)
3Locally originatedYesThis routerYour own network/aggregate beats learned
4AS-path lengthShorterEveryoneThe only knob the sender controls: prepending
5OriginIGP < EGP < ?EveryoneHow the route entered BGP; rarely decisive
6MEDLowerNext AS only, same neighbor AS"Enter my network here"; the one that's backwards
7eBGP over iBGPeBGPThis routerHot-potato: leave the AS as soon as possible
8IGP metric to next hopLowerThis routerNearest exit
9Oldest path, then lowest router ID—This routerTie-breakers for stability

Enterprise edge, in practice

  • Two ISPs, both providers: set Local Preference per ISP (say 110 vs 100). Higher wins, so ISP1 carries outbound; ISP2 takes over when ISP1's session drops.
  • Running eBGP south from edge routers to firewalls? Local Preference stops at the edge. Set it again on the firewalls' inbound route-maps, or tag at the edge with a community and match on it.
  • Weight is a per-router hack; use it for a one-box emergency, not policy.
  • All of this is outbound. Inbound is decided by everyone else's routers; you only influence it with prepending, communities to your ISP, or more-specifics.
Read more: the attributes that cross AS boundaries, and why that matters here

Only three things in this list travel with the route across the internet: the AS path, the origin code, and (one hop) the MED. Weight and Local Preference are private to the AS that sets them. That asymmetry is the whole security story in miniature: the sending network can influence how far its announcement wins by making the path look short (or by announcing a more-specific prefix, which bypasses this list entirely because forwarding uses longest match before any of it). The receiving network can override any of that with Local Preference, but only for its own routers, and only if it has a reason to distrust the route. Nothing here tells a router whether the origin AS is entitled to the prefix. That's the gap RPKI fills, and the only attribute it examines is the last ASN in the path.

Platform notes: FortiOS exposes weight, set local-preference, set as-path prepend and set metric (MED) in route-maps, and honors the standard order. Cisco IOS XE adds a few steps between 7 and 9 (multipath, cluster-list length) that don't change the picture. MED is only compared between routes from the same neighboring AS unless you turn on bgp always-compare-med, which is why it's a weak tool at an enterprise edge with two different ISPs.

Who hands out the numbers?

IANA / ICANN ARIN RIPE NCC APNIC LACNIC AFRINIC LIR / ISP End user (you) NRO: the five RIRs, coordinating

Click a box

IPs and ASNs flow IANA → RIR → LIR/ISP → you. Hold on to this chain: it's also the chain of trust RPKI will use.

Read more: governance in detail

IANA (operated by PTI, an affiliate of ICANN) manages the global pools of IPv4, IPv6 and AS numbers and allocates large blocks to the five Regional Internet Registries under global policies developed by the RIR communities. The Number Resource Organization (NRO) is the coordinating body of the five RIRs; it also fulfils the role of the ICANN Address Supporting Organization (ASO).

Each RIR runs open, bottom-up policy processes for its region. In North America, ARIN policy is in the Number Resource Policy Manual (NRPM). Below the RIR sit two kinds of holder. A Local Internet Registry (LIR) is an organization, almost always an ISP, that receives a large allocation from the RIR specifically to reassign pieces of it to its customers; the term comes from the RIPE region, and ARIN mostly says "ISP" for the same role. An end user receives an assignment for its own network and reassigns nothing. So an organization gets space either directly from the RIR (as an end user or as an LIR/ISP) or as a reassignment from its upstream ISP, which is acting as an LIR. Only the direct holder can make statements about the space at the RIR (the ROAs we get to later). If your IPs belong to your ISP, the ISP must make them for you.

Buying IPv4 through a broker. With the free pool gone, most new IPv4 space in the ARIN region changes hands on the transfer market under NRPM section 8.3 (specified transfers) or 8.4 (inter-RIR transfers). The seller and buyer find each other; ARIN then checks that the seller actually holds the block, that the buyer has signed an RSA and justified the need, and updates the registry. IP brokers do the matchmaking, escrow and paperwork. ARIN runs a Qualified Facilitator Program and publishes the list: to be on it a broker must be an ARIN-registered entity, pass background and reference checks, carry liability insurance and renew yearly. ARIN still does not endorse or guarantee any of them, so do your own diligence, and get transfer pre-approval from ARIN before you pay for anything. Once the transfer completes, the space is yours at the RIR, which means you (not the seller, not a broker) control its routing authorizations from then on.

Five registries, one planet

World map of the five Regional Internet Registries: ARIN (North America and parts of the Caribbean), LACNIC (Latin America and the Caribbean), RIPE NCC (Europe, the Middle East and Central Asia), AFRINIC (Africa) and APNIC (Asia-Pacific).

Each RIR is the authority for who holds what in its region. If you're in this room, your space and your ASN are registered at ARIN.

🚀 A sixth region? ARIN is debating Draft Policy 2026-1, "Taking IP To Other Planets" (TIPTOP): address space for networks on the Moon and beyond, allocated by celestial region.

Read more: TIPTOP, the proposal to allocate IP space off-planet

In March 2026 the ARIN Advisory Council accepted a proposal as Draft Policy ARIN-2026-1: Taking IP To Other Planets (TIPTOP), discussed at ARIN 58 in October 2026 and developed jointly with the IETF's TIPTOP working group. The problem it describes: space agencies and commercial operators are building IP networks beyond Earth orbit, today out of whatever terrestrial allocations each one happens to hold, which means lunar and deep-space networks that interconnect would announce a pile of unrelated prefixes with no way to aggregate them.

The draft would let ARIN allocate IPv4 and IPv6 to Extra-Terrestrial Networks, defined as infrastructure physically beyond the geostationary arc (so LEO and GEO satellites are explicitly not covered; they're just Earth networks with a long last mile). Allocations would be hierarchical by celestial region, such as Luna, Mars and the Earth–Moon Lagrange points, so routes can aggregate per body. IPv6 is preferred, with a minimum /48 per operator and sparse allocation to leave room for growth. It even allows exceptions to the usual utilization checks for high-latency nodes where "ping the hosts" isn't practical.

Status: a draft, not policy. ARIN staff noted it only works if the IETF decides a dedicated block is needed and IANA allocates one, possibly with an existing RIR running the registry until the space community has one of its own. So the map above may need a sixth color eventually. Routing security postscript: the same questions apply out there. Who vouches that an AS on the Moon is allowed to announce a lunar prefix? Same answer, same RPKI.

Getting your own IPs & ASN at ARIN

1 · Org & POCs

ARIN Online account, Org ID, admin/tech/abuse POCs.

2 · ASN

Show a plan to multihome (2+ upstreams) or a unique routing policy.

3 · IPv6

The easy one. Justify a modest need, get a block (e.g. /48 for an end site).

4 · IPv4

Free pool is gone: waitlist (small, slow) or the transfer market (buy, usually via an ARIN Qualified Facilitator).

Sign the RSA (or LRSA for legacy space) → pay the annual RSP fee → the space and ASN are registered to you. Later we'll use that registration to sign your routes.

Read more: costs, RSA and LRSA

Fees (ARIN 2026 schedule, checked Oct 28, 2026): fees are an annual Registration Services Plan (RSP) based on your total holdings. The smallest category, 3X-Small (IPv4 /24 or smaller, IPv6 /40 or smaller, 1–3 ASNs), is $275/yr in 2026; 2X-Small is $550. ARIN has published a new schedule effective 1 Jan 2027 (a further increase). There is also a transactional fee for creating a new Org ID, and transfers carry their own fees. Always check the live ARIN Fee Schedule.

RSA: the Registration Services Agreement every ARIN customer signs. LRSA: the Legacy RSA for space issued before ARIN existed (pre-1997). Signing it brings legacy space under ARIN services, and the RPKI services covered later require a signed (L)RSA.

IPv4: ARIN's free pool is exhausted. Qualified orgs can join the waiting list (small blocks, long waits, with restrictions), or buy space on the transfer market and complete a transfer through ARIN (needs-based approval). ASN: ARIN's guide requires showing a plan to connect to multiple networks or a unique routing policy.

Part 2 · The flaw

Why BGP believes whatever it's told

1 · No proof of ownership

A BGP UPDATE carries a prefix and an AS path. Nothing in the protocol proves the origin AS is allowed to announce that prefix. Your router accepts it because a neighbor said so.

2 · Longest match wins

Forwarding picks the most specific route. A bogus /24 beats the legitimate /22 everywhere, no matter how good the real path is. That's why hijackers announce more-specifics.

3 · Policy before path

Local Preference ranks routes by relationship (customer > peer > provider) before it ever looks at path length. So if a transit provider's customer announces a hijack, that provider prefers the hijack over the real route arriving from its upstream, longer path and all. That is exactly how the 2018 Route 53 hijack spread.

BGP (1989, RFC 4271 in 2006) was built for a few hundred networks that knew each other. Trust was the design. Remember the two levers: more-specific wins + customer route wins.

Read more: the trust model BGP never had

BGP authenticates the session (TCP MD5 or TCP-AO tell you the UPDATE came from your neighbor), not the content. Your neighbor is trusted to have checked its neighbor, and so on. In practice the only content checks are prefix filters built from IRR data, and IRR records were historically unverified, so a hijacker could register the victim's prefix in a loosely run IRR and pass the filter.

Two properties do the damage. Longest-prefix match means a more-specific hijack is global: every router that hears it prefers it, including routers that also hold the real route. Policy ordering means that even an exact-prefix hijack captures traffic from every network that is "closer" to the attacker by business relationship or AS-path length. The live demo below shows both, and the incidents are each one of these two patterns.

Fixing this in BGP itself (signing every path, BGPsec) requires every AS on the path to upgrade at once. RPKI was designed around that constraint: fix the origin first, out of band, in a way one network can deploy alone.

Part 3 · How RPKI helps

RPKI: two words you need, then one picture

ROA · Route Origin Authorization

A signed statement by the address holder: "AS 64500 is allowed to announce 192.0.2.0/24." You create it at your RIR. It's the publish side.

ROV · Route Origin Validation

What a router does with ROAs: compare every BGP route it receives against them and mark it Valid, Invalid or NotFound, then apply policy (usually: drop Invalid). It's the check side.

→ → → → →

You can do either half alone. Signing ROAs protects your prefixes at everyone who validates; doing ROV protects your users from everyone else's hijacks.

Read more: the moving parts

Each RIR runs a trust anchor. Resource certificates (RFC 6480 architecture) bind address/ASN holdings to a key. A Route Origin Authorization (ROA) says which AS may originate a prefix and how specific announcements may be (maxLength). Relying-party software ("validators") downloads and checks the whole repository and produces Validated ROA Payloads (VRPs). Common open-source validators: Routinator (NLnet Labs), rpki-client (OpenBSD), and FORT. Cloudflare's OctoRPKI (cfrpki) is no longer maintained, so don't deploy it new.

Routers fetch VRPs over the RPKI-to-Router protocol (RTR, RFC 6810 / RFC 8210) and mark each route per RFC 6811: Valid (a covering ROA matches origin and length), Invalid (covered, but origin or length doesn't match), NotFound (no covering ROA).

Why RPKI is designed the way it is

Why the RIRs are the trust anchors

The RIRs already know who holds what: they allocated it. The certificate tree copies the allocation tree (IANA → RIR → LIR → you), so a certificate can only cover resources its parent holds. No new registry, no new "who owns this" problem.

Why validation is out of band

Routers don't do X.509 well and shouldn't fetch from the internet. A validator does the crypto once, then hands routers a plain list of prefix · maxLength · origin AS over RTR. The router just does lookups.

Why only the origin is checked

Signing the whole AS path (BGPsec) needs every AS on the path to upgrade. Checking the origin can be done by one network, on day one, against routes from anyone. That's what made deployment possible.

Why NotFound is accepted

Only part of the internet has ROAs. If routers dropped routes with no ROA, they'd drop much of the table. So NotFound passes, Invalid is dropped. Coverage grows one ROA at a time, and every ROA protects its holder immediately.

Fail-open on purpose: lose your validators and routes drift to NotFound, not to "down". NotFound isn't an error state; it's the normal state for every prefix without a ROA, and routers treat it exactly as they did before RPKI existed.

Read more: certificates, ROAs and what a validator actually does

Resource certificates are X.509 certificates with RFC 3779 extensions listing IP prefixes and AS numbers. The RIR's trust anchor certificate holds the RIR's resources; a child certificate issued to your organization can only list resources inside its parent's set. A ROA is a signed object (CMS) under your certificate that says "AS X may originate these prefixes, up to maxLength". Both are published in RIR repositories reachable by rsync or RRDP (HTTPS). With hosted RPKI, the RIR runs the CA and signs on your behalf, so you never touch a key.

A validator (relying party) starts from the five trust anchor locators, fetches every repository, checks every signature and resource set, discards anything stale or malformed, and outputs a flat table of validated ROA payloads (VRPs). It re-fetches on a schedule (minutes to an hour). Routers pull that table over RTR (RFC 8210) and refresh it periodically; if the cache goes away, the router keeps the last table until its expiry timer runs out, then treats everything as NotFound. Two caches cover a validator outage.

Route origin validation (RFC 6811) is then a lookup per route: find VRPs covering the prefix; if none, NotFound; if one matches origin AS and the announced length ≤ maxLength, Valid; otherwise Invalid. What the router does with each state is local policy, which is why the rollout matters as much as the config.

ROA → ROV simulator

ROAs

    Test an announcement

    The maxLength trap

    ROA: 192.0.2.0/24, maxLength /25, AS64500

    Attacker announces 192.0.2.0/25 with a forged path 64666 64500.

    Origin = 64500 → Valid. More-specific wins. Traffic stolen.

    ROA: 192.0.2.0/24, maxLength /24, AS64500

    Same forged /25.

    Too specific → Invalid. Dropped by ROV.

    Rule: maxLength = what you actually announce. (RFC 9319)

    Be honest: what ROV doesn't stop

    ✔ Stops

    Origin hijacks & bogus more-specifics, where ROAs exist and networks drop invalids.

    ✘ Doesn't stop

    Route leaks (valid origin, wrong path) and forged-AS-path attacks.

    → Next

    ASPA: signed provider lists to catch leaks and some path forgery. BGPsec: signed paths, little deployment.

    Read more: ASPA, BGPsec and other controls

    ASPA (Autonomous System Provider Authorization) lets an AS publish its upstream providers in RPKI so others can detect "valley" paths: leaks and many forged paths. It's being standardised in the IETF SIDROPS working group, and validators and some router implementations are adding support. BGPsec (RFC 8205) signs every hop but needs every AS on the path to take part and has seen very little deployment. Controls you can use today: max-prefix limits, peer-locking, IRR-based prefix filters, and RFC 9234 roles / Only-to-Customer.

    Part 4 · Publish: ROAs and IRR at ARIN

    Creating your ROAs: hosted RPKI at ARIN in 4 steps

    Diagram only, not the real ARIN interface

    Read more: ARIN process detail

    In ARIN Online, choose Manage RPKI for your Org ID (requires a signed RSA or LRSA and the Admin or Tech POC role). Request Hosted RPKI. ARIN runs the certificate authority for you; delegated RPKI (you run the CA) is for large operators. Then create ROAs: give a name, origin AS, prefix and maxLength, and optional start/end dates. Hosted RPKI is the simplest path for enterprises. See ARIN: Hosted RPKI.

    Best practice: a ROA for every announced prefix with maxLength = announced length; an AS0 ROA for space you hold but don't announce (nobody may originate it); remember your DDoS-scrubbing provider's ASN if they announce your space; monitor with a validator, BGP alerts and a looking glass.

    IRR route objects: the older cousin, still required

    What the IRR is

    A database of routing intent in RPSL text: a route or route6 object says "this prefix is announced by this origin AS"; an as-set lists the ASes behind you. ISPs and exchange points build their prefix filters from it, so a missing object means your route gets dropped at the door.

    How it differs from a ROA

    No cryptography and, historically, weak checks on who could create what. A ROA is signed under the registry's certificate and proves authority; a route object is a claim. Modern IRR software can discard route objects that contradict RPKI, so keep the two consistent: same prefix, same origin AS.

    route:      192.0.2.0/24
    origin:     AS64500
    descr:      Example Corp, Omaha edge
    mnt-by:     MNT-EXAMPLE
    source:     ARIN

    At ARIN: Routing Security → Manage IRR → Create Object. Since late 2024, creating a ROA in ARIN Online can also create the matching managed route object for you.

    Read more: ARIN IRR specifics and what your ISP actually checks

    ARIN's IRR is managed in ARIN Online under Routing Security, next to RPKI. You can create route, route6, aut-num and as-set objects for resources registered to your Org, or submit RPSL templates by email. ARIN announced in October 2024 that generating a ROA creates an auto-managed route object (on by default, can be turned off per Org or per ROA); the managed object uses the ROA's prefix only, ignores maxLength, and is removed when the ROA is deleted unless you opt out. Manually created objects stay yours to maintain.

    What a transit provider does with this: it pulls your as-set (or your ASN) from the IRR, expands it to the list of prefixes with matching route objects, and builds an inbound prefix-list on your session. Many also fold in RPKI: ROAs are treated as route objects, and route objects that are RPKI-Invalid are ignored. Tell your ISP which as-set to use (put it in your PeeringDB record too), and update the IRR before you announce something new, or the announcement never makes it past the first hop.

    Other registries (RADB, NTT's rr.ntt.net, RIPE) mirror each other and ARIN; most providers query the authoritative one for your region. Check what the world sees with whois -h whois.radb.net 192.0.2.0/24.

    Part 5 · Check: when and how to do ROV

    When can you do ROV? It depends on what your ISP sends you

    
        

    Rule: default only → your ISP must do ROV for you, so ask. Full table → you can do it yourself, and should.

    Read more: why the feed type matters for ROV

    Route origin validation runs on routes you receive. With a default route only, your router sees a single 0.0.0.0/0, which no ROA covers, so every forwarding decision is your ISP's. Dropping invalids is your ISP's job. With partial/customer routes you can validate those prefixes, but everything else still follows the default. With a full table (roughly a million IPv4 routes plus IPv6; check current counts on a looking glass), your edge can drop invalids itself. That needs RAM and a validator.

    Many enterprises run full tables from two ISPs on a FortiGate or an IOS XE router. If you do, ROV on your own edge is a real control. If you take defaults, your control is the ISP contract.

    Questions to ask your ISP

    Run your own validator (RTR server)

    # Routinator in Docker: RTR on 3323, HTTP status/metrics on 8323
    docker volume create routinator-tals
    docker run --rm -v routinator-tals:/home/routinator/.rpki-cache/tals \
      nlnetlabs/routinator init -f --accept-arin-rpa
    docker run -d --restart=unless-stopped --name routinator \
      -p 3323:3323 -p 8323:8323 \
      -v routinator-tals:/home/routinator/.rpki-cache/tals \
      nlnetlabs/routinator

    Run two (different software if you can). IOS XE and FortiOS both take multiple caches and fail over between them.

    Read more: validator ops

    Routinator's Docker image listens for RTR on 3323 and HTTP on 8323 (check the Routinator install docs; newer releases ship the ARIN TAL by default, so the init step may not be needed). Restrict RTR to your routers with ACLs or a firewall. RTR over plain TCP isn't encrypted, so keep it on a management network. Public RTR caches exist for labs (e.g. Cloudflare's rtr.rpki.cloudflare.com:8282, used in Fortinet's own example), but run your own in production.

    Turn on ROV: IOS XE & FortiOS

    router bgp 64500
     bgp rpki server tcp 10.0.0.53 port 3323 refresh 300
     bgp rpki server tcp 10.0.0.54 port 3323 refresh 300
     address-family ipv4 unicast
      bgp bestpath prefix-validate disable
      neighbor 203.0.113.1 soft-reconfiguration inbound
      neighbor 203.0.113.1 route-map ISP-IN in
    !
    route-map ISP-IN deny 10
     match rpki invalid
    route-map ISP-IN permit 20
    config router bgp
        set route-origin-as-validation enable
        config rpki-server
            edit "rtr1"
                set addr "10.0.0.53"
                set port 3323
                set preference 10
            next
            edit "rtr2"
                set addr "10.0.0.54"
                set port 3323
                set preference 20
            next
        end
    end
    ! IOS XE
    show ip bgp rpki servers
    show bgp ipv4 unicast rpki table
    show bgp ipv4 unicast rpki invalid
    
    # FortiOS 8.0.1
    get router info bgp rpki server-summary
    get router info bgp rpki table-ipv4
    get router info bgp rpki validate 192.0.2.0/24 64500
    get router info bgp network
    Read more: platform notes

    IOS XE: by default IOS XE folds validation state into best-path selection (Valid preferred over NotFound over Invalid) but does not drop invalids. The NLNOG BGP filter guide recommends turning that integrated behaviour off with bgp bestpath prefix-validate disable (per address family) and doing the rejection explicitly in the inbound route-map, because letting validation state steer best-path can produce routing loops between routers that see different states. Enable soft-reconfiguration inbound on eBGP sessions so the router can re-run policy from its stored copy when the VRP table changes, instead of asking the neighbor for a route refresh every time. For a monitoring phase, replace the deny with set local-preference 50. Command reference: Cisco "BGP—Origin AS Validation" configuration guide.

    FortiOS: per Fortinet's documentation, BGP RPKI origin validation is new in FortiOS 8.0.1. It's CLI-only, configured per VDOM, RTR over plain TCP only, with one active cache per VDOM and the others as failover by preference (lower wins). With route-origin-as-validation enable, routes marked Invalid are rejected and not installed; Valid and NotFound are installed. Earlier FortiOS 7.x releases did not offer RPKI validation. Source: docs.fortinet.com: BGP RPKI route origin validation.

    Rolling out ROV without breaking anything

    1 · Sign your own ROAs 2 · Validators up, RTR connected 3 · Observe: count the invalids 4 · Deprioritize, then drop

    Do this first

    • ROA for every prefix you announce, maxLength = announced length, IPv6 too
    • Include your DDoS-scrubbing or cloud provider's ASN if they announce your space
    • Check yourself on a public validator before you touch a router
    • Two RTR caches, management network only, ACLs on the RTR port

    Then on the edge

    • Inbound eBGP only. Don't validate iBGP, don't validate your own outbound
    • Week one: show … rpki invalid daily. Who would you drop?
    • Week two: lower local-preference on Invalid
    • Then deny Invalid. Keep the "allow" exception path for a known-bad ROA of a partner

    Almost every Invalid you see is someone's misconfigured ROA, not an attack. Tell them; it fixes faster than you'd think.

    Read more: timers, iBGP, and the things that bite

    Order matters. Sign your ROAs before you drop invalids anywhere, because the first network to get bitten by a wrong ROA is usually its owner: a typo in the origin AS or a forgotten /25 makes your routes Invalid at every ROV network on the planet, and ROV deployments are now common at large transit providers and IXes.

    Timers. The validator refreshes repositories every few minutes to an hour; the router refreshes from the cache on the RTR refresh interval (300–600 s is common) and only drops the cached table after the expire interval, which is hours. So a new ROA takes tens of minutes to protect you, and a validator outage takes hours to hurt you. That is the fail-open design from above, and it's why two caches on separate hosts is enough.

    iBGP. Validate where routes enter: eBGP sessions to ISPs and peers. Inside your network, carry the result instead of re-validating; on IOS XE, neighbor … announce rpki state sends validation state to iBGP peers as a community so route reflectors and other edges agree. FortiOS applies validation per VDOM to routes learned via BGP once enabled.

    Default route only? Nothing to validate: your ISP's ROV is your control. Put the questions from the ISP checklist in writing. Partial table? Validate what you get; the default still carries everything else. Full tables? Budget RAM for the table plus the VRP set (hundreds of thousands of entries and growing).

    Watch for: ROAs that expire (hosted RPKI at ARIN lets you set end dates, so don't), a scrubbing provider that announces your /24 from its own AS, an acquisition that brings prefixes with ROAs pointing at the old AS, and IPv6 space you forgot to sign because "nothing uses it yet".

    Part 6 · See it happen

    Live: hijack the internet (safely)

    • route/traffic to real origin
    • route/traffic to attacker
    • 🛡 ROV on (click an AS to toggle)
    • ✕ dropped an invalid route
    • customer ↔ provider link
    • peer link
    • Prefix 192.0.2.0/24 · ROA origin AS64500

    Five real incidents

    Every one of these pulls the same two levers: more-specific wins + customer route wins. Watch for which.

    Pakistan Telecom vs YouTube accidental

    • When: 24 Feb 2008, ~2 hours
    • Who: AS17557 (Pakistan Telecom) → AS3491 (PCCW) → world
    • What: 208.65.153.0/24, more specific than YouTube's 208.65.152.0/22 (AS36561)
    • Why: a domestic censorship blackhole leaked upstream
    • Impact: YouTube unreachable for much of the internet

    RPKI? Yes. A ROA for the /22 (AS36561, maxLength /22) makes the /24 Invalid. Ideally PCCW would also filter its customer.

    Source: RIPE NCC RIS case study

    Route 53 → MyEtherWallet malicious

    • When: 24 Apr 2018, ~11:05–12:55 UTC
    • Who: AS10297 (eNet) announced /24s of Amazon's (AS16509) 205.251.192.0/23–198.0/23, via AS6939 (HE)
    • What: hijacked Route 53 DNS answered only myetherwallet.com, with phishing IPs
    • Then: fake site, self-signed TLS cert. Users who clicked through lost crypto.

    RPKI? Yes, with ROAs + ROV. Wrong origin and too specific: Invalid twice. DNSSEC/HSTS would also have blunted it.

    Source: Cloudflare: BGP leaks and cryptocurrencies

    Verizon / DQE route leak accidental

    • When: 24 Jun 2019, ~2 hours
    • Who: DQE (AS33154) "BGP optimizer" more-specifics → customer Allegheny Technologies (AS396531) → Verizon (AS701) → world
    • Impact: big chunks of Cloudflare, Amazon and others congested or unreachable

    RPKI? Partly. Cloudflare's ROAs made the leaked more-specifics Invalid, so ROV at Verizon would have dropped those. A same-length leak would be Valid. Max-prefix, customer filters and ASPA catch the leak itself.

    Source: Cloudflare blog, 24 Jun 2019

    Rostelecom 2020 accidental (disputed)

    • When: 1 Apr 2020, about an hour
    • Who: AS12389 (Rostelecom) originated 8,800+ prefixes from 200+ networks
    • Victims: Akamai, Cloudflare, AWS, Google, Digital Ocean, Hetzner, Linode…
    • Why: widely assessed as an internal traffic-engineering mistake. Intent never proven.

    RPKI? Yes, where it was deployed. Prefixes with ROAs were Invalid, and networks running ROV dropped them.

    Sources: ZDNet · MANRS

    KLAYswap / Kakao 2022 malicious

    • When: 3 Feb 2022, 01:04 UTC, several hours
    • What: hijacked prefixes for developers.kakao.com, which serves a JS SDK KLAYswap loaded
    • Twist: the attacker got a real TLS cert (ZeroSSL) by hijacking the CA's domain validation, then served malicious JS
    • Impact: ~US$2M in crypto stolen

    RPKI? Would have limited it. Researchers say ROV "could significantly limit" such attacks. Also needed: multi-vantage-point domain validation, no third-party JS on money flows.

    Source: Princeton CITP / Freedom to Tinker

    Part 7 · Where we are, what to do Monday

    Where are we today?

    Open these live. Numbers change monthly.

    Monday-morning checklist

    Enterprise

    • Sign (L)RSA, enable hosted RPKI
    • ROA per announced prefix, maxLength = length
    • AS0 ROA for unused space
    • Default route? Ask ISP the ROV questions
    • Full table? Validator ×2 + ROV on edge
    • Monitor: BGP alerts, isbgpsafeyet

    ISP / transit

    • Drop invalids on all eBGP sessions
    • Sign ROAs for customer space
    • Filter customers (IRR + RPKI), max-prefix
    • Join MANRS
    • Watch ASPA; publish yours when you can

    Questions?

    This page lives at arpninja.com/learn/rpki.html. Play with the demo, replay the hijacks on RPKI: The Incidents, then test your own ISP at isbgpsafeyet.com.

    Sources

    Example prefixes and ASNs in demos use reserved ranges: documentation prefixes 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 (RFC 5737); documentation ASNs 64496–64511 (RFC 5398); private-use ASNs 64512–65534 (RFC 6996). None are routable on the internet.