.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Info::Layer2::C1900 3pm" .TH Info::Layer2::C1900 3pm "2016-12-21" "perl v5.24.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" SNMP::Info::Layer2::C1900 \- SNMP Interface to data from Cisco Catalyst 1900 Network Switches running CatOS .SH "AUTHOR" .IX Header "AUTHOR" Max Baker .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 9 \& # Let SNMP::Info determine the correct subclass for you. \& my $c1900 = new SNMP::Info( \& AutoSpecify => 1, \& Debug => 1, \& DestHost => \*(Aqmyswitch\*(Aq, \& Community => \*(Aqpublic\*(Aq, \& Version => 1 \& ) \& or die "Can\*(Aqt connect to DestHost.\en"; \& \& my $class = $c1900\->class(); \& print "SNMP::Info determined this device to fall under subclass : $class\en"; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Provides abstraction to the configuration information obtainable from a Catalyst 1900 device through \s-1SNMP. \s0 See SNMP::Info for full documentation .PP Note that most of these devices only talk \s-1SNMP\s0 version 1, but not all. .PP For speed or debugging purposes you can call the subclass directly, but not after determining a more specific class using the method above. .PP .Vb 1 \& my $c1900 = new SNMP::Info::Layer2::C1900(...); .Ve .SS "Inherited classes" .IX Subsection "Inherited classes" .IP "SNMP::Info::CDP" 4 .IX Item "SNMP::Info::CDP" .PD 0 .IP "SNMP::Info::CiscoStats" 4 .IX Item "SNMP::Info::CiscoStats" .IP "SNMP::Info::CiscoConfig" 4 .IX Item "SNMP::Info::CiscoConfig" .IP "SNMP::Info::CiscoStpExtensions" 4 .IX Item "SNMP::Info::CiscoStpExtensions" .IP "SNMP::Info::CiscoAgg" 4 .IX Item "SNMP::Info::CiscoAgg" .IP "SNMP::Info::Layer2" 4 .IX Item "SNMP::Info::Layer2" .PD .SS "Required MIBs" .IX Subsection "Required MIBs" .IP "\fISTAND-ALONE-ETHERNET-SWITCH-MIB (ESSWITCH-MIB)\fR" 4 .IX Item "STAND-ALONE-ETHERNET-SWITCH-MIB (ESSWITCH-MIB)" \&\fIESSWITCH-MIB\fR is included in the Version 1 MIBs from Cisco. .Sp They can be found at ftp://ftp.cisco.com/pub/mibs/v1/v1.tar.gz .SS "Inherited MIBs" .IX Subsection "Inherited MIBs" See \*(L"Required MIBs\*(R" in SNMP::Info::CDP for its \s-1MIB\s0 requirements. .PP See \*(L"Required MIBs\*(R" in SNMP::Info::CiscoStats for its \s-1MIB\s0 requirements. .PP See \*(L"Required MIBs\*(R" in SNMP::Info::CiscoConfig for its \s-1MIB\s0 requirements. .PP See \*(L"Required MIBs\*(R" in SNMP::Info::CiscoStpExtensions for its \s-1MIB\s0 requirements. .PP See \*(L"Required MIBs\*(R" in SNMP::Info::CiscoAgg for its \s-1MIB\s0 requirements. .PP See \*(L"Required MIBs\*(R" in SNMP::Info::Layer2 for its \s-1MIB\s0 requirements. .SH "GLOBALS" .IX Header "GLOBALS" These are methods that return scalar value from \s-1SNMP\s0 .ie n .IP "$c1900\->\fIc1900_flash_status()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIc1900_flash_status()\fR" 4 .IX Item "$c1900->c1900_flash_status()" Usually contains the version of the software loaded in flash. Used by \fIos_ver()\fR .Sp \&\f(CW\*(C`STAND\-ALONE\-ETHERNET\-SWITCH\-MIB::upgradeFlashBankStatus\*(C'\fR .ie n .IP "$c1900\->\fIos()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIos()\fR" 4 .IX Item "$c1900->os()" Returns 'catalyst' .ie n .IP "$c1900\->\fIos_ver()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIos_ver()\fR" 4 .IX Item "$c1900->os_ver()" Returns CatOS version if obtainable. First tries to use SNMP::Info::CiscoStats\->\fIos_ver()\fR . If that fails then it checks for the presence of \f(CW$c1900\fR\->\fIc1900_flash_status()\fR and culls the version from there. .ie n .IP "$c1900\->\fIvendor()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIvendor()\fR" 4 .IX Item "$c1900->vendor()" Returns 'cisco' :) .SS "Overrides" .IX Subsection "Overrides" .ie n .IP "$c1900\->\fIcisco_comm_indexing()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIcisco_comm_indexing()\fR" 4 .IX Item "$c1900->cisco_comm_indexing()" Returns 1. Use vlan indexing. .ie n .IP "$c1900\->bulkwalk_no" 4 .el .IP "\f(CW$c1900\fR\->bulkwalk_no" 4 .IX Item "$c1900->bulkwalk_no" Return \f(CW1\fR. Bulkwalk is turned off for this class. .SS "Globals imported from SNMP::Info::CDP" .IX Subsection "Globals imported from SNMP::Info::CDP" See \*(L"\s-1GLOBALS\*(R"\s0 in SNMP::Info::CDP for details. .SS "Globals imported from SNMP::Info::CiscoStats" .IX Subsection "Globals imported from SNMP::Info::CiscoStats" See \*(L"\s-1GLOBALS\*(R"\s0 in SNMP::Info::CiscoStats for details. .SS "Globals imported from SNMP::Info::CiscoConfig" .IX Subsection "Globals imported from SNMP::Info::CiscoConfig" See \*(L"\s-1GLOBALS\*(R"\s0 in SNMP::Info::CiscoConfig for details. .SS "Globals imported from SNMP::Info::CiscoStpExtensions" .IX Subsection "Globals imported from SNMP::Info::CiscoStpExtensions" See \*(L"\s-1GLOBALS\*(R"\s0 in SNMP::Info::CiscoStpExtensions for details. .SS "Globals imported from SNMP::Info::CiscoAgg" .IX Subsection "Globals imported from SNMP::Info::CiscoAgg" See \*(L"\s-1GLOBALS\*(R"\s0 in SNMP::Info::CiscoAgg for details. .SS "Globals imported from SNMP::Info::Layer2" .IX Subsection "Globals imported from SNMP::Info::Layer2" See \*(L"\s-1GLOBALS\*(R"\s0 in SNMP::Info::Layer2 for details. .SH "TABLE METHODS" .IX Header "TABLE METHODS" These are methods that return tables of information in the form of a reference to a hash. .SS "Overrides" .IX Subsection "Overrides" .ie n .IP "$c1900\->\fIinterfaces()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIinterfaces()\fR" 4 .IX Item "$c1900->interfaces()" Returns reference to the map between \s-1IID\s0 and physical Port. .ie n .IP "$c1900\->\fIi_duplex()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIi_duplex()\fR" 4 .IX Item "$c1900->i_duplex()" Returns reference to map of IIDs to current link duplex .ie n .IP "$c1900\->\fIi_duplex_admin()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIi_duplex_admin()\fR" 4 .IX Item "$c1900->i_duplex_admin()" Returns reference to hash of IIDs to admin duplex setting .ie n .IP "$c1900\->\fIi_name()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIi_name()\fR" 4 .IX Item "$c1900->i_name()" Crosses \f(CW\*(C`ifName\*(C'\fR with \f(CW$c1900\fR\->\fIc1900_p_name()\fR and returns the human set port name if exists. .ie n .IP "$c1900\->\fIi_vlan()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIi_vlan()\fR" 4 .IX Item "$c1900->i_vlan()" Returns a mapping between the interface and the \s-1VLAN /\s0 bridge group if overlap is not enabled. .ie n .IP "$c1900\->\fIi_vlan_membership()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIi_vlan_membership()\fR" 4 .IX Item "$c1900->i_vlan_membership()" Returns reference to hash of arrays: key = interface, value = array of \s-1VLAN /\s0 bridge group IDs. .Sp .Vb 3 \& Example: \& my $interfaces = $c1900\->interfaces(); \& my $vlans = $c1900\->i_vlan_membership(); \& \& foreach my $iid (sort keys %$interfaces) { \& my $port = $interfaces\->{$iid}; \& my $vlan = join(\*(Aq,\*(Aq, sort(@{$vlans\->{$iid}})); \& print "Port: $port VLAN: $vlan\en"; \& } .Ve .ie n .IP "$c1900\->\fIi_vlan_membership_untagged()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIi_vlan_membership_untagged()\fR" 4 .IX Item "$c1900->i_vlan_membership_untagged()" Unsupported, returns nothing. .ie n .IP "$c1900\->\fIbp_index()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIbp_index()\fR" 4 .IX Item "$c1900->bp_index()" Returns a bp_index that contains the original bp_index entries and extra entries for those interfaces listed in if_index, as some C1900 devices do not return complete bp_indexes. .SS "\fISTAND-ALONE-ETHERNET-SWITCH-MIB\fP Switch Port Table Entries:" .IX Subsection "STAND-ALONE-ETHERNET-SWITCH-MIB Switch Port Table Entries:" .ie n .IP "$c1900\->\fIc1900_p_index()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIc1900_p_index()\fR" 4 .IX Item "$c1900->c1900_p_index()" Maps the Switch Port Table to the \s-1IID\s0 .Sp \&\f(CW\*(C`swPortIfIndex\*(C'\fR .ie n .IP "$c1900\->\fIc1900_p_duplex()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIc1900_p_duplex()\fR" 4 .IX Item "$c1900->c1900_p_duplex()" Gives Port Duplex Info .Sp (\f(CW\*(C`swPortDuplexStatus\*(C'\fR) .ie n .IP "$c1900\->\fIc1900_p_duplex_admin()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIc1900_p_duplex_admin()\fR" 4 .IX Item "$c1900->c1900_p_duplex_admin()" Gives admin setting for Duplex Info .Sp (\f(CW\*(C`swPortFullDuplex\*(C'\fR) .ie n .IP "$c1900\->\fIc1900_p_name()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIc1900_p_name()\fR" 4 .IX Item "$c1900->c1900_p_name()" Gives human set name for port .Sp (\f(CW\*(C`swPortName\*(C'\fR) .ie n .IP "$c1900\->\fIc1900_p_up_admin()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIc1900_p_up_admin()\fR" 4 .IX Item "$c1900->c1900_p_up_admin()" Gives Admin status of port enabled. .Sp (\f(CW\*(C`swPortAdminStatus\*(C'\fR) .ie n .IP "$c1900\->\fIc1900_p_type()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIc1900_p_type()\fR" 4 .IX Item "$c1900->c1900_p_type()" Gives Type of port, i.e. \f(CW"general\-ethernet"\fR .Sp (\f(CW\*(C`swPortMediaCapability\*(C'\fR) .ie n .IP "$c1900\->\fIc1900_p_media()\fR" 4 .el .IP "\f(CW$c1900\fR\->\fIc1900_p_media()\fR" 4 .IX Item "$c1900->c1900_p_media()" Gives the media of the port , i.e. "\f(CW\*(C`fiber\-sc\*(C'\fR" .Sp (\f(CW\*(C`swPortConnectorType\*(C'\fR) .SS "Table Methods imported from SNMP::Info::CDP" .IX Subsection "Table Methods imported from SNMP::Info::CDP" See \*(L"\s-1TABLE METHODS\*(R"\s0 in SNMP::Info::CDP for details. .SS "Table Methods imported from SNMP::Info::CiscoStats" .IX Subsection "Table Methods imported from SNMP::Info::CiscoStats" See \*(L"\s-1TABLE METHODS\*(R"\s0 in SNMP::Info::CiscoStats for details. .SS "Table Methods imported from SNMP::Info::CiscoConfig" .IX Subsection "Table Methods imported from SNMP::Info::CiscoConfig" See \*(L"\s-1TABLE METHODS\*(R"\s0 in SNMP::Info::CiscoConfig for details. .SS "Table Methods imported from SNMP::Info::CiscoStpExtensions" .IX Subsection "Table Methods imported from SNMP::Info::CiscoStpExtensions" See \*(L"\s-1TABLE METHODS\*(R"\s0 in SNMP::Info::CiscoStpExtensions for details. .SS "Table Methods imported from SNMP::Info::CiscoAgg" .IX Subsection "Table Methods imported from SNMP::Info::CiscoAgg" See \*(L"\s-1TABLE METHODS\*(R"\s0 in SNMP::Info::CiscoAgg for details. .SS "Table Methods imported from SNMP::Info::Layer2" .IX Subsection "Table Methods imported from SNMP::Info::Layer2" See \*(L"\s-1TABLE METHODS\*(R"\s0 in SNMP::Info::Layer2 for details. .SH "SET METHODS" .IX Header "SET METHODS" These are methods that provide \s-1SNMP\s0 set functionality for overridden methods or provide a simpler interface to complex set operations. See \&\*(L"\s-1SETTING DATA VIA SNMP\*(R"\s0 in SNMP::Info for general information on set operations. .ie n .IP "$c1900\->set_i_duplex_admin(duplex, ifIndex)" 4 .el .IP "\f(CW$c1900\fR\->set_i_duplex_admin(duplex, ifIndex)" 4 .IX Item "$c1900->set_i_duplex_admin(duplex, ifIndex)" Sets port duplex, must be supplied with duplex and port \f(CW\*(C`ifIndex\*(C'\fR. Speed choices are 'auto', 'half', 'full'. .Sp .Vb 4 \& Example: \& my %if_map = reverse %{$c1900\->interfaces()}; \& $c1900\->set_i_duplex_admin(\*(Aqauto\*(Aq, $if_map{\*(Aq1\*(Aq}) \& or die "Couldn\*(Aqt change port duplex. ",$c1900\->error(1); .Ve