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 re‐
65             mote host will be displayed. On the other hand, with details, all
66             available information will be displayed, giving a verbose view.
67             When using hidden, also display remote ports hidden by the smart
68             filter. When specifying one or several ports, the information
69             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 de‐
84             tails are skipped. On the other hand, with details, all available
85             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 ar‐
128             chitecture.
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 capabilities enabled capabilities
157
158             Override system capabilities with the provided value instead of
159             using kernel information. Several capabilities can be specified
160             separated by commas. Only available capabilities can be enabled.
161             Valid capabilities are:
162               other
163               repeater
164               bridge
165               wlan
166               router
167               telephone
168               docsis
169               station
170             Here is an example of use:
171                   configure system capabilities enabled bridge,router
172
173       unconfigure system capabilities enabled
174
175             Do not override capabilities and use the kernel information. This
176             option undoes the previous one.
177
178       configure system interface pattern pattern
179
180             Specify which interface to listen and send LLDPDU to. Without
181             this option, lldpd will use all available physical interfaces.
182             This option can use wildcards. Several interfaces can be speci‐
183             fied separated by commas.  It is also possible to remove an in‐
184             terface by prefixing it with an exclamation mark. It is possible
185             to allow an interface by prefixing it with two exclamation marks.
186             An allowed interface beats a forbidden interfaces which beats a
187             simple matched interface. For example, with eth*,!eth1,!eth2
188             lldpd will only use interfaces starting by eth with the exception
189             of eth1 and eth2.  While with *,!eth*,!!eth1 lldpcli will use all
190             interfaces, except interfaces starting by eth with the exception
191             of eth1.  When an exact match is found, it will circumvent some
192             tests. For example, if eth0.12 is specified, it will be accepted
193             even if this is a VLAN interface.
194
195       unconfigure system interface pattern
196
197             Remove any previously configured interface pattern and use all
198             physical interfaces. This option undoes the previous one.
199
200       configure system interface permanent pattern
201
202             Specify interfaces whose configuration is permanently kept by
203             lldpd.  By default, lldpd disregard any data about interfaces
204             when they are removed from the system (statistics, custom config‐
205             uration). This option allows one to specify a pattern similar to
206             the interface pattern. If an interface disappear but matches the
207             pattern, its data is kept in memory and reused if the interface
208             reappear at some point. For example, on Linux, one could use the
209             pattern eth*,eno*,enp*, which should match fixed interfaces on
210             most systems.
211
212       unconfigure system interface permanent
213
214             Remove any previously configured permanent interface pattern.
215             Any interface removed from the system will be forgotten. This op‐
216             tion undoes the previous one.
217
218       configure system interface description
219
220             Some OS allows the user to set a description for an interface.
221             Setting this option will enable lldpd to override this descrip‐
222             tion with the name of the peer neighbor if one is found or with
223             the number of neighbors found.
224
225       unconfigure system interface description
226
227             Do not update interface description with the name of the peer
228             neighbor. This option undoes the previous one.
229
230       configure system interface promiscuous
231
232             Enable promiscuous mode on managed interfaces.
233
234             When the interface is not managed any more (or when quitting
235             lldpd), the interface is left in promiscuous mode as it is diffi‐
236             cult to know if someone else also put the interface in promiscu‐
237             ous mode.
238
239             This option is known to be useful when the remote switch is a
240             Cisco 2960 and the local network card features VLAN hardware ac‐
241             celeration. In this case, you may not receive LLDP frames from
242             the remote switch. The most plausible explanation for this is the
243             frame is tagged with some VLAN (usually VLAN 1) and your network
244             card is filtering VLAN. This is not the only available solution
245             to work-around this problem. If you are concerned about perfor‐
246             mance issues, you can also tag the VLAN 1 on each interface in‐
247             stead.
248
249             Currently, this option has no effect on anything else than Linux.
250             On other OS, either disable VLAN acceleration, tag VLAN 1 or en‐
251             able promiscuous mode manually on the interface.
252
253       unconfigure system interface promiscuous
254
255             Do not set promiscuous mode on managed interfaces. This option
256             does not disable promiscuous mode on interfaces already using
257             this mode.
258
259       configure system ip management pattern pattern
260
261             Specify the management addresses of this system. As for inter‐
262             faces (described above), this option can use wildcards and inver‐
263             sions.  Without this option, the first IPv4 and the first IPv6
264             are used. If an exact IP address is provided, it is used as a
265             management address without any check. If only negative patterns
266             are provided, only one IPv4 and one IPv6 addresses are chosen.
267             Otherwise, many of them can be selected. If you want to remove
268             IPv6 addresses, you can use !*:*.  If an interface name is
269             matched, the first IPv4 address and the first IPv6 address asso‐
270             ciated to this interface will be chosen.
271
272       unconfigure system ip management pattern
273
274             Unset any specific pattern for matching management addresses.
275             This option undoes the previous one.
276
277       configure system bond-slave-src-mac-type value
278
279             Set the type of src mac in lldp frames sent on bond slaves
280
281             Valid types are:
282               real  Slave real mac
283               zero  All zero mac
284               fixed
285                     An arbitrary fixed value (00:60:08:69:97:ef)
286               local
287                     Real mac with locally administered bit set. If the real
288                     mac already has the locally administered bit set, fall‐
289                     back to the fixed value.
290
291             Default value for bond-slave-src-mac-type is local.  Some
292             switches may complain when using one of the two other possible
293             values (either because 00:00:00:00:00:00 is not a valid MAC or
294             because the MAC address is flapping from one port to another).
295             Using local might lead to a duplicate MAC address on the network
296             (but this is quite unlikely).
297
298       configure system max-neighbors neighbors
299
300             Change the maximum number of neighbors accepted (for each proto‐
301             col) on an interface. This is a global value. The default is 32.
302             This setting only applies to future neighbors.
303
304       configure lldp agent-type nearest-bridge | nearest-non-tpmr-bridge |
305       nearest-customer-bridge
306
307             The destination MAC address used to send LLDPDU allows an agent
308             to control the propagation of LLDPDUs. By default, the
309             01:80:c2:00:00:0e MAC address is used and limit the propagation
310             of the LLDPDU to the nearest bridge (nearest-bridge).  To in‐
311             struct lldpd to use the 01:80:c2:00:00:03 MAC address instead,
312             use nearest-nontpmr-bridge instead.  To use the 01:80:c2:00:00:00
313             MAC address instead, use nearest-customer-bridge instead.
314
315       configure lldp portidsubtype ifname | macaddress
316
317       configure [ports ethX [,...]] lldp portidsubtype local value
318
319             Force port ID subtype. By default, lldpd will use the MAC address
320             as port identifier and the interface name as port description,
321             unless the interface has an alias. In this case, the interface
322             name will be used as port identifier and the description will be
323             the interface alias. With this command, you can force the port
324             identifier to be the interface name (with ifname), the MAC ad‐
325             dress (with macaddress) or a local value (with value).  In the
326             latest case, the local value should be provided.
327
328       configure [ports ethX [,...]] lldp portdescription description
329
330             Force port description to the provided string.
331
332       configure lldp tx-interval interval
333
334             Change transmit delay to the specified value in seconds. The
335             transmit delay is the delay between two transmissions of LLDP
336             PDU. The default value is 30 seconds. Note: lldpd also starts an‐
337             other system based refresh timer on each port to detect changes
338             such as a hostname. This is the value of the tx-interval multi‐
339             plied by 20.
340
341             You can specify an interval value in milliseconds by appending a
342             "ms" suffix to the figure (e.g.  "configure lldp tx-interval
343             1500ms" is 1.5s, not 1500s). In this case the TTL for received
344             and sent LLDP frames is rounded up to the next second. Note: the
345             effective interval can be limited by the operating system capa‐
346             bilities and CPU speed.
347
348       configure lldp tx-hold hold
349
350             Change transmit hold value to the specified value. This value is
351             used to compute the TTL of transmitted packets which is the prod‐
352             uct of this value and of the transmit delay. The default value is
353             4 and therefore the default TTL is 120 seconds.
354
355       configure [ports ethX [,...]] lldp status rx-and-tx | rx-only | tx-only
356       | disabled
357
358             Configure the administrative status of the given port. By de‐
359             fault, all ports are configured to be in rx-and-tx mode. This
360             means they can receive and transmit LLDP frames (as well as other
361             protocols if needed). In rx-only mode, they won't emit any frames
362             and in tx-only mode, they won't receive any frames. In disabled
363             mode, no frame will be sent and any incoming frame will be dis‐
364             carded. This setting does not override the operational mode of
365             the main daemon. If it is configured in receive-only mode (with
366             the -r flag), setting any transmit mode won't have any effect.
367
368       configure [ports ethX [,...]] lldp vlan-tx vlan_id [prio priority [dei
369       dei]]
370
371             Configure the given port to send LLDP frames over a specified
372             VLAN. With VLAN Identifier (VID) as vlan_id, Priority Code Point
373             (PCP) as priority, and Drop Eligible Indicator (DEI) as dei.
374             lldpd accepts LLDP frames on all VLANs.
375
376       configure [ports ethX [,...]] lldp custom-tlv [add | replace] oui oui
377       subtype subtype [oui-info content]
378
379             Emit a custom TLV for OUI oui, with subtype subtype and option‐
380             ally with the bytes specified in content.  Both oui and content
381             should be a comma-separated list of bytes in hex format.  oui
382             must be exactly 3-byte long.  If add is specified then the TLV
383             will be added. This is the default action.  If replace is speci‐
384             fied then all TLVs with the same oui and subtype will be re‐
385             placed.
386
387
388       unconfigure [ports ethX [,...]] lldp custom-tlv [oui oui] [subtype
389       subtype]
390
391             When no oui is specified, remove all previously configured custom
392             TLV.  When OUI oui and subtype subtype is specified, remove spe‐
393             cific instances of custom TLV.
394
395       configure med fast-start enable | tx-interval interval
396
397             Configure LLDP-MED fast start mechanism. When a new LLDP-MED-en‐
398             abled neighbor is detected, fast start allows lldpd to shorten
399             the interval between two LLDPDU.  enable should enable LLDP-MED
400             fast start while tx-interval specifies the interval between two
401             LLDPDU in seconds. The default interval is 1 second. Once 4 LLD‐
402             PDU have been sent, the fast start mechanism is disabled until a
403             new neighbor is detected.
404
405       unconfigure med fast-start
406
407             Disable LLDP-MED fast start mechanism.
408
409       configure [ports ethX [,...]] med location coordinate latitude latitude
410       longitude longitude altitude altitude unit datum datum
411
412             Advertise a coordinate based location on the given ports (or on
413             all ports if no port is specified). The format of latitude is a
414             decimal floating point number followed either by N or S.  The
415             format of longitude is a decimal floating point number followed
416             either by E or W.  altitude is a decimal floating point number
417             followed either by m when expressed in meters or f when expressed
418             in floors. A space is expected between the floating point number
419             and the unit.  datum is one of those values:
420                     WGS84
421                     NAD83
422                     NAD83/MLLW
423
424             A valid use of this command is:
425                   configure ports eth0 med location coordinate latitude
426                   48.85667N longitude 2.2014E altitude 117.47 m datum WGS84
427
428       configure [ports ethX [,...]] med location address country country
429       [type value [...]]
430
431             Advertise a civic address on the given ports (or on all ports if
432             no port is specified).  country is the two-letter code represent‐
433             ing the country. The remaining arguments should be paired to form
434             the address. The first member of each pair indicates the type of
435             the second member which is a free-form text. Here is the list of
436             valid types:
437                     language
438                     country-subdivision
439                     county
440                     city
441                     city-division
442                     block
443                     street
444                     direction
445                     trailing-street-suffix
446                     street-suffix
447                     number
448                     number-suffix
449                     landmark
450                     additional
451                     name
452                     zip
453                     building
454                     unit
455                     floor
456                     room
457                     place-type
458                     script
459
460             A valid use of this command is:
461                   configure ports eth1 med location address country US street
462                   "Commercial Road" city "Roseville"
463
464       configure [ports ethX [,...]] med location elin number
465
466             Advertise the availability of an ELIN number. This is used for
467             setting up emergency call. If the provided number is too small,
468             it will be padded with 0. Here is an example of use:
469                   configure ports eth2 med location elin 911
470
471       configure [ports ethX [,...]] med policy application application
472       [unknown] [tagged] [vlan vlan] [priority priority] [dscp dscp]
473
474             Advertise a specific network policy for the given ports (or for
475             all ports if no port was provided). Only the application type is
476             mandatory.  application should be one of the following values:
477                     voice
478                     voice-signaling
479                     guest-voice
480                     guest-voice-signaling
481                     softphone-voice
482                     video-conferencing
483                     streaming-video
484                     video-signaling
485
486             The unknown flag tells that the network policy for the specified
487             application type is required by the device but is currently un‐
488             known. This is used by Endpoint Devices, not by Network Connec‐
489             tivity Devices. If not specified, the network policy for the
490             given application type is defined.
491
492             When a VLAN is specified with vlan tells which 802.1q VLAN ID has
493             to be advertised for the network policy. A valid value is between
494             1 and 4094.  tagged tells the VLAN should be tagged for the spec‐
495             ified application type.
496
497             priority allows one to specify IEEE 802.1d / IEEE 802.1p Layer 2
498             Priority, also known as Class of Service (CoS), to be used for
499             the specified application type. This field is usually ignored if
500             no VLAN is specified. The names match 802.1D-2004 standard (table
501             G-2). Some more recent standards may use different labels. Only
502             the numeric values should be relied upon. The accepted labels
503             are:
504                 1   background
505                 0   best-effort
506                 2   excellent-effort
507                 3   critical-applications
508                 4   video
509                 5   voice
510                 6   internetwork-control
511                 7   network-control
512
513             dscp represents the DSCP value to be advertised for the given
514             network policy.  DiffServ/Differentiated Services Code Point
515             (DSCP) value as defined in IETF RFC 2474 for the specified appli‐
516             cation type. Value: 0 (default per RFC 2475) through 63. Note:
517             The class selector DSCP values are backwards compatible for de‐
518             vices that only support the old IP precedence Type of Service
519             (ToS) format. (See the RFCs for what these values mean)
520
521             A valid use of this command is:
522                   configure med policy application voice vlan 500 priority
523                   voice dscp 46
524
525       configure inventory hardware-revision value
526
527             Override hardware-revision with the provided value. By default,
528             the hardware-revision is fetched from /sys/class/dmi
529
530       unconfigure inventory hardware-revision
531
532             Do not override hardware-revision and restore the use of the
533             /sys/class/dmi value.
534
535       configure inventory software-revision value
536
537             Override software-revision with the provided value. By default,
538             the software-revision is fetched from uname
539
540       unconfigure inventory software-revision
541
542             Do not override software-revision and restore the use of the un‐
543             ame value.
544
545       configure inventory firmware-revision value
546
547             Override firmware-revision with the provided value. By default,
548             the firmware-revision is fetched from /sys/class/dmi
549
550       unconfigure inventory firmware-revision
551
552             Do not override firmware-revision and restore the use of the
553             /sys/class/dmi value.
554
555       configure inventory serial-number value
556
557             Override serial-number with the provided value. By default, the
558             serial-number is fetched from /sys/class/dmi
559
560       unconfigure inventory serial-number
561
562             Do not override serial-number and restore the use of the
563             /sys/class/dmi value.
564
565       configure inventory manufacturer value
566
567             Override manufacturer with the provided value. By default, the
568             manufacturer is fetched from /sys/class/dmi
569
570       unconfigure inventory manufacturer
571
572             Do not override manufacturer and restore the use of the
573             /sys/class/dmi value.
574
575       configure inventory model value
576
577             Override model with the provided value. By default, the model is
578             fetched from /sys/class/dmi
579
580       unconfigure inventory model
581
582             Do not override model and restore the use of the /sys/class/dmi
583             value.
584
585       configure inventory asset value
586
587             Override asset with the provided value. By default, the asset is
588             fetched from /sys/class/dmi
589
590       unconfigure inventory asset
591
592             Do not override asset and restore the use of the /sys/class/dmi
593             value.
594
595       configure [ports ethX [,...]] med power pse | pd source source priority
596       priority value value
597
598             Advertise the LLDP-MED POE-MDI TLV for the given ports or for all
599             interfaces if no port is provided.  One can act as a PD (power
600             consumer) or a PSE (power provider). No check is done on the va‐
601             lidity of the parameters while LLDP-MED requires some restric‐
602             tions:
603
604             PD shall never request more power than physical 802.3af
605                 class.
606
607             PD shall never draw more than the maximum power advertised by
608                 PSE.
609
610             PSE shall not reduce power allocated to PD when this power is
611                 in use.
612
613             PSE may request reduced power using conservation mode
614
615             Being PSE or PD is a global parameter, not a per-port parame‐
616                 ter.  lldpcli does not enforce this: a port can be set as PD
617                 or PSE. LLDP-MED also requires for a PSE to only have one
618                 power source (primary or backup). Again, lldpcli does not en‐
619                 force this. Each port can have its own power source. The same
620                 applies for PD and power priority. LLDP-MED MIB does not al‐
621                 low this kind of representation.
622
623             Valid types are:
624               pse   Power Sourcing Entity (power provider)
625               pd    Power Device (power consumer)
626
627             Valid sources are:
628               unknown  Unknown
629               primary  For PSE, the power source is the primary power source.
630               backup   For PSE, the power source is the backup power source
631                        or a power conservation mode is asked (the PSE may be
632                        running on UPS for example).
633               pse      For PD, the power source is the PSE.
634               local    For PD, the power source is a local source.
635               both     For PD, the power source is both the PSE and a local
636                        source.
637
638             Valid priorities are:
639               unknown    Unknown priority
640               critical   Critical
641               high       High
642               low        Low
643
644             value should be the total power in milliwatts required by the PD
645             device or available by the PSE device.
646
647             Here is an example of use:
648                   configure med power pd source pse priority high value 5000
649
650       configure [ports ethX [,...]] dot3 power pse | pd [supported] [enabled]
651       [paircontrol] powerpairs powerpairs [class class] [type type source
652       source priority priority requested requested allocated allocated]
653
654             Advertise Dot3 POE-MDI TLV for the given port or for all ports if
655             none was provided. One can act as a PD (power consumer) or a PSE
656             (power provider). This configuration is distinct of the configu‐
657             ration of the transmission of the LLDP-MED POE-MDI TLV but the
658             user should ensure the coherency of those two configurations if
659             they are used together.
660
661             supported means that MDI power is supported on the given port
662             while enabled means that MDI power is enabled.  paircontrol is
663             used to indicate if pair selection can be controlled. Valid val‐
664             ues for powerpairs are:
665               signal  The signal pairs only are in use.
666               spare   The spare pairs only are in use.
667
668             When specified, class is a number between 0 and 4.
669
670             The remaining parameters are in conformance with 802.3at and are
671             optional.  type should be either 1 or 2, indicating which if the
672             device conforms to 802.3at type 1 or 802.3at type 2. Values of
673             source and priority are the same as for LLDP-MED POE-MDI TLV.
674             requested and allocated are expressed in milliwats.
675
676             Here are two valid uses of this command:
677                   configure ports eth3 dot3 power pse supported enabled
678                   paircontrol powerpairs spare class class-3
679                   configure dot3 power pd supported enabled powerpairs spare
680                   class class-3 type 1 source pse priority low requested
681                   10000 allocated 15000
682
683       pause
684
685             Pause lldpd operations.  lldpd will not send any more frames or
686             receive ones. This can be undone with resume command. This only
687             works interactively as lldpd asks lldpcli to unpause after read‐
688             ing the configuration file.
689
690       resume
691
692             Resume lldpd operations.  lldpd will start to send and receive
693             frames. This command is issued internally after processing con‐
694             figuration but can be used at any time if a manual pause command
695             is issued.
696
697

FILES

699     /run/lldpd/lldpd.socket    Unix-domain socket used for communication with
700                                lldpd(8).
701

SEE ALSO

703     lldpd(8)
704

AUTHORS

706     The lldpcli program was written by Vincent Bernat <bernat@luffy.cx>.
707
708BSD                              July 16, 2008                             BSD
Impressum