1LLDPD(8)                  BSD System Manager's Manual                 LLDPD(8)
2

NAME

4     lldpd — LLDP daemon
5

SYNOPSIS

7     lldpd [-dxcseiklrv] [-D debug] [-p pidfile] [-S description]
8           [-P platform] [-X socket] [-m management] [-u file] [-I interfaces]
9           [-C interfaces] [-M class] [-H hide] [-L lldpcli] [-O configfile]
10

DESCRIPTION

12     lldpd is a daemon able to receive and send LLDP frames. The Link Layer
13     Discovery Protocol is a vendor-neutral Layer 2 protocol that allows a
14     network device to advertise its identity and capabilities on the local
15     network.
16
17     lldpd also implements an SNMP subagent using AgentX protocol to interface
18     to a regular SNMP agent like Net-SNMP. To enable this subagent, you need
19     something like that in your snmpd.conf(5):
20
21           master agentx
22
23     This daemon implements both reception and sending. It will collect vari‐
24     ous information to send LLDP frames to all Ethernet interfaces, including
25     management address, speed and VLAN names.
26
27     The options are as follows:
28
29     -d      Do not daemonize.  If this option is specified, lldpd will run in
30             the foreground. When specified one more time, lldpd will not log
31             to syslog but only to stderr. Then, this option can be specified
32             many times to increase verbosity. When specified four times,
33             debug logs will be enabled. They can be filtered with -D flag.
34
35     -D debug
36             This option allows the user to filter out debugging information
37             by specifying allowed tokens. This option can be repeated several
38             times to allow several tokens. This option must be combined with
39             the -d flag to have some effect. Only debugging logs can be fil‐
40             tered. Here is a list of allowed tokens with their description:
41                 main        Main daemon.
42                 interfaces  Discovery of local interfaces.
43                 lldp        LLDP PDU encoding/decoding.
44                 edp         EDP PDU encoding/decoding.
45                 cdp         CDP/FDP PDU encoding/decoding.
46                 sonmp       SONMP PDU encoding/decoding.
47                 event       Events management.
48                 libevent    Events management but for logs generated by
49                             libevent.
50                 privsep     Privilege separation.
51                 localchassis
52                             Retrieval of information related to the local
53                             chassis.
54                 rpc         Client communication.
55                 control     Management of the Unix control socket.
56                 snmp        SNMP subagent.
57                 libsnmp     SNMP subagent but for logs generated by NetSNMP.
58                 decode      Generic PDU decoding.
59                 marshal     Low-level serialization mechanisms.
60                 alloc       Low-level allocation mechanisms.
61                 send        Sending PDU to some interface.
62                 receive     Receiving PDU from some interface.
63                 loop        Main loop.
64                 smartfilter
65                             Smart filtering of different protocols on the
66                             same port.
67                 netlink     Netlink subsystem.
68
69     -p pidfile
70             Use the provided PID file to record lldpd PID instead of
71             /var/run/lldpd.pid.
72
73     -k      Disable advertising of kernel release, version and machine. Ker‐
74             nel name (ie: Linux) will still be shared, and Inventory software
75             version will be set to 'Unknown'.
76
77     -S description
78             Override system description with the provided description. The
79             default description is the kernel name, the node name, the kernel
80             version, the build date and the architecture (except if you use
81             the -k flag described above).
82
83     -P platform
84             Override the CDP platform name with the provided value. The
85             default description is the kernel name (Linux).
86
87     -x      Enable SNMP subagent.  With this option, lldpd will enable an
88             SNMP subagent using AgentX protocol. This allows you to get
89             information about local system and remote systems through SNMP.
90
91     -X socket
92             Enable SNMP subagent using the specified socket.  lldpd will
93             enable an SNMP subagent using AgentX protocol for the given
94             socket. This option implies the previous one. The default socket
95             is usually /var/agentx/master.  You can specify a socket like
96             tcp:127.0.0.1:705 for example. Since the process that will open
97             this socket is enclosed in a chroot, you need to specify an IP
98             address (not a hostname) when using a TCP or UDP socket.
99
100     -c      Enable the support of CDP protocol to deal with Cisco routers
101             that do not speak LLDP. If repeated, CDPv1 packets will be sent
102             even when there is no CDP peer detected. If repeated once again,
103             CDPv2 packets will be sent even when there is no CDP peer
104             detected. If repeated once again (i.e.  -cccc), CDPv1 will be
105             disabled and CDPv2 will be enabled. If repeated once again (i.e.
106             -ccccc), CDPv1 will be disabled and CDPv2 will be forced.
107
108     -f      Enable the support of FDP protocol to deal with Foundry routers
109             that do not speak LLDP. If repeated, FDP packets will be sent
110             even when there is no FDP peer detected.
111
112     -s      Enable the support of SONMP protocol to deal with Nortel routers
113             and switches that do not speak LLDP. If repeated, SONMP packets
114             will be sent even when there is no SONMP peer detected.
115
116     -e      Enable the support of EDP protocol to deal with Extreme routers
117             and switches that do not speak LLDP. If repeated, EDP packets
118             will be sent even when there is no EDP peer detected.
119
120     -l      Force to send LLDP packets even when there is no LLDP peer
121             detected but there is a peer speaking another protocol detected.
122             By default, LLDP packets are sent when there is a peer speaking
123             LLDP detected or when there is no peer at all. If repeated, LLDP
124             is disabled.
125
126     -r      Receive-only mode. With this switch, lldpd will not send any
127             frame. It will only listen to neighbors.
128
129     -m management
130             Specify the management addresses of this system. As for inter‐
131             faces (described below), this option can use wildcards and inver‐
132             sions.  Without this option, the first IPv4 and the first IPv6
133             are used. If an exact IP address is provided, it is used as a
134             management address without any check. If only negative patterns
135             are provided, only one IPv4 and one IPv6 addresses are chosen.
136             Otherwise, many of them can be selected. If you want to blacklist
137             IPv6 addresses, you can use !*:*.
138
139     -u file
140             Specify the Unix-domain socket used for communication with
141             lldpctl(8).
142
143     -I interfaces
144             Specify which interface to listen and send LLDPDU to. Without
145             this option, lldpd will use all available physical interfaces.
146             This option can use wildcards. Several interfaces can be speci‐
147             fied separated by commas.  It is also possible to blacklist an
148             interface by suffixing it with an exclamation mark. It is possi‐
149             ble to whitelist an interface by suffixing it with two exclama‐
150             tion marks. A whitelisted interface beats a blacklisted interface
151             which beats a simple matched interface. For example, with
152             eth*,!eth1,!eth2 lldpd will only use interfaces starting by eth
153             with the exception of eth1 and eth2.  While with *,!eth*,!!eth1
154             lldpd will use all interfaces, except interfaces starting by eth
155             with the exception of eth1.  When an exact match is found, it
156             will circumvent some tests. For example, if eth0.12 is specified,
157             it will be accepted even if this is a VLAN interface.
158
159     -C interfaces
160             Specify which interfaces to use for computing chassis ID. Without
161             this option, all interfaces are considered.  lldpd will take the
162             first MAC address from all the considered interfaces to compute
163             the chassis ID. The logic of this option is the same as for -I
164             flag: you can exclude interfaces with an exclamation mark and use
165             globbing to specify several interfaces. If all interfaces are
166             blacklisted (with !*), the system name is used as a chassis ID
167             instead.
168
169     -M class
170             Enable emission of LLDP-MED frame. The class should be one of the
171             following value:
172             1     Generic Endpoint (Class I)
173             2     Media Endpoint (Class II)
174             3     Communication Device Endpoints (Class III)
175             4     Network Connectivity Device
176
177     -i      Disable LLDP-MED inventory TLV transmission.  lldpd will still
178             receive (and publish using SNMP if enabled) those LLDP-MED TLV
179             but will not send them. Use this option if you don't want to
180             transmit sensible information like serial numbers.
181
182     -H hide
183             Filter neighbors. See section FILTERING NEIGHBORS for details.
184
185     -L lldpcli
186             Provide an alternative path to lldpcli for configuration. If
187             empty, does not use lldpcli for configuration.
188
189     -O configfile
190             Override default configuration locations processed by lldpcli at
191             start. If a directory is provided, each file contained in it will
192             be read if ending by .conf. Order is alphabetical.
193
194     -v      Show lldpd version. When repeated, show more build information.
195

