Try to determine whether a device in generic Layer3::Cisco class needs community based indexing

Layer3 capable Cisco device without a mapping to a more specific class fall
under the Layer3::Cisco class. These can be "real" routers that don't need
community based indexing, or Layer 3 switches that do need community based
indexing (to fetch L2 forwarding tables for different VLANs). Generally, if
community based indexing is needed on a platform, it also supports the
CISCO-VTP-MIB. Dynamically return cisco_comm_indexing based on vtpVersion.
This commit is contained in:
Jeroen van Ingen
2015-06-02 18:03:43 +02:00
parent 224085dfca
commit ce4349a188
2 changed files with 14 additions and 0 deletions

View File

@@ -5,6 +5,8 @@ version 3.28 (TBD)
[ENHANCEMENTS]
* Add Layer3::Huawei class for Huawei Quidway switches
* Modified generic Layer3::Cisco class: use community based indexing if
the device returns a value for vtpVersion
version 3.27 (2015-05-05)

View File

@@ -136,6 +136,13 @@ sub i_vlan {
return $i_vlan;
}
sub cisco_comm_indexing {
my $cisco = shift;
# If we get a VTP version, it's *extremely* likely that the device needs community based indexing
my $vtp = $cisco->vtp_version() || '0';
return ($vtp ne '0');
}
1;
__END__
@@ -237,6 +244,11 @@ These are methods that return scalar value from SNMP
(C<cEigrpAsRouterId>)
=item $switch->cisco_comm_indexing()
Returns 1 when the device is likely to need vlan indexing.
Determined by checking C<vtpVersion>.
=back
=head2 Global Methods imported from SNMP::Info::CiscoVTP