SNMP::Info::CiscoBGP - SNMP Interface to Cisco's BGP MIBs
Alexander Hartmaier
# Let SNMP::Info determine the correct subclass for you. my $device = SNMP::Info->( AutoSpecify => 1, Debug => 1, DestHost => 'myswitch', Community => 'public', Version => 2 ) or die "Can't connect to DestHost.\n";
my $remoteas_for_index = $device->cisco_bgp_peer2_remoteas;
for my $index (keys $remoteas_for_index->%*) { my ($type, $addrlength, $ip) = $device->parse_cisco_bgp_peer2_entry_index($index); printf('remote: %-39s type: %-4s remote AS: %5d', $ip, $type, $remoteas_for_index->{$index}); }
SNMP::Info::CiscoBGP is a subclass of SNMP::Info that provides information about a cisco device's BGP configuration and state.
Use or create in a subclass of SNMP::Info. Do not use directly.
none.
None
This table contains, one entry per BGP peer, information about the connections with BGP peers.
This table contains prefix related information related to address families supported by a peer.
Takes a cbgpPeer2Entry index as returned by all methods of the Cisco BGP Peer 2 Table methods.
Returns a list of type (numeric, cbgpPeer2Type), address length (in bytes: 4 for IPv4, 16 for IPv6) and the remote IP address as string.
To install SNMP::Info, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SNMP::Info
CPAN shell
perl -MCPAN -e shell install SNMP::Info
For more information on module installation, please visit the detailed CPAN module installation guide.