SNMP::Info::CiscoBGP(3pm) | User Contributed Perl Documentation | SNMP::Info::CiscoBGP(3pm) |
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.
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.
Returns a list of type (numeric, cbgpPeer2Type), address length (in bytes: 4 for IPv4, 16 for IPv6) and the remote IP address as string.
2023-09-30 | perl v5.36.0 |