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

NAME

4     lldpcli, lldpctl — control LLDP daemon
5

SYNOPSIS

7     lldpcli [-dv] [-u socket] [-f format] [-c file] [command ...]
8     lldpctl [-dv] [-u socket] [-f format] [interfaces ...]
9

DESCRIPTION

11     The lldpcli program controls lldpd(8) daemon.
12
13     When no command is specified, lldpcli will start an interactive shell
14     which can be used to input arbitrary commands as if they were specified
15     on the command line. This interactive shell should provide completion and
16     history support.
17
18     The options are as follows:
19
20     -d      Enable more debugging information. This flag can be repeated.
21
22     -u socket
23             Specify the Unix-domain socket used for communication with
24             lldpd(8).
25
26     -v      Show lldpcli version. When repeated, show more build information.
27
28     -f format
29             Choose the output format. Currently plain, xml, json, json0 and
30             keyvalue formats are available. The default is plain.  json0 is
31             more verbose than json but the structure of the JSON object is
32             not affected by the number of interfaces or the number of neigh‐
33             bors. It is therefore easier to parse.
34
35     -c file
36             Read the given configuration file. This option may be repeated
37             several times. If a directory is provided, each file contained in
38             it will be read  if ending by .conf.  Order is alphabetical.
39
40     When invoked as lldpctl, lldpcli will display detailed information about
41     each neighbors on the specified interfaces or on all interfaces if none
42     are specified. This command is mostly kept for backward compatibility
43     with older versions.
44
45     The following commands are supported by lldpcli.  When there is no ambi‐
46     guity, the keywords can be abbreviated. For example, show neighbors ports
47     eth0 summary and sh neigh p eth0 sum are the same command.
48
49       exit
50
51             Quit lldpcli.
52
53       help [...]
54
55             Display general help or help about a command. Also, you can get
56             help using the completion or by pressing the ?  key. However,
57             completion and inline help may be unavailable if lldpcli was com‐
58             piled without readline support but help command is always avail‐
59             able.
60
61       show neighbors [ports ethX [,...]] [details | summary] [hidden]
62
63             Display information about each neighbor known by lldpd(8) daemon.
64             With summary, only the name and the port description of each
65             remote host will be displayed. On the other hand, with details,
66             all available information will be displayed, giving a verbose
67             view. When using hidden, also display remote ports hidden by the
68             smart filter. When specifying one or several ports, the informa‐
69             tion displayed is limited to the given list of ports.
70
71       show interfaces [ports ethX [,...]] [details | summary] [hidden]
72
73             Display information about each local interface known by lldpd(8)
74             daemon. With summary, only the name and the port description of
75             each local interface will be displayed. On the other hand, with
76             details, all available information will be displayed, giving a
77             verbose view. When using hidden, also display local ports hidden
78             by the smart filter. When specifying one or several ports, the
79             information displayed is limited to the given list of ports.
80
81       show chassis [details | summary]
82
83             Display information about local chassis. With summary, most
84             details are skipped. On the other hand, with details, all avail‐
85             able information will be displayed, giving a verbose view.
86
87       watch [ports ethX [,...]] [details | summary] [hidden] [limit X]
88
89             Watch for any neighbor changes and report them as soon as they
90             happen. When specifying ports, the changes are only reported when
91             happening on the given ports.  hidden, summary and details have
92             the same meaning than previously described. If limit is speci‐
93             fied, lldpcli will exit after receiving the specified number of
94             events.
95
96       show configuration
97
98             Display global configuration of lldpd(8) daemon.
99
100       show statistics [ports ethX [,...]] [summary]
101
102             Report LLDP-related statistics, like the number of LLDPDU trans‐
103             mitted, received, discarded or unrecognized. When specifying
104             ports, only the statistics from the given port are reported. With
105             summary the statistics of each port is summed.
106
107       update
108
109             Make lldpd(8) update its information and send new LLDP PDU on all
110             interfaces.
111
112       configure system hostname name
113
114             Override system hostname with the provided value. By default, the
115             system name is the FQDN found from the resolved value of uname
116             -n.  As a special value, use "." (dot) to use the short hostname
117             instead of a FQDN.
118
119       unconfigure system hostname
120
121             Do not override system hostname and restore the use of the node
122             name.
123
124       configure system description description
125
126             Override chassis description with the provided value instead of
127             using kernel name, node name, kernel version, build date and
128             architecture.
129
130       unconfigure system description
131
132             Do not override chassis description and use a value computed from
133             node name, kernel name, kernel version, build date and architec‐
134             ture instead.
135
136       configure system chassisid description
137
138             Override chassis ID with the provided value instead of using MAC
139             address from one interface or host name.
140
141       unconfigure system chassisid
142
143             Do not override chassis ID and use a value computed from one of
144             the interface MAC address (or host name if none is found).
145
146       configure system platform description
147
148             Override platform description with the provided value instead of
149             using kernel name. This value is currently only used for CDP.
150
151       unconfigure system platform
152
153             Do not override platform description and use the kernel name.
154             This option undoes the previous one.
155
156       configure system interface pattern pattern
157
158             Specify which interface to listen and send LLDPDU to. Without
159             this option, lldpd will use all available physical interfaces.
160             This option can use wildcards. Several interfaces can be speci‐
161             fied separated by commas.  It is also possible to blacklist an
162             interface by suffixing it with an exclamation mark. It is possi‐
163             ble to whitelist an interface by suffixing it with two exclama‐
164             tion marks. A whitelisted interface beats a blacklisted inter‐
165             faces which beats a simple matched interface. For example, with
166             eth*,!eth1,!eth2 lldpd will only use interfaces starting by eth
167             with the exception of eth1 and eth2.  While with *,!eth*,!!eth1
168             lldpcli will use all interfaces, except interfaces starting by
169             eth with the exception of eth1.  When an exact match is found, it
170             will circumvent some tests. For example, if eth0.12 is specified,
171             it will be accepted even if this is a VLAN interface.
172
173       unconfigure system interface pattern
174
175             Remove any previously configured interface pattern and use all
176             physical interfaces. This option undoes the previous one.
177
178       configure system interface permanent pattern
179
180             Specify interfaces whose configuration is permanently kept by
181             lldpd.  By default, lldpd disregard any data about interfaces
182             when they are removed from the system (statistics, custom config‐
183             uration). This option allows one to specify a pattern similar to
184             the interface pattern. If an interface disappear but matches the
185             pattern, its data is kept in memory and reused if the interface
186             reappear at some point. For example, on Linux, one could use the
187             pattern eth*,eno*,enp*, which should match fixed interfaces on
188             most systems.
189
190       unconfigure system interface permanent
191
192             Remove any previously configured permanent interface pattern.
193             Any interface removed from the system will be forgotten. This
194             option undoes the previous one.
195
196       configure system interface description
197
198             Some OS allows the user to set a description for an interface.
199             Setting this option will enable lldpd to override this descrip‐
200             tion with the name of the peer neighbor if one is found or with
201             the number of neighbors found.
202
203       unconfigure system interface description
204
205             Do not update interface description with the name of the peer
206             neighbor. This option undoes the previous one.
207
208       configure system interface promiscuous
209
210             Enable promiscuous mode on managed interfaces.
211
212             When the interface is not managed any more (or when quitting
213             lldpd), the interface is left in promiscuous mode as it is diffi‐
214             cult to know if someone else also put the interface in promiscu‐
215             ous mode.
216
217             This option is known to be useful when the remote switch is a
218             Cisco 2960 and the local network card features VLAN hardware
219             acceleration. In this case, you may not receive LLDP frames from
220             the remote switch. The most plausible explanation for this is the
221             frame is tagged with some VLAN (usually VLAN 1) and your network
222             card is filtering VLAN. This is not the only available solution
223             to work-around this problem. If you are concerned about perfor‐
224             mance issues, you can also tag the VLAN 1 on each interface
225             instead.
226
227             Currently, this option has no effect on anything else than Linux.
228             On other OS, either disable VLAN acceleration, tag VLAN 1 or
229             enable promiscuous mode manually on the interface.
230
231       unconfigure system interface promiscuous
232
233             Do not set promiscuous mode on managed interfaces. This option
234             does not disable promiscuous mode on interfaces already using
235             this mode.
236
237       configure system ip management pattern pattern
238
239             Specify the management addresses of this system. As for inter‐
240             faces (described above), this option can use wildcards and inver‐
241             sions.  Without this option, the first IPv4 and the first IPv6
242             are used. If an exact IP address is provided, it is used as a
243             management address without any check. If only negative patterns
244             are provided, only one IPv4 and one IPv6 addresses are chosen.
245             Otherwise, many of them can be selected. If you want to blacklist
246             IPv6 addresses, you can use !*:*.
247
248       unconfigure system ip management pattern
249
250             Unset any specific pattern for matching management addresses.
251             This option undoes the previous one.
252
253       configure system bond-slave-src-mac-type value
254
255             Set the type of src mac in lldp frames sent on bond slaves
256
257             Valid types are:
258               real  Slave real mac
259               zero  All zero mac
260               fixed
261                     An arbitrary fixed value (00:60:08:69:97:ef)
262               local
263                     Real mac with locally administered bit set. If the real
264                     mac already has the locally administered bit set, fall‐
265                     back to the fixed value.
266
267             Default value for bond-slave-src-mac-type is local.  Some
268             switches may complain when using one of the two other possible
269             values (either because 00:00:00:00:00:00 is not a valid MAC or
270             because the MAC address is flapping from one port to another).
271             Using local might lead to a duplicate MAC address on the network
272             (but this is quite unlikely).
273
274       configure system max-neighbors neighbors
275
276             Change the maximum number of neighbors accepted (for each proto‐
277             col) on an interface. This is a global value. The default is 32.
278             This setting only applies to future neighbors.
279
280       configure lldp agent-type nearest-bridge | nearest-non-tpmr-bridge |
281       nearest-customer-bridge
282
283             The destination MAC address used to send LLDPDU allows an agent
284             to control the propagation of LLDPDUs. By default, the
285             01:80:c2:00:00:0e MAC address is used and limit the propagation
286             of the LLDPDU to the nearest bridge (nearest-bridge).  To
287             instruct lldpd to use the 01:80:c2:00:00:03 MAC address instead,
288             use nearest-nontpmr-bridge instead.  To use the 01:80:c2:00:00:00
289             MAC address instead, use nearest-customer-bridge instead.
290
291       configure lldp portidsubtype ifname | macaddress
292
293       configure [ports ethX [,...]] lldp portidsubtype local value
294
295             Force port ID subtype. By default, lldpd will use the MAC address
296             as port identifier and the interface name as port description,
297             unless the interface has an alias. In this case, the interface
298             name will be used as port identifier and the description will be
299             the interface alias. With this command, you can force the port
300             identifier to be the interface name (with ifname), the MAC
301             address (with macaddress) or a local value (with value).  In the
302             latest case, the local value should be provided.
303
304       configure [ports ethX [,...]] lldp portdescription description
305
306             Force port description to the provided string.
307
308       configure lldp tx-interval interval
309
310             Change transmit delay to the specified value in seconds. The
311             transmit delay is the delay between two transmissions of LLDP
312             PDU. The default value is 30 seconds.
313
314       configure lldp tx-hold hold
315
316             Change transmit hold value to the specified value. This value is
317             used to compute the TTL of transmitted packets which is the prod‐
318             uct of this value and of the transmit delay. The default value is
319             4 and therefore the default TTL is 120 seconds.
320
321       configure [ports ethX [,...]] lldp status rx-and-tx | rx-only | tx-only
322       | disabled
323
324             Configure the administrative status of the given port. By
325             default, all ports are configured to be in rx-and-tx mode. This
326             means they can receive and transmit LLDP frames (as well as other
327             protocols if needed). In rx-only mode, they won't emit any frames
328             and in tx-only mode, they won't receive any frames. In disabled
329             mode, no frame will be sent and any incoming frame will be dis‐
330             carded. This setting does not override the operational mode of
331             the main daemon. If it is configured in receive-only mode (with
332             the -r flag), setting any transmit mode won't have any effect.
333
334       configure lldp custom-tlv [add | replace] oui oui subtype subtype
335       [oui-info content]
336
337             Emit a custom TLV for OUI oui, with subtype subtype and option‐
338             ally with the bytes specified in content.  Both oui and content
339             should be a comma-separated list of bytes in hex format.  oui
340             must be exactly 3-byte long.  If add is specified then the TLV
341             will be added. This is the default action.  If replace is speci‐
342             fied then all TLVs with the same oui and subtype will be
343             replaced.
344
345
346       unconfigure lldp custom-tlv [oui oui] [subtype subtype]
347
348             When no oui is specified, remove all previously configured custom
349             TLV.  When OUI oui and subtype subtype is specified, remove spe‐
350             cific instances of custom TLV.
351
352       configure med fast-start enable | tx-interval interval
353
354             Configure LLDP-MED fast start mechanism. When a new LLDP-MED-
355             enabled neighbor is detected, fast start allows lldpd to shorten
356             the interval between two LLDPDU.  enable should enable LLDP-MED
357             fast start while tx-interval specifies the interval between two
358             LLDPDU in seconds. The default interval is 1 second. Once 4 LLD‐
359             PDU have been sent, the fast start mechanism is disabled until a
360             new neighbor is detected.
361
362       unconfigure med fast-start
363
364             Disable LLDP-MED fast start mechanism.
365
366       configure [ports ethX [,...]] med location coordinate latitude latitude
367       longitude longitude altitude altitude unit datum datum
368
369             Advertise a coordinate based location on the given ports (or on
370             all ports if no port is specified). The format of latitude is a
371             decimal floating point number followed either by N or S.  The
372             format of longitude is a decimal floating point number followed
373             either by E or W.  altitude is a decimal floating point number
374             followed either by m when expressed in meters or f when expressed
375             in floors. A space is expected between the floating point number
376             and the unit.  datum is one of those values:
377                     ·   WGS84
378                     ·   NAD83
379                     ·   NAD83/MLLW
380
381             A valid use of this command is:
382                   configure ports eth0 med location coordinate latitude
383                   48.85667N longitude 2.2014E altitude 117.47 m datum WGS84
384
385       configure [ports ethX [,...]] med location address country country
386       [type value [...]]
387
388             Advertise a civic address on the given ports (or on all ports if
389             no port is specified).  country is the two-letter code represent‐
390             ing the country. The remaining arguments should be paired to form
391             the address. The first member of each pair indicates the type of
392             the second member which is a free-form text. Here is the list of
393             valid types:
394                     ·   language
395                     ·   country-subdivision
396                     ·   county
397                     ·   city
398                     ·   city-division
399                     ·   block
400                     ·   street
401                     ·   direction
402                     ·   trailing-street-suffix
403                     ·   street-suffix
404                     ·   number
405                     ·   number-suffix
406                     ·   landmark
407                     ·   additional
408                     ·   name
409                     ·   zip
410                     ·   building
411                     ·   unit
412                     ·   floor
413                     ·   room
414                     ·   place-type
415                     ·   script
416
417             A valid use of this command is:
418                   configure ports eth1 med location address country US street
419                   "Commercial Road" city "Roseville"
420
421       configure [ports ethX [,...]] med location elin number
422
423             Advertise the availability of an ELIN number. This is used for
424             setting up emergency call. If the provided number is too small,
425             it will be padded with 0. Here is an example of use:
426                   configure ports eth2 med location elin 911
427
428       configure [ports ethX [,...]] med policy application application
429       [unknown] [tagged] [vlan vlan] [priority priority] [dscp dscp]
430
431             Advertise a specific network policy for the given ports (or for
432             all ports if no port was provided). Only the application type is
433             mandatory.  application should be one of the following values:
434                     ·   voice
435                     ·   voice-signaling
436                     ·   guest-voice
437                     ·   guest-voice-signaling
438                     ·   softphone-voice
439                     ·   video-conferencing
440                     ·   streaming-video
441                     ·   video-signaling
442
443             The unknown flag tells that the network policy for the specified
444             application type is required by the device but is currently
445             unknown. This is used by Endpoint Devices, not by Network Connec‐
446             tivity Devices. If not specified, the network policy for the
447             given application type is defined.
448
449             When a VLAN is specified with vlan tells which 802.1q VLAN ID has
450             to be advertised for the network policy. A valid value is between
451             1 and 4094.  tagged tells the VLAN should be tagged for the spec‐
452             ified application type.
453
454             priority allows one to specify IEEE 802.1d / IEEE 802.1p Layer 2
455             Priority, also known as Class of Service (CoS), to be used for
456             the specified application type. This field is usually ignored if
457             no VLAN is specified. The names match 802.1D-2004 standard (table
458             G-2). Some more recent standards may use different labels. Only
459             the numeric values should be relied upon. The accepted labels
460             are:
461                 1   background
462                 0   best-effort
463                 2   excellent-effort
464                 3   critical-applications
465                 4   video
466                 5   voice
467                 6   internetwork-control
468                 7   network-control
469
470             dscp represents the DSCP value to be advertised for the given
471             network policy.  DiffServ/Differentiated Services Code Point
472             (DSCP) value as defined in IETF RFC 2474 for the specified appli‐
473             cation type. Value: 0 (default per RFC 2475) through 63. Note:
474             The class selector DSCP values are backwards compatible for
475             devices that only support the old IP precedence Type of Service
476             (ToS) format. (See the RFCs for what these values mean)
477
478             A valid use of this command is:
479                   configure med policy application voice vlan 500 priority
480                   voice dscp 46
481
482       configure [ports ethX [,...]] med power pse | pd source source priority
483       priority value value
484
485             Advertise the LLDP-MED POE-MDI TLV for the given ports or for all
486             interfaces if no port is provided.  One can act as a PD (power
487             consumer) or a PSE (power provider). No check is done on the
488             validity of the parameters while LLDP-MED requires some restric‐
489             tions:
490
491             ·   PD shall never request more power than physical 802.3af
492                 class.
493
494             ·   PD shall never draw more than the maximum power advertised by
495                 PSE.
496
497             ·   PSE shall not reduce power allocated to PD when this power is
498                 in use.
499
500             ·   PSE may request reduced power using conservation mode
501
502             ·   Being PSE or PD is a global parameter, not a per-port parame‐
503                 ter.  lldpcli does not enforce this: a port can be set as PD
504                 or PSE. LLDP-MED also requires for a PSE to only have one
505                 power source (primary or backup). Again, lldpcli does not
506                 enforce this. Each port can have its own power source. The
507                 same applies for PD and power priority. LLDP-MED MIB does not
508                 allow this kind of representation.
509
510             Valid types are:
511               pse   Power Sourcing Entity (power provider)
512               pd    Power Device (power consumer)
513
514             Valid sources are:
515               unknown  Unknown
516               primary  For PSE, the power source is the primary power source.
517               backup   For PSE, the power source is the backup power source
518                        or a power conservation mode is asked (the PSE may be
519                        running on UPS for example).
520               pse      For PD, the power source is the PSE.
521               local    For PD, the power source is a local source.
522               both     For PD, the power source is both the PSE and a local
523                        source.
524
525             Valid priorities are:
526               unknown    Unknown priority
527               critical   Critical
528               high       High
529               low        Low
530
531             value should be the total power in milliwatts required by the PD
532             device or available by the PSE device.
533
534             Here is an example of use:
535                   configure med power pd source pse priority high value 5000
536
537       configure [ports ethX [,...]] dot3 power pse | pd [supported] [enabled]
538       [paircontrol] powerpairs powerpairs [class class] [type type source
539       source priority priority requested requested allocated allocated]
540
541             Advertise Dot3 POE-MDI TLV for the given port or for all ports if
542             none was provided. One can act as a PD (power consumer) or a PSE
543             (power provider). This configuration is distinct of the configu‐
544             ration of the transmission of the LLDP-MED POE-MDI TLV but the
545             user should ensure the coherency of those two configurations if
546             they are used together.
547
548             supported means that MDI power is supported on the given port
549             while enabled means that MDI power is enabled.  paircontrol is
550             used to indicate if pair selection can be controlled. Valid val‐
551             ues for powerpairs are:
552               signal  The signal pairs only are in use.
553               spare   The spare pairs only are in use.
554
555             When specified, class is a number between 0 and 4.
556
557             The remaining parameters are in conformance with 802.3at and are
558             optional.  type should be either 1 or 2, indicating which if the
559             device conforms to 802.3at type 1 or 802.3at type 2. Values of
560             source and priority are the same as for LLDP-MED POE-MDI TLV.
561             requested and allocated are expressed in milliwats.
562
563             Here are two valid uses of this command:
564                   configure ports eth3 dot3 power pse supported enabled
565                   paircontrol powerpairs spare class class-3
566                   configure dot3 power pd supported enabled powerpairs spare
567                   class class-3 type 1 source pse priority low requested
568                   10000 allocated 15000
569
570       pause
571
572             Pause lldpd operations.  lldpd will not send any more frames or
573             receive ones. This can be undone with resume command.
574
575       resume
576
577             Resume lldpd operations.  lldpd will start to send and receive
578             frames. This command is issued internally after processing con‐
579             figuration but can be used at any time if a manual pause command
580             is issued.
581
582

FILES

584     /run/lldpd/lldpd.socket    Unix-domain socket used for communication with
585                                lldpd(8).
586

SEE ALSO

588     lldpd(8)
589

AUTHORS

591     The lldpcli program was written by Vincent Bernat <bernat@luffy.cx>.
592
593BSD                            December 31, 2019                           BSD
Impressum