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