Andrew 2011-11-04 07:44:40
I have a project where I will need to parse config files dumped from
Cisco and Juniper Routers. From the parsed data, I must determine
routing information so that I can tell which interface a given IP
address routes to.
I’ve searched CPAN extensively, and while there are some pre-existing
modules out there, none of them really handle the kind of stuff I’m
dealing with, and each of them deals specifically with one type of
router, or at the least routers from one vendor.
So I have begun work on my own. I am trying to create a two layer
system not unlike DBI. I want to create a logical module which models
a generic routing device, and beneath that I want to have a parsing
module for specific types of routers and vendors. So you might have
my $router = new Router::Config::Cisco ( file => “./myconfig”) || die
I have gotten a little way into this project and it occurs to me
first, that this is a HUGE undertaking, and secondly, that I may not
be the first one to have trodden this path.
So I have some questions for the group:
1) does anyone know of similar pre-existing projects like this ?
2) does anyone know of an appropriate forum for discussion of a
project such as this ?
3) does anyone want to help ?
Andrew 2011-11-04 07:44:56
I’m sorry, I should have elaborated a bit more.
In my specific project (which I can’t elaborate on here too much) The
given IP is always known to be downstream of one of the interfaces.
That is, the IP isn’t arbirary, so while it’s not possible to know
EVERY possible route, it should be possible to find SOME routes, and
to figgure out at least MOST of the given IP’s.
What I’m looking for help on here is a perl module to model the
available data that one might find in a router config, in a vendor
neutral way. So that any routing device can be represented as a perl
be done with it … like constucting partial routing tables to find
the interface for a known downstream IP 😉
Other interesting applications would be propagation of changes in the
perl object back to the config file. So, for instance, changing a
route in the perl object would write the change back to the config
file via rules in the vendor specific parser … very nice if you have
a diverse set of routing devices to manage.
Anyhow … like I was saying, I’m looking for any pointers or help
that the community can offer …
thanks again, -Andrew