SNMP::Info::Layer1::S3000 - SNMP Interface to Synoptics / Nortel Hubs
Eric Miller
#Let SNMP::Info determine the correct subclass for you.
my $s3000 = new SNMP::Info( AutoSpecify => 1, Debug => 1, DestHost => 'myswitch', Community => 'public', Version => 2 )
or die "Can't connect to DestHost.\n";
my $class = $s3000->class(); print "SNMP::Info determined this device to fall under subclass : $class\n";
Provides abstraction to the configuration information obtainable from a Bay hub device through SNMP. Also provides device MAC to port mapping through the proprietary MIB.
For speed or debugging purposes you can call the subclass directly, but not after determining a more specific class using the method above.
my $s3000 = new SNMP::Info::Layer1::S3000(...);
See Required MIBs in the SNMP::Info::Layer2 manpage for its MIB requirements.
These are methods that return scalar value from SNMP
vendor()
Returns 'nortel'
os()
Returns 'synoptics'
model()
Cross references $s3000->id()
to the SYNOPTICS-MIB and returns
the results.
Removes sreg-
from the model name and returns only the numeric model
identifier.
os_ver()
Returns the software version specified as major.minor.maint.
(s3AgentSwMajorVer
).(s3AgentSwMinorVer
).(s3AgentSwMaintVer
)
os_bin()
Returns the firmware version. (s3AgentFwVer
)
mac()
Returns MAC of the advertised IP address of the device.
layers()
Returns 00000011. Class emulates Layer 2 functionality through proprietary MIBs.
See GLOBALS in the SNMP::Info::Layer2 manpage for details.
These are methods that return tables of information in the form of a reference to a hash.
i_index()
Returns reference to map of IIDs to Interface index.
Since hubs do not support ifIndex
, the interface index is created using the
formula (board * 256 + port). This is required to support devices with more
than one module.
interfaces()
Returns reference to map of IIDs to physical ports.
i_duplex()
Returns half, hubs do not support full duplex.
i_duplex_admin()
Returns half, hubs do not support full duplex.
i_speed()
Returns 10000000. The hubs only support 10 Mbs Ethernet.
i_up()
Returns (s3EnetPortLinkStatus
) for each port. Translates on/off to
up/down.
i_up_admin()
Returns (s3EnetPortPartStatus
) for each port.
Sets port state, must be supplied with state and port ifIndex
State choices are 'up' or 'down'
Example: my %if_map = reverse %{$s3000->interfaces()}; $s3000->set_i_up_admin('down', $if_map{'1.1'}) or die ``Couldn't change port state. '',$s3000->error(1);
bp_index()
Simulates bridge MIB by returning reference to a hash containing the index for both the keys and values.
fw_port()
Returns reference to map of IIDs of the
SYNOPTICS-ETHERNET-MIB::s3EnetShowNodesTable
to the Interface index.
fw_mac()
(s3EnetShowNodesMacAddress
)
s3000_topo_port()
Returns reference to hash. Key: Table entry, Value:Port Number (interface iid)
(s3EnetTopNmmPort
)
s3000_topo_mac()
(s3EnetTopNmmMacAddr
)
Returns reference to hash. Key: Table entry, Value:Remote MAC address
See TABLE METHODS in the SNMP::Info::Layer2 manpage for details.