1Info::Layer3::Extreme(3U)ser Contributed Perl DocumentatiIonnfo::Layer3::Extreme(3)
2
3
4
6 SNMP::Info::Layer3::Extreme - Perl5 Interface to Extreme Network
7 Devices
8
10 Eric Miller, Bill Fenner
11
13 # Let SNMP::Info determine the correct subclass for you.
14 my $extreme = new SNMP::Info(
15 AutoSpecify => 1,
16 Debug => 1,
17 DestHost => 'myswitch',
18 Community => 'public',
19 Version => 1
20 )
21 or die "Can't connect to DestHost.\n";
22
23 my $class = $extreme->class();
24
25 print "SNMP::Info determined this device to fall under subclass : $class\n";
26
28 Provides abstraction to the configuration information obtainable from
29 an Extreme device through SNMP.
30
31 For speed or debugging purposes you can call the subclass directly, but
32 not after determining a more specific class using the method above.
33
34 my $extreme = new SNMP::Info::Layer3::Extreme(...);
35
36 Inherited Classes
37 SNMP::Info::Layer3
38 SNMP::Info::MAU
39
40 Required MIBs
41 EXTREME-BASE-MIB
42 EXTREME-SYSTEM-MIB
43 EXTREME-FDB-MIB
44 EXTREME-VLAN-MIB
45 Inherited Classes' MIBs
46 See classes listed above for their required MIBs.
47
49 These are methods that return scalar value from SNMP
50
51 $extreme->model()
52 Returns model type. Checks $extreme->id() against the EXTREME-
53 BASE-MIB.
54
55 $extreme->vendor()
56 Returns extreme
57
58 $extreme->os()
59 Returns extreme
60
61 $extreme->os_ver()
62 Parses device operating system version from description()
63
64 $extreme->serial()
65 Returns serial number
66
67 ("extremeSystemID")
68
69 $extreme->temp()
70 Returns system temperature
71
72 ("extremeCurrentTemperature")
73
74 $extreme->ps1_status()
75 Returns status of power supply 1
76
77 ("extremePowerSupplyStatus.1")
78
79 $extreme->ps2_status()
80 Returns status of power supply 2
81
82 ("extremePowerSupplyStatus.2")
83
84 $extreme->fan()
85 Returns fan status
86
87 ("extremeFanOperational.1")
88
89 $extreme->mac()
90 Returns base mac
91
92 ("dot1dBaseBridgeAddress")
93
94 Overrides
95 Globals imported from SNMP::Info::Layer3
96 See documentation in "GLOBALS" in SNMP::Info::Layer3 for details.
97
98 Globals imported from SNMP::Info::MAU
99 See documentation in "GLOBALS" in SNMP::Info::MAU for details.
100
102 These are methods that return tables of information in the form of a
103 reference to a hash.
104
105 Overrides
106 $extreme->interfaces()
107 Returns a mapping between the Interface Table Index (iid) and the
108 physical port name.
109
110 $extreme->i_duplex()
111 Parses mau_index and mau_link to return the duplex information for
112 interfaces.
113
114 $extreme->i_duplex_admin()
115 Parses "mac_index","mau_autostat","mau_type_admin" in order to find
116 the admin duplex setting for all the interfaces.
117
118 Returns either (auto,full,half).
119
120 $extreme->i_ignore()
121 Returns reference to hash. Increments value of IID if port is to
122 be ignored.
123
124 Ignores VLAN meta interfaces and loopback
125
126 $extreme->fw_mac()
127 ("extremeFdbMacFdbMacAddress")
128
129 $extreme->fw_port()
130 ("extremeFdbMacFdbPortIfIndex")
131
132 $extreme->fw_status()
133 ("extremeFdbMacFdbStatus")
134
135 $extreme->i_vlan()
136 Returns a mapping between "ifIndex" and the VLAN.
137
138 $extreme->i_vlan_membership()
139 Returns reference to hash of arrays: key = "ifIndex", value = array
140 of VLAN IDs. These are the VLANs which are members of the egress
141 list for the port.
142
143 Example:
144 my $interfaces = $extreme->interfaces();
145 my $vlans = $extreme->i_vlan_membership();
146
147 foreach my $iid (sort keys %$interfaces) {
148 my $port = $interfaces->{$iid};
149 my $vlan = join(',', sort(@{$vlans->{$iid}}));
150 print "Port: $port VLAN: $vlan\n";
151 }
152
153 $extreme->v_index()
154 Returns VLAN IDs
155
156 $extreme->v_name()
157 Returns VLAN names
158
159 ("extremeVlanIfDescr")
160
161 $extreme->bp_index()
162 Returns reference to hash of bridge port table entries map back to
163 interface identifier (iid)
164
165 Returns ("ifIndex") for both key and value since we're using
166 EXTREME-FDB-MIB rather than BRIDGE-MIB.
167
168 Table Methods imported from SNMP::Info::Layer3
169 See documentation in "TABLE METHODS" in SNMP::Info::Layer3 for details.
170
171 Table Methods imported from SNMP::Info::MAU
172 See documentation in "TABLE METHODS" in SNMP::Info::MAU for details.
173
175 These are methods that provide SNMP set functionality for overridden
176 methods or provide a simpler interface to complex set operations. See
177 "SETTING DATA VIA SNMP" in SNMP::Info for general information on set
178 operations.
179
180 $extreme->set_i_vlan ( vlan, ifIndex )
181 Changes an access (untagged) port VLAN, must be supplied with the
182 numeric VLAN ID and port "ifIndex". This method should only be
183 used on end station (non-trunk) ports.
184
185 Example:
186 my %if_map = reverse %{$extreme->interfaces()};
187 $extreme->set_i_vlan('2', $if_map{'FastEthernet0/1'})
188 or die "Couldn't change port VLAN. ",$extreme->error(1);
189
190 $extreme->set_i_pvid ( pvid, ifIndex )
191 Sets port default VLAN, must be supplied with the numeric VLAN ID
192 and port "ifIndex". This method should only be used on trunk
193 ports.
194
195 Example:
196 my %if_map = reverse %{$extreme->interfaces()};
197 $extreme->set_i_pvid('2', $if_map{'FastEthernet0/1'})
198 or die "Couldn't change port default VLAN. ",$extreme->error(1);
199
200 $extreme->set_add_i_vlan_tagged ( vlan, ifIndex )
201 Adds the VLAN to the enabled VLANs list of the port, must be
202 supplied with the numeric VLAN ID and port "ifIndex".
203
204 Example:
205 my %if_map = reverse %{$extreme->interfaces()};
206 $extreme->set_add_i_vlan_tagged('2', $if_map{'FastEthernet0/1'})
207 or die "Couldn't add port to egress list. ",$extreme->error(1);
208
209 $extreme->set_remove_i_vlan_tagged ( vlan, ifIndex )
210 Removes the VLAN from the enabled VLANs list of the port, must be
211 supplied with the numeric VLAN ID and port "ifIndex".
212
213 Example:
214 my %if_map = reverse %{$extreme->interfaces()};
215 $extreme->set_remove_i_vlan_tagged('2', $if_map{'FastEthernet0/1'})
216 or die "Couldn't add port to egress list. ",$extreme->error(1);
217
219 $extreme->munge_power_stat()
220 Removes 'present' and changes 'not' to 'Not' in the front of a
221 string.
222
223 $extreme->munge_true_ok()
224 Replaces 'true' with "OK" and 'false' with "Not OK".
225
226
227
228perl v5.12.0 2009-06-12 Info::Layer3::Extreme(3)