What is an autonomous system? What are ASNs?

An Autonomous System (AS) is a large network—or a collection of networks—that operates under a single routing policy. Each AS is assigned a unique number called an Autonomous System Number (ASN).

June 11, 2024

In today’s interconnected world, the ongoing functioning of the internet relies on hundreds of thousands of networks communicating seamlessly. At the heart of this global connectivity lie Autonomous Systems (AS) and their unique identifiers, the Autonomous System Numbers (ASNs).

What are autonomous systems and ASNs?

An Autonomous System is essentially a large network or a group of networks under a single administrative control that presents a unified routing policy to the internet. Think of an AS as a city within a vast country — the city manages its own postal system and traffic routes, ensuring mail and packages (data packets) are efficiently delivered within its borders and to other cities.

An Autonomous System Number (ASN) is a unique identifier assigned to each AS. Much like a city’s postal code, an ASN tells the internet “who’s who” among networks. These numbers come in two primary formats:

  • 16-bit ASNs: Historically, these provided up to 65,536 unique identifiers.
  • 32-bit ASNs: Introduced later to accommodate growing demand, offering billions of possibilities.

ASNs are assigned by the Internet Assigned Numbers Authority (IANA) through regional organizations known as Regional Internet Registries (RIRs).

What is BGP?

The Border Gateway Protocol (BGP) is the routing protocol that makes the internet work by managing how data packets are delivered between networks. It helps determine the best network routes for data transmission. BGP is responsible for looking at all available paths and selecting the best route for data to travel. For instance, when a user in the United States loads an application with origin servers in Europe, BGP makes that communication quick and efficient. BGP routing is critical because the internet is made of hundreds of thousands of autonomous systems.

BGP comes in two types:

  • External BGP (eBGP): This is used to exchange routing information between different autonomous systems.
  • Internal BGP (iBGP): This is used to route data within the same autonomous system.

BGP allows network administrators to implement their own routing policies, giving them the flexibility to control how data is routed.

How do ASNs connect to each other?

Autonomous Systems connect with each other through a process called peering. Peering is a voluntary interconnection of administratively separate internet networks to exchange traffic. In over 99% of cases, peering is settlement-free, meaning neither party pays the other for the exchange of traffic. The alternative to peering is transit, which is a paid arrangement where one network pays another for access to the internet.

Peering can happen in two ways:

  • Public peering: This involves direct interconnection via public Internet Exchange Points (IXPs), where multiple internet providers connect and share traffic.
  • Private peering: This involves the interconnection of dedicated and private networks, which is useful for large volumes of data.

The main motivation for peering is often to reduce the costs of transit services, but it also offers other benefits like increased redundancy and capacity.

Leveraging ASN data with IPLocate

At IPLocate, we understand the importance of detailed network data. Our API provides comprehensive Autonomous System data — including the ASN itself, the associated IP range, network name, operator, domain name, and more.

For instance, using the IPLocate API, you can easily look up ASN details for a given IP address. Here’s a quick example using curl:

curl https://iplocate.io/api/lookup/8.8.8.8?apikey=your_api_key

This request returns structured data about the IP address, including the ASN block. For example:

{
  // ...
  "asn": {
    "asn": "AS7545",
    "route": "123.243.246.0/24",
    "netname": "TPG-INTERNET-AP",
    "name": "TPG Telecom Limited",
    "country_code": "AU",
    "domain": "tpgtelecom.com.au",
    "type": "isp",
    "rir": "APNIC"
  },
  // ...
}

To see all the details our API offers, check out our ASN data section in the documentation.

Further reading

For those interested in diving deeper into the technical aspects of ASNs and BGP routing, here are some useful resources:

About IPLocate

Founded in 2017, IPLocate.io provides reliable, accurate IP address geolocation and intelligence data to thousands of businesses and developers of all sizes.