Network & delivery

6 min readUpdated

What is an ASN? Autonomous system numbers explained

Quick answer

An autonomous system number (ASN) identifies a network that runs its own routing policy on the internet, such as an ISP, cloud provider or hosting company, and announces its IP prefixes with BGP. ASNs are 32-bit numbers distributed by IANA through the five regional internet registries. To find the ASN behind an IP address, query a routing-based service such as Team Cymru's whois, RIPEstat or bgp.tools, then use the registry record for the holder and abuse contact.

01What is an autonomous system and an ASN?

An autonomous system (AS) is a network, or a group of networks, under one routing policy. RFC 1930 puts it as "a connected group of one or more IP prefixes run by one or more network operators which has a SINGLE and CLEARLY DEFINED routing policy". ISPs, cloud platforms, hosting companies, universities and large enterprises each run one or more.

The autonomous system number is how that network identifies itself in BGP. Every route carries an AS path, the list of ASNs it has passed through, and the last ASN in the path is the origin: the network claiming the prefix. On 24 October 2026 the CIDR Report counted 79,726 ASes in the IPv4 routing table.

An ASN is neither an IP address nor a company. One organisation may hold several ASNs, and one ASN can announce thousands of prefixes, or just one.

0216-bit and 32-bit ASNs, and the reserved ranges

ASNs were originally 16-bit numbers, 65,536 values in total. RFC 6793 extended BGP to 4-byte numbers, about 4.29 billion values. Routers that only understand 2-byte numbers see the placeholder AS 23456 (AS_TRANS) wherever a 4-byte ASN appears, which is why that number turns up in old equipment's output.

RFC 5396 recommends writing ASNs as plain decimal numbers (asplain). Older tools use asdot, which writes values from 65,536 upwards as two 16-bit halves: AS 65546 becomes 1.10.

RangePurposeDefined in
0Reserved; may not be used in routing, but appears in AS0 ROAsRFC 7607, RFC 6483
23456AS_TRANS placeholder for 4-byte ASNsRFC 6793
64496–64511 and 65536–65551Documentation and sample codeRFC 5398
64512–65534Private use (16-bit)RFC 6996
4200000000–4294967294Private use (32-bit)RFC 6996
65535 and 4294967295ReservedRFC 7300
65552–131071ReservedIANA AS numbers registry
All other numbersAllocated by IANA to the regional registries, which assign them to networksIANA AS numbers registry

03Who assigns ASNs?

IANA allocates blocks of ASNs to the five regional internet registries, AFRINIC, APNIC, ARIN, LACNIC and the RIPE NCC, which assign individual numbers to networks in their regions, directly or through sponsoring members. RFC 1930 explains the logic: a network needs its own ASN when it has its own routing policy, typically because it connects to more than one upstream provider.

A customer that only ever talks to one provider usually needs no public ASN. It can use a private one on its BGP session, or let the provider announce its addresses.

04How to look up the ASN of an IP address

Use a source built from live routing data for "which network announces this address now", and the registry for "who holds it and whom do I contact". The table compares the sources. The commands after it are read-only queries to public services, using the RIPE NCC's own address, 193.0.6.139, with real output shortened. For a quick answer in the browser, the IP & ASN lookup shows the ASN, organisation and prefix for any address.

SourceAnswersCaveat
BGP-derived (Team Cymru, RIPEstat, bgp.tools)Who announces this address right nowShows the announcement, legitimate or not
Registry whois (inetnum, aut-num)Who holds the block, and the abuse contactHolder and announcer can differ, for example with leased space or routed DDoS protection
IRR route objects (RIPE, RADb)Which ASN the holder intends to originate itSome IRRs do not verify the registrant; stale objects are common
PeeringDBWhat kind of network an ASN is and how it peersSelf-reported by the network
IP to ASN lookups (run with whois 5.5.17, dig 9.18 and curl 7.88)
# Team Cymru's IP-to-ASN service, built from BGP data
whois -h whois.cymru.com " -v 193.0.6.139"
# AS   | IP          | BGP Prefix   | CC | Registry | Allocated  | AS Name
# 3333 | 193.0.6.139 | 193.0.0.0/21 | NL | ripencc  | 1993-09-01 | RIPE-NCC-AS ...

# the same over DNS: reverse the octets
dig +short TXT 139.6.0.193.origin.asn.cymru.com
# "3333 | 193.0.0.0/21 | NL | ripencc | 1993-09-01"

# RIPEstat: announcing ASN and prefix as JSON
curl -s 'https://stat.ripe.net/data/network-info/data.json?resource=193.0.6.139'

# registry route object: the ASN the holder says should originate it
whois -h whois.ripe.net -- '-T route 193.0.6.139'

# every route object registered for an ASN in RADb
whois -h whois.radb.net -- '-i origin AS3333'

05What an ASN lookup tells you, and what it does not

