What Is an ASN? Autonomous Systems and BGP Explained
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
| Range | Use |
|---|---|
| 1 to 64,495 | Original 16-bit public ASNs |
| 64,512 to 65,534 | Private use (16-bit), for internal networks that never announce them publicly |
| 131,072 upwards | 32-bit public ASNs, issued since the 16-bit pool started running low |
| 4,200,000,000 to 4,294,967,294 | Private 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.
- AS64500 announces the prefix to its two transit providers, AS64501 and AS64502.
- 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. - 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.
- 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.
- Upstreams (transit providers) carry traffic to the whole internet for a fee. A network with two or more upstreams can survive one of them failing.
- Peers exchange traffic only for each other's customers, usually without payment, either over a direct link or across an internet exchange point (IXP), where many networks connect in one building.
- Downstreams are customers that buy transit from this network.
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
- Identify the network behind traffic. If a burst of login attempts comes from addresses that all sit in one hosting provider's ASN, that is useful context for a block rule and for an abuse report.
- Tell residential from data center traffic. A visitor whose ASN belongs to a cloud provider is probably a server, a VPN or a bot rather than a home user.
- Check a provider's connectivity before choosing a host: how many upstreams it has, which exchange points it is present at, and how many prefixes it announces.
- Diagnose provider-specific problems. When a site is unreachable only from one ISP, comparing paths often points to a routing issue between two specific networks rather than at either end.
- Check your own announcement. If you run your own address space, confirm that the prefixes you expect are visible under your ASN, and nothing else.
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.
- Route leaks happen when a network passes routes on to neighbours it should not, for example re-announcing one provider's routes to another, which can drag large volumes of traffic through a network that cannot handle them.
- Hijacks happen when a network announces address space that belongs to someone else, by mistake or deliberately. A well-known 2008 example made YouTube unreachable for much of the internet for a couple of hours, after a provider announced a more specific prefix for YouTube's addresses that was meant only for internal blocking.
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.