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