]> git.ipfire.org Git - thirdparty/lldpd.git/blob - src/client/lldpcli.8.in
65b3d94db0fabce9c6824d585317fc66a65251ce
[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 interface pattern Ar pattern
272 .Bd -ragged -offset XXXXXX
273 Specify which interface to listen and send LLDPDU to. Without this
274 option,
275 .Nm lldpd
276 will use all available physical interfaces. This option can use
277 wildcards. Several interfaces can be specified separated by commas.
278 It is also possible to blacklist an interface by suffixing it with an
279 exclamation mark. It is possible to whitelist an interface by
280 suffixing it with two exclamation marks. A whitelisted interface beats
281 a blacklisted interfaces which beats a simple matched interface. For
282 example, with
283 .Em eth*,!eth1,!eth2
284 .Nm lldpd
285 will only use interfaces starting by
286 .Em eth
287 with the exception of
288 .Em eth1
289 and
290 .Em eth2 .
291 While with
292 .Em *,!eth*,!!eth1
293 .Nm
294 will use all interfaces, except interfaces starting by
295 .Em eth
296 with the exception of
297 .Em eth1 .
298 When an exact match is found, it will circumvent some tests. For example, if
299 .Em eth0.12
300 is specified, it will be accepted even if this is a VLAN interface.
301 .Ed
302
303 .Cd unconfigure
304 .Cd system interface pattern
305 .Bd -ragged -offset XXXXXX
306 Remove any previously configured interface pattern and use all
307 physical interfaces. This option undoes the previous one.
308 .Ed
309
310 .Cd configure
311 .Cd system interface permanent Ar pattern
312 .Bd -ragged -offset XXXXXX
313 Specify interfaces whose configuration is permanently kept by
314 .Nm lldpd .
315 By default,
316 .Nm lldpd
317 disregard any data about interfaces when they are removed from the
318 system (statistics, custom configuration). This option allows one to
319 specify a pattern similar to the interface pattern. If an interface
320 disappear but matches the pattern, its data is kept in memory and
321 reused if the interface reappear at some point. For example, on Linux,
322 one could use the pattern
323 .Em eth*,eno*,enp* ,
324 which should match fixed interfaces on most systems.
325 .Ed
326
327 .Cd unconfigure
328 .Cd system interface permanent
329 .Bd -ragged -offset XXXXXX
330 Remove any previously configured permanent interface pattern. Any
331 interface removed from the system will be forgotten. This option
332 undoes the previous one.
333 .Ed
334
335 .Cd configure
336 .Cd system interface description
337 .Bd -ragged -offset XXXXXX
338 Some OS allows the user to set a description for an interface. Setting
339 this option will enable
340 .Nm lldpd
341 to override this description with the name of the peer neighbor if one
342 is found or with the number of neighbors found.
343 .Ed
344
345 .Cd unconfigure
346 .Cd system interface description
347 .Bd -ragged -offset XXXXXX
348 Do not update interface description with the name of the peer
349 neighbor. This option undoes the previous one.
350 .Ed
351
352 .Cd configure
353 .Cd system interface promiscuous
354 .Bd -ragged -offset XXXXXX
355 Enable promiscuous mode on managed interfaces.
356 .Pp
357 When the interface is not managed any more (or when quitting
358 .Nm lldpd ) ,
359 the interface is left in promiscuous mode as it is difficult to know
360 if someone else also put the interface in promiscuous mode.
361 .Pp
362 This option is known to be useful when the remote switch is a Cisco
363 2960 and the local network card features VLAN hardware
364 acceleration. In this case, you may not receive LLDP frames from the
365 remote switch. The most plausible explanation for this is the frame is
366 tagged with some VLAN (usually VLAN 1) and your network card is
367 filtering VLAN. This is not the only available solution to work-around
368 this problem. If you are concerned about performance issues, you can
369 also tag the VLAN 1 on each interface instead.
370 .Pp
371 Currently, this option has no effect on anything else than Linux. On
372 other OS, either disable VLAN acceleration, tag VLAN 1 or enable
373 promiscuous mode manually on the interface.
374 .Ed
375
376 .Cd unconfigure
377 .Cd system interface promiscuous
378 .Bd -ragged -offset XXXXXX
379 Do not set promiscuous mode on managed interfaces. This option does
380 not disable promiscuous mode on interfaces already using this mode.
381 .Ed
382
383 .Cd configure
384 .Cd system ip management pattern Ar pattern
385 .Bd -ragged -offset XXXXXX
386 Specify the management addresses of this system. As for interfaces
387 (described above), this option can use wildcards and inversions.
388 Without this option, the first IPv4 and the first IPv6 are used. If an
389 exact IP address is provided, it is used as a management address
390 without any check. If only negative patterns are provided, only one
391 IPv4 and one IPv6 addresses are chosen. Otherwise, many of them can be
392 selected. If you want to blacklist IPv6 addresses, you can use
393 .Em !*:* .
394 If an interface name is matched, the first IPv4 address and the first
395 IPv6 address associated to this interface will be chosen.
396 .Ed
397
398 .Cd unconfigure
399 .Cd system ip management pattern
400 .Bd -ragged -offset XXXXXX
401 Unset any specific pattern for matching management addresses. This
402 option undoes the previous one.
403 .Ed
404
405 .Cd configure
406 .Cd system bond-slave-src-mac-type Ar value
407 .Bd -ragged -offset XXXXXX
408 Set the type of src mac in lldp frames sent on bond slaves
409
410 Valid types are:
411 .Bl -tag -width "XXX." -compact -offset XX
412 .It Sy real
413 Slave real mac
414 .It Sy zero
415 All zero mac
416 .It Sy fixed
417 An arbitrary fixed value
418 .Li ( 00:60:08:69:97:ef )
419 .It Sy local
420 Real mac with locally administered bit set. If the real mac already
421 has the locally administered bit set, fallback to the fixed value.
422 .El
423 .Pp
424 Default value for
425 .Nm bond-slave-src-mac-type
426 is
427 .Nm local .
428 Some switches may complain when using one of the two other possible
429 values (either because
430 .Li 00:00:00:00:00:00
431 is not a valid MAC or because the MAC address is flapping from one
432 port to another). Using
433 .Sy local
434 might lead to a duplicate MAC address on the network (but this is
435 quite unlikely).
436 .Ed
437
438 .Cd configure
439 .Cd system max-neighbors Ar neighbors
440 .Bd -ragged -offset XXXXXX
441 Change the maximum number of neighbors accepted (for each protocol) on
442 an interface. This is a global value. The default is 32. This setting
443 only applies to future neighbors.
444 .Ed
445
446 .Cd configure
447 .Cd lldp agent-type
448 .Cd nearest-bridge | nearest-non-tpmr-bridge | nearest-customer-bridge
449 .Bd -ragged -offset XXXXXX
450 The destination MAC address used to send LLDPDU allows an agent to
451 control the propagation of LLDPDUs. By default, the
452 .Li 01:80:c2:00:00:0e
453 MAC address is used and limit the propagation of the LLDPDU to the
454 nearest bridge
455 .Cd ( nearest-bridge ) .
456 To instruct
457 .Nm lldpd
458 to use the
459 .Li 01:80:c2:00:00:03
460 MAC address instead, use
461 .Cd nearest-nontpmr-bridge
462 instead.
463 To use the
464 .Li 01:80:c2:00:00:00
465 MAC address instead, use
466 .Cd nearest-customer-bridge
467 instead.
468 .Ed
469
470 .Cd configure
471 .Cd lldp portidsubtype
472 .Cd ifname | macaddress
473 .Pp
474 .Cd configure
475 .Op ports Ar ethX Op ,...
476 .Cd lldp portidsubtype
477 .Cd local Ar value
478 .Bd -ragged -offset XXXXXX
479 Force port ID subtype. By default,
480 .Nm lldpd
481 will use the MAC address as port identifier and the interface name as
482 port description, unless the interface has an alias. In this case, the
483 interface name will be used as port identifier and the description
484 will be the interface alias. With this command, you can force the port
485 identifier to be the interface name (with
486 .Cd ifname ) ,
487 the MAC address (with
488 .Cd macaddress )
489 or a local value (with
490 .Cd value ) .
491 In the latest case, the local value should be provided.
492 .Ed
493
494 .Cd configure
495 .Op ports Ar ethX Op ,...
496 .Cd lldp portdescription
497 .Cd Ar description
498 .Bd -ragged -offset XXXXXX
499 Force port description to the provided string.
500 .Ed
501
502 .Cd configure
503 .Cd lldp tx-interval Ar interval
504 .Bd -ragged -offset XXXXXX
505 Change transmit delay to the specified value in seconds. The transmit
506 delay is the delay between two transmissions of LLDP PDU. The default
507 value is 30 seconds.
508 .Ed
509
510 .Cd configure
511 .Cd lldp tx-hold Ar hold
512 .Bd -ragged -offset XXXXXX
513 Change transmit hold value to the specified value. This value is used
514 to compute the TTL of transmitted packets which is the product of this
515 value and of the transmit delay. The default value is 4 and therefore
516 the default TTL is 120 seconds.
517 .Ed
518
519 .Cd configure
520 .Op ports Ar ethX Op ,...
521 .Cd lldp
522 .Cd status Ar rx-and-tx | rx-only | tx-only | disabled
523 .Bd -ragged -offset XXXXXX
524 Configure the administrative status of the given port. By default, all
525 ports are configured to be in
526 .Ar rx-and-tx
527 mode. This means they can receive and transmit LLDP frames (as well as
528 other protocols if needed). In
529 .Ar rx-only
530 mode, they won't emit any frames and in
531 .Ar tx-only
532 mode, they won't receive any frames. In
533 .Ar disabled
534 mode, no frame will be sent and any incoming frame will be
535 discarded. This setting does not override the operational mode of the
536 main daemon. If it is configured in receive-only mode (with the
537 .Fl r
538 flag), setting any transmit mode won't have any effect.
539 .Ed
540
541 .Cd configure
542 .Cd lldp custom-tlv
543 .Op Cd add | replace
544 .Cd oui Ar oui
545 .Cd subtype Ar subtype
546 .Op Cd oui-info Ar content
547 .Bd -ragged -offset XXXXXX
548 Emit a custom TLV for OUI
549 .Ar oui ,
550 with subtype
551 .Ar subtype
552 and optionally with the bytes specified in
553 .Ar content .
554 Both
555 .Ar oui
556 and
557 .Ar content
558 should be a comma-separated list of bytes in hex format.
559 .Ar oui
560 must be exactly 3-byte long.
561 If
562 .Ar add
563 is specified then the TLV will be added. This is the default action.
564 If
565 .Ar replace
566 is specified then all TLVs with the same
567 .Ar oui
568 and
569 .Ar subtype
570 will be replaced.
571
572 .Ed
573
574 .Cd unconfigure
575 .Cd lldp custom-tlv
576 .Op Cd oui Ar oui
577 .Op Cd subtype Ar subtype
578 .Bd -ragged -offset XXXXXX
579 When no oui is specified, remove all previously configured custom TLV.
580 When OUI
581 .Ar oui
582 and subtype
583 .Ar subtype
584 is specified, remove specific instances of custom TLV.
585 .Ed
586
587 .Cd configure med fast-start
588 .Cd enable | tx-interval Ar interval
589 .Bd -ragged -offset XXXXXX
590 Configure LLDP-MED fast start mechanism. When a new LLDP-MED-enabled
591 neighbor is detected, fast start allows
592 .Nm lldpd
593 to shorten the interval between two LLDPDU.
594 .Cd enable
595 should enable LLDP-MED fast start while
596 .Cd tx-interval
597 specifies the interval between two LLDPDU in seconds. The default
598 interval is 1 second. Once 4 LLDPDU have been sent, the fast start
599 mechanism is disabled until a new neighbor is detected.
600 .Ed
601
602 .Cd unconfigure med fast-start
603 .Bd -ragged -offset XXXXXX
604 Disable LLDP-MED fast start mechanism.
605 .Ed
606
607 .Cd configure
608 .Op ports Ar ethX Op ,...
609 .Cd med location coordinate
610 .Cd latitude Ar latitude
611 .Cd longitude Ar longitude
612 .Cd altitude Ar altitude Ar unit
613 .Cd datum Ar datum
614 .Bd -ragged -offset XXXXXX
615 Advertise a coordinate based location on the given ports (or on all
616 ports if no port is specified). The format of
617 .Ar latitude
618 is a decimal floating point number followed either by
619 .Em N
620 or
621 .Em S .
622 The format of
623 .Ar longitude
624 is a decimal floating point number followed either by
625 .Em E
626 or
627 .Em W .
628 .Ar altitude
629 is a decimal floating point number followed either by
630 .Em m
631 when expressed in meters or
632 .Em f
633 when expressed in floors. A space is expected between the floating
634 point number and the unit.
635 .Ar datum
636 is one of those values:
637 .Bl -bullet -compact -offset XXXXXXXX
638 .It
639 WGS84
640 .It
641 NAD83
642 .It
643 NAD83/MLLW
644 .El
645 .Pp
646 A valid use of this command is:
647 .D1 configure ports eth0 med location coordinate latitude 48.85667N longitude 2.2014E altitude 117.47 m datum WGS84
648 .Ed
649
650 .Cd configure
651 .Op ports Ar ethX Op ,...
652 .Cd med location address
653 .Cd country Ar country
654 .Cd Op Ar type value Op ...
655 .Bd -ragged -offset XXXXXX
656 Advertise a civic address on the given ports (or on all ports if no
657 port is specified).
658 .Ar country
659 is the two-letter code representing the country. The remaining
660 arguments should be paired to form the address. The first member of
661 each pair indicates the type of the second member which is a free-form
662 text. Here is the list of valid types:
663 .Bl -bullet -compact -offset XXXXXXXX
664 .It
665 language
666 .It
667 country-subdivision
668 .It
669 county
670 .It
671 city
672 .It
673 city-division
674 .It
675 block
676 .It
677 street
678 .It
679 direction
680 .It
681 trailing-street-suffix
682 .It
683 street-suffix
684 .It
685 number
686 .It
687 number-suffix
688 .It
689 landmark
690 .It
691 additional
692 .It
693 name
694 .It
695 zip
696 .It
697 building
698 .It
699 unit
700 .It
701 floor
702 .It
703 room
704 .It
705 place-type
706 .It
707 script
708 .El
709 .Pp
710 A valid use of this command is:
711 .D1 configure ports eth1 med location address country US street Qo Commercial Road Qc city Qo Roseville Qc
712 .Ed
713
714 .Cd configure
715 .Op ports Ar ethX Op ,...
716 .Cd med location elin
717 .Ar number
718 .Bd -ragged -offset XXXXXX
719 Advertise the availability of an ELIN number. This is used for setting
720 up emergency call. If the provided number is too small, it will be
721 padded with 0. Here is an example of use:
722 .D1 configure ports eth2 med location elin 911
723 .Ed
724
725 .Cd configure
726 .Op ports Ar ethX Op ,...
727 .Cd med policy
728 .Cd application Ar application
729 .Op Cd unknown
730 .Op Cd tagged
731 .Op Cd vlan Ar vlan
732 .Op Cd priority Ar priority
733 .Op Cd dscp Ar dscp
734 .Bd -ragged -offset XXXXXX
735 Advertise a specific network policy for the given ports (or for all
736 ports if no port was provided). Only the application type is
737 mandatory.
738 .Ar application
739 should be one of the following values:
740 .Bl -bullet -compact -offset XXXXXXXX
741 .It
742 voice
743 .It
744 voice-signaling
745 .It
746 guest-voice
747 .It
748 guest-voice-signaling
749 .It
750 softphone-voice
751 .It
752 video-conferencing
753 .It
754 streaming-video
755 .It
756 video-signaling
757 .El
758 .Pp
759 The
760 .Cd unknown
761 flag tells that the network policy for the specified application type
762 is required by the device but is currently unknown. This is used by
763 Endpoint Devices, not by Network Connectivity Devices. If not
764 specified, the network policy for the given application type is
765 defined.
766 .Pp
767 When a VLAN is specified with
768 .Ar vlan
769 tells which 802.1q VLAN ID has to be advertised for the network
770 policy. A valid value is between 1 and 4094.
771 .Cd tagged
772 tells the VLAN should be tagged for the specified application type.
773 .Pp
774 .Ar priority
775 allows one to specify IEEE 802.1d / IEEE 802.1p Layer 2 Priority, also
776 known as Class of Service (CoS), to be used for the specified
777 application type. This field is usually ignored if no VLAN is
778 specified. The names match 802.1D-2004 standard (table G-2). Some more
779 recent standards may use different labels. Only the numeric values
780 should be relied upon. The accepted labels are:
781 .Bl -tag -width "X." -compact -offset XXXX
782 .It Sy 1
783 background
784 .It Sy 0
785 best-effort
786 .It Sy 2
787 excellent-effort
788 .It Sy 3
789 critical-applications
790 .It Sy 4
791 video
792 .It Sy 5
793 voice
794 .It Sy 6
795 internetwork-control
796 .It Sy 7
797 network-control
798 .El
799 .Pp
800 .Ar dscp
801 represents the DSCP value to be advertised for the given network
802 policy. DiffServ/Differentiated Services Code Point (DSCP) value as
803 defined in IETF RFC 2474 for the specified application type. Value: 0
804 (default per RFC 2475) through 63. Note: The class selector DSCP
805 values are backwards compatible for devices that only support the old
806 IP precedence Type of Service (ToS) format. (See the RFCs for what
807 these values mean)
808 .Pp
809 A valid use of this command is:
810 .D1 configure med policy application voice vlan 500 priority voice dscp 46
811 .Ed
812
813 .Cd configure
814 .Op ports Ar ethX Op ,...
815 .Cd med power pse | pd
816 .Cd source Ar source
817 .Cd priority Ar priority
818 .Cd value Ar value
819 .Bd -ragged -offset XXXXXX
820 Advertise the LLDP-MED POE-MDI TLV for the given ports or for all
821 interfaces if no port is provided. One can act as a PD (power
822 consumer) or a PSE (power provider). No check is done on the validity
823 of the parameters while LLDP-MED requires some restrictions:
824 .Bl -bullet
825 .It
826 PD shall never request more power than physical 802.3af class.
827 .It
828 PD shall never draw more than the maximum power advertised by PSE.
829 .It
830 PSE shall not reduce power allocated to PD when this power is in use.
831 .It
832 PSE may request reduced power using conservation mode
833 .It
834 Being PSE or PD is a global parameter, not a per-port parameter.
835 .Nm
836 does not enforce this: a port can be set as PD or PSE. LLDP-MED also
837 requires for a PSE to only have one power source (primary or
838 backup). Again,
839 .Nm
840 does not enforce this. Each port can have its own power source. The
841 same applies for PD and power priority. LLDP-MED MIB does not allow
842 this kind of representation.
843 .El
844 .Pp
845 Valid types are:
846 .Bl -tag -width "XXX." -compact -offset XX
847 .It Sy pse
848 Power Sourcing Entity (power provider)
849 .It Sy pd
850 Power Device (power consumer)
851 .El
852 .Pp
853 Valid sources are:
854 .Bl -tag -width "XXXXXXX" -compact -offset XX
855 .It Sy unknown
856 Unknown
857 .It Sy primary
858 For PSE, the power source is the primary power source.
859 .It Sy backup
860 For PSE, the power source is the backup power source or a power
861 conservation mode is asked (the PSE may be running on UPS for
862 example).
863 .It Sy pse
864 For PD, the power source is the PSE.
865 .It Sy local
866 For PD, the power source is a local source.
867 .It Sy both
868 For PD, the power source is both the PSE and a local source.
869 .El
870 .Pp
871 Valid priorities are:
872 .Bl -tag -width "XXXXXXXXX" -compact -offset XX
873 .It Sy unknown
874 Unknown priority
875 .It Sy critical
876 Critical
877 .It Sy high
878 High
879 .It Sy low
880 Low
881 .El
882 .Pp
883 .Ar value
884 should be the total power in milliwatts required by the PD device or
885 available by the PSE device.
886 .Pp
887 Here is an example of use:
888 .D1 configure med power pd source pse priority high value 5000
889 .Ed
890
891 .Cd configure
892 .Op ports Ar ethX Op ,...
893 .Cd dot3 power pse | pd
894 .Op Cd supported
895 .Op Cd enabled
896 .Op Cd paircontrol
897 .Cd powerpairs Ar powerpairs
898 .Op Cd class Ar class
899 .Op Cd type Ar type Cd source Ar source Cd priority Ar priority Cd requested Ar requested Cd allocated Ar allocated
900 .Bd -ragged -offset XXXXXX
901 Advertise Dot3 POE-MDI TLV for the given port or for all ports if none
902 was provided. One can act as a PD (power consumer) or a PSE (power
903 provider). This configuration is distinct of the configuration of the
904 transmission of the LLDP-MED POE-MDI TLV but the user should ensure
905 the coherency of those two configurations if they are used together.
906 .Pp
907 .Ar supported
908 means that MDI power is supported on the given port while
909 .Ar enabled
910 means that MDI power is enabled.
911 .Ar paircontrol
912 is used to indicate if pair selection can be controlled. Valid values
913 for
914 .Ar powerpairs
915 are:
916 .Bl -tag -width "XXXXXX" -compact -offset XX
917 .It Sy signal
918 The signal pairs only are in use.
919 .It Sy spare
920 The spare pairs only are in use.
921 .El
922 .Pp
923 When specified,
924 .Ar class
925 is a number between 0 and 4.
926 .Pp
927 The remaining parameters are in conformance with 802.3at and are optional.
928 .Ar type
929 should be either 1 or 2, indicating which if the device conforms to
930 802.3at type 1 or 802.3at type 2. Values of
931 .Ar source
932 and
933 .Ar priority
934 are the same as for LLDP-MED POE-MDI TLV.
935 .Ar requested
936 and
937 .Ar allocated
938 are expressed in milliwats.
939 .Pp
940 Here are two valid uses of this command:
941 .D1 configure ports eth3 dot3 power pse supported enabled paircontrol powerpairs spare class class-3
942 .D1 configure dot3 power pd supported enabled powerpairs spare class class-3 type 1 source pse priority low requested 10000 allocated 15000
943 .Ed
944
945 .Cd pause
946 .Bd -ragged -offset XXXXXX
947 Pause
948 .Nm lldpd
949 operations.
950 .Nm lldpd
951 will not send any more frames or receive ones. This can be undone with
952 .Cd resume
953 command.
954 .Ed
955
956 .Cd resume
957 .Bd -ragged -offset XXXXXX
958 Resume
959 .Nm lldpd
960 operations.
961 .Nm lldpd
962 will start to send and receive frames. This command is issued
963 internally after processing configuration but can be used at any time
964 if a manual
965 .Cd pause
966 command is issued.
967 .Ed
968
969 .Ed
970 .Sh FILES
971 .Bl -tag -width "@LLDPD_CTL_SOCKET@XX" -compact
972 .It @LLDPD_CTL_SOCKET@
973 Unix-domain socket used for communication with
974 .Xr lldpd 8 .
975 .El
976 .Sh SEE ALSO
977 .Xr lldpd 8
978 .Sh AUTHORS
979 .An -nosplit
980 The
981 .Nm
982 program was written by
983 .An Vincent Bernat Aq bernat@luffy.cx .