A lookup returns the origin ASN, the covering prefix, the registry, the allocation date and a name. Read each with care.

  • The country code is where the block or ASN is registered, not where the device is
  • The AS name is the holder's label, often abbreviated or out of date after mergers
  • Two origin ASNs for one prefix can be a deliberate set-up, but it is also what a hijack looks like; see BGP hijacking
  • A more specific prefix than usual from an unfamiliar ASN deserves a second look
  • Where routing data and registry disagree, the routing data shows where packets actually go

06Why ASNs matter for DDoS mitigation and abuse reports

Grouping traffic by origin ASN turns thousands of addresses into a handful of networks, which is how operators make sense of an attack. A flood that comes mostly from hosting and cloud ASNs looks very different from one spread across residential broadband networks, which points towards a botnet of compromised home devices.

Two cautions apply. In reflection and amplification attacks the packets really do come from the reflectors' networks, but those servers are victims too, misused through spoofed requests. And blocking an entire ASN is blunt: hosting networks carry legitimate API clients, monitoring and crawlers alongside abuse, so ASN works best as one signal among several, as in bot management.

For abuse reports, the registry record names the contact. RIPE NCC records carry an abuse-mailbox attribute, which RIPEstat also exposes through its API:

Finding the abuse contact and network type
whois -h whois.ripe.net -- '-b 193.0.6.139'
# inetnum:        193.0.0.0 - 193.0.7.255
# abuse-mailbox:  [email protected]

curl -s 'https://stat.ripe.net/data/abuse-contact-finder/data.json?resource=193.0.6.139'

# what kind of network an ASN is, from PeeringDB
curl -s 'https://www.peeringdb.com/api/net?asn=3333'

07Do you need your own ASN?

You need one to announce address space under your own routing policy to more than one network, which covers multihoming across two transit providers and many bring-your-own-IP arrangements. You also need to know your ASN, or your provider's, to publish correct ROAs, because a ROA names the ASN allowed to originate a prefix; see what RPKI is.

For routed DDoS protection of your own prefix there are two common set-ups. Either the provider originates your prefix from its ASN during mitigation, which needs a ROA naming the provider's ASN, or your ASN stays the origin and the provider acts as transit. RFC 9319 describes both and warns that the ROA must exist before the attack, because RPKI changes propagate more slowly than BGP. Clean traffic then reaches you through a tunnel, compared in GRE vs IPIP.

Questions

Frequently asked questions

An IP address identifies a single interface or host. An ASN identifies a whole network that runs its own routing policy and announces blocks of IP addresses, called prefixes, to the rest of the internet with BGP. Looking up the ASN of an address tells you which network is responsible for routing it, not which device is using it.

Not exactly. Most ISPs have at least one ASN, but so do cloud providers, hosting companies, content networks, universities and large enterprises. Some organisations hold several ASNs for different regions or businesses, and some small ISPs have none and route through their upstream's ASN. An ASN describes a routing policy, not a type of company.

An address is covered by one or more announced prefixes, and the same prefix can be originated by more than one ASN at the same time. That happens legitimately with some anycast and DDoS mitigation set-ups, and illegitimately during hijacks. If a lookup shows an origin you do not expect, check the prefix's RPKI status and its routing history before assuming either.

Only roughly. The country in an ASN or prefix record is where the resource is registered, not where the device is. A network registered in one country can announce its addresses from data centres around the world, and mobile and satellite networks route users far from home. Use dedicated geolocation data when location matters, and treat registry countries as a hint.

Apply to the regional internet registry for your region, either directly as a member or through a sponsoring member. You normally need to show a unique routing policy, such as connections to two or more upstream networks, and address space you hold or are authorised to use. Once assigned, register route objects and ROAs for your prefixes before you start announcing them.

Sources

Sources and verification

All lookups were run against the live services with whois 5.5.17, dig 9.18 and curl 7.88.1 on Debian 12, October 2026; outputs are shortened.

  1. 01RFC 1930: Guidelines for creation, selection, and registration of an Autonomous System · RFC Editor
  2. 02RFC 6793: BGP Support for Four-Octet AS Number Space · RFC Editor
  3. 03RFC 6996: Autonomous System Reservation for Private Use · RFC Editor
  4. 04RFC 5396: Textual Representation of AS Numbers · RFC Editor
  5. 05Special-purpose AS numbers · IANA
  6. 06Autonomous System (AS) Numbers · IANA
  7. 07Regional internet registries · Number Resource Organization
  8. 08IP to ASN mapping service · Team Cymru
  9. 09RIPEstat Data API: network-info · RIPE NCC
  10. 10PeeringDB: AS3333 · PeeringDB
  11. 11bgp.tools: AS3333 · bgp.tools
  12. 12CIDR Report · CIDR Report
  13. 13RFC 9319: The Use of maxLength in the RPKI · RFC Editor

Last updated