Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Anyone knows where I can get list of Autonomous system number users by country ? If it is not possible to get it by country, any kind of list will suffice. thnx

share|improve this question
up vote 8 down vote accepted

One good list can be found at:

Its harder to get them sorted by "country" since lots of organisations span several continents and might use the same AS globally, but the world is split up into regional registries so you can see atleast what region gave out the specific AS number. So for Europe, for example, you have RIPE. A list of AS numbers and what region they were given out to can be found at:

If you want to do some manual processing you can get information from this file too:

Fields are split by |. The second field is country code, the third field type (asn for AS number) and the fourth field the actual AS number. Since its a text file you can easily import it in Excel and search around, or if you have access to command line utilities you can query it that way. An example from Linux with awk to list all AS numbers delegated to Sweden.

awk -F\| '{if ($2 == "SE" && $3 == "asn" ) print $4}' < delegated-ripencc-latest

To search for Russia replace SE with RU.

A bit more advanced from a Linux prompt, to download the RIPE database file, to sort out all AS numbers from russia, then prepare an input file for an AS number lookup service (from Team Cymru), then send the request file and save the output to you you can do something like this, line by line into your Linux shell:

awk -F\| '{if ($2 == "RU" && $3 == "asn" ) print $4}' < delegated-ripencc-latest > output.txt
sed -i -e 's/^/AS/' output.txt
(echo begin;echo verbose;cat output.txt;echo end) > input.txt
nc whois < input.txt >

Then your will output something like this:

Bulk mode; [2012-01-18 19:09:55 +0000]
2118    | RU | ripencc  | 1993-02-17 | RELCOM-AS OOO _NPO Relcom_
2122    | RU | ripencc  | 2000-06-30 | JSC PIOGLOBAL Asset Management,
2587    | RU | ripencc  | 1995-03-23 | FREE-NET-AS2587 OOO FREEnet Group
share|improve this answer

You can get all AS-numbers registered to a given country using the services on Input a two-letter country code (ISO 3166-1 Alpha-2), and all ASNs are returned. Options available to get IPv4 or IPv6 prefixes. Examples:

Using whois to get all ASNs for Sweden:

whois -h SE

Will output


Or you can use curl to get the same data:


You can also get the entire database, for offline lookups:


This database is updated on a daily basis (the frequency of the RIRs updating their delegations files).

Source code available on github:

share|improve this answer

The country reports include a list of all of the ASNs for each country. The screenshot below shows the data for Brazil, which is available at brazil report

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.