gotinfo.net by VARØ Industries

What Is an ASN? Autonomous Systems and BGP Explained

GotInfo guides  |  VARØ Industries

Every IP lookup on GotInfo shows an ASN, a number like AS15169 or AS13335. That number identifies the network your traffic belongs to, and it is the unit the internet actually routes between. Understanding it explains how packets find their way across tens of thousands of independent networks.

Networks of networks

There is no central internet operator. The internet is tens of thousands of separately run networks: broadband and mobile providers, cloud platforms, content networks, universities, governments and large companies. A network run under one administration with its own routing policy is an autonomous system (AS). When it connects to the internet through more than one other network, it needs a public autonomous system number (ASN) to identify it.

ASNs are issued by the five regional internet registries, the same organizations that allocate IP address blocks. The WHOIS vs RDAP guide covers how to look those registrations up.

Number formats

RangeUse
1 to 64,495Original 16-bit public ASNs
64,512 to 65,534Private use (16-bit), for internal networks that never announce them publicly
131,072 upwards32-bit public ASNs, issued since the 16-bit pool started running low
4,200,000,000 to 4,294,967,294Private use (32-bit)

A few other values are reserved for documentation and special purposes. The private ranges are set out in RFC 6996, and you will see them inside data centers and in the backbones of large companies, where they never appear on the public internet.

What BGP does

Autonomous systems tell each other which addresses they can deliver traffic to using the Border Gateway Protocol (BGP). The unit of announcement is a prefix, a block of addresses in CIDR form such as 203.0.113.0/24 (see the CIDR guide if that notation is new).

Here is a simplified example. AS64500, a small hosting company, owns 203.0.113.0/24.

  1. AS64500 announces the prefix to its two transit providers, AS64501 and AS64502.
  2. Each provider passes the announcement on to the networks it connects to, adding its own number to the front of the AS path. A network three hops away might receive the route with the path 64510 64501 64500.
  3. A router that hears several routes to the same prefix picks one using its policy: typically preferring routes through customers (who pay) over peers (free) over transit providers (who cost money), and then preferring shorter AS paths.
  4. Traffic to any address in the prefix follows the chosen path. The last number in the path, the origin AS, is the network that claims the addresses.

The AS path also prevents loops: a network that sees its own number in a path it receives rejects that route.

Routers always prefer the most specific matching prefix. If one network announces 203.0.113.0/24 and another announces 203.0.113.0/25, traffic for the first half of that range goes to whoever announced the /25. Many networks filter announcements smaller than a /24 in IPv4 (or a /48 in IPv6), which is why those sizes are the practical minimum for an independently routed block.

Upstreams, peers and downstreams

The ASN lookup sorts a network's neighbours into three groups.

Large networks at the top of this structure, which reach everyone through peering alone without buying transit, are often called tier 1 networks. Content and cloud companies peer widely so their traffic reaches users with as few hops as possible.

Practical uses for an ASN lookup

When routing goes wrong

BGP was built on trust. A network can announce any prefix, and its neighbours may accept it unless they filter. Two kinds of incident follow from that.

The main defence is RPKI (Resource Public Key Infrastructure). Address holders publish signed Route Origin Authorizations (ROAs) through their regional registry, stating which ASN may originate each prefix and how specific the announcement may be. Networks that perform route origin validation drop announcements that contradict a ROA. Adoption has grown steadily, and if you hold your own address space, creating ROAs through your registry's portal is one of the most valuable routing tasks you can do. Filtering based on registry data and peering agreements covers some of the leak cases RPKI origin checks do not.

Reading your own ASN

The GotInfo home page shows the ASN for your connection. At home it will be your broadband provider. On a phone it will be your carrier. With a VPN switched on it should change to the VPN provider's network or the hosting company it rents servers from. If it does not, your traffic is not going through the VPN; the VPN leak test guide covers that check in more detail.

Look up any network: open the GotInfo ASN lookup to see an ASN's owner, announced prefixes, peers and upstreams.

Related guides