Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages
SNMP::Info::Layer1(3) User Contributed Perl Documentation SNMP::Info::Layer1(3)

SNMP::Info::Layer1 - SNMP Interface to network devices serving Layer1 only.

Max Baker

 # Let SNMP::Info determine the correct subclass for you. 
 my $l1 = new SNMP::Info(
                          AutoSpecify => 1,
                          Debug       => 1,
                          DestHost    => 'myswitch',
                          Community   => 'public',
                          Version     => 1
    or die "Can't connect to DestHost.\n";
 my $class = $l1->class();
 print "SNMP::Info determined this device to fall under subclass : $class\n";
 # Let's get some basic Port information
 my $interfaces = $l1->interfaces();
 my $i_up       = $l1->i_up();
 my $i_speed    = $l1->i_speed();
 foreach my $iid (keys %$interfaces) {
    my $port  = $interfaces->{$iid};
    my $up    = $i_up->{$iid};
    my $speed = $i_speed->{$iid}
    print "Port $port is $up. Port runs at $speed.\n";

This class is usually used as a superclass for more specific device classes listed under SNMP::Info::Layer1::* Please read all docs under SNMP::Info first.
Provides abstraction to the configuration information obtainable from a Layer1 device through SNMP. Information is stored in a number of MIBs.
For speed or debugging purposes you can call the subclass directly, but not after determining a more specific class using the method above.
 my $l1 = new SNMP::Info::Layer1(...);


MIBs required for "Required MIBs" in SNMP::Info
See "Required MIBs" in SNMP::Info for its MIB requirements.
SNMP-REPEATER-MIB needs to be extracted from

These are methods that return scalar value from SNMP
Gets the number of ports under the interface mib

Cross references $l1->id() with product IDs.
For HP devices, removes 'hpswitch' from the name
For Cisco devices, removes 'sysid' from the name
Tries to discover the vendor from $l1->model() and $l1->vendor()
Adds the values from rptr_ports() and ports_managed()
Number of 'groups' in the Repeater MIB

See documentation in "GLOBALS" in SNMP::Info for details.

These are methods that return tables of information in the form of a reference to a hash.

Returns reference to the map between IID and physical Port.
Returns reference to map of IIDs to link status.
Returns reference to map of IIDs to administrative link status.

Number of ports in each group.
Port number in Group
Group (slot) Number for given port.

See documentation in "TABLE METHODS" in SNMP::Info for details.
2019-01-02 perl v5.28.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.