ASN
Autonomous System Number
A globally unique number assigned to each independently operated network on the internet, used by BGP to exchange routing information between ISPs and cloud providers.
An ASN (Autonomous System Number) is a globally unique identifier assigned to an autonomous system — a network or group of networks operated under a single administrative entity with a unified routing policy. Every ISP, major cloud provider, CDN, and large university operates one or more autonomous systems. The internet is the interconnection of roughly 80,000 active ASes exchanging route announcements with each other via BGP (Border Gateway Protocol).
How ASNs are assigned
IANA (Internet Assigned Numbers Authority) delegates ASN blocks to five Regional Internet Registries (RIRs): ARIN (North America), RIPE NCC (Europe/Middle East), APNIC (Asia-Pacific), LACNIC (Latin America), and AFRINIC (Africa). Organisations apply to their regional RIR to receive an ASN, demonstrating a need for independent routing policy — typically because they connect to two or more upstream providers (multi-homing) or operate infrastructure at significant scale.
16-bit vs 32-bit ASNs and private ASNs
| Range | Type | Notes |
|---|---|---|
| 1 – 64511 | Public 16-bit | Original range, globally routable |
| 64512 – 65534 | Private 16-bit | For internal iBGP use, not announced on internet |
| 65535 | Reserved | Not for use |
| 131072 – 4199999999 | Public 32-bit | Extended range introduced in RFC 4893 (2007) |
| 4200000000 – 4294967294 | Private 32-bit | For internal use per RFC 6996 |
Private ASNs (64512–65534 in 16-bit space) are used internally — for example, a large enterprise may assign private ASNs to branch offices running iBGP (internal BGP) without those ASNs ever appearing in the global routing table. They serve the same purpose as RFC 1918 private IP addresses: structuring internal routing without consuming globally unique resources.
How BGP uses ASNs
Each AS announces the IP prefixes it controls to its BGP neighbours. Every BGP route carries an AS path attribute — an ordered list of all ASNs the route has traversed. This serves two purposes: it gives routers information to choose between multiple paths, and it prevents routing loops — if a router sees its own ASN already in the AS path, it discards the route. When you send a packet to a remote server, BGP routing tables determine the sequence of ASes the packet traverses. Each AS-to-AS handoff is a peering or transit link, and the quality of those links determines real-world latency and throughput.
How to look up an ASN
Several methods work for identifying which AS owns an IP address:
- Command line:
whois <IP>on Linux or macOS returns the ASN and organisation in theoriginoraut-numfields - RIPEstat (stat.ripe.net): detailed BGP visibility, route history, and prefix data for any ASN or IP
- BGPView (bgpview.io): peer relationships, announced prefixes, and upstream providers for any ASN
- ipinfo.io: returns ASN, organisation, and geolocation for any IP via a simple API or web lookup
Major ASN holders
A handful of ASNs are worth recognising because they appear frequently in traceroutes and BGP tables:
- AS15169 — Google LLC (search, YouTube, Google Cloud)
- AS13335 — Cloudflare (CDN, DNS resolver 1.1.1.1, DDoS protection)
- AS7922 — Comcast Cable (largest US residential ISP)
- AS16509 — Amazon AWS (cloud infrastructure)
- AS32934 — Meta (Facebook, Instagram, WhatsApp)
ASN and IP geolocation
IP geolocation databases map IP addresses to physical locations partly by correlating ASN registrations, BGP route origins, and latency measurements. When a geolocation service returns a city or country for an IP, it is often inferring location from which AS owns the prefix and where that AS's infrastructure is known to be deployed. VPNs and proxies route traffic through a different AS, which is why geolocation shows the VPN server's location rather than the user's actual location.
Why ASNs matter for speed
Your speed test result measures the path between your device and the test server's AS. A fast result to a nearby server in your ISP's own AS may not reflect how fast you reach a video service in a different AS. Peering quality — whether your ISP exchanges traffic with a content provider directly at a peering point or routes it through a paid transit provider — is the hidden variable that explains why some sites load fast and others are slow on the same connection.
Frequently Asked Questions
What is an autonomous system?
A network or group of networks under a single administrative control with its own routing policy. ISPs, cloud providers, and large enterprises each operate at least one. The internet is the interconnection of ~80,000 autonomous systems exchanging routes via BGP.
How does an ASN affect my internet speed?
Traffic between two ASNs crosses peering points or transit providers. Poor peering between your ISP's AS and a content provider's AS forces packets down a longer, slower path — even if both endpoints have fast connections.
How can I find the ASN for a website or IP?
Run whois <IP> on Linux or macOS, or use an online tool like ipinfo.io or BGPView. The result shows the ASN (e.g. AS15169 for Google) and the operating organisation.