1SNMP::Info::CiscoVTP(3pUms)er Contributed Perl DocumentatSiNoMnP::Info::CiscoVTP(3pm)
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

GLOBALS

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

TABLE METHODS

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

SET METHODS

275       These are methods that provide SNMP set functionality for overridden
276       methods or provide a simpler interface to complex set operations.  See
277       "SETTING DATA VIA SNMP" in SNMP::Info for general information on set
278       operations.
279
280       $vtp->set_i_vlan ( vlan, ifIndex )
281           Changes an access (untagged) port VLAN, must be supplied with the
282           numeric VLAN ID and port "ifIndex".  This method should only be
283           used on end station (non-trunk) ports.
284
285             Example:
286             my %if_map = reverse %{$vtp->interfaces()};
287             $vtp->set_i_vlan('2', $if_map{'FastEthernet0/1'})
288               or die "Couldn't change port VLAN. ",$vtp->error(1);
289
290       $vtp->set_i_pvid ( pvid, ifIndex )
291           Sets port default VLAN, must be supplied with the numeric VLAN ID
292           and port "ifIndex".  This method should only be used on trunk
293           ports.
294
295             Example:
296             my %if_map = reverse %{$vtp->interfaces()};
297             $vtp->set_i_pvid('2', $if_map{'FastEthernet0/1'})
298               or die "Couldn't change port default VLAN. ",$vtp->error(1);
299
300       $vtp->set_i_untagged ( vlan, ifIndex )
301           This method attempts to work out whether the port referenced by
302           ifIndex is trunking, and if so will return the value of
303           "set_i_pvid". Otherwise, the value of "set_i_vlan" is returned.
304
305       $vtp->set_add_i_vlan_tagged ( vlan, ifIndex )
306           Adds the VLAN to the enabled VLANs list of the port, must be
307           supplied with the numeric VLAN ID and port "ifIndex".
308
309             Example:
310             my %if_map = reverse %{$vtp->interfaces()};
311             $vtp->set_add_i_vlan_tagged('2', $if_map{'FastEthernet0/1'})
312               or die "Couldn't add port to egress list. ",$vtp->error(1);
313
314       $vtp->set_remove_i_vlan_tagged ( vlan, ifIndex )
315           Removes the VLAN from the enabled VLANs list of the port, must be
316           supplied with the numeric VLAN ID and port "ifIndex".
317
318             Example:
319             my %if_map = reverse %{$vtp->interfaces()};
320             $vtp->set_remove_i_vlan_tagged('2', $if_map{'FastEthernet0/1'})
321               or die "Couldn't add port to egress list. ",$vtp->error(1);
322
323
324
325perl v5.38.0                      2023-09-04         SNMP::Info::CiscoVTP(3pm)
Impressum