]> git.ipfire.org Git - thirdparty/lldpd.git/blob - src/client/lldpcli.8.in
client: document ability to have per-port custom TLVs
[thirdparty/lldpd.git] / src / client / lldpcli.8.in
1 .\" Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
2 .\" Copyright (c) 2008 Vincent Bernat <bernat@luffy.cx>
3 .\"
4 .\" Permission to use, copy, modify, and/or distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\"
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 .\"
16 .Dd $Mdocdate: July 16 2008 $
17 .Dt LLDPCLI 8
18 .Os
19 .Sh NAME
20 .Nm lldpcli ,
21 .Nm lldpctl
22 .Nd control LLDP daemon
23 .Sh SYNOPSIS
24 .Nm
25 .Op Fl dv
26 .Op Fl u Ar socket
27 .Op Fl f Ar format
28 .Op Fl c Ar file
29 .Op Ar command ...
30 .Nm lldpctl
31 .Op Fl dv
32 .Op Fl u Ar socket
33 .Op Fl f Ar format
34 .Op Ar interfaces ...
35 .Sh DESCRIPTION
36 The
37 .Nm
38 program controls
39 .Xr lldpd 8
40 daemon.
41 .Pp
42 When no command is specified,
43 .Nm
44 will start an interactive shell which can be used to input arbitrary
45 commands as if they were specified on the command line. This
46 interactive shell should provide completion and history support.
47 .Pp
48 The options are as follows:
49 .Bl -tag -width Ds
50 .It Fl d
51 Enable more debugging information. This flag can be repeated.
52 .It Fl u Ar socket
53 Specify the Unix-domain socket used for communication with
54 .Xr lldpd 8 .
55 .It Fl v
56 Show
57 .Nm
58 version. When repeated, show more build information.
59 .It Fl f Ar format
60 Choose the output format. Currently
61 .Em plain ,
62 .Em xml ,
63 .Em json ,
64 .Em json0
65 and
66 .Em keyvalue
67 formats are available. The default is
68 .Em plain .
69 .Em json0
70 is more verbose than
71 .Em json
72 but the structure of the JSON object is not affected by the number of
73 interfaces or the number of neighbors. It is therefore easier to
74 parse.
75 .It Fl c Ar file
76 Read the given configuration file. This option may be repeated several
77 times. If a directory is provided, each file contained in it will be
78 read if ending by
79 .Li .conf .
80 Order is alphabetical.
81 .El
82 .Pp
83 When invoked as
84 .Nm lldpctl ,
85 .Nm
86 will display detailed information about each neighbors on the
87 specified interfaces or on all interfaces if none are specified. This
88 command is mostly kept for backward compatibility with older versions.
89 .Pp
90 The following commands are supported by
91 .Nm .
92 When there is no ambiguity, the keywords can be abbreviated. For
93 example,
94 .Cd show neighbors ports eth0 summary
95 and
96 .Cd sh neigh p eth0 sum
97 are the same command.
98 .Bd -ragged -offset XX
99 .Cd exit
100 .Bd -ragged -offset XXXXXX
101 Quit
102 .Nm .
103 .Ed
104
105 .Cd help Op ...
106 .Bd -ragged -offset XXXXXX
107 Display general help or help about a command. Also, you can get help
108 using the completion or by pressing the
109 .Ic ?
110 key. However, completion and inline help may be unavailable if
111 .Nm
112 was compiled without readline support but
113 .Cd help
114 command is always available.
115 .Ed
116
117 .Cd show neighbors
118 .Op ports Ar ethX Op ,...
119 .Op Cd details | summary
120 .Op Cd hidden
121 .Bd -ragged -offset XXXXXX
122 Display information about each neighbor known by
123 .Xr lldpd 8
124 daemon. With
125 .Cd summary ,
126 only the name and the port description of each remote host will be
127 displayed. On the other hand, with
128 .Cd details ,
129 all available information will be displayed, giving a verbose
130 view. When using
131 .Cd hidden ,
132 also display remote ports hidden by the smart filter. When specifying
133 one or several ports, the information displayed is limited to the
134 given list of ports.
135 .Ed
136
137 .Cd show interfaces
138 .Op ports Ar ethX Op ,...
139 .Op Cd details | summary
140 .Op Cd hidden
141 .Bd -ragged -offset XXXXXX
142 Display information about each local interface known by
143 .Xr lldpd 8
144 daemon. With
145 .Cd summary ,
146 only the name and the port description of each local interface will be
147 displayed. On the other hand, with
148 .Cd details ,
149 all available information will be displayed, giving a verbose
150 view. When using
151 .Cd hidden ,
152 also display local ports hidden by the smart filter. When specifying
153 one or several ports, the information displayed is limited to the
154 given list of ports.
155 .Ed
156
157 .Cd show chassis
158 .Op Cd details | summary
159 .Bd -ragged -offset XXXXXX
160 Display information about local chassis. With
161 .Cd summary ,
162 most details are skipped. On the other hand, with
163 .Cd details ,
164 all available information will be displayed, giving a verbose
165 view.
166 .Ed
167
168 .Cd watch
169 .Op ports Ar ethX Op ,...
170 .Op Cd details | summary
171 .Op Cd hidden
172 .Op Cd limit Ar X
173 .Bd -ragged -offset XXXXXX
174 Watch for any neighbor changes and report them as soon as they
175 happen. When specifying ports, the changes are only reported when
176 happening on the given ports.
177 .Cd hidden , summary
178 and
179 .Cd details
180 have the same meaning than previously described. If
181 .Cd limit
182 is specified,
183 .Nm
184 will exit after receiving the specified number of events.
185 .Ed
186
187 .Cd show configuration
188 .Bd -ragged -offset XXXXXX
189 Display global configuration of
190 .Xr lldpd 8
191 daemon.
192 .Ed
193
194 .Cd show statistics
195 .Op ports Ar ethX Op ,...
196 .Op Cd summary
197 .Bd -ragged -offset XXXXXX
198 Report LLDP-related statistics, like the number of LLDPDU transmitted,
199 received, discarded or unrecognized. When specifying ports, only the
200 statistics from the given port are reported. With
201 .Cd summary
202 the statistics of each port is summed.
203 .Ed
204
205 .Cd update
206 .Bd -ragged -offset XXXXXX
207 Make
208 .Xr lldpd 8
209 update its information and send new LLDP PDU on all interfaces.
210 .Ed
211
212 .Cd configure
213 .Cd system hostname Ar name
214 .Bd -ragged -offset XXXXXX
215 Override system hostname with the provided value. By default, the
216 system name is the FQDN found from the resolved value of
217 .Ic uname -n .
218 As a special value, use "." (dot) to use the short hostname instead of
219 a FQDN.
220 .Ed
221
222 .Cd unconfigure
223 .Cd system hostname
224 .Bd -ragged -offset XXXXXX
225 Do not override system hostname and restore the use of the node name.
226 .Ed
227
228 .Cd configure
229 .Cd system description Ar description
230 .Bd -ragged -offset XXXXXX
231 Override chassis description with the provided value instead of using
232 kernel name, node name, kernel version, build date and architecture.
233 .Ed
234
235 .Cd unconfigure
236 .Cd system description
237 .Bd -ragged -offset XXXXXX
238 Do not override chassis description and use a value computed from node
239 name, kernel name, kernel version, build date and architecture instead.
240 .Ed
241
242 .Cd configure
243 .Cd system chassisid Ar description
244 .Bd -ragged -offset XXXXXX
245 Override chassis ID with the provided value instead of using MAC address
246 from one interface or host name.
247 .Ed
248
249 .Cd unconfigure
250 .Cd system chassisid
251 .Bd -ragged -offset XXXXXX
252 Do not override chassis ID and use a value computed from one of the interface
253 MAC address (or host name if none is found).
254 .Ed
255
256 .Cd configure
257 .Cd system platform Ar description
258 .Bd -ragged -offset XXXXXX
259 Override platform description with the provided value instead of using
260 kernel name. This value is currently only used for CDP.
261 .Ed
262
263 .Cd unconfigure
264 .Cd system platform
265 .Bd -ragged -offset XXXXXX
266 Do not override platform description and use the kernel name. This
267 option undoes the previous one.
268 .Ed
269
270 .Cd configure
271 .Cd system capabilities enabled Ar capabilities
272 .Bd -ragged -offset XXXXXX
273 Override system capabilities with the provided value instead of using
274 kernel information. Several capabilities can be specified separated by
275 commas. Only available capabilities can be enabled. Valid capabilities are:
276 .Bl -tag -width "XXX." -compact -offset XX
277 .It Sy other
278 .It Sy repeater
279 .It Sy bridge
280 .It Sy wlan
281 .It Sy router
282 .It Sy telephone
283 .It Sy docsis
284 .It Sy station
285 .El
286 Here is an example of use:
287 .D1 configure system capabilities enabled bridge,router
288 .Pp
289 .Ed
290
291 .Cd unconfigure
292 .Cd system capabilities enabled
293 .Bd -ragged -offset XXXXXX
294 Do not override capabilities and use the kernel information. This option
295 undoes the previous one.
296 .Ed
297
298 .Cd configure
299 .Cd system interface pattern Ar pattern
300 .Bd -ragged -offset XXXXXX
301 Specify which interface to listen and send LLDPDU to. Without this
302 option,
303 .Nm lldpd
304 will use all available physical interfaces. This option can use
305 wildcards. Several interfaces can be specified separated by commas.
306 It is also possible to remove an interface by prefixing it with an
307 exclamation mark. It is possible to allow an interface by
308 prefixing it with two exclamation marks. An allowed interface beats
309 a forbidden interfaces which beats a simple matched interface. For
310 example, with
311 .Em eth*,!eth1,!eth2
312 .Nm lldpd
313 will only use interfaces starting by
314 .Em eth
315 with the exception of
316 .Em eth1
317 and
318 .Em eth2 .
319 While with
320 .Em *,!eth*,!!eth1
321 .Nm
322 will use all interfaces, except interfaces starting by
323 .Em eth
324 with the exception of
325 .Em eth1 .
326 When an exact match is found, it will circumvent some tests. For example, if
327 .Em eth0.12
328 is specified, it will be accepted even if this is a VLAN interface.
329 .Ed
330
331 .Cd unconfigure
332 .Cd system interface pattern
333 .Bd -ragged -offset XXXXXX
334 Remove any previously configured interface pattern and use all
335 physical interfaces. This option undoes the previous one.
336 .Ed
337
338 .Cd configure
339 .Cd system interface permanent Ar pattern
340 .Bd -ragged -offset XXXXXX
341 Specify interfaces whose configuration is permanently kept by
342 .Nm lldpd .
343 By default,
344 .Nm lldpd
345 disregard any data about interfaces when they are removed from the
346 system (statistics, custom configuration). This option allows one to
347 specify a pattern similar to the interface pattern. If an interface
348 disappear but matches the pattern, its data is kept in memory and
349 reused if the interface reappear at some point. For example, on Linux,
350 one could use the pattern
351 .Em eth*,eno*,enp* ,
352 which should match fixed interfaces on most systems.
353 .Ed
354
355 .Cd unconfigure
356 .Cd system interface permanent
357 .Bd -ragged -offset XXXXXX
358 Remove any previously configured permanent interface pattern. Any
359 interface removed from the system will be forgotten. This option
360 undoes the previous one.
361 .Ed
362
363 .Cd configure
364 .Cd system interface description
365 .Bd -ragged -offset XXXXXX
366 Some OS allows the user to set a description for an interface. Setting
367 this option will enable
368 .Nm lldpd
369 to override this description with the name of the peer neighbor if one
370 is found or with the number of neighbors found.
371 .Ed
372
373 .Cd unconfigure
374 .Cd system interface description
375 .Bd -ragged -offset XXXXXX
376 Do not update interface description with the name of the peer
377 neighbor. This option undoes the previous one.
378 .Ed
379
380 .Cd configure
381 .Cd system interface promiscuous
382 .Bd -ragged -offset XXXXXX
383 Enable promiscuous mode on managed interfaces.
384 .Pp
385 When the interface is not managed any more (or when quitting
386 .Nm lldpd ) ,
387 the interface is left in promiscuous mode as it is difficult to know
388 if someone else also put the interface in promiscuous mode.
389 .Pp
390 This option is known to be useful when the remote switch is a Cisco
391 2960 and the local network card features VLAN hardware
392 acceleration. In this case, you may not receive LLDP frames from the
393 remote switch. The most plausible explanation for this is the frame is
394 tagged with some VLAN (usually VLAN 1) and your network card is
395 filtering VLAN. This is not the only available solution to work-around
396 this problem. If you are concerned about performance issues, you can
397 also tag the VLAN 1 on each interface instead.
398 .Pp
399 Currently, this option has no effect on anything else than Linux. On
400 other OS, either disable VLAN acceleration, tag VLAN 1 or enable
401 promiscuous mode manually on the interface.
402 .Ed
403
404 .Cd unconfigure
405 .Cd system interface promiscuous
406 .Bd -ragged -offset XXXXXX
407 Do not set promiscuous mode on managed interfaces. This option does
408 not disable promiscuous mode on interfaces already using this mode.
409 .Ed
410
411 .Cd configure
412 .Cd system ip management pattern Ar pattern
413 .Bd -ragged -offset XXXXXX
414 Specify the management addresses of this system. As for interfaces
415 (described above), this option can use wildcards and inversions.
416 Without this option, the first IPv4 and the first IPv6 are used. If an
417 exact IP address is provided, it is used as a management address
418 without any check. If only negative patterns are provided, only one
419 IPv4 and one IPv6 addresses are chosen. Otherwise, many of them can be
420 selected. If you want to remove IPv6 addresses, you can use
421 .Em !*:* .
422 If an interface name is matched, the first IPv4 address and the first
423 IPv6 address associated to this interface will be chosen.
424 .Ed
425
426 .Cd unconfigure
427 .Cd system ip management pattern
428 .Bd -ragged -offset XXXXXX
429 Unset any specific pattern for matching management addresses. This
430 option undoes the previous one.
431 .Ed
432
433 .Cd configure
434 .Cd system bond-slave-src-mac-type Ar value
435 .Bd -ragged -offset XXXXXX
436 Set the type of src mac in lldp frames sent on bond slaves
437
438 Valid types are:
439 .Bl -tag -width "XXX." -compact -offset XX
440 .It Sy real
441 Slave real mac
442 .It Sy zero
443 All zero mac
444 .It Sy fixed
445 An arbitrary fixed value
446 .Li ( 00:60:08:69:97:ef )
447 .It Sy local
448 Real mac with locally administered bit set. If the real mac already
449 has the locally administered bit set, fallback to the fixed value.
450 .El
451 .Pp
452 Default value for
453 .Nm bond-slave-src-mac-type
454 is
455 .Nm local .
456 Some switches may complain when using one of the two other possible
457 values (either because
458 .Li 00:00:00:00:00:00
459 is not a valid MAC or because the MAC address is flapping from one
460 port to another). Using
461 .Sy local
462 might lead to a duplicate MAC address on the network (but this is
463 quite unlikely).
464 .Ed
465
466 .Cd configure
467 .Cd system max-neighbors Ar neighbors
468 .Bd -ragged -offset XXXXXX
469 Change the maximum number of neighbors accepted (for each protocol) on
470 an interface. This is a global value. The default is 32. This setting
471 only applies to future neighbors.
472 .Ed
473
474 .Cd configure
475 .Cd lldp agent-type
476 .Cd nearest-bridge | nearest-non-tpmr-bridge | nearest-customer-bridge
477 .Bd -ragged -offset XXXXXX
478 The destination MAC address used to send LLDPDU allows an agent to
479 control the propagation of LLDPDUs. By default, the
480 .Li 01:80:c2:00:00:0e
481 MAC address is used and limit the propagation of the LLDPDU to the
482 nearest bridge
483 .Cd ( nearest-bridge ) .
484 To instruct
485 .Nm lldpd
486 to use the
487 .Li 01:80:c2:00:00:03
488 MAC address instead, use
489 .Cd nearest-nontpmr-bridge
490 instead.
491 To use the
492 .Li 01:80:c2:00:00:00
493 MAC address instead, use
494 .Cd nearest-customer-bridge
495 instead.
496 .Ed
497
498 .Cd configure
499 .Cd lldp portidsubtype
500 .Cd ifname | macaddress
501 .Pp
502 .Cd configure
503 .Op ports Ar ethX Op ,...
504 .Cd lldp portidsubtype
505 .Cd local Ar value
506 .Bd -ragged -offset XXXXXX
507 Force port ID subtype. By default,
508 .Nm lldpd
509 will use the MAC address as port identifier and the interface name as
510 port description, unless the interface has an alias. In this case, the
511 interface name will be used as port identifier and the description
512 will be the interface alias. With this command, you can force the port
513 identifier to be the interface name (with
514 .Cd ifname ) ,
515 the MAC address (with
516 .Cd macaddress )
517 or a local value (with
518 .Cd value ) .
519 In the latest case, the local value should be provided.
520 .Ed
521
522 .Cd configure
523 .Op ports Ar ethX Op ,...
524 .Cd lldp portdescription
525 .Cd Ar description
526 .Bd -ragged -offset XXXXXX
527 Force port description to the provided string.
528 .Ed
529
530 .Cd configure
531 .Cd lldp tx-interval Ar interval
532 .Bd -ragged -offset XXXXXX
533 Change transmit delay to the specified value in seconds. The transmit
534 delay is the delay between two transmissions of LLDP PDU. The default
535 value is 30 seconds. Note:
536 .Nm lldpd
537 also starts another system based refresh timer on each port to detect
538 changes such as a hostname. This is the value of the tx-interval
539 multiplied by 20.
540 .Pp
541 You can specify an
542 .Cd interval
543 value in milliseconds by appending a "ms" suffix to the figure (e.g.
544 "configure lldp tx-interval 1500ms" is 1.5s, not 1500s). In this case
545 the TTL for received and sent LLDP frames is rounded up to the next
546 second. Note: the effective interval can be limited by the operating
547 system capabilities and CPU speed.
548 .Ed
549
550 .Cd configure
551 .Cd lldp tx-hold Ar hold
552 .Bd -ragged -offset XXXXXX
553 Change transmit hold value to the specified value. This value is used
554 to compute the TTL of transmitted packets which is the product of this
555 value and of the transmit delay. The default value is 4 and therefore
556 the default TTL is 120 seconds.
557 .Ed
558
559 .Cd configure
560 .Op ports Ar ethX Op ,...
561 .Cd lldp
562 .Cd status Ar rx-and-tx | rx-only | tx-only | disabled
563 .Bd -ragged -offset XXXXXX
564 Configure the administrative status of the given port. By default, all
565 ports are configured to be in
566 .Ar rx-and-tx
567 mode. This means they can receive and transmit LLDP frames (as well as
568 other protocols if needed). In
569 .Ar rx-only
570 mode, they won't emit any frames and in
571 .Ar tx-only
572 mode, they won't receive any frames. In
573 .Ar disabled
574 mode, no frame will be sent and any incoming frame will be
575 discarded. This setting does not override the operational mode of the
576 main daemon. If it is configured in receive-only mode (with the
577 .Fl r
578 flag), setting any transmit mode won't have any effect.
579 .Ed
580
581 .Cd configure
582 .Op ports Ar ethX Op ,...
583 .Cd lldp
584 .Cd vlan-tx Ar vlan_id
585 .Op Cd prio Ar priority Op Cd dei Ar dei
586 .Bd -ragged -offset XXXXXX
587 Configure the given port to send LLDP frames over a specified VLAN. With VLAN Identifier (VID) as
588 .Ar vlan_id ,
589 Priority Code Point (PCP) as
590 .Ar priority ,
591 and Drop Eligible Indicator (DEI) as
592 .Ar dei .
593 .Nm lldpd
594 accepts LLDP frames on all VLANs.
595 .Ed
596
597 .Cd configure
598 .Op ports Ar ethX Op ,...
599 .Cd lldp custom-tlv
600 .Op Cd add | replace
601 .Cd oui Ar oui
602 .Cd subtype Ar subtype
603 .Op Cd oui-info Ar content
604 .Bd -ragged -offset XXXXXX
605 Emit a custom TLV for OUI
606 .Ar oui ,
607 with subtype
608 .Ar subtype
609 and optionally with the bytes specified in
610 .Ar content .
611 Both
612 .Ar oui
613 and
614 .Ar content
615 should be a comma-separated list of bytes in hex format.
616 .Ar oui
617 must be exactly 3-byte long.
618 If
619 .Ar add
620 is specified then the TLV will be added. This is the default action.
621 If
622 .Ar replace
623 is specified then all TLVs with the same
624 .Ar oui
625 and
626 .Ar subtype
627 will be replaced.
628
629 .Ed
630
631 .Cd unconfigure
632 .Op ports Ar ethX Op ,...
633 .Cd lldp custom-tlv
634 .Op Cd oui Ar oui
635 .Op Cd subtype Ar subtype
636 .Bd -ragged -offset XXXXXX
637 When no oui is specified, remove all previously configured custom TLV.
638 When OUI
639 .Ar oui
640 and subtype
641 .Ar subtype
642 is specified, remove specific instances of custom TLV.
643 .Ed
644
645 .Cd configure med fast-start
646 .Cd enable | tx-interval Ar interval
647 .Bd -ragged -offset XXXXXX
648 Configure LLDP-MED fast start mechanism. When a new LLDP-MED-enabled
649 neighbor is detected, fast start allows
650 .Nm lldpd
651 to shorten the interval between two LLDPDU.
652 .Cd enable
653 should enable LLDP-MED fast start while
654 .Cd tx-interval
655 specifies the interval between two LLDPDU in seconds. The default
656 interval is 1 second. Once 4 LLDPDU have been sent, the fast start
657 mechanism is disabled until a new neighbor is detected.
658 .Ed
659
660 .Cd unconfigure med fast-start
661 .Bd -ragged -offset XXXXXX
662 Disable LLDP-MED fast start mechanism.
663 .Ed
664
665 .Cd configure
666 .Op ports Ar ethX Op ,...
667 .Cd med location coordinate
668 .Cd latitude Ar latitude
669 .Cd longitude Ar longitude
670 .Cd altitude Ar altitude Ar unit
671 .Cd datum Ar datum
672 .Bd -ragged -offset XXXXXX
673 Advertise a coordinate based location on the given ports (or on all
674 ports if no port is specified). The format of
675 .Ar latitude
676 is a decimal floating point number followed either by
677 .Em N
678 or
679 .Em S .
680 The format of
681 .Ar longitude
682 is a decimal floating point number followed either by
683 .Em E
684 or
685 .Em W .
686 .Ar altitude
687 is a decimal floating point number followed either by
688 .Em m
689 when expressed in meters or
690 .Em f
691 when expressed in floors. A space is expected between the floating
692 point number and the unit.
693 .Ar datum
694 is one of those values:
695 .Bl -bullet -compact -offset XXXXXXXX
696 .It
697 WGS84
698 .It
699 NAD83
700 .It
701 NAD83/MLLW
702 .El
703 .Pp
704 A valid use of this command is:
705 .D1 configure ports eth0 med location coordinate latitude 48.85667N longitude 2.2014E altitude 117.47 m datum WGS84
706 .Ed
707
708 .Cd configure
709 .Op ports Ar ethX Op ,...
710 .Cd med location address
711 .Cd country Ar country
712 .Cd Op Ar type value Op ...
713 .Bd -ragged -offset XXXXXX
714 Advertise a civic address on the given ports (or on all ports if no
715 port is specified).
716 .Ar country
717 is the two-letter code representing the country. The remaining
718 arguments should be paired to form the address. The first member of
719 each pair indicates the type of the second member which is a free-form
720 text. Here is the list of valid types:
721 .Bl -bullet -compact -offset XXXXXXXX
722 .It
723 language
724 .It
725 country-subdivision
726 .It
727 county
728 .It
729 city
730 .It
731 city-division
732 .It
733 block
734 .It
735 street
736 .It
737 direction
738 .It
739 trailing-street-suffix
740 .It
741 street-suffix
742 .It
743 number
744 .It
745 number-suffix
746 .It
747 landmark
748 .It
749 additional
750 .It
751 name
752 .It
753 zip
754 .It
755 building
756 .It
757 unit
758 .It
759 floor
760 .It
761 room
762 .It
763 place-type
764 .It
765 script
766 .El
767 .Pp
768 A valid use of this command is:
769 .D1 configure ports eth1 med location address country US street Qo Commercial Road Qc city Qo Roseville Qc
770 .Ed
771
772 .Cd configure
773 .Op ports Ar ethX Op ,...
774 .Cd med location elin
775 .Ar number
776 .Bd -ragged -offset XXXXXX
777 Advertise the availability of an ELIN number. This is used for setting
778 up emergency call. If the provided number is too small, it will be
779 padded with 0. Here is an example of use:
780 .D1 configure ports eth2 med location elin 911
781 .Ed
782
783 .Cd configure
784 .Op ports Ar ethX Op ,...
785 .Cd med policy
786 .Cd application Ar application
787 .Op Cd unknown
788 .Op Cd tagged
789 .Op Cd vlan Ar vlan
790 .Op Cd priority Ar priority
791 .Op Cd dscp Ar dscp
792 .Bd -ragged -offset XXXXXX
793 Advertise a specific network policy for the given ports (or for all
794 ports if no port was provided). Only the application type is
795 mandatory.
796 .Ar application
797 should be one of the following values:
798 .Bl -bullet -compact -offset XXXXXXXX
799 .It
800 voice
801 .It
802 voice-signaling
803 .It
804 guest-voice
805 .It
806 guest-voice-signaling
807 .It
808 softphone-voice
809 .It
810 video-conferencing
811 .It
812 streaming-video
813 .It
814 video-signaling
815 .El
816 .Pp
817 The
818 .Cd unknown
819 flag tells that the network policy for the specified application type
820 is required by the device but is currently unknown. This is used by
821 Endpoint Devices, not by Network Connectivity Devices. If not
822 specified, the network policy for the given application type is
823 defined.
824 .Pp
825 When a VLAN is specified with
826 .Ar vlan
827 tells which 802.1q VLAN ID has to be advertised for the network
828 policy. A valid value is between 1 and 4094.
829 .Cd tagged
830 tells the VLAN should be tagged for the specified application type.
831 .Pp
832 .Ar priority
833 allows one to specify IEEE 802.1d / IEEE 802.1p Layer 2 Priority, also
834 known as Class of Service (CoS), to be used for the specified
835 application type. This field is usually ignored if no VLAN is
836 specified. The names match 802.1D-2004 standard (table G-2). Some more
837 recent standards may use different labels. Only the numeric values
838 should be relied upon. The accepted labels are:
839 .Bl -tag -width "X." -compact -offset XXXX
840 .It Sy 1
841 background
842 .It Sy 0
843 best-effort
844 .It Sy 2
845 excellent-effort
846 .It Sy 3
847 critical-applications
848 .It Sy 4
849 video
850 .It Sy 5
851 voice
852 .It Sy 6
853 internetwork-control
854 .It Sy 7
855 network-control
856 .El
857 .Pp
858 .Ar dscp
859 represents the DSCP value to be advertised for the given network
860 policy. DiffServ/Differentiated Services Code Point (DSCP) value as
861 defined in IETF RFC 2474 for the specified application type. Value: 0
862 (default per RFC 2475) through 63. Note: The class selector DSCP
863 values are backwards compatible for devices that only support the old
864 IP precedence Type of Service (ToS) format. (See the RFCs for what
865 these values mean)
866 .Pp
867 A valid use of this command is:
868 .D1 configure med policy application voice vlan 500 priority voice dscp 46
869 .Ed
870
871 .Cd configure
872 .Cd inventory hardware-revision Ar value
873 .Bd -ragged -offset XXXXXX
874 Override hardware-revision with the provided value. By default, the
875 hardware-revision is fetched from /sys/class/dmi
876 .Ed
877
878 .Cd unconfigure
879 .Cd inventory hardware-revision
880 .Bd -ragged -offset XXXXXX
881 Do not override hardware-revision and restore the use of the /sys/class/dmi value.
882 .Ed
883
884 .Cd configure
885 .Cd inventory software-revision Ar value
886 .Bd -ragged -offset XXXXXX
887 Override software-revision with the provided value. By default, the
888 software-revision is fetched from uname
889 .Ed
890
891 .Cd unconfigure
892 .Cd inventory software-revision
893 .Bd -ragged -offset XXXXXX
894 Do not override software-revision and restore the use of the uname value.
895 .Ed
896
897 .Cd configure
898 .Cd inventory firmware-revision Ar value
899 .Bd -ragged -offset XXXXXX
900 Override firmware-revision with the provided value. By default, the
901 firmware-revision is fetched from /sys/class/dmi
902 .Ed
903
904 .Cd unconfigure
905 .Cd inventory firmware-revision
906 .Bd -ragged -offset XXXXXX
907 Do not override firmware-revision and restore the use of the /sys/class/dmi value.
908 .Ed
909
910 .Cd configure
911 .Cd inventory serial-number Ar value
912 .Bd -ragged -offset XXXXXX
913 Override serial-number with the provided value. By default, the
914 serial-number is fetched from /sys/class/dmi
915 .Ed
916
917 .Cd unconfigure
918 .Cd inventory serial-number
919 .Bd -ragged -offset XXXXXX
920 Do not override serial-number and restore the use of the /sys/class/dmi value.
921 .Ed
922
923 .Cd configure
924 .Cd inventory manufacturer Ar value
925 .Bd -ragged -offset XXXXXX
926 Override manufacturer with the provided value. By default, the
927 manufacturer is fetched from /sys/class/dmi
928 .Ed
929
930 .Cd unconfigure
931 .Cd inventory manufacturer
932 .Bd -ragged -offset XXXXXX
933 Do not override manufacturer and restore the use of the /sys/class/dmi value.
934 .Ed
935
936 .Cd configure
937 .Cd inventory model Ar value
938 .Bd -ragged -offset XXXXXX
939 Override model with the provided value. By default, the
940 model is fetched from /sys/class/dmi
941 .Ed
942
943 .Cd unconfigure
944 .Cd inventory model
945 .Bd -ragged -offset XXXXXX
946 Do not override model and restore the use of the /sys/class/dmi value.
947 .Ed
948
949 .Cd configure
950 .Cd inventory asset Ar value
951 .Bd -ragged -offset XXXXXX
952 Override asset with the provided value. By default, the
953 asset is fetched from /sys/class/dmi
954 .Ed
955
956 .Cd unconfigure
957 .Cd inventory asset
958 .Bd -ragged -offset XXXXXX
959 Do not override asset and restore the use of the /sys/class/dmi value.
960 .Ed
961
962 .Cd configure
963 .Op ports Ar ethX Op ,...
964 .Cd med power pse | pd
965 .Cd source Ar source
966 .Cd priority Ar priority
967 .Cd value Ar value
968 .Bd -ragged -offset XXXXXX
969 Advertise the LLDP-MED POE-MDI TLV for the given ports or for all
970 interfaces if no port is provided. One can act as a PD (power
971 consumer) or a PSE (power provider). No check is done on the validity
972 of the parameters while LLDP-MED requires some restrictions:
973 .Bl -bullet
974 .It
975 PD shall never request more power than physical 802.3af class.
976 .It
977 PD shall never draw more than the maximum power advertised by PSE.
978 .It
979 PSE shall not reduce power allocated to PD when this power is in use.
980 .It
981 PSE may request reduced power using conservation mode
982 .It
983 Being PSE or PD is a global parameter, not a per-port parameter.
984 .Nm
985 does not enforce this: a port can be set as PD or PSE. LLDP-MED also
986 requires for a PSE to only have one power source (primary or
987 backup). Again,
988 .Nm
989 does not enforce this. Each port can have its own power source. The
990 same applies for PD and power priority. LLDP-MED MIB does not allow
991 this kind of representation.
992 .El
993 .Pp
994 Valid types are:
995 .Bl -tag -width "XXX." -compact -offset XX
996 .It Sy pse
997 Power Sourcing Entity (power provider)
998 .It Sy pd
999 Power Device (power consumer)
1000 .El
1001 .Pp
1002 Valid sources are:
1003 .Bl -tag -width "XXXXXXX" -compact -offset XX
1004 .It Sy unknown
1005 Unknown
1006 .It Sy primary
1007 For PSE, the power source is the primary power source.
1008 .It Sy backup
1009 For PSE, the power source is the backup power source or a power
1010 conservation mode is asked (the PSE may be running on UPS for
1011 example).
1012 .It Sy pse
1013 For PD, the power source is the PSE.
1014 .It Sy local
1015 For PD, the power source is a local source.
1016 .It Sy both
1017 For PD, the power source is both the PSE and a local source.
1018 .El
1019 .Pp
1020 Valid priorities are:
1021 .Bl -tag -width "XXXXXXXXX" -compact -offset XX
1022 .It Sy unknown
1023 Unknown priority
1024 .It Sy critical
1025 Critical
1026 .It Sy high
1027 High
1028 .It Sy low
1029 Low
1030 .El
1031 .Pp
1032 .Ar value
1033 should be the total power in milliwatts required by the PD device or
1034 available by the PSE device.
1035 .Pp
1036 Here is an example of use:
1037 .D1 configure med power pd source pse priority high value 5000
1038 .Ed
1039
1040 .Cd configure
1041 .Op ports Ar ethX Op ,...
1042 .Cd dot3 power pse | pd
1043 .Op Cd supported
1044 .Op Cd enabled
1045 .Op Cd paircontrol
1046 .Cd powerpairs Ar powerpairs
1047 .Op Cd class Ar class
1048 .Op Cd type Ar type Cd source Ar source Cd priority Ar priority Cd requested Ar requested Cd allocated Ar allocated
1049 .Bd -ragged -offset XXXXXX
1050 Advertise Dot3 POE-MDI TLV for the given port or for all ports if none
1051 was provided. One can act as a PD (power consumer) or a PSE (power
1052 provider). This configuration is distinct of the configuration of the
1053 transmission of the LLDP-MED POE-MDI TLV but the user should ensure
1054 the coherency of those two configurations if they are used together.
1055 .Pp
1056 .Ar supported
1057 means that MDI power is supported on the given port while
1058 .Ar enabled
1059 means that MDI power is enabled.
1060 .Ar paircontrol
1061 is used to indicate if pair selection can be controlled. Valid values
1062 for
1063 .Ar powerpairs
1064 are:
1065 .Bl -tag -width "XXXXXX" -compact -offset XX
1066 .It Sy signal
1067 The signal pairs only are in use.
1068 .It Sy spare
1069 The spare pairs only are in use.
1070 .El
1071 .Pp
1072 When specified,
1073 .Ar class
1074 is a number between 0 and 4.
1075 .Pp
1076 The remaining parameters are in conformance with 802.3at and are optional.
1077 .Ar type
1078 should be either 1 or 2, indicating which if the device conforms to
1079 802.3at type 1 or 802.3at type 2. Values of
1080 .Ar source
1081 and
1082 .Ar priority
1083 are the same as for LLDP-MED POE-MDI TLV.
1084 .Ar requested
1085 and
1086 .Ar allocated
1087 are expressed in milliwats.
1088 .Pp
1089 Here are two valid uses of this command:
1090 .D1 configure ports eth3 dot3 power pse supported enabled paircontrol powerpairs spare class class-3
1091 .D1 configure dot3 power pd supported enabled powerpairs spare class class-3 type 1 source pse priority low requested 10000 allocated 15000
1092 .Ed
1093
1094 .Cd pause
1095 .Bd -ragged -offset XXXXXX
1096 Pause
1097 .Nm lldpd
1098 operations.
1099 .Nm lldpd
1100 will not send any more frames or receive ones. This can be undone with
1101 .Cd resume
1102 command. This only works interactively as lldpd asks lldpcli to
1103 unpause after reading the configuration file.
1104 .Ed
1105
1106 .Cd resume
1107 .Bd -ragged -offset XXXXXX
1108 Resume
1109 .Nm lldpd
1110 operations.
1111 .Nm lldpd
1112 will start to send and receive frames. This command is issued
1113 internally after processing configuration but can be used at any time
1114 if a manual
1115 .Cd pause
1116 command is issued.
1117 .Ed
1118
1119 .Ed
1120 .Sh FILES
1121 .Bl -tag -width "@LLDPD_CTL_SOCKET@XX" -compact
1122 .It @LLDPD_CTL_SOCKET@
1123 Unix-domain socket used for communication with
1124 .Xr lldpd 8 .
1125 .El
1126 .Sh SEE ALSO
1127 .Xr lldpd 8
1128 .Sh AUTHORS
1129 .An -nosplit
1130 The
1131 .Nm
1132 program was written by
1133 .An Vincent Bernat Aq bernat@luffy.cx .