1SNMP::Info::Layer3(3) User Contributed Perl DocumentationSNMP::Info::Layer3(3)
2
3
4

NAME

6       SNMP::Info::Layer3 - SNMP Interface to network devices serving Layer3
7       or Layers 2 & 3
8

AUTHOR

10       Max Baker
11

SYNOPSIS

13        # Let SNMP::Info determine the correct subclass for you.
14        my $l3 = new SNMP::Info(
15                                 AutoSpecify => 1,
16                                 Debug       => 1,
17                                 DestHost    => 'myswitch',
18                                 Community   => 'public',
19                                 Version     => 2
20                               )
21           or die "Can't connect to DestHost.\n";
22
23        my $class = $l3->class();
24        print "SNMP::Info determined this device to fall under subclass : $class\n";
25
26        # Let's get some basic Port information
27        my $interfaces = $l3->interfaces();
28        my $i_up       = $l3->i_up();
29        my $i_speed    = $l3->i_speed();
30        foreach my $iid (keys %$interfaces) {
31           my $port  = $interfaces->{$iid};
32           my $up    = $i_up->{$iid};
33           my $speed = $i_speed->{$iid}
34           print "Port $port is $up. Port runs at $speed.\n";
35        }
36

DESCRIPTION

38       This class is usually used as a superclass for more specific device
39       classes listed under SNMP::Info::Layer3::*   Please read all docs under
40       SNMP::Info first.
41
42       Provides generic methods for accessing SNMP data for Layer 3 network
43       devices.  Includes support for Layer2+3 devices.
44
45       For speed or debugging purposes you can call the subclass directly, but
46       not after determining a more specific class using the method above.
47
48        my $l3 = new SNMP::Info::Layer3(...);
49
50   Inherited Classes
51       SNMP::Info
52       SNMP::Info::Bridge (For L2/L3 devices)
53       SNMP::Info::EtherLike
54       SNMP::Info::Entity
55       SNMP::Info::PowerEthernet
56       SNMP::Info::IPv6
57       SNMP::Info::LLDP
58
59   Required MIBs
60       IP-MIB
61       ISIS-MIB
62       OSPF-MIB
63       BGP4-MIB
64
65   Inherited MIBs
66       See "Required MIBs" in SNMP::Info for its MIB requirements.
67
68       See "Required MIBs" in SNMP::Info::Bridge for its MIB requirements.
69
70       See "Required MIBs" in SNMP::Info::EtherLike for its MIB requirements.
71
72       See "Required MIBs" in SNMP::Info::Entity for its MIB requirements.
73
74       See "Required MIBs" in SNMP::Info::PowerEthernet for its MIB
75       requirements.
76
77       See "Required MIBs" in SNMP::Info::IPv6 for its MIB requirements.
78
79       See "Required MIBs" in SNMP::Info::LLDP for its MIB requirements.
80

GLOBALS

82       These are methods that return scalar value from SNMP
83
84       $l3->mac()
85           Returns root port mac address
86
87           ("ifPhysAddress.1")
88
89       $l3->router_ip()
90           ("ospfRouterId.0")
91
92       $l3->bgp_id()
93           ("bgpIdentifier.0")
94
95           Returns the BGP identifier of the local system
96
97       $l3->bgp_local_as()
98           Returns the local autonomous system number
99
100           ("bgpLocalAs.0")
101
102   Overrides
103       $l3->model()
104           Tries to reference $l3->id() to one of the product MIBs listed
105           above
106
107           Removes 'cisco'  from cisco devices for readability.
108
109       $l3->serial()
110           Returns a serial number if found from ENTITY-MIB and OLD-CISCO-...
111           MIB.
112
113       $l3->vendor()
114           Tries to cull a Vendor name from "sysDescr"
115
116       $l3->root_ip()
117           Returns the primary IP used to communicate with the device.
118           Returns the first found:  OSPF Router ID ("ospfRouterId") or any
119           OSPF Host IP Address ("ospfHostIpAddress").
120
121   Globals imported from SNMP::Info
122       See "GLOBALS" in SNMP::Info for details.
123
124   Global Methods imported from SNMP::Info::Bridge
125       See "GLOBALS" in SNMP::Info::Bridge for details.
126
127   Global Methods imported from SNMP::Info::EtherLike
128       See "GLOBALS" in SNMP::Info::EtherLike for details.
129
130   Global Methods imported from SNMP::Info::Entity
131       See "GLOBALS" in SNMP::Info::Entity for details.
132
133   Global Methods imported from SNMP::Info:PowerEthernet
134       See "GLOBALS" in SNMP::Info::PowerEthernet for details.
135
136   Global Methods imported from SNMP::Info::IPv6
137       See "GLOBALS" in SNMP::Info::IPv6 for details.
138
139   Global Methods imported from SNMP::Info::LLDP
140       See "GLOBALS" in SNMP::Info::LLDP for details.
141

