OSPF::LSDB::Cisco - parse Cisco OSPF link state database
use OSPF::LSDB::Cisco;
my $cisco = OSPF::LSDB::Cisco->new();
my $cisco = OSPF::LSDB::Cisco->new(ssh => "user@host");
$cisco->parse(%files);
The OSPF::LSDB::Cisco module parses the output of the Cisco OSPF IOS and fills the OSPF::LSDB base object. The output of show ip ospf, show ip ospf database router, show ip ospf database network, show ip ospf database summary, show ip ospf database asbr-summary, show ip ospf database external is needed. It can be given as separate files or obtained dynamically. In the latter case ssh is invoked. If the object has been created with the ssh argument, the specified user and host are used to login otherwise cisco is used as host name.
show ip ospf
show ip ospf database router
show ip ospf database network
show ip ospf database summary
show ip ospf database asbr-summary
show ip ospf database external
ssh
cisco
There is only one public method:
This function takes a hash with file names as value containing the Cisco show ip ospf output data. The hash keys are named selfid, router, network, summary, boundary, external. If a hash entry is missing, ssh to the Cisco router is run instead to obtain the information dynamically.
selfid
router
network
summary
boundary
external
The complete OSPF link state database is stored in the ospf field of the base class.
This module has been tested with Cisco IOS 12.4. If it works with other versions is unknown.
The methods die if any error occurs.
OSPF::LSDB
ciscoospf2yaml
Alexander Bluhm
Cisco support is experimental. This module is far from complete.
No support for multiple router processes.
No support for IPv6.
To install OSPF::LSDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OSPF::LSDB
CPAN shell
perl -MCPAN -e shell install OSPF::LSDB
For more information on module installation, please visit the detailed CPAN module installation guide.