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

I would like a way of collecting ip blocks for known networks in the RIPE database. Take this search result as an example:
Here's all the networks for Akamai listed, I would like to be able to have my own static route to the network members listed in the result through a specific gateway on my local network.
This have to be able to run on Linux and/or *BSD.

Creating a custom script which queries whois servers on an interval sounds wrong.
Is there a standardized way of collecting routes from the RIPE database?

share|improve this question
What does querying DNS have to do with collecting routing information? – joeqwerty Oct 29 '10 at 14:38
@joeqwerty Nothing indeed, corrected – baloo Oct 30 '10 at 11:27
up vote 2 down vote accepted

My knowledge of BGP and routes and how to query RIPE's WHOIS database and whatnot is very limited, but sounds like it might be relevant. I compiled it on my machine and managed to produce the following:

~$ echo '@rtconfig networks AS39836' | rtconfig
network mask
network mask
network mask

AS39836 is just a random AS from the "AS-AKAMAI" as-set, per your example.

From rtconfig's manfile:

@rtconfig networks <ASN-1>
    <ASN-1> is an AS number preceded with string "AS".  For each route registered with  
    origin <ASN-1>, a network statement of the form  "network <prefix> mask <mask>"
    is generated.

I suppose you could then do something ugly like this:

whois -h -x AS-AKAMAI | egrep '^members: +AS' | awk '{print $2;}' | while read member; do echo @rtconfig networks $member | rtconfig; done
share|improve this answer
Very interesting tools, thanks! – baloo Oct 30 '10 at 11:16

Take a look at this FAQ, it could help.

share|improve this answer
Interesting FAQ but I don't understand how to use that information practically to solve my problem – baloo Oct 30 '10 at 11:12

You can download a dump from RIPE

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.