]> git.ipfire.org Git - thirdparty/lldpd.git/blob - man/lldpd.8
Update ISC license wording.
[thirdparty/lldpd.git] / man / lldpd.8
1 .\" Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
2 .\" Copyright (c) 2008 Vincent Bernat <bernat@luffy.cx>
3 .\"
4 .\" Permission to use, copy, modify, and/or distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\"
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 .\"
16 .Dd $Mdocdate: August 21 2008 $
17 .Dt LLDPD 8
18 .Os
19 .Sh NAME
20 .Nm lldpd
21 .Nd LLDP daemon
22 .Sh SYNOPSIS
23 .Nm
24 .Op Fl dxcseiklr
25 .Op Fl S Ar description
26 .Op Fl X Ar socket
27 .Op Fl m Ar management
28 .Op Fl M Ar class
29 .Op Fl H Ar hide
30 .Sh DESCRIPTION
31 .Nm
32 is a daemon able to receive and send
33 .Em LLDP
34 frames. The Link Layer Discovery Protocol is a vendor-neutral Layer 2
35 protocol that allows a network device to advertise its identity and
36 capabilities on the local network.
37 .Pp
38 .Nm
39 also implements an SNMP subagent using AgentX protocol to interface to
40 a regular SNMP agent like Net-SNMP. To enable this subagent, you need
41 something like that in your
42 .Xr snmpd.conf 5 :
43 .Bd -literal -offset indent
44 master agentx
45 .Ed
46 .Pp
47 This daemon implements both reception and sending. It will collect
48 various information to send LLDP frames to all Ethernet interfaces,
49 including management address, speed and VLAN names.
50 .Pp
51 The options are as follows:
52 .Bl -tag -width Ds
53 .It Fl d
54 Do not daemonize.
55 If this option is specified,
56 .Nm
57 will run in the foreground and log to
58 .Em stderr .
59 This option can be specified many times to increase verbosity.
60 .It Fl k
61 Disable advertising of kernel release, version and machine. Kernel name
62 (ie: Linux) will still be shared, and Inventory software version will be set
63 to 'Unknown'.
64 .It Fl S Ar description
65 Override system description with the provided description. The default
66 description is the kernel name, the node name, the kernel version, the
67 build date and the architecture (except if you use the
68 .Fl k
69 flag described above).
70 .It Fl x
71 Enable SNMP subagent.
72 With this option,
73 .Nm
74 will enable an SNMP subagent using AgentX protocol. This allows to get
75 information about local system and remote systems through SNMP.
76 .It Fl X Ar socket
77 Enable SNMP subagent using the specified socket.
78 .Nm
79 will enable an SNMP subagent using AgentX protocol for the given
80 socket. This option implies the previous one. The default socket is
81 usally
82 .Em /var/agentx/master .
83 You can specify a socket like
84 .Em tcp:127.0.0.1:705
85 for example. Since the process that will open this socket is enclosed
86 in a chroot, you need to specify an IP address (not a hostname) when
87 using a TCP or UDP socket.
88 .It Fl c
89 Enable the support of CDP protocol to deal with Cisco routers that do
90 not speak LLDP. If repeated, CDPv1 packets will be sent even when
91 there is no CDP peer detected.
92 .It Fl f
93 Enable the support of FDP protocol to deal with Foundry routers that do
94 not speak LLDP. If repeated, FDP packets will be sent even when there
95 is no FDP peer detected.
96 .It Fl s
97 Enable the support of SONMP protocol to deal with Nortel routers and
98 switches that do not speak LLDP. If repeated, SONMP packets will be
99 sent even when there is no SONMP peer detected.
100 .It Fl e
101 Enable the support of EDP protocol to deal with Extreme routers and
102 switches that do not speak LLDP. If repeated, EDP packets will be sent
103 even when there is no EDP peer detected.
104 .It Fl l
105 Force to send LLDP packets even when there is no LLDP peer detected
106 but there is a peer speaking another protocol detected. By default,
107 LLDP packets are sent when there is a peer speaking LLDP detected or
108 when there is no peer at all.
109 .It Fl r
110 Receive-only mode. With this switch,
111 .Nm
112 will not send any frame. It will only listen to neighbors.
113 .It Fl m Ar management
114 Specify the management address of this system.
115 .Nm
116 only sends one management address. It will use the first one that it
117 finds or the one that you specify with this option. This option can
118 use wildcards.
119 .It Fl M Ar class
120 Enable emission of LLDP-MED frame. The class should be one of the
121 following value:
122 .Bl -tag -width "0:XX" -compact
123 .It Sy 1
124 Generic Endpoint (Class I)
125 .It Sy 2
126 Media Endpoint (Class II)
127 .It Sy 3
128 Communication Device Endpoints (Class III)
129 .It Sy 4
130 Network Connectivity Device
131 .El
132 .It Fl i
133 Disable LLDP-MED inventory TLV transmission.
134 .Nm
135 will still receive (and publish using SNMP if enabled) those LLDP-MED
136 TLV but will not send them. Use this option if you don't want to
137 transmit sensible information like serial numbers.
138 .It Fl H Ar hide
139 Filter neighbors. See section
140 .Sx FILTERING NEIGHBORS
141 for details.
142 .El
143 .Sh FILTERING NEIGHBORS
144 In a heterogeneous network, you may see several different hosts on the
145 same port, even if there is only one physically plugged to this
146 port. For example, if you have a Nortel switch running LLDP which is
147 plugged to a Cisco switch running CDP and your host is plugged to the
148 Cisco switch, you will see the Nortel switch as well because LLDP
149 frames are forwarded by the Cisco switch. This may not be what you
150 want. The
151 .Fl H Ar hide
152 parameter will allow you to tell
153 .Nm
154 to discard some frames that it receives and to avoid to send some
155 other frames.
156 .Pp
157 Incoming filtering and outgoing filtering are
158 unrelated. Incoming filtering will hide some remote ports to get you a
159 chance to know exactly what equipment is on the other side of the
160 network cable. Outgoing filtering will avoid to use some protocols to
161 avoid flooding your network with a protocol that is not handled by the
162 nearest equipment. Keep in mind that even without filtering,
163 .Nm
164 will speak protocols for which at least one frame has been received
165 and LLDP otherwise (there are other options to change this behaviour,
166 for example
167 .Fl cc , ss , ee , ll
168 and
169 .Fl ff
170 ).
171 .Pp
172 When enabling incoming filtering,
173 .Nm
174 will try to select one protocol and filter out neighbors using other
175 protocols. To select this protocol, the rule is to take the less used
176 protocol. If on one port, you get 12 CDP neighbors and 1 LLDP
177 neighbor, this mean that the remote switch speaks LLDP and does not
178 filter CDP. Therefore, we select LLDP. When enabling outgoing
179 filtering,
180 .Nm
181 will also try to select one protocol and only speaks this
182 protocol. The filtering is done per port. Each port may select a
183 different protocol.
184 .Pp
185 There are two additional criteria when enabling filtering: allowing
186 one or several protocols to be selected (in case of a tie) and
187 allowing one or several neighbors to be selected. Even when allowing
188 several protocols, the rule of selecting the protocols with the less
189 neighbors still apply. If
190 .Nm
191 selects LLDP and CDP, this means they have the same number of
192 neighbors. The selection of the neighbor is random. Incoming filtering
193 will select a set of neighbors to be displayed while outgoing
194 filtering will use the selected set of neighbors to decide which
195 protocols to use: if a selected neighbor speaks LLDP and another one
196 CDP,
197 .Nm
198 will speak both CDP and LLDP on this port.
199 .Pp
200 There are some corner cases. A typical example is a switch speaking
201 two protocols (CDP and LLDP for example). You want to get the
202 information from the best protocol but you want to speak both
203 protocols because some tools use the CDP table and some other the LLDP
204 table.
205 .Pp
206 The table below summarize all accepted values for the
207 .Fl H Ar hide
208 parameter. The default value is
209 .Em 15
210 which corresponds to the corner case described above. The
211 .Em filter
212 column means that filtering is enabled. The
213 .Em 1proto
214 column tells that only one protocol will be kept. The
215 .Em 1neigh
216 column tells that only one neighbor will be kept.
217 .Pp
218 .Bl -column -compact -offset indent "HXXX" "filterX" "1protoX" "1neighX" "filterX" "1protoX" "1neighX"
219 .It Ta Ta incoming Ta Ta outgoing Ta
220 .It Ta Em filter Ta Em 1proto Ta Em 1neigh Ta Em filter Ta Em 1proto Ta Em 1neigh
221 .It Em 0 Ta Ta Ta Ta Ta Ta
222 .It Em 1 Ta x Ta x Ta Ta x Ta x Ta
223 .It Em 2 Ta x Ta x Ta Ta Ta Ta
224 .It Em 3 Ta Ta Ta Ta x Ta x Ta
225 .It Em 4 Ta x Ta Ta Ta x Ta Ta
226 .It Em 5 Ta x Ta Ta Ta Ta Ta
227 .It Em 6 Ta Ta Ta Ta x Ta Ta
228 .It Em 7 Ta x Ta x Ta x Ta x Ta x Ta
229 .It Em 8 Ta x Ta x Ta x Ta Ta Ta
230 .It Em 9 Ta x Ta Ta x Ta x Ta x Ta
231 .It Em 10 Ta Ta Ta Ta x Ta Ta x
232 .It Em 11 Ta x Ta Ta x Ta Ta Ta
233 .It Em 12 Ta x Ta Ta x Ta x Ta Ta x
234 .It Em 13 Ta x Ta Ta x Ta x Ta Ta
235 .It Em 14 Ta x Ta x Ta Ta x Ta Ta x
236 .It Em 15 Ta x Ta x Ta Ta x Ta Ta
237 .It Em 16 Ta x Ta x Ta x Ta x Ta Ta x
238 .It Em 17 Ta x Ta x Ta x Ta x Ta Ta
239 .It Em 18 Ta x Ta Ta Ta x Ta Ta x
240 .It Em 19 Ta x Ta Ta Ta x Ta x Ta
241 .El
242 .Sh FILES
243 .Bl -tag -width "/var/run/lldpd.socketXX" -compact
244 .It /var/run/lldpd.socket
245 Unix-domain socket used for communication with
246 .Xr lldpctl 8 .
247 .El
248 .Sh SEE ALSO
249 .Xr lldpctl 8 ,
250 .Xr snmpd 8
251 .Sh HISTORY
252 The
253 .Nm
254 program is inspired from a preliminary work of Reyk Floeter.
255 .Sh AUTHORS
256 .An -nosplit
257 The
258 .Nm
259 program was written by
260 .An Pierre-Yves Ritschard Aq pyr@openbsd.org ,
261 and
262 .An Vincent Bernat Aq bernat@luffy.cx .