Log in Sign up
ASN lookup

Autonomous system lookup: IP to ASN and AS prefix lists

An ASN (autonomous system number) is the ID of a network that one operator runs, such as a home ISP or a cloud provider. Enter an IPv4 or IPv6 address to see which AS announces it, or an AS number like AS13335 or 13335 to list its networks.

Data: RIPEstat (RIPE NCC)

Network clusters on a globe: each autonomous system with its own servers and prefixes

What an ASN tells you

An autonomous system number (ASN) identifies a group of IP networks that one operator routes under a single policy. The operator announces its IP ranges, called prefixes, to neighboring networks over BGP, and routers across the internet use those announcements to pick a path to each address.

The AS holder tells you whose network an address sits in. A residential IP maps to a telecom operator, and a VPS address maps to a host such as Hetzner (AS24940). Anti-fraud systems score logins from hosting ASNs as riskier, so a site will challenge a proxy on a data center AS more often than one on a mobile carrier.

When you need it

  • See who is hosting an IP from your server logs or a proxy list
  • Map an AS number to its IP ranges before you block or allow a hosting company in a firewall
  • Check whether a proxy address belongs to a home ISP or a data center before you use it
  • Confirm which AS originates your own prefix after you move it to a new provider

AS number formats and who assigns them

IANA hands out blocks of AS numbers to the five regional internet registries (ARIN, RIPE NCC, APNIC, LACNIC and AFRINIC), and they assign numbers to operators. The Registry field in the result names the source, for example "Assigned by ARIN" for AS13335 and "Assigned by RIPE NCC" for AS24940. The first AS numbers were 16-bit, from 1 to 65535. RFC 6793 extended the space to 32 bits, up to 4294967295, and registries now hand out both kinds. Type the plain decimal number with or without the AS prefix: AS16509, as16509 and 16509 return the same result. The form rejects dotted notation, so convert it first. Multiply the part before the dot by 65536 and add the part after it, which turns 3.10 into 196618.

How to read an ASN lookup result

Enter an IP and you get the host name from its PTR record, the announced network that contains the address, the origin ASN, the AS holder, and the country and city from the MaxMind GeoLite data that RIPEstat serves. The network links to the subnet calculator, and the ASN link opens the AS view. Enter an AS number and you get the holder, whether the AS announces routes, its registry and the IPv4 and IPv6 prefixes it originates. Try AS13335 for Cloudflare or AS15169 for Google. An IP such as 8.8.8.8 gives both parts in one run: the address details first, then the prefix list of AS15169. The page keeps your query in the address bar, so you can share a link like advanced.name/ip/asn?q=AS16509 and it opens the Amazon result.

Using an ASN prefix list in firewall rules

To block or allow a whole hosting company, look up its AS number and copy the prefixes into an ipset or an nftables set. The page lists prefixes as links and has no export button. For an AS with thousands of networks, write a short script against the RIPEstat ris-prefixes API and skip the copying. Operators add and withdraw routes, so rebuild the list on a schedule. Think before you block a cloud AS such as AS16509. Corporate VPNs run there as well as proxies, and you can lock out real users.

Questions and answers

01What is an ASN (autonomous system number)?

An ASN is a unique number that identifies an autonomous system, a set of IP networks that one operator runs under one routing policy. Routers use it in BGP to tell networks apart. Cloudflare, for example, routes its network as AS13335.

02How do I get every IP range (prefix) that belongs to an ASN?

Enter the AS number, for example AS16509 or 16509. The tool lists the IPv4 and IPv6 prefixes the AS originates in BGP and counts the IPv4 addresses they cover, with overlaps counted once. For an AS with more than 1,000 prefixes, press Show networks to load the list. Each group shows its first 20 networks, and the Show all button opens the rest. The list holds announced routes, so address space the holder registered and keeps offline will not appear.

03How is an ASN lookup different from a WHOIS lookup?

WHOIS for an IP shows the organization that registered the address block, its range and its registration dates. The ASN shows which network routes the block over BGP. A leased block can stay registered to the lessor while the tenant announces it from its own AS. For an AS number, this tool gives the basic ASN WHOIS fields, holder and registry, without contacts. To see the registered organization of an IP block, run the WHOIS lookup.

04What are the private ASN ranges?

RFC 6996 reserves 64512 to 65534 among 16-bit numbers and 4200000000 to 4294967294 among 32-bit numbers for private use. Operators use them inside their own networks and strip them before routes leave. Look one up and the Registry field reads "Reserved for Private Use (Reference: RFC 6996)" with a dash in the Owner field.

05How does an ASN relate to BGP, and can one IP belong to several ASNs?

BGP is the protocol networks use to exchange routes, and the ASN names each network in that exchange. Every route carries the list of AS numbers it crossed, ending with the origin AS. A few prefixes have two or more origin ASes, for example when an operator anycasts a block from several networks. This tool shows the first origin AS that RIPEstat returns and leaves out the others. A result with no ASN means RIPEstat's collectors see no route for the address, which happens with unused and private blocks.

06How can I tell from the ASN whether an IP is a data center or a home ISP address?

Read the AS holder. Hosts and clouds route their networks under their own names, so Hetzner or Amazon appears in the Owner field. Residential addresses sit in the AS of a telecom operator such as Comcast (AS7922). The tool has no network-type label, so for an operator that sells both home broadband and servers, check the host name as well.

07What do /24 and /48 mean in the network list?

The number after the slash is the prefix length. In IPv4, a /24 holds 256 addresses and a /22 holds 1,024. Most operators drop IPv4 routes longer than /24, so a /25 or smaller almost never shows up in the list. In IPv6, /48 plays the same role, and one /48 holds 2 to the power of 80 addresses.

08What are the ASNs of Cloudflare, Google and Amazon?

Cloudflare announces its network from AS13335 and Google from AS15169. Amazon announces most AWS ranges from AS16509. Large companies run extra AS numbers for specific services: Google Cloud uses AS396982, and part of AWS uses AS14618. Enter an IP from your logs to see which one routes it.

09Where does the data come from?

RIPEstat, run by RIPE NCC, supplies the ASN, holder, prefixes and location. It builds the routing data from its RIS route collectors, which peer with hundreds of networks. The host name comes from a PTR query to Cloudflare DNS over HTTPS, with Google DNS as the fallback. Your own browser sends these requests to RIPEstat and the DNS resolver.

Pricing Grab a free hour