NAME
SNMP::Info::Layer2::Catalyst - Perl5 Interface to Cisco devices running Catalyst OS
DESCRIPTION
Provides abstraction to the configuration information obtainable from a Catalyst device through SNMP. Information is stored in a number of MIB's such as IF-MIB, CISCO-CDP-MIB, CISCO-STACK-MIB, CISCO-VTP-MIB, and SWITCH-MIB.
AUTHOR
Max Baker (max@warped.org
)
SYNOPSIS
my $cat = new SNMP::Info::Layer2::Catalyst(DestHost => 'router' ,
Community => 'public' );
CREATING AN OBJECT
- new SNMP::Info::Layer2::Catalyst()
-
Arguments passed to new() are passed on to SNMP::Session::new()
my $cat = new SNMP::Info::Layer2::Catalyst( DestHost => $host, Community => 'public', Version => 3,... ) die "Couldn't connect.\n" unless defined $cat;
- $cat->session()
-
Sets or returns the SNMP::Session object
# Get my $sess = $cat->session(); # Set my $newsession = new SNMP::Session(...); $cat->session($newsession);
GLOBAL Values
- $cat->netmask() (sysNetMask)
- $cat->broadcast() (sysBroadcast)
- $cat->serial() (chassisSerialNumberString)
- $cat->model() (chassisModel)
- $cat->ps1_type() (chassisPs1Type)
- $cat->ps2_type() (chassisPs2Type)
- $cat->ps1_status() (chassisPs1Status)
- $cat->ps2_status() (chassisPs2Status)
- $cat->slots() (chassisNumSlots)
- $cat->fan() (chassisFanStatus)
- $cat->vendor()
-
Returns 'cisco'
TABLE ENTRIES
Overrides
- $cat->interfaces()
-
Crosses p_port() with i_index() to get physical names.
- $cat->i_physical()
-
Returns a map to IID for ports that are physical ports, not vlans, etc.
- $cat->i_type()
-
Crosses p_port() with p_type() and returns the results. Overrides with ifType if p_type() isn't available.
- $cat->i_name()
-
Crosses p_name with p_port and returns results.
- $cat->i_duplex()
-
Crosses p_duplex with p_port and returns results.
- $cat->i_duplex_admin()
-
Crosses p_duplex_admin with p_port. Munges bit_string returned from p_duplex_admin to get duplex settings.
Module table
This table holds configuration information for each of the blades installed in the Catalyst device.
- $cat->m_type() (moduleType)
- $cat->m_model() (moduleModel)
- $cat->m_serial() (moduleSerialNumber)
- $cat->m_status() (moduleStatus)
- $cat->m_name() (moduleName)
- $cat->m_ports() (moduleNumPorts)
- $cat->m_ports_status() Returns a list of space separated status strings for the ports. To see the status of port 4 : @ports_status = split(' ', $cat->m_ports_status() ); $port4 = $ports_status[3];
-
(modulePortStatus)
- $cat->m_ports_hwver() (moduleHwVersion)
- $cat->m_ports_fwver() (moduleFwVersion)
- $cat->m_ports_swver() (moduleSwVersion)
- $cat->m_ports_ip() (moduleIPAddress)
- $cat->m_ports_sub1() (moduleSubType)
- $cat->m_ports_sub2() (moduleSubType2)
Modules - Router Blades
Port Entry Table (CISCO-STACK-MIB::portTable)
- $cat->p_name() (portName)
- $cat->p_type() (portType)
- $cat->p_status() (portOperStatus)
- $cat->p_status2() (portAdditionalStatus)
- $cat->p_speed() (portAdminSpeed)
- $cat->p_duplex() (portDuplex)
- $cat->p_port() (portIfIndex)
Port Capability Table (CISCO-STACK-MIB::portCpbTable)
VLAN Entry Table
See ftp://ftp.cisco.com/pub/mibs/supportlists/wsc5000/wsc5000-communityIndexing.html for a good treaty of how to connect to the VLANs