Who hands out addresses: IANA, RIRs and LIRs
Describe the Internet number registry hierarchy from IANA through the RIRs and LIRs to end sites. Compare provider-aggregatable (PA) and provider-independent (PI) address space and choose between them. Calculate how a registry-scale block divides into LIR allocations and end-site assignments. Use RDAP or whois to find who holds a prefix or an AS number.
Take the quiz · pass mark 70% · 10 questions
Explanation
Before you can plan addresses, you need some. This lesson explains where IPv6 address space comes from, what kind you should ask for, and how to look up who holds any prefix on the Internet.
The Internet Numbers Registry System
RFC 7020 describes the system that hands out IP addresses and AS numbers. It has three goals:
- Allocation pool management: the pools are finite, so they must be managed carefully (this matters much more for IPv4).
- Hierarchical allocation: addresses are given out so that routes can be aggregated. One provider announces one large prefix instead of thousands of small ones.
- Registration accuracy: there is a public, correct record of who holds what. This is what lets you identify a network and contact its operator about abuse.
The structure is a tree:
Drawing diagram…
- IANA (the Internet Assigned Numbers Authority, run by PTI, an affiliate of ICANN) manages the global pools. For IPv6, IANA hands large blocks (/12s under the current global policy) from the global unicast range
2000::/3to the RIRs. - The five Regional Internet Registries (RIRs) serve their regions: AFRINIC, APNIC, ARIN, LACNIC and RIPE NCC. Each one sets its own policies through an open, bottom-up community process.
- Some regions also have National Internet Registries (NIRs) between the RIR and the members, for example in parts of Asia-Pacific and Latin America.
- Local Internet Registries (LIRs) are usually ISPs and hosting providers. They are RIR members that receive an allocation (a block to sub-assign to customers) and make assignments to end sites.
- End sites are a home, a business, a data-centre tenant or a campus. They are assigned a prefix to use.
Allocation and assignment are different things. An allocation is space given to an LIR to distribute. An assignment is space given to an end site to use. You will see these words in RDAP records.
How big are the blocks?
Policies differ by RIR and change over time, so always check your RIR's current policy. Common patterns are:
- LIR allocations: a /32 is the usual minimum. Larger LIRs can get more (for example a /29 or larger) with justification based on how many customers they will serve.
- End-site assignments: RFC 6177 (BCP 157) replaced RFC 3177's advice that every end site should get a /48. It says a single default is "not nuanced enough". It still insists that end sites, including homes, get multiple subnets' worth of space and never just a single /64 or a /128. In practice, many operators give homes a /56 and businesses a /48.
- PI assignments: usually a /48 for an end site that wants its own routable prefix.
The arithmetic matters for planning. A /32 holds 2^16 = 65,536 /48s or 2^24 = 16,777,216 /56s. RFC 6177 points out that moving homes from /48 to /56 saves up to 8 bits, which is a factor of 256.
PA versus PI
| Provider-aggregatable (PA) | Provider-independent (PI) | |
|---|---|---|
| Comes from | Your ISP's allocation | The RIR (directly or through a sponsoring LIR) |
| Typical size | /56 or /48 from the ISP | /48 |
| Routing | Covered by the ISP's aggregate. Adds no routes to the global table. | Announced by you with BGP and your own AS number. Adds a route to every router in the default-free zone. |
| Change provider | Renumber (L2.08) | Keep your addresses |
| Multihoming | Possible but complex (multiple prefixes, L2.06) | Straightforward with BGP |
| Cost and effort | Included with the service | RIR fees, an AS number, BGP skills and routers |
Rule of thumb: a home or small office uses PA from its ISP. An enterprise that is multihomed with BGP, or a hosting provider that does not want to depend on one upstream, uses PI or becomes an LIR. In the global routing table, /48 is widely treated as the longest IPv6 prefix that will be accepted. This is common operator filtering practice, not an RFC rule, so do not plan to announce anything longer.
The ictNetworks scenario
Throughout Level 2 we use an invented provider modelled on ictNetworks: a hosting provider and ISP that is an LIR in its RIR's region. Its allocation is 3fff:a00::/32. This is a documentation prefix from 3fff::/20 (RFC 9637) that stands in for a real allocation. To make registry-scale arithmetic concrete, imagine that the RIR's pool is 3fff::/20:
3fff::/20holds 2^(32 − 20) = 4,096 /32s, or 512 /29s.- The /32 allocations are
3fff::/32,3fff:1::/32,3fff:2::/32…3fff:fff::/32. Allocation index k is3fff:k::/32, with k written in hex. 3fff:a00::/32is index 0xa00 = 2,560. If the RIR reserved the surrounding /29 for growth, that /29 would be3fff:a00::/29, which covers3fff:a00::to3fff:a07:ffff:….
The habit of reserving adjacent space so that an allocation can grow without becoming two separate prefixes is the same idea you will use inside your own plan in L2.04.
AS numbers
To announce PI space you also need an Autonomous System Number (ASN). ASNs are 32-bit numbers handed out through the same hierarchy. Course examples use only the documentation ASNs from RFC 5398: 64496 to 64511 and 65536 to 65551.
Looking up who holds a prefix: RDAP and whois
Two protocols query registration data:
- whois (RFC 3912) is the old plain-text protocol on TCP port 43. Each registry formats its output differently.
- RDAP (Registration Data Access Protocol) is the modern replacement. It runs over HTTPS, uses standard query URLs (RFC 9082) and returns structured JSON (RFC 9083). IANA publishes bootstrap files that say which RIR's RDAP server is authoritative for each block (RFC 9224).
A typical RDAP IP network response includes startAddress, endAddress, ipVersion, name, type, country, parentHandle and entities with roles such as registrant and abuse. Following parentHandle upwards shows the delegation chain: assignment → LIR allocation → RIR block.
# Which RIR is authoritative for an IPv6 block? (IANA bootstrap, RFC 9224)
curl -s https://data.iana.org/rdap/ipv6.json | python3 -m json.tool | head -40
# Query an IP network or an ASN (rdap.org is a community redirector to the right RIR)
curl -sL https://rdap.org/ip/<prefix-or-address> | python3 -m json.tool
curl -sL https://rdap.org/autnum/<asn> | python3 -m json.tool
# Classic whois
whois <prefix-or-address>
Documentation prefixes such as 2001:db8::/32 are not held by any operator, so look up your own network's prefix in the lab instead.
Worked examples
Example 1: Registry-scale counting
How many /32 allocations fit in 3fff::/20, and how many /29s? 2^(32 − 20) = 4,096 /32s, and 2^(29 − 20) = 512 /29s.
Example 2: Allocation by index
Under the scenario, which /32 is allocation index 4 in 3fff::/20? A /32 inside a /20 uses the last three hex digits of the second group. Index 4 → 3fff:4::/32.
Example 3: End-site capacity
The ictNetworks scenario allocation 3fff:a00::/32 holds 2^16 = 65,536 /48s or 2^24 = 16,777,216 /56s. Even if every residential customer gets a /56, address space will not be the limiting factor.
Example 4: The cost of /48 for everyone
A provider expects 2 million homes. With a /48 per home, it needs at least 2,000,000 /48s. That needs 21 bits of numbering (2^21 = 2,097,152 is the first power of two above 2,000,000), so it requires a /27 allocation (48 − 21). With a /56 per home it needs 2^21 /56s, which fits in a /35 (56 − 21), so in practice a /32 with room to spare. This is the 8-bit saving that RFC 6177 mentions.
Example 5: Reading a delegation chain
An RDAP answer for a customer prefix shows type: ASSIGNED PA, parentHandle pointing to a /32, and the /32's record shows type: ALLOCATED-BY-RIR (labels vary by RIR). The chain is: end-site assignment (customer) → LIR allocation (ISP) → RIR → IANA. The abuse contact is on the most specific record that has one.
Lab
Goal: Find out who holds the IPv6 prefix and ASN of a network you use, and explain the delegation chain.
You need: curl, python3 (for pretty-printing JSON) and optionally whois. Use your organisation's or home ISP's network. In this course text we never print real prefixes, but your own lab notes may.
Step 1: Find your prefix
On a host with IPv6 (see L1.01), find your global address and the prefix that your router received:
ip -6 addr show scope global # Linux; on macOS: ifconfig; on Windows: ipconfig
curl -s -6 https://ifconfig.co # the address the Internet sees
If you have no IPv6 at home, use the IPv6 address of a website you operate or a hosting provider's VM.
Step 2: Ask the bootstrap file which RIR to query
Download https://data.iana.org/rdap/ipv6.json. Write a short Python script that loads it and finds the service entry whose prefix contains your address (use ipaddress.ip_address(x) in ipaddress.ip_network(p)). Print the RDAP base URL.
Step 3: Query RDAP
Query <base-url>ip/<your-address>. Record startAddress, endAddress, name, type, parentHandle and the abuse contact. Follow parentHandle (or query the covering prefix) until you reach the RIR-level block. Work out the prefix length of each level from the start and end addresses.
Step 4: Find the ASN
Use a looking glass or a BGP tool of your choice to find which AS originates your prefix. Then query <base-url>autnum/<asn> and record the holder's name.
Step 5: Compare with whois
Run whois for the same address. Note which fields correspond to the RDAP ones and which output is easier to parse in a script.
What to submit
A short report with: your address, every level of the delegation chain with prefix lengths, whether your prefix is PA or PI, the originating ASN and holder, the abuse contact, and three sentences comparing RDAP with whois.
Summary
- IANA gives large blocks to the five RIRs. The RIRs allocate to LIRs (usually ISPs), and LIRs assign to end sites. RFC 7020 sets out the goals: pool management, hierarchical allocation and registration accuracy.
- An allocation is for redistributing. An assignment is for use.
- RFC 6177 (replacing RFC 3177) drops the single /48 default but requires multiple subnets for every end site. /56 for homes and /48 for businesses are common.
- PA space is aggregated by your ISP but must be renumbered when you leave. PI space is portable but needs an ASN and BGP, and adds a global route. Do not plan on announcing anything longer than a /48.
- A /32 holds 65,536 /48s or 16,777,216 /56s.
- RDAP (RFC 9082, RFC 9083, bootstrap in RFC 9224) is structured JSON over HTTPS and replaces whois (RFC 3912). Examples use documentation ASNs from RFC 5398.
- Next lesson (L2.03): why the LAN subnet is a /64.
Quiz imported · 10 questions · pass mark 70%. Lab questions are not auto-marked.