How to get your own IP addresses (PI, ASN, BGP)
To get IP addresses that are yours, you register a block with a Regional Internet Registry, get an AS number, and announce the block to the internet over BGP. The block is either Provider-Independent (PI) space requested through a sponsoring registry member, or the allocation you receive by becoming a member (a Local Internet Registry, LIR) yourself. The smallest block the internet will route is a /24 of IPv4 (256 addresses) or a /48 of IPv6. The address your ISP hands you is none of this: it sits in the ISP’s block, is announced by the ISP’s routers, and stays behind when you leave.
The whole procedure, in order:
- Pick your registry by region: RIPE NCC, ARIN, APNIC, LACNIC or AFRINIC.
- Get the block. IPv6: request a
/48of PI through a sponsoring LIR, or join as an LIR. IPv4: buy a/24on the transfer market (about $20–35 per address in 2026), lease one, or queue on a waiting list. - Get an AS number. It requires BGP sessions to two networks or a routing policy of your own.
- Publish who may announce it: a
route/route6object and an RPKI ROA naming your ASN as origin. - Announce the prefix over BGP to one or more upstream providers, and nothing but that prefix.
- Verify from outside, then point DNS (
A/AAAA,PTR) at the addresses.
All addresses and AS numbers below are documentation values: 198.51.100.0/24 and 203.0.113.0/24 (RFC 5737), 2001:db8::/32 (RFC 3849), AS64496–AS64511 (RFC 5398).
Who assigns IP addresses: IANA, RIRs and LIRs
IPv4 addresses, IPv6 addresses and AS numbers each come from one global pool, delegated down a fixed chain:
- IANA Keeps the global pools of IPv4, IPv6 and AS numbers. It handed its last five IPv4
/8s to the registries on 3 Feb 2011; IPv6 still goes out in/12blocks. - AFRINIC Africa. In IPv4 exhaustion phase 1 since April 2017, now phase 2: a rationed pool, a
/24to a/22per request. - APNIC Asia-Pacific. Reached its last
/8on 15 Apr 2011 and still delegates at most a/23per member from what is left (about 3 million addresses in July 2026). - ARIN USA, Canada and parts of the Caribbean. Free pool empty since 24 Sep 2015; reclaimed space goes out quarterly through a waiting list, at most a
/22. - LACNIC Latin America and parts of the Caribbean. Last /10 from 10 Jun 2014, new entrants only from 15 Feb 2017, pool empty on 19 Aug 2020; recovered space goes through a waiting list.
- RIPE NCC Europe, the Middle East and parts of Central Asia. Last
/8on 14 Sep 2012, empty on 25 Nov 2019; a new LIR can queue for one/24. - LIR A Local Internet Registry is a member of the registry: it signs the service agreement, pays the fee, and holds an allocation recorded as
inetnum/inet6numin the registry database. You can be one. - PA space The LIR assigns a slice of its allocation to a customer (RIPE status
ASSIGNED PA). It is routed inside the LIR's block and returns to the LIR when the contract ends. This is what an ISP "static IP" is. - PI space The registry assigns the block to the end user itself (RIPE status
ASSIGNED PI); the LIR is only the contractual sponsor. Change sponsor or upstream and the block moves with you.
| Registry | Region | IPv4 free pool ran out | IPv4 still obtainable from the registry |
|---|---|---|---|
| APNIC | Asia-Pacific | 15 Apr 2011 (last /8) | up to a /23 per member |
| RIPE NCC | Europe, Middle East, Central Asia | 14 Sep 2012 (last /8) · 25 Nov 2019 (empty) | one /24 per new LIR, via waiting list |
| LACNIC | Latin America, Caribbean | 10 Jun 2014 (last /10) · 19 Aug 2020 (empty) | recovered space, via waiting list |
| ARIN | USA, Canada, parts of the Caribbean | 24 Sep 2015 | at most a /22, via quarterly waiting-list distributions |
| AFRINIC | Africa | Apr 2017 (exhaustion phase 1) | a /24 to a /22 per request (phase 2) |
You deal with the registry of the region your network is in.
Provider-independent (PI) space or LIR membership
There are two ways to hold a block, and both make it yours:
| End user with PI space | LIR (registry member) | |
|---|---|---|
| Contract | with a sponsoring LIR, which files the request | directly with the registry |
| What you hold | an assignment: IPv6 /48, an AS number | an allocation: IPv6 /32–/29, a place on the IPv4 waiting list |
| RIPE NCC fees, 2026 | €75 a year per PI block and €50 per ASN, billed to the sponsor, which adds its own margin | €1,000 sign-up + €1,800 a year, plus €50 per ASN |
| ARIN fees, 2026 | $275 a year (3X-Small: up to a /24 of IPv4, a /40 of IPv6 and three ASNs) | same schedule: ARIN bills by size, not by membership type |
| Can assign space to customers | no | yes |
Either way the request has to be justified: who you are (company registration or ID), what network the numbers are for, and for an AS number, who you will peer with. PA/PI is RIPE vocabulary; ARIN calls the same split reassigned versus directly registered space.
IPv6 is easy, IPv4 is a market
IPv6 is plentiful. A RIPE NCC LIR receives a /32 on request and up to a /29 without further justification (eight /32s, 2³⁵ ≈ 3.4 × 10¹⁰ /64 subnets); an end user receives a /48 of PI (65,536 /64s). The request is usually approved within days and costs only the registry fee above.
IPv4 is gone from the free pools. RIPE NCC has not assigned new IPv4 PI since 2012, so a /24 comes from one of three places:
| Route | What you get | Cost / wait |
|---|---|---|
| Registry waiting list | reclaimed space: RIPE NCC gives an LIR that has never had IPv4 one /24; ARIN at most a /22 | RIPE NCC, mid-2026: about 750 LIRs queued, the first waiting 15 months. ARIN: over a year |
| Transfer market | a block bought from its holder and re-registered to you by the registry | about $20–35 per address in 2026 (about $30 a year earlier), so a /24 is roughly $5,000–9,000 plus broker and registry fees |
| Lease | a block the holder lets you announce: a Letter of Authorisation (LOA) plus a ROA for your AS | a monthly per-address fee; the holder can take it back |
A transfer is a registry procedure, not just a payment. Both parties confirm it in their registry accounts; ARIN checks that the receiver can justify the space (24-month need), RIPE NCC checks the paperwork and then locks the block against re-transfer for 24 months. Only when the database shows you as holder is it yours.
Size matters for routing, not just money. A /24 is the longest IPv4 prefix and a /48 the longest IPv6 prefix that networks across the internet accept. A /25 or a /56 is filtered by most of them and never becomes globally reachable. “One IP of my own” therefore means “a /24 that contains it”.
Get an AS number (ASN)
To announce a prefix yourself you need an Autonomous System Number. It identifies your network in BGP: every route carries the list of ASes it has passed through (the AS path), and the last one in that list, the origin, is the network claiming the prefix.
- Format. ASNs are 32-bit (RFC 6793). The 16-bit range (1–65535) is used up apart from recycled numbers, so expect a six-digit or longer number written in plain decimal.
- Justification. RIPE NCC requires the network to be multihomed: BGP sessions to at least two other ASes, named in the request. ARIN accepts multihoming or a routing policy that differs from your upstream’s.
- Cost. RIPE NCC charges €50 a year per ASN since 2025 (it was free before); at ARIN up to three ASNs are included in the $275 category.
Private ASNs (64512–65534 and 4200000000–4294967294, RFC 6996) work inside a network but are stripped or rejected on the public internet.
Route object and RPKI ROA: what other networks check
Holding the space is not enough. The routers that will carry your route check public databases before they trust it. Three records do the work:
1. The registration itself: inetnum (IPv4) or inet6num (IPv6) in the registry database, saying who holds the block and which maintainer may edit it, plus aut-num for your ASN.
2. A route object in an Internet Routing Registry (the RIR’s own, or RADb). It states which AS may originate the prefix. Upstream ISPs build the prefix filter for your BGP session from it, usually automatically with a tool such as bgpq4:
route: 198.51.100.0/24
descr: example network
origin: AS64500
mnt-by: EXAMPLE-MNT
source: RIPE
route6: 2001:db8:4000::/48
origin: AS64500
mnt-by: EXAMPLE-MNT
source: RIPE
3. An RPKI ROA (Route Origin Authorisation), created in the registry’s portal and signed with the certificate the registry issues for your space. It says: prefix 198.51.100.0/24, max length /24, origin AS64500. Routers doing Route Origin Validation (RFC 6811) mark every BGP route valid, invalid or not-found against all published ROAs, and the large transit networks drop the invalid ones.
Two ROA mistakes take your own prefix off the internet: the wrong origin AS, and a max length shorter than what you announce (ROA for a /23 with max length /23, announcement of the two /24s: both invalid). Set max length equal to the prefix length you actually announce (RFC 9319) and create the ROA before the first announcement.
Add reverse DNS while you are in the database: a domain object for 100.51.198.in-addr.arpa (IPv6: 0.0.0.4.8.b.d.0.1.0.0.2.ip6.arpa) delegating the zone to your nameservers, so 198.51.100.10 can resolve back to a name.
Announce the prefix with BGP
The registry records exist; now the numbers have to become a route. This is the chain from the address on your server to every router on the internet:
- inetnum + aut-num The registry database records who holds
198.51.100.0/24(inetnum) andAS64500(aut-num), and which maintainer may edit them. Every other record hangs off these two. - route object
route: 198.51.100.0/24,origin: AS64500in an Internet Routing Registry. Both ISPs generate the prefix filter for your session from it, so a prefix with no route object dies at the first hop. - RPKI ROA A signed statement:
AS64500may originate198.51.100.0/24, max length/24. Routers doing origin validation (RFC 6811) rate each route valid, invalid or not-found and drop the invalid. - 1 · Your server
ip addr add 198.51.100.10/24: any address from the block, chosen by you. No provider's DHCP is involved. - 2 · Your router The server's default gateway and the BGP speaker of
AS64500. It originates the prefix: an UPDATE message with NLRI198.51.100.0/24and AS_PATH64500. - 3 · Your ISPs Each upstream checks the UPDATE against its prefix filter (route object) and the ROA, prepends its own AS (AS_PATH
64496 64500) and sends it on to its peers and transit providers. - 4 · Internet routers Every network in the default-free zone, where the full table holds about a million IPv4 prefixes, installs the best path it hears for
198.51.100.0/24. Seconds to minutes. - 5 · Reachable A packet for
198.51.100.10is forwarded hop by hop on the longest matching prefix towardAS64500: the opposite direction to the announcement. - DNS An
Arecord pointsexample.comat the address; thePTRin the reverse zone delegated to your nameservers points back. DNS names the address, it does not route it.
1. Server. Inside your network nothing is special: the server takes an address from the block and a default route to your router.
ip addr add 198.51.100.10/24 dev eth0
ip route add default via 198.51.100.1
2. Router and BGP session. You need a provider that will run BGP with you: a transit ISP, a colocation datacentre, or a VPS host that offers BGP sessions. You send them the prefix and ASN (some ask for an LOA); they build a filter from your route object and configure their side. A minimal BIRD 2 configuration that originates the block and announces nothing else:
router id 198.51.100.1;
protocol device { } # learn interfaces; BGP needs them to reach the neighbour
protocol kernel {
ipv4 { export where source = RTS_BGP; }; # install the routes learned from the ISPs
}
protocol static own_v4 {
ipv4;
route 198.51.100.0/24 unreachable; # puts the prefix in BIRD's table so BGP can export it
}
protocol bgp isp_a {
local as 64500;
neighbor 203.0.113.1 as 64496; # the ISP's end of the link
ipv4 {
import all; # or a default route only
export where proto = "own_v4"; # announce our prefix, nothing else
};
}
The second upstream is the same protocol bgp block with its neighbour address and as 64497. Exporting only your own prefix matters: a router that re-exports what it learned from ISP A to ISP B has made itself a transit path between them, which is what a route leak is. The upstreams’ filters are the safety net, not the plan.
3–4. Propagation. Your ISPs pass the route to their peers and transit providers, each prepending its AS to the path, until every network in the default-free zone (routers with no default route, carrying the full table of about a million IPv4 prefixes) has an entry for 198.51.100.0/24. With the session up and the filters open this takes seconds to minutes. The usual delay is the upstream refreshing its IRR-built filter, which some do nightly and some on request.
5. Reachability. From then on a packet for 198.51.100.10 sent anywhere on the internet is forwarded toward AS64500, enters through whichever ISP the sender’s network prefers, and reaches the server.
Check that the prefix is reachable
Look at the route from outside, not from your own router:
# Who holds the block, and is a route object registered?
whois -h whois.ripe.net 198.51.100.0/24
whois -h whois.radb.net 198.51.100.0/24
# RPKI: is AS64500 a valid origin? (RIPEstat public API)
curl -s 'https://stat.ripe.net/data/rpki-validation/data.json?resource=AS64500&prefix=198.51.100.0/24'
# Do the public route collectors (RIPE RIS) see it, and with what AS path?
curl -s 'https://stat.ripe.net/data/looking-glass/data.json?resource=198.51.100.0/24'
# End-to-end, from a machine outside your network
traceroute 198.51.100.10
| Check | Expected | If not |
|---|---|---|
| whois | holder is you; route object with origin: AS64500 | create or fix the route object |
| RPKI | valid | invalid: fix the ROA before anything else. unknown: no ROA yet |
| Collectors | paths ending 64496 64500 and 64497 64500 | an upstream is still filtering: ask it to refresh its prefix filter |
| traceroute | ends at your server | route is there but packets die: check the router’s forwarding and firewall |
DNS: A record and reverse PTR
DNS does not make an address reachable. It maps a name onto an address that already is:
example.com. A 198.51.100.10
10.100.51.198.in-addr.arpa. PTR example.com.
The A record lives in the zone of whoever hosts example.com. The PTR lives in the reverse zone the registry delegated to your nameservers through the domain object above. Mail is where it bites: Gmail and most large receivers reject a sender whose address has no PTR, or whose PTR name does not resolve back to the same address. How a resolver walks from the root to that A record is shown step by step in the DNS recursive resolution simulator.
Without your own router: BYOIP, hosted announcement, leasing
- Bring your own IP (BYOIP) to a cloud. AWS, Google Cloud and Azure announce a
/24or larger (IPv6:/48) that you hold from their network. You prove control with a ROA naming their origin AS (AWS:AS16509andAS14618; Google Cloud:AS396982; Azure:AS8075) plus a signed message or a registry record they verify. The addresses then appear in your account and remain yours when you leave. - Let a host announce it for you. With one upstream only, many providers will originate your PI block from their ASN against an LOA and a ROA naming them: no ASN or router of your own. You give up multihoming and keep the addresses portable.
- Lease instead of buy. The fastest way to IPv4. The lessor publishes the ROA for your ASN. Read the term and notice period: when the lease ends the ROA is revoked and your announcement turns invalid.
FAQ: getting your own IP addresses
Can I get a single IP address of my own?
Not one that is routed by itself. The smallest block accepted across the internet is a /24 of IPv4 or a /48 of IPv6, so you hold the whole block and use as much of it as you need. A “static IP” from an ISP is one address of the ISP’s PA space, on loan for the length of the contract.
How much does it cost to get your own IP addresses?
IPv6 with an ASN through a sponsoring LIR in the RIPE region: €125 a year in registry fees (€75 for the /48, €50 for the ASN) plus the sponsor’s margin. An IPv4 /24 on top: roughly $5,000–9,000 once to buy, or a monthly lease. As a RIPE NCC member: €1,000 once and €1,800 a year. At ARIN: $275 a year for up to a /24, a /40 of IPv6 and three ASNs. Then the BGP session, which some providers include and some charge for.
Do I need an ASN to use my own IP addresses?
No. A provider can originate your block from its ASN (an LOA, a ROA naming its AS), and cloud BYOIP works the same way. You need your own ASN once you announce the block yourself, which is also the only way to use two upstreams at once.
How long does it take?
IPv6 PI and an ASN: days, most of it document checks. A purchased IPv4 block: one to a few weeks for the transfer. A waiting-list /24: more than a year. Once the route object and ROA exist, the announcement itself is visible worldwide within minutes.
Can I announce my own IP addresses from a home connection?
Not natively: residential ISPs do not run BGP with customers. The common workaround is a VPS or router at a provider that does, with a tunnel (WireGuard, GRE) carrying the block home.
TL;DR: “Your own IP” is a block registered to you at a Regional Internet Registry (RIPE NCC, ARIN, APNIC, LACNIC, AFRINIC), as an LIR member or as PI space through a sponsoring LIR. IPv6 is there for the asking (
/48PI, up to a/29per LIR); IPv4 comes from a waiting list, the transfer market (about $20–35 per address in 2026) or a lease, and has to be at least a/24to be routed. Get an ASN, register a route object and sign an RPKI ROA for it, then announce the prefix over BGP to your upstreams, and only that prefix. Check it on whois, RIPEstat and the route collectors, then point DNS (A,PTR) at it.