++ed by:
ABRAXXA INPHOBIA KEEDI

3 PAUSE users
1 non-PAUSE user.

Author image Max Baker

NAME

SNMP::Info::Layer2::C1900 - Perl5 Interface to SNMP data from Cisco Catlyst 1900 Network Switches running CatOS

AUTHOR

Max Baker (max@warped.org)

SYNOPSIS

 # Let SNMP::Info determine the correct subclass for you. 
 my $c1900 = new SNMP::Info(
                          AutoSpecify => 1,
                          Debug       => 1,
                          # These arguments are passed directly on to SNMP::Session
                          DestHost    => 'myswitch',
                          Community   => 'public',
                          Version     => 1
                        ) 
    or die "Can't connect to DestHost.\n";

 my $class      = $c1900->class();
 print "SNMP::Info determined this device to fall under subclass : $class\n";

DESCRIPTION

Provides abstraction to the configuration information obtainable from a Catalyst 1900 device through SNMP. See SNMP::Info for full documentation

Note that most of these devices only talk SNMP version 1, but not all.

For speed or debugging purposes you can call the subclass directly, but not after determining a more specific class using the method above.

 my $c1900 = new SNMP::Info::Layer2::C1900(...);

Inherited classes

SNMP::Info::Layer2

Required MIBs

STAND-ALONE-ETHERNET-SWITCH-MIB (ESSWITCH-MIB)

ESSWITCH-MIB is included in the Version 1 MIBS from Cisco.

They can be found at ftp://ftp.cisco.com/pub/mibs/v1/v1.tar.gz

Inherited Classes' MIBs

MIBs listed in SNMP::Info::Layer2

GLOBALS

These are methods that return scalar value from SNMP

$c1900->c1900_flash_status()

Usually contains the version of the software loaded in flash. Used by os_ver()

STAND-ALONE-ETHERNET-SWITCH-MIB::upgradeFlashBankStatus

$c1900->os()

Returns 'catalyst'

$c1900->os_ver()

Returns CatOS version if obtainable. First tries to use SNMP::Info::CiscoStats->os_ver() . If that fails then it checks for the presence of $c1900->c1900_flash_status() and culls the version from there.

$c1900->vendor()

Returns 'cisco' :)

Globals imported from SNMP::Info::Layer2

See documentation in SNMP::Info::Layer2 for details.

TABLE ENTRIES

Overrides

$c1900->i_duplex()

Returns reference to map of IIDs to current link duplex

Crosses $c1900->c1900_p_index() with $c1900->c1900_p_duplex;

$c1900->i_duplex_admin()

Returns reference to hash of IIDs to admin duplex setting

Crosses $c1900->c1900_p_index() with $c1900->c1900_p_duplex_admin;

$c1900->i_name()

Crosses ifName with c1900_p_name() and returns the human set port name if exists.

$c1900->i_type()

Returns reference to hash of IID to port type

Takes the default ifType and overrides it with

c1900_p_type() and c1900_p_media() if they exist.

STAND-ALONE-ETHERNET-SWITCH-MIB Switch Port Table Entries:

$c1900->c1900_p_index()

Maps the Switch Port Table to the IID

swPortIfIndex

$c1900->c1900_p_duplex()

Gives Port Duplex Info

swPortDuplexStatus

$c1900->c1900_p_duplex_admin()

Gives admin setting for Duplex Info

swPortFullDuplex

$c1900->c1900_p_name()

Gives human set name for port

swPortName

$c1900->c1900_p_up_admin()

Gives Admin status of port enabled.

swPortAdminStatus

$c1900->c1900_p_type()

Gives Type of port, ie. "general-ethernet"

swPortMediaCapability

$c1900->c1900_p_media()

Gives the media of the port , ie "fiber-sc"

swPortConnectorType

Table Methods imported from SNMP::Info::Layer2

See documentation in SNMP::Info::Layer2 for details.