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