# IP ASN, now free: announced space by origin AS

IP ASN, every announced IPv4 and IPv6 range with its origin AS and the route's RPKI status, is free now with any account under CC BY-SA 4.0.

[IP ASN](https://internetdata.io/databases/ip-asn) is now one of our Open databases, every column included: free to download with any account under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). It's every range in the global routing table, split so that each address belongs to the most specific prefix announcing it, with the AS originating that prefix, the network's name, domain, type and country, and the route's RPKI status.

## One origin per range

| Prefix | AS | Name | Domain | Type | Country | RPKI |
|---|---|---|---|---|---|---|
| `1.1.1.0/24` | 13335 | Cloudflare, Inc. | cloudflare.com | `hosting` | US | `valid` |
| `13.35.201.0/24` | 16509 | Amazon.com, Inc. | amazon.com | `hosting` | US | `valid` |
| `37.99.10.0/24` | 21299 | Kar-Tel LLC | beeline.kz | `isp` | KZ | `not_found` |
| `102.135.34.0/24` | 9009 | M247 Europe SRL | m247global.com | `hosting` | RO | `invalid:origin` |
| `2a01:4f8::/32` | 24940 | Hetzner Online GmbH | hetzner.com | `hosting` | DE | `valid` |

Where more than one AS originates a prefix, the row keeps the one most of the routing table sees. `country` is where the AS is registered, which isn't always where an address is used: [IP Country](https://internetdata.io/databases/ip-country) has that. `rpki_status` is the route checked against the published RPKI data (RFC 6811): `valid`, `not_found` where no ROA covers it, and `invalid:origin` or `invalid:length` where one contradicts it.

## What's in it

The October 15 build holds 1,468,057 ranges, 1,168,584 IPv4 and 299,473 IPv6, covering 3,127,523,472 announced IPv4 addresses from 86,443 origin networks. Routes that RPKI validates cover 65.1% of those addresses and routes no ROA covers 34.9%, with 1,929,928 under an invalid route.

| The origin AS's `type` | IPv4 addresses |
|---|---|
| `isp` | 1,989,816,745 (63.6%) |
| `hosting` | 456,405,863 (14.6%) |
| `government` | 314,997,776 (10.1%) |
| `education` | 203,939,828 (6.5%) |
| `business` | 162,363,260 (5.2%) |

`name`, `domain`, `type` and `country` are the origin AS's as the free [ASN](https://internetdata.io/databases/asn) database publishes them, so the two join on `asn`.

## Getting access

[Sign up](https://app.internetdata.io/auth/signup), and IP ASN is in the console with a download button, already licensed to your organization: nothing to request. With an API key, the [CLI](https://docs.internetdata.io/integrations/cli) and the client libraries download it as they do any database:

```sh
internetdata db download ip_asn_v1
```

In BigQuery, subscribe to the free `InternetData Open` listing, or `InternetData Open EU`, and look addresses up inline ([BigQuery](https://docs.internetdata.io/integrations/bigquery) has the details):

```sql
SELECT
    l.ip,
    internetdata_open.ip_asn_v1(l.ip).asn AS asn,
    internetdata_open.ip_asn_v1(l.ip).name AS network,
    internetdata_open.ip_asn_v1(l.ip).type AS type
FROM mydataset.logins AS l
```

CC BY-SA 4.0 asks two things: credit InternetData with a link to [internetdata.io](https://internetdata.io), and share what you build from the data under the same license. Building it into something you sell without sharing alike takes a [redistribution license](https://internetdata.io/pricing). Its [docs page](https://docs.internetdata.io/database/ip-asn) has the schema.

