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 lldp agent-type nearest-bridge | nearest-non-tpmr-bridge |
275       nearest-customer-bridge
276
277             The destination MAC address used to send LLDPDU allows an agent
278             to control the propagation of LLDPDUs. By default, the
279             01:80:c2:00:00:0e MAC address is used and limit the propagation
280             of the LLDPDU to the nearest bridge (nearest-bridge).  To
281             instruct lldpd to use the 01:80:c2:00:00:03 MAC address instead,
282             use nearest-nontpmr-bridge instead.  To use the 01:80:c2:00:00:00
283             MAC address instead, use nearest-customer-bridge instead.
284
285       configure lldp portidsubtype ifname | macaddress
286
287       configure [ports ethX [,...]] lldp portidsubtype local value
288
289             Force port ID subtype. By default, lldpd will use the MAC address
290             as port identifier and the interface name as port description,
291             unless the interface has an alias. In this case, the interface
292             name will be used as port identifier and the description will be
293             the interface alias. With this command, you can force the port
294             identifier to be the interface name (with ifname), the MAC
295             address (with macaddress) or a local value (with value).  In the
296             latest case, the local value should be provided.
297
298       configure [ports ethX [,...]] lldp portdescription description
299
300             Force port description to the provided string.
301
302       configure lldp tx-interval interval
303
304             Change transmit delay to the specified value in seconds. The
305             transmit delay is the delay between two transmissions of LLDP
306             PDU. The default value is 30 seconds.
307
308       configure lldp tx-hold hold
309
310             Change transmit hold value to the specified value. This value is
311             used to compute the TTL of transmitted packets which is the prod‐
312             uct of this value and of the transmit delay. The default value is
313             4 and therefore the default TTL is 120 seconds.
314
315       configure [ports ethX [,...]] lldp status rx-and-tx | rx-only | tx-only
316       | disabled
317
318             Configure the administrative status of the given port. By
319             default, all ports are configured to be in rx-and-tx mode. This
320             means they can receive and transmit LLDP frames (as well as other
321             protocols if needed). In rx-only mode, they won't emit any frames
322             and in tx-only mode, they won't receive any frames. In disabled
323             mode, no frame will be sent and any incoming frame will be dis‐
324             carded. This setting does not override the operational mode of
325             the main daemon. If it is configured in receive-only mode (with
326             the -r flag), setting any transmit mode won't have any effect.
327
328       configure lldp custom-tlv [add | replace] oui oui subtype subtype
329       [oui-info content]
330
331             Emit a custom TLV for OUI oui, with subtype subtype and option‐
332             ally with the bytes specified in content.  Both oui and content
333             should be a comma-separated list of bytes in hex format.  oui
334             must be exactly 3-byte long.  If add is specified then the TLV
335             will be added. This is the default action.  If replace is speci‐
336             fied then all TLVs with the same oui and subtype will be
337             replaced.
338
339
340       unconfigure lldp custom-tlv [oui oui] [subtype subtype]
341
342             When no oui is specified, remove all previously configured custom
343             TLV.  When OUI oui and subtype subtype is specified, remove spe‐
344             cific instances of custom TLV.
345
346       configure med fast-start enable | tx-interval interval
347
348             Configure LLDP-MED fast start mechanism. When a new LLDP-MED-
349             enabled neighbor is detected, fast start allows lldpd to shorten
350             the interval between two LLDPDU.  enable should enable LLDP-MED
351             fast start while tx-interval specifies the interval between two
352             LLDPDU in seconds. The default interval is 1 second. Once 4 LLD‐
353             PDU have been sent, the fast start mechanism is disabled until a
354             new neighbor is detected.
355
356       unconfigure med fast-start
357
358             Disable LLDP-MED fast start mechanism.
359
360       configure [ports ethX [,...]] med location coordinate latitude latitude
361       longitude longitude altitude altitude unit datum datum
362
363             Advertise a coordinate based location on the given ports (or on
364             all ports if no port is specified). The format of latitude is a
365             decimal floating point number followed either by N or S.  The
366             format of longitude is a decimal floating point number followed
367             either by E or W.  altitude is a decimal floating point number
368             followed either by m when expressed in meters or f when expressed
369             in floors. A space is expected between the floating point number
370             and the unit.  datum is one of those values:
371                     ·   WGS84
372                     ·   NAD83
373                     ·   NAD83/MLLW
374
375             A valid use of this command is:
376                   configure ports eth0 med location coordinate latitude
377                   48.85667N longitude 2.2014E altitude 117.47 m datum WGS84
378
379       configure [ports ethX [,...]] med location address country country
380       [type value [...]]
381
382             Advertise a civic address on the given ports (or on all ports if
383             no port is specified).  country is the two-letter code represent‐
384             ing the country. The remaining arguments should be paired to form
385             the address. The first member of each pair indicates the type of
386             the second member which is a free-form text. Here is the list of
387             valid types:
388                     ·   language
389                     ·   country-subdivision
390                     ·   county
391                     ·   city
392                     ·   city-division
393                     ·   block
394                     ·   street
395                     ·   direction
396                     ·   trailing-street-suffix
397                     ·   street-suffix
398                     ·   number
399                     ·   number-suffix
400                     ·   landmark
401                     ·   additional
402                     ·   name
403                     ·   zip
404                     ·   building
405                     ·   unit
406                     ·   floor
407                     ·   room
408                     ·   place-type
409                     ·   script
410
411             A valid use of this command is:
412                   configure ports eth1 med location address country US street
413                   "Commercial Road" city "Roseville"
414
415       configure [ports ethX [,...]] med location elin number
416
417             Advertise the availability of an ELIN number. This is used for
418             setting up emergency call. If the provided number is too small,
419             it will be padded with 0. Here is an example of use:
420                   configure ports eth2 med location elin 911
421
422       configure [ports ethX [,...]] med policy application application
423       [unknown] [tagged] [vlan vlan] [priority priority] [dscp dscp]
424
425             Advertise a specific network policy for the given ports (or for
426             all ports if no port was provided). Only the application type is
427             mandatory.  application should be one of the following values:
428                     ·   voice
429                     ·   voice-signaling
430                     ·   guest-voice
431                     ·   guest-voice-signaling
432                     ·   softphone-voice
433                     ·   video-conferencing
434                     ·   streaming-video
435                     ·   video-signaling
436
437             The unknown flag tells that the network policy for the specified
438             application type is required by the device but is currently
439             unknown. This is used by Endpoint Devices, not by Network Connec‐
440             tivity Devices. If not specified, the network policy for the
441             given application type is defined.
442
443             When a VLAN is specified with vlan tells which 802.1q VLAN ID has
444             to be advertised for the network policy. A valid value is between
445             1 and 4094.  tagged tells the VLAN should be tagged for the spec‐
446             ified application type.
447
448             priority allows one to specify IEEE 802.1d / IEEE 802.1p Layer 2
449             Priority, also known as Class of Service (CoS), to be used for
450             the specified application type. This field is usually ignored if
451             no VLAN is specified. The names match 802.1D-2004 standard (table
452             G-2). Some more recent standards may use different labels. Only
453             the numeric values should be relied upon. The accepted labels
454             are:
455                 1   background
456                 0   best-effort
457                 2   excellent-effort
458                 3   critical-applications
459                 4   video
460                 5   voice
461                 6   internetwork-control
462                 7   network-control
463
464             dscp represents the DSCP value to be advertised for the given
465             network policy.  DiffServ/Differentiated Services Code Point
466             (DSCP) value as defined in IETF RFC 2474 for the specified appli‐
467             cation type. Value: 0 (default per RFC 2475) through 63. Note:
468             The class selector DSCP values are backwards compatible for
469             devices that only support the old IP precedence Type of Service
470             (ToS) format. (See the RFCs for what these values mean)
471
472             A valid use of this command is:
473                   configure med policy application voice vlan 500 priority
474                   voice dscp 46
475
476       configure [ports ethX [,...]] med power pse | pd source source priority
477       priority value value
478
479             Advertise the LLDP-MED POE-MDI TLV for the given ports or for all
480             interfaces if no port is provided.  One can act as a PD (power
481             consumer) or a PSE (power provider). No check is done on the
482             validity of the parameters while LLDP-MED requires some restric‐
483             tions:
484
485             ·   PD shall never request more power than physical 802.3af
486                 class.
487
488             ·   PD shall never draw more than the maximum power advertised by
489                 PSE.
490
491             ·   PSE shall not reduce power allocated to PD when this power is
492                 in use.
493
494             ·   PSE may request reduced power using conservation mode
495
496             ·   Being PSE or PD is a global parameter, not a per-port parame‐
497                 ter.  lldpcli does not enforce this: a port can be set as PD
498                 or PSE. LLDP-MED also requires for a PSE to only have one
499                 power source (primary or backup). Again, lldpcli does not
500                 enforce this. Each port can have its own power source. The
501                 same applies for PD and power priority. LLDP-MED MIB does not
502                 allow this kind of representation.
503
504             Valid types are:
505               pse   Power Sourcing Entity (power provider)
506               pd    Power Device (power consumer)
507
508             Valid sources are:
509               unknown  Unknown
510               primary  For PSE, the power source is the primary power source.
511               backup   For PSE, the power source is the backup power source
512                        or a power conservation mode is asked (the PSE may be
513                        running on UPS for example).
514               pse      For PD, the power source is the PSE.
515               local    For PD, the power source is a local source.
516               both     For PD, the power source is both the PSE and a local
517                        source.
518
519             Valid priorities are:
520               unknown    Unknown priority
521               critical   Critical
522               high       High
523               low        Low
524
525             value should be the total power in milliwatts required by the PD
526             device or available by the PSE device.
527
528             Here is an example of use:
529                   configure med power pd source pse priority high value 5000
530
531       configure [ports ethX [,...]] dot3 power pse | pd [supported] [enabled]
532       [paircontrol] powerpairs powerpairs [class class] [type type source
533       source priority priority requested requested allocated allocated]
534
535             Advertise Dot3 POE-MDI TLV for the given port or for all ports if
536             none was provided. One can act as a PD (power consumer) or a PSE
537             (power provider). This configuration is distinct of the configu‐
538             ration of the transmission of the LLDP-MED POE-MDI TLV but the
539             user should ensure the coherency of those two configurations if
540             they are used together.
541
542             supported means that MDI power is supported on the given port
543             while enabled means that MDI power is enabled.  paircontrol is
544             used to indicate if pair selection can be controlled. Valid val‐
545             ues for powerpairs are:
546               signal  The signal pairs only are in use.
547               spare   The spare pairs only are in use.
548
549             When specified, class is a number between 0 and 4.
550
551             The remaining parameters are in conformance with 802.3at and are
552             optional.  type should be either 1 or 2, indicating which if the
553             device conforms to 802.3at type 1 or 802.3at type 2. Values of
554             source and priority are the same as for LLDP-MED POE-MDI TLV.
555             requested and allocated are expressed in milliwats.
556
557             Here are two valid uses of this command:
558                   configure ports eth3 dot3 power pse supported enabled
559                   paircontrol powerpairs spare class class-3
560                   configure dot3 power pd supported enabled powerpairs spare
561                   class class-3 type 1 source pse priority low requested
562                   10000 allocated 15000
563
564       pause
565
566             Pause lldpd operations.  lldpd will not send any more frames or
567             receive ones. This can be undone with resume command.
568
569       resume
570
571             Resume lldpd operations.  lldpd will start to send and receive
572             frames. This command is issued internally after processing con‐
573             figuration but can be used at any time if a manual pause command
574             is issued.
575
576

FILES

578     /run/lldpd/lldpd.socket    Unix-domain socket used for communication with
579                                lldpd(8).
580

SEE ALSO

582     lldpd(8)
583

AUTHORS

585     The lldpcli program was written by Vincent Bernat <bernat@luffy.cx>.
586
587BSD                              June 20, 2019                             BSD
Impressum