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:
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user