What is an ASN? Demystifying the Internet's Routing Backbone
On February 24, 2008, a single typo in a network configuration file in Pakistan instantly knocked YouTube offline for millions of users worldwide.
The Pakistani government had ordered domestic internet service providers to block access to YouTube within the country. To comply with the mandate, Pakistan Telecom (registered as AS17557) configured its internal routing tables to redirect all YouTube traffic into a black hole.
However, a routing engineer accidentally advertised this black hole route to the provider’s upstream transit provider. Within minutes, this incorrect routing information propagated across the global network like wildfire.
Routers all over the world believed Pakistan Telecom offered the absolute fastest path to YouTube. Instead of reaching Google’s servers, global traffic destined for YouTube was funneled into a bottleneck in Islamabad and dropped.
This multi-hour blackout highlighted the fascinating, fragile, and cooperative system that holds the global internet together. To understand how such an event can occur, we have to look closely at the routing backbone of the internet: Autonomous Systems and their unique identifiers, Autonomous System Numbers (ASNs).
What Exactly is an Autonomous System (AS)?
The internet is not a single, giant, centrally managed network. Instead, it is a vast patchwork of tens of thousands of smaller, independent networks connected to one another.
These individual networks are run by internet service providers, tech giants like Microsoft and Netflix, academic institutions, and government agencies. In networking terminology, any group of IP networks managed by a single organization with a clearly defined routing policy is called an Autonomous System (AS).
Think of the internet as an international airport system.
Each airport operates independently. They have their own terminal layouts, local security teams, and baggage handling systems. However, to allow passengers to travel from Tokyo to London, these airports must agree on international flight paths, signaling protocols, and customs procedures.
An Autonomous System is the digital equivalent of an airport. It manages its internal operations however it sees fit, but it must coordinate with other systems to exchange traffic across international borders.
To keep track of all these players, each “airport” needs a unique international code. That is where the Autonomous System Number comes in.
Enter the ASN: The Social Security Number of Networks
An Autonomous System Number (ASN) is a globally unique identifier assigned to an Autonomous System. Much like a passport or tax ID number, it gives a network a distinct identity on the global stage.
ASNs were originally defined in RFC 1930 as 16-bit values, allowing for up to 65,536 unique numbers. As the internet expanded at an exponential rate, the networking industry realized that these numbers would eventually run out—a scenario very similar to the IP address exhaustion we discuss in IPv4 vs IPv6 status.
To prevent this, RFC 4893 introduced 32-bit ASNs, increasing the pool of available identifiers to over 4.2 billion. Today, there are over 115,000 active ASNs actively routing traffic on the global internet.
Some of the most recognizable tech networks operate under famous ASNs:
- AS15169: Google
- AS16509: Amazon Web Services (AWS)
- AS13335: Cloudflare
When you purchase internet access from a local Internet Service Provider (ISP), your home router is assigned an IP address. That IP address belongs to a block of addresses allocated to your ISP’s ASN.
The diagram below shows how a packet travels from your home router through various ASNs to reach its final destination:
Now that we know what these systems are and how they are identified, we can look at the protocol they use to talk to one another.
How BGP Routing Uses ASNs
Autonomous Systems do not just automatically know how to reach one another. They have to tell each other which IP addresses they own and what paths they can offer to reach other networks. This exchange of routing information is handled by the Border Gateway Protocol (BGP).
If the TCP/IP protocol suite defines how data packets are formatted and packaged for transport, BGP is the global GPS system that coordinates the optimal path for those packages.
Unlike local routing protocols that operate inside a single network, BGP is a path-vector routing protocol. This means BGP does not look at individual routers or hop-by-hop steps. Instead, it looks at the sequence of ASNs that a packet must pass through to reach its destination.
A typical BGP path advertisement looks like this:
Destination: 192.0.2.0/24 -> Path: AS100 -> AS200 -> AS300
When your router sends a packet to a destination IP, the BGP routers along the way choose the path with the fewest AS hops. It is the network equivalent of choosing a direct flight over a flight with multiple layovers.
This reliance on cooperative announcements explains why the 2008 YouTube incident was so devastating.
Because BGP historically relied on implicit trust, routers around the world assumed Pakistan Telecom’s route announcement was legitimate. There was no widespread mechanism to verify if AS17557 actually had the authority to announce routes for YouTube’s network.
Today, security standards like Resource Public Key Infrastructure (RPKI) help prevent these “BGP hijacks,” but the fundamental mechanics of BGP routing remain unchanged.
With ASNs playing such a massive role in routing, how can you use them to investigate who is behind a particular IP address?
Tracking Down the Owner: How to Look Up an ASN
When analyzing network traffic, security logs, or website analytics, knowing a visitor’s IP address only gives you part of the picture.
IP addresses are dynamic; they are constantly leased, sub-leased, and shifted between locations. An ASN, on the other hand, represents the administrative entity that actually routes those IPs.
By performing an IP lookup using tools like whoip.tw, you can look past the temporary IP address to find the actual organization operating the network. An ASN lookup typically reveals:
- The ASN: The unique number (e.g., AS15169).
- The Owner’s Name: The corporation, university, or ISP registered to that number (e.g., Google LLC).
- The IP Range: The block of IP addresses allocated to that specific AS.
- The Registry Source: The Regional Internet Registry (such as ARIN or RIPE) that assigned the number.
This data is incredibly helpful for system administrators. If you see malicious traffic flooding your servers, blocking individual IPs is often a losing game of whack-a-mole. However, if you identify that all the bad traffic is coming from a specific hosting provider’s ASN, you can block the entire ASN in your firewall to stop the attack instantly.
Furthermore, accurate IP geolocation systems rely heavily on mapping IP blocks back to their respective ASNs and looking at how those networks are physically distributed.
The next time you load a website or stream a video, remember that your data is performing a coordinated dance, hopping across several massive corporate and regional networks in milliseconds, guided entirely by the numbers assigned to those autonomous systems.