CISCO-VTP-MIB::vtpVlanTable
)CISCO-VLAN-MEMBERSHIP-MIB::vmMembershipTable
)CISCO-VTP-MIB::managementDomainTable
)CISCO-VTP-MIB::vlanTrunkPortTable
)
SNMP::Info::CiscoVTP - SNMP Interface to Cisco's VLAN Management MIBs
Max Baker
# Let SNMP::Info determine the correct subclass for you. my $vtp = new SNMP::Info( AutoSpecify => 1, Debug => 1, DestHost => 'myswitch', Community => 'public', Version => 2 ) or die "Can't connect to DestHost.\n";
my $class = $vtp->class(); print "SNMP::Info determined this device to fall under subclass : $class\n";
SNMP::Info::CiscoVTP is a subclass of SNMP::Info that provides information about a Cisco device's VLAN and VTP Domain membership.
Use or create in a subclass of SNMP::Info. Do not use directly.
None.
MIBs can be found at ftp://ftp.cisco.com/pub/mibs/v2/v2.tar.gz
vtp_version()
(vtpVersion
)
vtp_maxstore()
(vtpMaxVlanStorage
)
vtp_notify()
(vtpNotificationsEnabled
)
vtp_notify_create()
(vtpVlanCreatedNotifEnabled
)
vtp_notify_delete()
(vtpVlanDeletedNotifEnabled
)
vtp_trunk_set_serial()
(vlanTrunkPortSetSerialNo
)
Your device will only implement a subset of these methods.
i_vlan()
Returns a mapping between ifIndex
and assigned VLAN ID for access ports
and the default VLAN ID for trunk ports.
i_vlan_membership()
Returns reference to hash of arrays: key = ifIndex
, value = array of VLAN
IDs. These are the VLANs which are members of enabled VLAN list for the port.
Example: my $interfaces = $vtp->interfaces(); my $vlans = $vtp->i_vlan_membership(); foreach my $iid (sort keys %$interfaces) { my $port = $interfaces->{$iid}; my $vlan = join(',', sort(@{$vlans->{$iid}})); print "Port: $port VLAN: $vlan\n"; }
CISCO-VTP-MIB::vtpVlanTable
)See ftp://ftp.cisco.com/pub/mibs/supportlists/wsc5000/wsc5000-communityIndexing.html for a good treaty of how to connect to the VLANs
v_index()
(vtpVlanIndex
)
v_state()
(vtpVlanState
)
v_type()
(vtpVlanType
)
v_name()
(vtpVlanName
)
v_mtu()
(vtpVlanMtu
)
v_said()
(vtpVlanDot10Said
)
v_ring()
(vtpVlanRingNumber
)
v_bridge()
(vtpVlanBridgeNumber
)
v_stp()
(vtpVlanStpType
)
v_parent()
(vtpVlanParentVlan
)
v_trans1()
(vtpVlanTranslationalVlan1
)
v_trans2()
(vtpVlanTranslationalVlan2
)
v_btype()
(vtpVlanBridgeType
)
v_hop_are()
(vtpVlanAreHopCount
)
v_hop_ste()
(vtpVlanSteHopCount
)
v_crf()
(vtpVlanIsCRFBackup
)
v_type_ext()
(vtpVlanTypeExt
)
v_if()
(vtpVlanIfIndex
)
CISCO-VLAN-MEMBERSHIP-MIB::vmMembershipTable
)i_vlan_type()
Static, Dynamic, or multiVlan.
(vmVlanType
)
i_vlan2()
The VLAN that an access port is assigned to.
(vmVlan
)
i_vlan_stat()
Inactive, active, shutdown.
(vmPortStatus
)
i_vlan_1()
Each bit represents a VLAN. This is 0 through 1023
(vmVlans
)
i_vlan_2()
Each bit represents a VLAN. This is 1024 through 2047
(vmVlans2k
)
i_vlan_3()
Each bit represents a VLAN. This is 2048 through 3071
(vmVlans3k
)
i_vlan_4()
Each bit represents a VLAN. This is 3072 through 4095
(vmVlans4k
)
CISCO-VLAN-MEMBERSHIP-MIB::vmVoiceVlanTable
)i_voice_vlan()
(vmVoiceVlanId
)
CISCO-VTP-MIB::managementDomainTable
)vtp_d_index()
(managementDomainIndex
)
vtp_d_name()
(managementDomainName
)
vtp_d_mode()
(managementDomainLocalMode
)
vtp_d_rev()
(managementDomainConfigRevNumber
)
vtp_d_updater()
(managementDomainLastUpdater
)
vtp_d_last()
(managementDomainLastChange
)
vtp_d_status()
(managementDomainRowStatus
)
vtp_d_tftp()
(managementDomainTftpServer
)
vtp_d_tftp_path()
(managementDomainTftpPathname
)
vtp_d_pruning()
(managementDomainPruningState
)
vtp_d_ver()
(managementDomainVersionInUse
)
CISCO-VTP-MIB::vlanTrunkPortTable
)vtp_trunk_mgmt_dom()
(vlanTrunkPortManagementDomain
)
vtp_trunk_encaps_t()
(vlanTrunkPortEncapsulationType
)
vtp_trunk_vlans()
(vlanTrunkPortVlansEnabled
)
vtp_trunk_vlans_2k()
(vlanTrunkPortVlansEnabled2k
)
vtp_trunk_vlans_3k()
(vlanTrunkPortVlansEnabled3k
)
vtp_trunk_vlans_4k()
(vlanTrunkPortVlansEnabled4k
)
vtp_trunk_native()
(vlanTrunkPortNativeVlan
)
i_pvid()
(vlanTrunkPortNativeVlan
)
vtp_trunk_rstat()
(vlanTrunkPortRowStatus
)
vtp_trunk_dyn()
(vlanTrunkPortDynamicState
)
vtp_trunk_dyn_stat()
(vlanTrunkPortDynamicStatus
)
vtp_trunk_vtp()
(vlanTrunkPortVtpEnabled
)
vtp_trunk_encaps()
(vlanTrunkPortEncapsulationOperType
)
These are methods that provide SNMP set functionality for overridden methods or provide a simpler interface to complex set operations. See SETTING DATA VIA SNMP in the SNMP::Info manpage for general information on set operations.
Changes an access (untagged) port VLAN, must be supplied with the numeric
VLAN ID and port ifIndex
. This method should only be used on end station
(non-trunk) ports.
Example: my %if_map = reverse %{$vtp->interfaces()}; $vtp->set_i_vlan('2', $if_map{'FastEthernet0/1'}) or die "Couldn't change port VLAN. ",$vtp->error(1);
Sets port default VLAN, must be supplied with the numeric VLAN ID and
port ifIndex
. This method should only be used on trunk ports.
Example: my %if_map = reverse %{$vtp->interfaces()}; $vtp->set_i_pvid('2', $if_map{'FastEthernet0/1'}) or die "Couldn't change port default VLAN. ",$vtp->error(1);
Adds the VLAN to the enabled VLANs list of the port, must be supplied with the
numeric VLAN ID and port ifIndex
.
Example: my %if_map = reverse %{$vtp->interfaces()}; $vtp->set_add_i_vlan_tagged('2', $if_map{'FastEthernet0/1'}) or die "Couldn't add port to egress list. ",$vtp->error(1);
Removes the VLAN from the enabled VLANs list of the port, must be supplied
with the numeric VLAN ID and port ifIndex
.
Example: my %if_map = reverse %{$vtp->interfaces()}; $vtp->set_remove_i_vlan_tagged('2', $if_map{'FastEthernet0/1'}) or die "Couldn't add port to egress list. ",$vtp->error(1);