Routing
From IPv4 lease to route: LOA, route object and ROA
Before announcing a leased prefix, check your upstream’s filters. A LOA documents permission, an IRR object can feed routing filters, and a ROA authorizes the origin AS. Without a covering ROA the RPKI status is NotFound. Acceptance depends on upstream policy.
Why a contract is not enough
With a lease, the lessor remains registered as the holder in the registry. The lessee announces the prefix from its own autonomous system (AS), AS64496 in this example, but does not appear in any registry entry. To third parties, this looks like the announcement of someone else's addresses.
The MANRS initiative (Mutually Agreed Norms for Routing Security) commits its participants to checking whether customers legitimately hold the addresses and AS numbers they announce, and to passing on only what the customer is entitled to. As the means, it names explicit filters at the prefix level.8 Such filters are built from publicly available data, not from contracts. Three pieces of evidence work together here.
Scroll sideways to see more columns.
| Evidence | Who creates it | What it shows | Who evaluates it |
|---|---|---|---|
| Letter of Authorization | The holder of the block, for presentation to the lessee's upstream | Written permission for a specific AS to announce the prefixes | The upstream, by hand |
| Route object (IRR) | The maintainer of the address space in the routing registry | Intended announcement: prefix and origin AS | Tools that generate prefix filters |
| ROA (RPKI) | The holder, through its RPKI certificate | Cryptographically signed: this AS may announce this prefix | Routers performing Route Origin Validation |
The technology behind the third is explained in our article on RPKI, ROV and ASPA. This article is about how all three interact in a lease.
The Letter of Authorization
The Letter of Authorization (LOA), also called a Letter of Agency, is a letter with which one operator authorizes another to act on its behalf. In routing, the holder uses it to permit a provider to accept specific prefixes from a specific AS and pass them on. There is no standard for it. A draft submitted to the IETF in 2024, which has since expired, describes the practice and proposes the following details: name and contact details of the issuer, date, all prefixes concerned and, for each prefix, the origin AS and the provider's AS.10
The same draft names the weakness. LOAs are mostly exchanged as documents by email, without integrity protection, and their content cannot readily be checked for authenticity. Some operators nevertheless require them as part of their processes.10 The LOA is thus a piece of evidence for the upstream's files, but not a technical switch: it changes neither a filter nor the RPKI status of a route.
The route object in the routing registry
In the Internet Routing Registry (IRR), operators record their routing intentions in the Routing Policy Specification Language (RPSL). RFC 2622 defines the route object for this purpose: a prefix and the AS that announces it. The two together form the key. Several objects with different origins can therefore exist side by side for one prefix.1
In the RIPE Database, the address space determines who is authorized. A route object can be created by anyone who authenticates with a maintainer of the corresponding inetnum object, checked in the order mnt-routes, mnt-lower, mnt-by. Approval from the origin AS is not required, and the AS does not even have to exist in the RIPE Database.2 For a lease this means: the lessor creates the object with the lessee's AS as “origin:”, or grants the lessee the right to do so through mnt-routes.
There is a trap in the order of checks. If a route object already exists for the same prefix or a less specific one, the database checks against that object's maintainer first. An old object from the previous user can block the new one in this way. The holder of the address space can delete it themselves.2
Route objects can no longer be created in the RIPE Database for addresses managed by another registry.2 Older objects of this kind are held in the non-authoritative source RIPE-NONAUTH. If such an object conflicts with a ROA for 14 consecutive days, the RIPE NCC deletes it.3 For a block from another region, the right place is the routing registry of the registry responsible there.8
The ROA in the RPKI
The Route Origin Authorization (ROA) is the cryptographically signed version of the same statement. Under RFC 9582, which replaced RFC 6482 in May 2024, it is issued by the holder of the address space. Each ROA names exactly one AS. If several ASes are to be allowed to announce the same prefix, one ROA per AS is needed.4 The lessor can therefore authorize the lessee, but the lessee cannot authorize itself.
What matters is the effect on routers performing Route Origin Validation. Under RFC 6811, a route is invalid as soon as at least one ROA covers the prefix but none matches the origin AS and prefix length.6 If the lessor has a ROA for its /22 with its own AS and leases out a /24 from it, the lessee's announcement is not treated as unknown but as invalid until a matching ROA is published.
For the maxLength attribute, the recommendation in RFC 9319 applies: a ROA should contain only the prefixes that the AS actually announces.5 If maxLength is absent, only the exact prefix is authorized.4
How this turns into filters, and how long it takes
Customer filters can be generated automatically from this data. RFC 7454 describes the procedure: starting from the customer's AS or AS-SET, a script resolves all the ASes it contains and collects the associated prefixes from the IRR. The RFC suggests regenerating the filters daily.7 An AS-SET is an RPSL object that groups AS numbers and other sets.1 MANRS requires participants to document their intended announcements in a routing registry or, as a substitute, to substantiate them with ROAs, and to maintain at least one AS-SET for automated filter generation.8
This is where the waiting times come from. A new route object only takes effect once the upstream has regenerated its filters. How often that happens is up to each upstream. For ROAs there are measurements: in a study covering November 2021 to October 2022, a median of 18 minutes passed between the creation of a ROA and its visible effect in BGP for prefixes from the RIPE region, and less than an hour in at least 95 percent of cases. Deleting a ROA took effect more slowly than creating one.9
Typical mistakes
- ROA with an old origin: The ROA still names the AS of the lessor or of a previous lessee, and there is none for the lessee. The lessee's announcement is then invalid.6
- Old objects from the previous user: Route objects with an earlier origin AS persist until someone deletes them. In filters generated from the IRR, the previous user therefore remains listed.17
- Overly generous maxLength: A value of /24 on a /22 authorizes announcements that nobody is planning. An attacker can announce such a sub-prefix with a forged origin, and it counts as valid.5
- Forgotten AS-SET: The lessee's AS is missing from the AS-SET from which the upstream generates its filters. Route object and ROA are correct, yet the filter stays closed.7
- Prefix longer than /24: Such IPv4 prefixes are generally neither announced nor accepted on the Internet.7
- Announcing before the ROA: New RPKI objects become visible much more slowly than BGP updates. If another ROA already covers the block, the route is invalid until then.56
Order of steps and cleanup
- Take stock: which ROAs and route objects cover the block today, and with which origin?
- Remove leftovers: have the holder delete the route objects and ROAs of earlier users.
- Have a ROA created for the lessee's AS at the exact prefix length.
- Have a route object created with the lessee's AS as the origin.
- Add your own AS to the AS-SET that the upstream evaluates.
- Give the LOA to the upstream and wait for the filter to be opened.
- Announce, and check from the outside whether the route arrives and is evaluated as valid.
At the end of the lease the same sequence runs in reverse: withdraw the announcement, delete the route object, remove the ROA, and declare the LOA terminated to the upstream. If the ROA stays in place, the former lessee's AS can continue to announce the block validly.6 Because deleted ROAs take effect more slowly than new ones, some time should pass between the end of the lease and the next use.9
How the location of a block that has been taken over can be corrected in the geolocation databases is described in our article on geolocation and geofeeds. We can help with this: leasing IPv4 addresses and RPKI, ROA and IRR.
Sources
- IETF: RFC 2622: Routing Policy Specification Language (RPSL), June 1999
- RIPE Database Documentation: Protection of Route(6) Object Space
- RIPE NCC: RIPE NCC IRR Database Non-Authoritative Route Object Clean-up (ripe-731), 6 November 2019
- IETF: RFC 9582: A Profile for Route Origin Authorizations (ROAs), May 2024
- IETF: RFC 9319 (BCP 185): The Use of maxLength in the Resource Public Key Infrastructure (RPKI), October 2022
- IETF: RFC 6811: BGP Prefix Origin Validation, January 2013
- IETF: RFC 7454 (BCP 194): BGP Operations and Security, February 2015
- MANRS: MANRS Network Operator Actions (MANRS-003.01), 17 May 2021
- Fontugne et al., PAM 2023: RPKI Time-of-Flight: Tracking Delays in the Management, Control, and Data Planes, 2023
- IETF Datatracker (individual Internet-Draft, expired): draft-martin-grow-rpki-generated-loa: Generating a Letter of Agency to reflect RPKI Validity, Version 00, 16 October 2024