2

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?

baloo
  • 135
  • 1
  • 6

3 Answers3

2

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
Xhantar
  • 1,042
  • 1
  • 8
  • 11
1

Take a look at this FAQ, it could help.

Daniele Santi
  • 2,529
  • 1
  • 25
  • 22
  • Interesting FAQ but I don't understand how to use that information practically to solve my problem – baloo Oct 30 '10 at 11:12
1

You can download a dump from RIPE

ptman
  • 28,394
  • 2
  • 30
  • 45