This post has been recoverd from the old site for archival purposes and as it has still been generating some hits.
Last year I built my self an Cisco/Foundry BGP config to RPSL generator to create RPSL for in an routing registry (I primarily use the RIPE database). I did this because there where only tools that could do the other way around, generate a config from your RPSL entries in the routing registry database. As I currently can't find any tool in the wild that can do this I'm hereby opening it to the world.
It's written in perl and is focused on the RIPEdb. It can be found here. It has some examples incorporated for it.
It currently defines it preference and as-set we announce by peer-groups in the router config. I was busy rebuilding it so it can figure this out by it self and only needs the router config to be fed by stdin and automatically find out which AS-SET is being used and which preferences and metrics are going to be used.
Feedback is very welcome as well are updates, patches and bugreports. There is still a little todo list to add to the script which includes communities and metrics.
Notice that it only builds import/export and remarks line, the rest of the aut-num object has to be build around it.
Update: Version 20041127-2.pl has been released. This version incorporates automatic localpref, metric and community setting in the rpsl object. Unfortunately AS prepending does not work. The RFC2622 describes it, but the RIPEdb (which I test on) does not accept it.
The next step for updaterpsl.pl will be automated local interface detection. In the far future also announcements can be auto generated from the configuration. Currently this is hardcoded in the file.
I just found a tool that does about the same but is less portable because it relies on SNMP to do the trick. You can find it here Well a little update here. I’m going to rewrite updaterpsl.pl this week to make allmost everything automated. It will parse the router configs and generate it’s own IP adress for in RPSL from it, analyzes route-maps for metric settings, communities and local preferences. It will be quite some work, but I’m sure that if it does all of this, this tool will be used a lot.
Anybody who has any perl scripts that already do some of these things please send them to me so I can include them in my code :)