---
title: "What Is an ASN? How to Look Up an AS Number and Why It Matters"
description: "Learn what an ASN is, who assigns AS numbers, 16-bit vs 32-bit, and how BGP differs from registration. Includes whois, RDAP, DNS lookups and cdnping steps."
url: https://cdnping.org/en/blog/what-is-asn-and-how-to-look-up
language: en
published: 2026-10-27
category: "IP & privacy"
tags: ["ASN","BGP","RDAP","IP type","datacenter IP"]
source: cdnping.org
license: Free to quote and summarize with a link to the url above.
---
# What Is an ASN? How to Look Up an AS Number and Why It Matters

What is an ASN? An ASN (Autonomous System Number) is the identifier of a network at the internet routing layer. When an ISP, cloud provider, or university announces a set of IP prefixes it manages to the internet under one routing policy, that whole unit is called an autonomous system (AS), and its number is the ASN. Looking up which ASN an IP belongs to tells you who is announcing that address block to the internet, which says more about the nature of the IP than "which city is it in."

## Who assigns AS numbers?

The assignment chain has three levels:

1. **IANA** manages the entire AS number space and hands out blocks to the five Regional Internet Registries (RIRs).
2. **RIRs** work by region: APNIC for Asia-Pacific, ARIN for North America, RIPE NCC for Europe, the Middle East and Central Asia, LACNIC for Latin America, and AFRINIC for Africa. Some countries also have a National Internet Registry (NIR). In mainland China it is CNNIC, which receives resources from APNIC and passes them on to domestic members.
3. **ISPs, cloud providers, IDCs (data center operators), and enterprises** apply to an RIR or NIR for an AS number, and apply for IP prefixes at the same time or already hold them.

A common misconception is that "the IETF assigns ASNs." The IETF writes protocol standards, such as BGP and the 32-bit AS number specification. The actual number assignment is done by IANA and the RIRs.

## What is the difference between 16-bit and 32-bit AS numbers?

Early AS numbers were 16 bits, ranging from 0 to 65535. When the numbers started running out, RFC 6793 extended AS numbers to 32 bits, with a maximum of 4294967295. Most newly assigned numbers are now 32-bit, so you will see short ones like AS4134 as well as six-digit and ten-digit ones. The length of a number only reflects when it was requested. It says nothing about network size or quality.

A few special ranges worth recognizing:

| Range | Meaning |
|---|---|
| AS23456 | AS_TRANS, a placeholder used when old equipment does not understand 32-bit numbers. It does not represent a real network |
| AS64496–64511 | Reserved for documentation and examples |
| AS64512–65534 | 16-bit private numbers, used only inside internal networks and should not appear in public routing |
| AS4200000000–4294967294 | 32-bit private numbers |

If a private number shows up in your results, it usually means the lookup tool or a particular route record has a problem. Try another data source.

## Registration and BGP announcement are two different things

An IP prefix carries two kinds of ownership information:

- **Registration data**: in the RIR database, who the prefix is registered to, which country it is in, and the contacts. This is what RDAP and whois return.
- **Routing data**: which AS is currently announcing the prefix over BGP on the internet, known as the origin AS. Packets actually follow this.

In most cases the two agree: a prefix registered to an ISP is announced by that ISP's AS. But mismatches are common too, for example with IP leasing, or when a prefix is registered in country A but announced by a data center in another country. The latter is what people call a "broadcast IP" (an announced IP), and it is why geolocation databases can return different locations. The difference between native and broadcast IPs is covered in [Native IP vs. broadcast IP](/en/learn/native-ip-vs-broadcast-ip), and why geolocation drifts is covered in [Why IP geolocation is inaccurate](/en/blog/why-ip-location-is-inaccurate).

So when you look up an ASN, check both: the prefix's registration data and the AS currently announcing it.

## Why does ASN matter most for telling datacenter from residential?

When a website classifies an IP type, the ASN is usually the first clue it looks at, because an AS generally has a stable primary line of business.

- ASes of cloud providers and IDCs announce mostly server addresses. A match makes a datacenter classification very likely.
- ASes of fixed-line ISPs' home broadband announce mainly residential broadband addresses.
- ASes of mobile carriers usually put addresses behind CGNAT, with many users sharing an egress. For how shared egress affects reputation, see [Do shared IPs and CGNAT affect IP reputation?](/en/blog/shared-ip-cgnat-reputation)

Many detection services maintain a "hosting ASN list" that collects the AS numbers of cloud providers, IDCs, and VPS vendors. An IP that falls in one of those ASes is flagged as hosting or datacenter. This is easier to maintain than classifying by city or by hand-sorting IP ranges.

But the ASN is not the only signal, and several situations can make it unreliable:

- **One AS mixes several kinds of business.** Large ISPs also run their own IDCs, so residential and datacenter addresses may sit under the same AS. In that case look at the RDAP prefix name and the reverse DNS as well.
- **One company has multiple ASes.** For example, Chinese telecom carriers use different AS numbers for the regular backbone and the premium network, and cloud providers can have more than one AS too: Amazon has AS14618 in addition to AS16509.
- **The announcer is not the user.** A leased prefix is announced by the IDC, but the actual user may be a different company.

For the full set of signals that separate datacenter and residential IPs, including prefix name, reverse DNS, reputation databases, and latency characteristics, see [Datacenter IP vs. residential IP](/en/blog/datacenter-ip-vs-residential-ip). For how much weight ASN carries in an IP risk score, see [What affects an IP risk score](/en/blog/what-affects-ip-risk-score).

## How to recognize common ISP and cloud provider ASes

