1Info::LLDP(3)         User Contributed Perl Documentation        Info::LLDP(3)
2
3
4

NAME

6       SNMP::Info::LLDP - SNMP Interface to the Link Layer Discovery Protocol
7       (LLDP)
8

AUTHOR

10       Eric Miller
11

SYNOPSIS

13        my $lldp = new SNMP::Info (
14                                    AutoSpecify => 1,
15                                    Debug       => 1,
16                                    DestHost    => 'router',
17                                    Community   => 'public',
18                                    Version     => 2
19                                  );
20
21        my $class = $lldp->class();
22        print " Using device sub class : $class\n";
23
24        $haslldp   = $lldp->hasLLDP() ? 'yes' : 'no';
25
26        # Print out a map of device ports with LLDP neighbors:
27        my $interfaces    = $lldp->interfaces();
28        my $lldp_if       = $lldp->lldp_if();
29        my $lldp_ip       = $lldp->lldp_ip();
30        my $lldp_port     = $lldp->lldp_port();
31
32        foreach my $lldp_key (keys %$lldp_ip){
33           my $iid           = $lldp_if->{$lldp_key};
34           my $port          = $interfaces->{$iid};
35           my $neighbor      = $lldp_ip->{$lldp_key};
36           my $neighbor_port = $lldp_port->{$lldp_key};
37           print "Port : $port connected to $neighbor / $neighbor_port\n";
38        }
39

DESCRIPTION

41       SNMP::Info::LLDP is a subclass of SNMP::Info that provides an object
42       oriented interface to LLDP information through SNMP.
43
44       LLDP is a Layer 2 protocol that allows a network device to advertise
45       its identity and capabilities on the local network providing topology
46       information.  The protocol is defined in the IEEE standard 802.1AB.
47
48       Create or use a device subclass that inherits this class.  Do not use
49       directly.
50
51   Inherited Classes
52       None.
53
54   Required MIBs
55       LLDP-MIB
56       LLDP-EXT-DOT1-MIB
57       LLDP-EXT-DOT3-MIB
58

GLOBAL METHODS

60       These are methods that return scalar values from SNMP
61
62       $lldp->hasLLDP()
63           Is LLDP is active in this device?
64
65           Note:  LLDP may be active, but nothing in "lldpRemoteSystemsData"
66           Tables so the device would not return any useful topology
67           information.
68
69       $lldp->lldp_sysname()
70           The string value used to identify the system name of the local
71           system.  If the local agent supports IETF RFC 3418,
72           "lldpLocSysName" object should have the same value of "sysName"
73           object.
74
75           Nulls are removed before the value is returned.
76
77           ("lldpLocSysName")
78
79       $lldp->lldp_sysdesc()
80           The string value used to identify the system description of the
81           local system.  If the local agent supports IETF RFC 3418,
82           "lldpLocSysDesc" object should have the same value of "sysDesc"
83           object.
84
85           Nulls are removed before the value is returned.
86
87           ("lldpLocSysDesc")
88
89       $lldp->lldp_sys_cap()
90           Returns which system capabilities are enabled on the local system.
91           Results are munged into an ascii binary string, LSB.  Each digit
92           represents a bit from the table below:
93
94           Bit 'other(0)' indicates that the system has capabilities other
95           than those listed below.
96           Bit 'repeater(1)' indicates that the system has repeater
97           capability.
98           Bit 'bridge(2)' indicates that the system has bridge capability.
99           Bit 'wlanAccessPoint(3)' indicates that the system has WLAN access
100           point capability.
101           Bit 'router(4)' indicates that the system has router capability.
102           Bit 'telephone(5)' indicates that the system has telephone
103           capability.
104           Bit 'docsisCableDevice(6)' indicates that the system has DOCSIS
105           Cable Device capability (IETF RFC 2669 & 2670).
106           Bit 'stationOnly(7)' indicates that the system has only station
107           capability and nothing else."
108
109           ("lldpLocSysCapEnabled")
110

TABLE METHODS

112       These are methods that return tables of information in the form of a
113       reference to a hash.
114
115       $lldp->lldp_id()
116           Returns the string value used to identify the chassis
117           component  associated with the remote system.
118
119           ("lldpRemChassisId")
120
121       $lldp->lldp_if()
122           Returns the mapping to the SNMP Interface Table.
123
124       $lldp->lldp_ip()
125           Returns remote IPv4 address.  Returns for all other address types,
126           use lldp_addr if you want any return address type.
127
128       $lldp->lldp_addr()
129           Returns remote address.  Type may be any IANA Address Family
130           Number.  Currently only returns IPv4 or MAC addresses.
131
132       $lldp->lldp_port()
133           Returns remote port ID
134
135   LLDP Remote Table ("lldpRemTable")
136       $lldp->lldp_rem_id_type()
137           Returns the type of encoding used to identify the chassis
138           associated with the remote system.
139
140           ("lldpRemChassisIdSubtype")
141
142       $lldp->lldp_rem_id()
143           Returns the string value used to identify the chassis
144           component  associated with the remote system.
145
146           ("lldpRemChassisId")
147
148       $lldp->lldp_rem_pid_type()
149           Returns the type of port identifier encoding used in the associated
150           "lldpRemPortId" object.
151
152           ("lldpRemPortIdSubtype")
153
154       $lldp->lldp_rem_pid()
155           Returns the string value used to identify the port component
156           associated with the remote system.
157
158           ("lldpRemPortId")
159
160       $lldp->lldp_rem_desc()
161           Returns the string value used to identify the description of the
162           given port associated with the remote system.
163
164           Nulls are removed before the value is returned.
165
166           ("lldpRemPortDesc")
167
168       $lldp->lldp_rem_sysname()
169           Returns the string value used to identify the system name of the
170           remote system.
171
172           Nulls are removed before the value is returned.
173
174           ("lldpRemSysName")
175
176       $lldp->lldp_rem_sysdesc()
177           Returns the string value used to identify the system description of
178           the remote system.
179
180           Nulls are removed before the value is returned.
181
182           ("lldpRemSysDesc")
183
184       $lldp->lldp_rem_sys_cap()
185           Returns which system capabilities are enabled on the local system.
186           Results are munged into an ascii binary string, LSB.  Each digit
187           represents a bit from the table below:
188
189           Bit 'other(0)' indicates that the system has capabilities other
190           than those listed below.
191           Bit 'repeater(1)' indicates that the system has repeater
192           capability.
193           Bit 'bridge(2)' indicates that the system has bridge capability.
194           Bit 'wlanAccessPoint(3)' indicates that the system has WLAN access
195           point capability.
196           Bit 'router(4)' indicates that the system has router capability.
197           Bit 'telephone(5)' indicates that the system has telephone
198           capability.
199           Bit 'docsisCableDevice(6)' indicates that the system has DOCSIS
200           Cable Device capability (IETF RFC 2669 & 2670).
201           Bit 'stationOnly(7)' indicates that the system has only station
202           capability and nothing else."
203
204           ("lldpRemSysCapEnabled")
205
206
207
208perl v5.12.0                      2009-06-12                     Info::LLDP(3)
Impressum