1SNMP::Info::Layer2::C29U0s0e(r3)Contributed Perl DocumenStNaMtPi:o:nInfo::Layer2::C2900(3)
2
3
4

NAME

6       SNMP::Info::Layer2::C2900 - SNMP Interface to Cisco Catalyst 2900
7       Switches running IOS
8

AUTHOR

10       Max Baker
11

SYNOPSIS

13        # Let SNMP::Info determine the correct subclass for you.
14        my $c2900 = new SNMP::Info(
15                               AutoSpecify => 1,
16                               Debug       => 1,
17                               # These arguments are passed directly to SNMP::Session
18                               DestHost    => 'myswitch',
19                               Community   => 'public',
20                               Version     => 2
21                               )
22           or die "Can't connect to DestHost.\n";
23
24        my $class = $c2900->class();
25        print "SNMP::Info determined this device to fall under subclass : $class\n";
26

DESCRIPTION

28       Provides abstraction to the configuration information obtainable from a
29       C2900 device through SNMP.
30
31   Inherited Classes
32       SNMP::Info::Layer2::Cisco
33
34   Required MIBs
35       CISCO-C2900-MIB
36           Part of the v2 MIBs from Cisco.
37
38   Inherited MIBs
39       See "Required MIBs" in SNMP::Info::Layer2::Cisco for its MIB
40       requirements.
41

GLOBALS

43       These are methods that return scalar value from SNMP
44
45   Overrides
46       $c2900->vendor()
47           Returns 'cisco'
48
49       $c2900->cisco_comm_indexing()
50           Returns 1.  Use vlan indexing.
51
52   Globals imported from SNMP::Info::Layer2::Cisco
53       See "GLOBALS" in SNMP::Info::Layer2::Cisco for details.
54

TABLE METHODS

56       These are methods that return tables of information in the form of a
57       reference to a hash.
58
59   Overrides
60       $c2900->interfaces()
61           Returns reference to the map between IID and physical Port.
62
63           On the 2900 devices i_name isn't reliable, so we override to just
64           the description.
65
66           Next all dots are changed for forward slashes so that the physical
67           port name is the same as the broad-casted CDP port name.
68               (Ethernet0.1 -> Ethernet0/1)
69
70           Also, any weird characters are removed, as I saw a few pop up.
71
72       $c2900->i_duplex()
73           Returns reference to map of IIDs to current link duplex
74
75           Crosses $c2900->c2900_p_index() with $c2900->c2900_p_duplex()
76
77       $c2900->i_duplex_admin()
78           Returns reference to hash of IIDs to admin duplex setting
79
80           Crosses $c2900->c2900_p_index() with $c2900->c2900_p_duplex_admin()
81
82       $c2900->i_speed_admin()
83           Returns reference to hash of IIDs to admin speed setting.
84
85   C2900-MIB Port Entry Table
86       $c2900->c2900_p_index()
87           Maps the Switch Port Table to the IID
88
89           ("c2900PortIfIndex")
90
91       $c2900->c2900_p_duplex()
92           Gives Port Duplex Info
93
94           ("c2900PortDuplexStatus")
95
96       $c2900->c2900_p_duplex_admin()
97           Gives admin setting for Duplex Info
98
99           ("c2900PortDuplexState")
100
101       $c2900->c2900_p_speed_admin()
102           Gives Admin speed of port
103
104           ("c2900PortAdminSpeed")
105
106   Table Methods imported from SNMP::Info::Layer2::Cisco
107       See "TABLE METHODS" in SNMP::Info::Layer2::Cisco for details.
108

SET METHODS

110       These are methods that provide SNMP set functionality for overridden
111       methods or provide a simpler interface to complex set operations.  See
112       "SETTING DATA VIA SNMP" in SNMP::Info for general information on set
113       operations.
114
115       $c2900->set_i_speed_admin(speed, ifIndex)
116           Sets port speed, must be supplied with speed and port "ifIndex"
117
118           Speed choices are 'auto', '10', '100'
119
120           Crosses $c2900->c2900_p_index() with $c2900->c2900_p_speed_admin()
121           to utilize port "ifIndex".
122
123               Example:
124               my %if_map = reverse %{$c2900->interfaces()};
125               $c2900->set_i_speed_admin('auto', $if_map{'FastEthernet0/1'})
126                   or die "Couldn't change port speed. ",$c2900->error(1);
127
128       $c2900->set_i_duplex_admin(duplex, ifIndex)
129           Sets port duplex, must be supplied with duplex and port "ifIndex"
130
131           Speed choices are 'auto', 'half', 'full'
132
133           Crosses $c2900->c2900_p_index() with $c2900->c2900_p_duplex_admin()
134           to utilize port "ifIndex".
135
136               Example:
137               my %if_map = reverse %{$c2900->interfaces()};
138               $c2900->set_i_duplex_admin('auto', $if_map{'FastEthernet0/1'})
139                   or die "Couldn't change port duplex. ",$c2900->error(1);
140
141
142
143perl v5.32.1                      2021-01-27      SNMP::Info::Layer2::C2900(3)
Impressum