Super User is a question and answer site for computer enthusiasts and power users. 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

I want to know what IP ranges are belonging for example to the AS714.

How do I get this information?

I know how to do the reverse way, which is easy with whois. But the other way doesn't seem to be that easy.

share|improve this question
Do you want IP address ranges that originate on this AS? (Direct customers who don't have an AS) What about IP address ranges only reachable through this AS? (Customers that have their own AS.) What about IP address ranges reachable through this AS but also other provider ASes? (Multihomed customers.) – David Schwartz Mar 28 '12 at 10:06
The purpose was to find out all the IP ranges my provider owns. I got this info by visiting in order to find out the AS number and in order to get all the IP ranges through the prefixes tab. Do you know other possibilities? – JohnnyFromBF Mar 28 '12 at 11:01
up vote 5 down vote accepted

Ok, I just found one simple way. You just put this[ASXXX]#_prefixes in your browser, where [ASXXX] is a certain AS and a number like this

share|improve this answer

They're listed online with related details at (replace the ASN to get the equivalent details for any other ASN).

If instead of browsing them you'd rather grab them programmatically you can use the RADb whois server:

$ whois -h -- '-i origin AS714' | grep -Eo "([0-9.]+){4}/[0-9]+" | head
share|improve this answer

I found that you can't really automate queries to, I kept getting 403 responses, and then when I faked a user agent, it tried to verify that I was indeed a real browser. I kind of failed in everything with (even contacting the site).

What DID work for me, was to query as Ben Dowling said in another answer.

I did a python script to get every IP block per ASN. I had a list of every AS number in a csv file. here it is:

import requests
from bs4 import BeautifulSoup
import re

url_base = ''
as_base = 'AS'

output = open('ip_per_asn.csv', 'w')
with open('chilean_asn.csv') as f:
    lines =
    for asn in lines:
        ASN = as_base + asn
        page = requests.get(url_base+ASN)
        html_doc = page.content
        soup = BeautifulSoup(html_doc, 'html.parser')
        for link in soup.find_all('a'):
            if asn in link.get('href'):
                auxstring = '/'+as_base+asn+'/'
                line = re.sub(auxstring, '', link.get('href'))
                printstring = asn+','+line+'\n'
                if 'AS' not in printstring:
        print asn+'\n'

print 'script finished'

That said, you can also use curl with Just try to be polite and don't make absurdly large queries to the servers.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .