1Info::CiscoVTP(3)     User Contributed Perl Documentation    Info::CiscoVTP(3)
2
3
4

NAME

6       SNMP::Info::CiscoVTP - SNMP Interface to Cisco's VLAN Management MIBs
7

AUTHOR

9       Max Baker
10

SYNOPSIS

12        # Let SNMP::Info determine the correct subclass for you.
13        my $vtp = new SNMP::Info(
14                                 AutoSpecify => 1,
15                                 Debug       => 1,
16                                 DestHost    => 'myswitch',
17                                 Community   => 'public',
18                                 Version     => 2
19                               )
20           or die "Can't connect to DestHost.\n";
21
22        my $class = $vtp->class();
23        print "SNMP::Info determined this device to fall under subclass : $class\n";
24

DESCRIPTION

26       SNMP::Info::CiscoVTP is a subclass of SNMP::Info that provides
27       information about a Cisco device's VLAN and VTP Domain membership.
28
29       Use or create in a subclass of SNMP::Info.  Do not use directly.
30
31   Inherited Classes
32       None.
33
34   Required MIBs
35       CISCO-VTP-MIB
36       CISCO-VLAN-MEMBERSHIP-MIB
37       CISCO-VLAN-IFTABLE-RELATIONSHIP-MIB
38
39       MIBs can be found at ftp://ftp.cisco.com/pub/mibs/v2/v2.tar.gz
40

GLOBALS

42       $vtp->vtp_version()
43           ("vtpVersion")
44
45       $vtp->vtp_maxstore()
46           ("vtpMaxVlanStorage")
47
48       $vtp->vtp_notify()
49           ("vtpNotificationsEnabled")
50
51       $vtp->vtp_notify_create()
52           ("vtpVlanCreatedNotifEnabled")
53
54       $vtp->vtp_notify_delete()
55           ("vtpVlanDeletedNotifEnabled")
56
57       $vtp->vtp_trunk_set_serial()
58           ("vlanTrunkPortSetSerialNo")
59

TABLE METHODS

61       Your device will only implement a subset of these methods.
62
63       $vtp->i_vlan()
64           Returns a mapping between "ifIndex" and assigned VLAN ID for access
65           ports and the default VLAN ID for trunk ports.
66
67       $vtp->i_vlan_membership()
68           Returns reference to hash of arrays: key = "ifIndex", value = array
69           of VLAN IDs.  These are the VLANs which are members of enabled VLAN
70           list for the port.
71
72             Example:
73             my $interfaces = $vtp->interfaces();
74             my $vlans      = $vtp->i_vlan_membership();
75
76             foreach my $iid (sort keys %$interfaces) {
77               my $port = $interfaces->{$iid};
78               my $vlan = join(',', sort(@{$vlans->{$iid}}));
79               print "Port: $port VLAN: $vlan\n";
80             }
81
82   VLAN Table ("CISCO-VTP-MIB::vtpVlanTable")
83       See
84       ftp://ftp.cisco.com/pub/mibs/supportlists/wsc5000/wsc5000-communityIndexing.html
85       <ftp://ftp.cisco.com/pub/mibs/supportlists/wsc5000/wsc5000-communityIndexing.html>
86       for a good treaty of how to connect to the VLANs
87
88       $vtp->v_index()
89           ("vtpVlanIndex")
90
91       $vtp->v_state()
92           ("vtpVlanState")
93
94       $vtp->v_type()
95           ("vtpVlanType")
96
97       $vtp->v_name()
98           ("vtpVlanName")
99
100       $vtp->v_mtu()
101           ("vtpVlanMtu")
102
103       $vtp->v_said()
104           ("vtpVlanDot10Said")
105
106       $vtp->v_ring()
107           ("vtpVlanRingNumber")
108
109       $vtp->v_bridge()
110           ("vtpVlanBridgeNumber")
111
112       $vtp->v_stp()
113           ("vtpVlanStpType")
114
115       $vtp->v_parent()
116           ("vtpVlanParentVlan")
117
118       $vtp->v_trans1()
119           ("vtpVlanTranslationalVlan1")
120
121       $vtp->v_trans2()
122           ("vtpVlanTranslationalVlan2")
123
124       $vtp->v_btype()
125           ("vtpVlanBridgeType")
126
127       $vtp->v_hop_are()
128           ("vtpVlanAreHopCount")
129
130       $vtp->v_hop_ste()
131           ("vtpVlanSteHopCount")
132
133       $vtp->v_crf()
134           ("vtpVlanIsCRFBackup")
135
136       $vtp->v_type_ext()
137           ("vtpVlanTypeExt")
138
139       $vtp->v_if()
140           ("vtpVlanIfIndex")
141
142   VLAN Membership Table ("CISCO-VLAN-MEMBERSHIP-MIB::vmMembershipTable")
143       $vtp->i_vlan_type()
144           Static, Dynamic, or multiVlan.
145
146           ("vmVlanType")
147
148       $vtp->i_vlan2()
149           The VLAN that an access port is assigned to.
150
151           ("vmVlan")
152
153       $vtp->i_vlan_stat()
154           Inactive, active, shutdown.
155
156           ("vmPortStatus")
157
158       $vtp->i_vlan_1()
159           Each bit represents a VLAN.  This is 0 through 1023
160
161           ("vmVlans")
162
163       $vtp->i_vlan_2()
164           Each bit represents a VLAN.  This is 1024 through 2047
165
166           ("vmVlans2k")
167
168       $vtp->i_vlan_3()
169           Each bit represents a VLAN.  This is 2048 through 3071
170
171           ("vmVlans3k")
172
173       $vtp->i_vlan_4()
174           Each bit represents a VLAN.  This is 3072 through 4095
175
176           ("vmVlans4k")
177
178   VLAN Membership Voice VLAN Table
179       ("CISCO-VLAN-MEMBERSHIP-MIB::vmVoiceVlanTable")
180       $vtp->i_voice_vlan()
181           ("vmVoiceVlanId")
182
183   Management Domain Table ("CISCO-VTP-MIB::managementDomainTable")
184       $vtp->vtp_d_index()
185           ("managementDomainIndex")
186
187       $vtp->vtp_d_name()
188           ("managementDomainName")
189
190       $vtp->vtp_d_mode()
191           ("managementDomainLocalMode")
192
193       $vtp->vtp_d_rev()
194           ("managementDomainConfigRevNumber")
195
196       $vtp->vtp_d_updater()
197           ("managementDomainLastUpdater")
198
199       $vtp->vtp_d_last()
200           ("managementDomainLastChange")
201
202       $vtp->vtp_d_status()
203           ("managementDomainRowStatus")
204
205       $vtp->vtp_d_tftp()
206           ("managementDomainTftpServer")
207
208       $vtp->vtp_d_tftp_path()
209           ("managementDomainTftpPathname")
210
211       $vtp->vtp_d_pruning()
212           ("managementDomainPruningState")
213
214       $vtp->vtp_d_ver()
215           ("managementDomainVersionInUse")
216
217   VLAN Trunk Port Table ("CISCO-VTP-MIB::vlanTrunkPortTable")
218       $vtp->vtp_trunk_mgmt_dom()
219           ("vlanTrunkPortManagementDomain")
220
221       $vtp->vtp_trunk_encaps_t()
222           ("vlanTrunkPortEncapsulationType")
223
224       $vtp->vtp_trunk_vlans()
225           ("vlanTrunkPortVlansEnabled")
226
227       $vtp->vtp_trunk_vlans_2k()
228           ("vlanTrunkPortVlansEnabled2k")
229
230       $vtp->vtp_trunk_vlans_3k()
231           ("vlanTrunkPortVlansEnabled3k")
232
233       $vtp->vtp_trunk_vlans_4k()
234           ("vlanTrunkPortVlansEnabled4k")
235
236       $vtp->vtp_trunk_native()
237           ("vlanTrunkPortNativeVlan")
238
239       $vtp->i_pvid()
240           ("vlanTrunkPortNativeVlan")
241
242       $vtp->vtp_trunk_rstat()
243           ("vlanTrunkPortRowStatus")
244
245       $vtp->vtp_trunk_dyn()
246           ("vlanTrunkPortDynamicState")
247
248       $vtp->vtp_trunk_dyn_stat()
249           ("vlanTrunkPortDynamicStatus")
250
251       $vtp->vtp_trunk_vtp()
252           ("vlanTrunkPortVtpEnabled")
253
254       $vtp->vtp_trunk_encaps()
255           ("vlanTrunkPortEncapsulationOperType")
256

SET METHODS

258       These are methods that provide SNMP set functionality for overridden
259       methods or provide a simpler interface to complex set operations.  See
260       "SETTING DATA VIA SNMP" in SNMP::Info for general information on set
261       operations.
262
263       $vtp->set_i_vlan ( vlan, ifIndex )
264           Changes an access (untagged) port VLAN, must be supplied with the
265           numeric VLAN ID and port "ifIndex".  This method should only be
266           used on end station (non-trunk) ports.
267
268             Example:
269             my %if_map = reverse %{$vtp->interfaces()};
270             $vtp->set_i_vlan('2', $if_map{'FastEthernet0/1'})
271               or die "Couldn't change port VLAN. ",$vtp->error(1);
272
273       $vtp->set_i_pvid ( pvid, ifIndex )
274           Sets port default VLAN, must be supplied with the numeric VLAN ID
275           and port "ifIndex".  This method should only be used on trunk
276           ports.
277
278             Example:
279             my %if_map = reverse %{$vtp->interfaces()};
280             $vtp->set_i_pvid('2', $if_map{'FastEthernet0/1'})
281               or die "Couldn't change port default VLAN. ",$vtp->error(1);
282
283       $vtp->set_add_i_vlan_tagged ( vlan, ifIndex )
284           Adds the VLAN to the enabled VLANs list of the port, must be
285           supplied with the numeric VLAN ID and port "ifIndex".
286
287             Example:
288             my %if_map = reverse %{$vtp->interfaces()};
289             $vtp->set_add_i_vlan_tagged('2', $if_map{'FastEthernet0/1'})
290               or die "Couldn't add port to egress list. ",$vtp->error(1);
291
292       $vtp->set_remove_i_vlan_tagged ( vlan, ifIndex )
293           Removes the VLAN from the enabled VLANs list of the port, must be
294           supplied with the numeric VLAN ID and port "ifIndex".
295
296             Example:
297             my %if_map = reverse %{$vtp->interfaces()};
298             $vtp->set_remove_i_vlan_tagged('2', $if_map{'FastEthernet0/1'})
299               or die "Couldn't add port to egress list. ",$vtp->error(1);
300
301
302
303perl v5.12.0                      2009-06-12                 Info::CiscoVTP(3)
Impressum