FILTERING NEIGHBORS

197     In a heterogeneous network, you may see several different hosts on the
198     same port, even if there is only one physically plugged to this port. For
199     example, if you have a Nortel switch running LLDP which is plugged to a
200     Cisco switch running CDP and your host is plugged to the Cisco switch,
201     you will see the Nortel switch as well because LLDP frames are forwarded
202     by the Cisco switch. This may not be what you want. The -H hide parameter
203     will allow you to tell lldpd to discard some frames that it receives and
204     to avoid to send some other frames.
205
206     Incoming filtering and outgoing filtering are unrelated. Incoming filter‐
207     ing will hide some remote ports to get you a chance to know exactly what
208     equipment is on the other side of the network cable. Outgoing filtering
209     will avoid to use some protocols to avoid flooding your network with a
210     protocol that is not handled by the nearest equipment. Keep in mind that
211     even without filtering, lldpd will speak protocols for which at least one
212     frame has been received and LLDP otherwise (there are other options to
213     change this behaviour, for example -cc, -ss, -ee, -ll and -ff ).
214
215     When enabling incoming filtering, lldpd will try to select one protocol
216     and filter out neighbors using other protocols. To select this protocol,
217     the rule is to take the less used protocol. If on one port, you get 12
218     CDP neighbors and 1 LLDP neighbor, this mean that the remote switch
219     speaks LLDP and does not filter CDP. Therefore, we select LLDP. When
220     enabling outgoing filtering, lldpd will also try to select one protocol
221     and only speaks this protocol. The filtering is done per port. Each port
222     may select a different protocol.
223
224     There are two additional criteria when enabling filtering: allowing one
225     or several protocols to be selected (in case of a tie) and allowing one
226     or several neighbors to be selected. Even when allowing several proto‐
227     cols, the rule of selecting the protocols with the less neighbors still
228     apply. If lldpd selects LLDP and CDP, this means they have the same num‐
229     ber of neighbors. The selection of the neighbor is random. Incoming fil‐
230     tering will select a set of neighbors to be displayed while outgoing fil‐
231     tering will use the selected set of neighbors to decide which protocols
232     to use: if a selected neighbor speaks LLDP and another one CDP, lldpd
233     will speak both CDP and LLDP on this port.
234
235     There are some corner cases. A typical example is a switch speaking two
236     protocols (CDP and LLDP for example). You want to get the information
237     from the best protocol but you want to speak both protocols because some
238     tools use the CDP table and some other the LLDP table.
239
240     The table below summarize all accepted values for the -H hide parameter.
241     The default value is 15 which corresponds to the corner case described
242     above. The filter column means that filtering is enabled. The 1proto col‐
243     umn tells that only one protocol will be kept. The 1neigh column tells
244     that only one neighbor will be kept.
245
246                        incoming                outgoing
247                filter  1proto  1neigh  filter  1proto  1neigh
248           0
249           1    x       x               x       x
250           2    x       x
251           3                            x       x
252           4    x                       x
253           5    x
254           6                            x
255           7    x       x       x       x       x
256           8    x       x       x
257           9    x               x       x       x
258           10                           x               x
259           11   x               x
260           12   x               x       x               x
261           13   x               x       x
262           14   x       x               x               x
263           15   x       x               x
264           16   x       x       x       x               x
265           17   x       x       x       x
266           18   x                       x               x
267           19   x                       x       x
268

FILES

270     /run/lldpd/lldpd.socket    Unix-domain socket used for communication with
271                                lldpctl(8).
272     /etc/lldpd.conf            Configuration file for lldpd.  Commands in
273                                this files are executed by lldpcli(8) at
274                                start.
275     /etc/lldpd.d               Directory containing configuration files whose
276                                commands are executed by lldpcli(8) at start.
277

SEE ALSO

279     lldpctl(8), lldpcli(8), snmpd(8)
280

HISTORY

282     The lldpd program is inspired from a preliminary work of Reyk Floeter.
283

AUTHORS

285     The lldpd program was written by Pierre-Yves Ritschard <pyr@openbsd.org>,
286     and Vincent Bernat <bernat@luffy.cx>.
287
288BSD                              June 20, 2019                             BSD
Impressum