What is an ASN (autonomous system number)?
Definition
The number that identifies a network announcing IP addresses on the internet. For proxies, it decides how an exit is classified before it is used.
An autonomous system is a network run under one routing policy that announces its blocks of addresses to the rest of the internet over BGP. The ASN is its identifier. Every routed public address sits inside a block some autonomous system announces, and that mapping is public. For proxy work, that makes the ASN the cheapest classification signal there is: a defence can label an address as consumer broadband, mobile or hosting from its ASN alone, before it has seen a single request.
Look one up
Team Cymru runs a free IP-to-ASN service built from BGP feeds and registry records. Both of these are real outputs:
$ whois -h whois.cymru.com " -v 8.8.8.8"
AS | IP | BGP Prefix | CC | Registry | Allocated | AS Name
15169 | 8.8.8.8 | 8.8.8.0/24 | US | arin | 2023-12-28 | GOOGLE - Google LLC, US
$ dig +short TXT 8.8.8.8.origin.asn.cymru.com
"15169 | 8.8.8.0/24 | US | arin | 2023-12-28"
The space before -v inside the quotes is deliberate; Team Cymru’s documentation uses it so the local whois client passes the flag through instead of parsing it. The DNS form expects the address with its octets reversed, which 8.8.8.8 hides: 203.0.113.10 becomes 10.113.0.203.origin.asn.cymru.com.
Read three fields. The AS name tells you whose network it is, and usually whether it is an access provider or a hosting company. The BGP prefix is the block actually announced, which is the unit a defence can act on. The CC column is the country in the registry record, and Team Cymru warns it often differs significantly from where an address is actually used, so do not read it as a location; geo-targeting explains why.
The number space
ASNs were 16-bit until RFC 6793 standardised four-octet numbers. IANA’s registry sets aside these ranges:
| Range | What it is for | Defined in |
|---|---|---|
| 0 | Reserved | RFC 7607 |
| 23456 | AS_TRANS, the stand-in a router that only understands 16-bit numbers sees in place of a four-octet ASN | RFC 6793 |
| 64496 to 64511 | Documentation and sample code | RFC 5398 |
| 64512 to 65534 | Private use | RFC 6996 |
| 65535 | Reserved | RFC 7300 |
| 65536 to 65551 | Documentation and sample code | RFC 5398 |
| 4200000000 to 4294967294 | Private use | RFC 6996 |
| 4294967295 | Reserved | RFC 7300 |
Four-octet numbers have more than one spelling, which trips up anyone grepping logs or config. RFC 5396 names them: in plain decimal, the form IANA uses, AS 65546 is 65546; in the older dotted form it is 1.10, the high 16 bits and the low 16 bits joined by a period. Some tools print the dotted form, so convert before comparing.
Everything else is the public space, handed out through the regional registries. Two practical uses: write examples with a documentation ASN such as AS64500, never a real network’s number, and treat a private-use ASN in a lookup result as a sign you are looking at internal routing rather than the public internet.
Why it decides how an exit is treated
The number itself carries no label. Classification comes from databases that record what each network is, and that is the line between residential and datacenter in practice: which network announces the address, not where the hardware sits. It is also why an ISP proxy exists. Its addresses are announced under an access provider’s ASN while the machines live in a datacentre. The proxy type guide walks through testing whether a target actually checks.
A network is one identifier, so it is also one decision. When a defence refuses an ASN, every address under it goes at once. That is why a pool should be judged by how many distinct networks it spans, not by how many addresses it lists, and why the proxy pool entry counts networks with the same Team Cymru service shown above. To find the ASN of an exit you are using, ask an echo service for your address through the proxy, then look that address up:
exit=$(curl -s -x http://user:pass@gw.example.net:8000 https://api.ipify.org)
whois -h whois.cymru.com " -v $exit"
When a supposedly residential exit is being treated as though it were flagged, this is the first check to run. The curl guide covers the related checks on the exit address and its geography, and what is a proxy server? covers what else a destination sees.
Frequently asked questions
What is the difference between an ASN and an IP address?
Can one organisation have several ASNs?
Sources
- IANA: Autonomous System (AS) Numbers registry, special-purpose ranges
- RFC 6793: BGP Support for Four-Octet Autonomous System (AS) Number Space
- RFC 5398: Autonomous System (AS) Number Reservation for Documentation Use
- RFC 6996: Autonomous System (AS) Reservation for Private Use
- RFC 5396: Textual Representation of Autonomous System (AS) Numbers
- Team Cymru: IP to ASN mapping service