Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like a way of collecting ip blocks for known networks in the RIPE database. Take this search result as an example: http://www.db.ripe.net/whois?form_type=simple&full_query_string=&searchtext=AS-AKAMAI&do_search=Search
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

3 Answers 3

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 http://www.isc.org/software/irrtoolset sounds like it might be relevant. I compiled it on my machine and managed to produce the following:

~$ echo '@rtconfig networks AS39836' | rtconfig
!
network 84.53.147.0 mask 255.255.255.0
network 84.53.172.0 mask 255.255.255.0
network 84.53.147.0 mask 255.255.255.0

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 whois.ripe.net -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

 
discard

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.