You do not need to memorize numbers. Reading the AS name and registration data is usually enough to tell them apart:

| What to check | ISP home broadband | Cloud / IDC | Mobile network |
|---|---|---|---|
| AS name | Contains Telecom, Unicom, Broadband, etc. | Contains Cloud, Hosting, Datacenter, Server, or a cloud provider's company name | Contains Mobile, Wireless, etc. |
| RDAP prefix name | Often includes a province, city, and broadband wording | Often includes IDC, CLOUD, HOSTING, or a regional data center code | Often includes MOBILE, GPRS, LTE, etc. |
| Reverse DNS | Often a long auto-generated hostname based on the address, or none | Often the cloud provider's shared domain, or none | Often none, or the carrier's standard format |
| Address density | Many prefixes, widely scattered | Concentrated prefixes, often announced as whole blocks | Few egress points, heavily shared |

A few numbers that readers in China run into often, as a reference: China Telecom backbone AS4134 (commonly called 163), China Telecom premium network AS4809 (CN2), China Unicom AS4837, Unicom premium network AS9929 (CUII), China Mobile AS9808, and China Mobile International AS58453 (CMI). How cross-border routes relate to these numbers is explained in more detail in [CN2 GIA, 163, 9929, and CMI explained](/en/blog/cn2-gia-9929-cmi-routes-explained). Common ones outside China include Cloudflare AS13335, Google AS15169, Amazon AS16509, and Microsoft AS8075. For an unfamiliar number, run the commands in the next section and check the name and registry.

## How to look up the ASN of an IP (you can follow along)

The commands below work on macOS and Linux. On Windows you can run them in WSL. Replace the example IP with the address you want to check.

### 1. Query the origin AS over DNS (fastest)

Team Cymru offers a DNS-based IP-to-ASN lookup. Write the IP in reverse order, for example to look up 1.2.3.4:

```bash
dig +short TXT 4.3.2.1.origin.asn.cymru.com
# Returns: origin AS | prefix | country | RIR | allocation date

dig +short TXT AS13335.asn.cymru.com
# Returns the AS name and registry
```

### 2. Query route objects with whois

```bash
whois -h whois.cymru.com " -v 1.1.1.1"
whois -h whois.radb.net 1.1.1.1
```

The first command returns the AS, prefix, and AS name directly. The second queries the RADb routing registry (IRR) and returns a `route:` object whose `origin:` field is the registered origin AS. Note that IRR data is submitted by network operators themselves and can be out of date. It shows that someone registered it, not that BGP is actually announcing it that way right now.

### 3. Query registration data with RDAP

RDAP is the structured replacement for whois. It returns JSON, which is easy to script:

```bash
# Registration data for the prefix containing the IP
curl -sL https://rdap.org/ip/1.1.1.1 | jq '{name, country, startAddress, endAddress}'

# Registration data for an AS number
curl -sL https://rdap.org/autnum/4134 | jq '{handle, name, country}'
```

rdap.org redirects the request to the right RIR using IANA's bootstrap files. You can also query an RIR service directly, such as `https://rdap.apnic.net/autnum/4134`.

### 4. See what BGP is actually announcing

Registration data only tells you who owns a block. To see who is announcing it now and what its upstreams are, use a public BGP lookup site such as bgp.tools or bgp.he.net. Enter an IP or AS number to see prefixes, upstreams, and peers. bgp.tools also supports the whois format:

```bash
whois -h bgp.tools " -v 1.1.1.1"
```

If the DNS lookup, RADb, and the BGP lookup site disagree on the origin AS, trust the current announcement shown by the BGP site, then use RDAP to see the registrant. If the two do not match, you are looking at the broadcast IP or leased prefix case described above.

## How to read the ASN in cdnping

If you would rather not type commands, open [IP & environment check](/en/ip) to see the following for your current egress IP:

1. ASN and carrier name: first see whether the name belongs to an ISP, a cloud provider, or a mobile network, using the table above.
2. RDAP prefix registration data: check the prefix name and registered country, and whether they are consistent with the ASN.
3. Native IP / broadcast IP verdict: read it alongside the registration vs. announcement distinction above.
4. IP type: one of four categories: datacenter, residential, mobile, Tor.
5. The "hosting ASN list" item under purity: it is one of the 14 reputation sources the purity summary draws on. A match means the AS is classified as a hosting network. The weight of every matched item is published.

When reading results, keep in mind that a "hosting ASN list" match does not by itself mean there is an abuse record. It only says the address is a datacenter address. For how to interpret each purity source and its weight, see [How the IP purity score is calculated](/en/blog/ip-purity-score-explained). The criteria behind each check are written up in [Methodology](/en/methodology).

cdnping started collecting data on 2026-10-17 and has not published statistics aggregated by ASN, so this article does not give figures such as "what share of ASes are of a certain type."

## A quick checklist

When you get an IP, check in this order:

- [ ] What the origin AS is, and whether the name belongs to an ISP, a cloud provider, or a mobile network
- [ ] Whether the RDAP prefix name and registered country are consistent with the AS
- [ ] Whether it is a private number or AS23456 (if so, switch data sources)
- [ ] Whether the origin registered in the IRR matches what BGP currently announces
- [ ] Whether the reverse DNS looks like a cloud provider's shared domain
- [ ] On /ip, the IP type and whether the "hosting ASN list" matches

The ASN answers "who announces this block of addresses," while geolocation answers "roughly where is this address." The former comes from registration and routing data, the latter from inference by geolocation databases. To see what else an IP can reveal, read [What your IP address actually reveals](/en/blog/what-your-ip-address-reveals).