TABLE METHODS

143       These are methods that return tables of information in the form of a
144       reference to a hash.
145
146   Overrides
147       $l3->interfaces()
148           Returns the map between SNMP Interface Identifier (iid) and
149           physical port name.
150
151           Only returns those iids that have a description listed in
152           $l3->i_description()
153
154       $l3->i_name()
155           Returns reference to hash of iid to human set name.
156
157           Defaults to "ifName", but checks for an "ifAlias"
158
159       $l3->i_duplex()
160           Returns reference to hash of iid to current link duplex setting.
161
162           Maps $l3->el_index() to $l3->el_duplex, then culls out full,half,
163           or auto and sets the map to that value.
164
165           See SNMP::Info::Etherlike for the el_index() and el_duplex()
166           methods.
167
168   IP-MIB Arp Cache Table ("ipNetToMediaTable")
169       $l3->at_index()
170           Returns reference to hash.  Maps ARP table entries to Interface
171           IIDs
172
173           ("ipNetToMediaIfIndex")
174
175           If the device doesn't support "ipNetToMediaIfIndex", this will try
176           the deprecated "atIfIndex".
177
178       $l3->at_paddr()
179           Returns reference to hash.  Maps ARP table entries to MAC
180           addresses.
181
182           ("ipNetToMediaPhysAddress")
183
184           If the device doesn't support "ipNetToMediaPhysAddress", this will
185           try the deprecated "atPhysAddress".
186
187       $l3->at_netaddr()
188           Returns reference to hash.  Maps ARP table entries to IP addresses.
189
190           ("ipNetToMediaNetAddress")
191
192           If the device doesn't support "ipNetToMediaNetAddress", this will
193           try the deprecated "atNetAddress".
194
195   ARP Cache Entries
196       The "atTable" has been deprecated since 1991.  You should never need to
197       use these methods.  See "ipNetToMediaTable" above.
198
199       $l3->old_at_index()
200           Returns reference to map of IID to Arp Cache Entry
201
202           ("atIfIndex")
203
204       $l3->old_at_paddr()
205           Returns reference to hash of Arp Cache Entries to MAC address
206
207           ("atPhysAddress")
208
209       $l3->old_at_netaddr()
210           Returns reference to hash of Arp Cache Entries to IP Address
211
212           ("atNetAddress")
213
214   BGP Peer Table ("bgpPeerTable")
215       $l3->bgp_peers()
216           Returns reference to hash of BGP peer to local IP address
217
218           ("bgpPeerLocalAddr")
219
220       $l3->bgp_peer_id()
221           Returns reference to hash of BGP peer to BGP peer identifier
222
223           ("bgpPeerIdentifier")
224
225       $l3->bgp_peer_state()
226           Returns reference to hash of BGP peer to BGP peer state
227
228           ("bgpPeerState")
229
230       $l3->bgp_peer_as()
231           Returns reference to hash of BGP peer to BGP peer autonomous system
232           number
233
234           ("bgpPeerRemoteAs")
235
236       $l3->bgp_peer_addr()
237           Returns reference to hash of BGP peer to BGP peer IP address
238
239           ("bgpPeerRemoteAddr")
240
241       $l3->bgp_peer_fsm_est_trans()
242           Returns reference to hash of BGP peer to the total number of times
243           the BGP FSM transitioned into the established state
244
245           ("bgpPeerFsmEstablishedTransitions")
246
247       $l3->bgp_peer_in_tot_msgs()
248           Returns reference to hash of BGP peer to the total number of
249           messages received from the remote peer on this connection
250
251           ("bgpPeerInTotalMessages")
252
253       $l3->bgp_peer_in_upd_el_time()
254           Returns reference to hash of BGP peer to the elapsed time in
255           seconds since the last BGP UPDATE message was received from the
256           peer.
257
258           ("bgpPeerInUpdateElapsedTime")
259
260       $l3->bgp_peer_in_upd()
261           Returns reference to hash of BGP peer to the number of BGP UPDATE
262           messages received on this connection
263
264           ("bgpPeerInUpdates")
265
266       $l3->bgp_peer_out_tot_msgs()
267           Returns reference to hash of BGP peer to the total number of
268           messages transmitted to the remote peer on this connection
269
270           ("bgpPeerOutTotalMessages")
271
272       $l3->bgp_peer_out_upd()
273           Returns reference to hash of BGP peer to the number of BGP UPDATE
274           messages transmitted on this connection
275
276           ("bgpPeerOutUpdates")
277
278   OSPF Interface Table ("ospfIfTable")
279       $l3->ospf_if_ip()
280           Returns reference to hash of OSPF interface IP addresses
281
282           ("ospfIfIpAddress")
283
284       $l3->ospf_if_area()
285           Returns reference to hash of the OSPF area to which the interfaces
286           connect
287
288           ("ospfIfAreaId")
289
290       $l3->ospf_if_type()
291           Returns reference to hash of the OSPF interfaces' type
292
293           ("ospfIfType")
294
295       $l3->ospf_if_hello()
296           Returns reference to hash of the OSPF interfaces' hello interval
297
298           ("ospfIfHelloInterval")
299
300       $l3->ospf_if_dead()
301           Returns reference to hash of the OSPF interfaces' dead interval
302
303           ("ospfIfRtrDeadInterval")
304
305       $l3->ospf_if_admin()
306           Returns reference to hash of the OSPF interfaces' administrative
307           status
308
309           ("ospfIfAdminStat")
310
311       $l3->ospf_if_state()
312           Returns reference to hash of the OSPF interfaces' state
313
314           ("ospfIfState")
315
316   OSPF Neighbor Table ("ospfNbrTable")
317       $l3->ospf_peers()
318           Returns reference to hash of IP addresses the neighbor is using in
319           its IP Source Addresses
320
321           ("ospfNbrIpAddr")
322
323       $l3->ospf_peer_id()
324           Returns reference to hash of neighbor Router IDs
325
326           ("ospfNbrRtrId")
327
328       $l3->ospf_peer_state()
329           Returns reference to hash of state of the relationship with the
330           neighbor routers
331
332           ("ospfNbrState")
333
334   IS-IS Circuit Table
335       $l3->isis_circ_if_idx()
336           Returns reference to hash of the interface index associated with
337           the IS-IS circuit ("isisCircIfIndex")
338
339       $l3->isis_circ_admin()
340           Returns reference to hash of the IS-IS circuit's admin status
341
342           ("isisCircAdminState")
343
344       $l3->isis_circ_type()
345           Returns reference to hash of the IS-IS circuit's type
346
347           ("isisCircType")
348
349       $l3->isis_circ_level_type()
350           Returns reference to hash of the IS-IS circuit's level
351
352           ("isisCircLevelType")
353
354   IS-IS Adjacency Table
355       $l3->isis_adj_id()
356           Returns reference to hash of the peer id of adjacencies.
357
358           ("isisISAdjNeighSysID")
359
360       $l3->isis_adj_type()
361           Returns reference to hash of the type of adjacencies (Level 1
362           Intermediate System, Level 2 Intermediate System, Level 1+2
363           Intermediate System, unknown)
364
365           ("isisISAdjNeighSysType")
366
367       $l3->isis_adj_usage()
368           Returns reference to hash of the type of adjacencies in use
369           (undefined, Level 1, Level 2, Level1+2)
370
371           ("isisISAdjNeighUsage")
372
373       $l3->isis_adj_ip_type()
374           Returns reference to hash of type of address (IPv4, IPv6, etc) on
375           adjacencies.
376
377           ("isisISAdjIPAddrType")
378
379       $l3->isis_adj()
380           Returns reference to hash of addresses (IPv4, IPv6, etc) on
381           adjacencies.  Note this returns hash-strings, for IPs, use
382           $l3->isis_peers()
383
384           ("isisISAdjIPAddrAddress")
385
386       $l3->isis_peers()
387           Returns reference to hash of addresses (IPv4, IPv6) on adjacencies.
388           Convers hash strings from isis_adj to proper IP (v4 and v6)
389           formatting.
390
391   Table Methods imported from SNMP::Info
392       See "TABLE METHODS" in SNMP::Info for details.
393
394   Table Methods imported from SNMP::Info::Bridge
395       See "TABLE METHODS" in SNMP::Info::Bridge for details.
396
397   Table Methods imported from SNMP::Info::EtherLike
398       See "TABLE METHODS" in SNMP::Info::EtherLike for details.
399
400   Table Methods imported from SNMP::Info::Entity
401       See "TABLE METHODS" in SNMP::Info::Entity for details.
402
403   Table Methods imported from SNMP::Info::PowerEthernet
404       See "TABLE METHODS" in SNMP::Info::PowerEthernet for details.
405
406   Table Methods imported from SNMP::Info::IPv6
407       See "TABLE METHODS" in SNMP::Info::IPv6 for details.
408
409   Table Methods imported from SNMP::Info::LLDP
410       See "TABLE METHODS" in SNMP::Info::LLDP for details.
411
412
413
414perl v5.28.1                      2019-04-04             SNMP::Info::Layer3(3)
Impressum