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