]>
Commit | Line | Data |
---|---|---|
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 | |
0262adbb | 26 | .Op Fl u Ar file |
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 | |
0262adbb | 32 | .Op Fl u Ar file |
fe80711e VB |
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. | |
0262adbb ZM |
52 | .It Fl u |
53 | Specify the Unix-domain socket used for communication with | |
54 | .Xr lldpd 8 . | |
fe80711e VB |
55 | .It Fl v |
56 | Show | |
57 | .Nm | |
58 | version. | |
59 | .It Fl f Ar format | |
60 | Choose the output format. Currently | |
61 | .Em plain , | |
62 | .Em xml , | |
63 | .Em json | |
64 | and | |
65 | .Em keyvalue | |
66 | formats are available. The default is | |
67 | .Em plain . | |
6402fd2c VB |
68 | .It Fl c Ar file |
69 | Read the given configuration file. This option may be repeated several | |
70 | times. If a directory is provided, each file contained in it will be | |
71 | read if ending by | |
72 | .Li .conf . | |
73 | Order is alphabetical. | |
fe80711e | 74 | .El |
fe80711e VB |
75 | .Pp |
76 | When invoked as | |
77 | .Nm lldpctl , | |
78 | .Nm | |
79 | will display detailed information about each neighbors on the | |
80 | specified interfaces or on all interfaces if none are specified. This | |
81 | command is mostly kept for backward compatibility with older versions. | |
fe80711e VB |
82 | .Pp |
83 | The following commands are supported by | |
84 | .Nm . | |
85 | When there is no ambiguity, the keywords can be abbreviated. For | |
86 | example, | |
87 | .Cd show neighbors ports eth0 summary | |
88 | and | |
89 | .Cd sh neigh p eth0 sum | |
90 | are the same command. | |
fe80711e VB |
91 | .Bd -ragged -offset XX |
92 | .Cd exit | |
93 | .Bd -ragged -offset XXXXXX | |
94 | Quit | |
95 | .Nm . | |
96 | .Ed | |
97 | ||
72706acd VB |
98 | .Cd help Op ... |
99 | .Bd -ragged -offset XXXXXX | |
100 | Display general help or help about a command. Also, you can get help | |
101 | using the completion or by pressing the | |
102 | .Ic ? | |
103 | key. However, completion and inline help may be unavailable if | |
104 | .Nm | |
105 | was compiled without readline support but | |
106 | .Cd help | |
107 | command is always available. | |
108 | .Ed | |
109 | ||
fe80711e | 110 | .Cd show neighbors |
97772619 | 111 | .Op ports Ar ethX Op ,... |
fe80711e VB |
112 | .Op Cd details | summary |
113 | .Op Cd hidden | |
114 | .Bd -ragged -offset XXXXXX | |
115 | Display information about each neighbor known by | |
116 | .Xr lldpd 8 | |
117 | daemon. With | |
118 | .Cd summary , | |
119 | only a the name and the port description of each remote host will be | |
120 | displayed. On the other hand, with | |
121 | .Cd details , | |
122 | all available information will be displayed, giving a verbose | |
123 | view. When using | |
124 | .Cd hidden , | |
125 | also display remote ports hidden by the smart filter. When specifying | |
126 | one or several ports, the information displayed is limited to the | |
127 | given list of ports. | |
128 | .Ed | |
129 | ||
130 | .Cd watch | |
97772619 | 131 | .Op ports Ar ethX Op ,... |
fe80711e VB |
132 | .Op Cd details | summary |
133 | .Op Cd hidden | |
134 | .Bd -ragged -offset XXXXXX | |
135 | Watch for any neighbor changes and report them as soon as they | |
136 | happen. When specifying ports, the changes are only reported when | |
137 | happening on the given ports. | |
138 | .Cd hidden , summary | |
139 | and | |
140 | .Cd details | |
141 | have the same meaning than previously described. | |
142 | .Ed | |
143 | ||
144 | .Cd show configuration | |
145 | .Bd -ragged -offset XXXXXX | |
146 | Display global configuration of | |
147 | .Xr lldpd 8 | |
148 | daemon. | |
149 | .Ed | |
150 | ||
885aa4f4 VB |
151 | .Cd show statistics |
152 | .Op ports Ar ethX Op ,... | |
153 | .Op Cd summary | |
154 | .Bd -ragged -offset XXXXXX | |
155 | Report LLDP-related statistics, like the number of LLDPDU transmitted, | |
156 | received, discarded or unrecognized. When specifying ports, only the | |
157 | statistics from the given port are reported. With | |
158 | .Cd summary | |
159 | the statistics of each port is summed. | |
160 | .Ed | |
161 | ||
fe80711e VB |
162 | .Cd update |
163 | .Bd -ragged -offset XXXXXX | |
164 | Make | |
165 | .Xr lldpd 8 | |
166 | update its information and send new LLDP PDU on all interfaces. | |
167 | .Ed | |
168 | ||
decaec0d VB |
169 | .Cd configure |
170 | .Cd system description Ar description | |
171 | .Bd -ragged -offset XXXXXX | |
172 | Override chassis description with the provided value instead of using | |
173 | kernel name, node name, kernel version, build date and architecture. | |
174 | .Ed | |
175 | ||
3f70e118 VB |
176 | .Cd configure |
177 | .Cd system platform Ar description | |
178 | .Bd -ragged -offset XXXXXX | |
179 | Override platform description with the provided value instead of using | |
180 | kernel name. This value is currently only used for CDP. | |
181 | .Ed | |
182 | ||
f88442ac | 183 | .Cd configure |
48d0a4b0 | 184 | .Cd system interface pattern Ar pattern |
0093777b | 185 | .Bd -ragged -offset XXXXXX |
48d0a4b0 | 186 | Set the pattern of valid interfaces to use. When not set, |
0093777b VB |
187 | .Nm lldpd |
188 | will listen on all available interfaces. This option can use | |
189 | wildcards. Several interfaces can be specified separated by commas. | |
190 | It is also possible to blacklist an interface by suffixing it with an | |
191 | exclamation mark. When an interface is both specified with and without | |
192 | an exclamation mark, it is blacklisted. For example, with | |
193 | .Em eth*,!eth1,!eth2 | |
194 | .Nm lldpd | |
195 | will only listen to interfaces starting by | |
196 | .Em eth | |
197 | with the exception of | |
198 | .Em eth1 | |
199 | and | |
200 | .Em eth2 . | |
201 | .Ed | |
202 | ||
48d0a4b0 VB |
203 | .Cd configure |
204 | .Cd lldp tx-interval Ar interval | |
205 | .Bd -ragged -offset XXXXXX | |
206 | Change transmit delay to the specified value in seconds. The transmit | |
207 | delay is the delay between two transmissions of LLDP PDU. The default | |
208 | value is 30 seconds. | |
209 | .Ed | |
210 | ||
211 | .Cd configure | |
212 | .Cd lldp tx-hold Ar hold | |
213 | .Bd -ragged -offset XXXXXX | |
214 | Change transmit hold value to the specified value. This value is used | |
215 | to compute the TTL of transmitted packets which is the product of this | |
216 | value and of the transmit delay. The default value is 4 and therefore | |
217 | the default TTL is 120 seconds. | |
218 | .Ed | |
219 | ||
486a6133 VB |
220 | .Cd configure med fast-start |
221 | .Cd enable | tx-interval Ar interval | |
222 | .Bd -ragged -offset XXXXXX | |
223 | Configure LLDP-MED fast start mechanism. When a new LLDP-MED-enabled | |
224 | neighbor is detected, fast start allows | |
225 | .Nm lldpd | |
226 | to shorten the interval between two LLDPDU. | |
227 | .Cd enable | |
228 | should enable LLDP-MED fast start while | |
229 | .Cd tx-interval | |
230 | specifies the interval between two LLDPDU in seconds. The default | |
231 | interval is 1 second. Once 4 LLDPDU have been sent, the fast start | |
232 | mechanism is disabled until a new neighbor is detected. | |
233 | .Ed | |
234 | ||
235 | .Cd unconfigure med fast-start | |
236 | .Bd -ragged -offset XXXXXX | |
237 | Disable LLDP-MED fast start mechanism. | |
238 | .Ed | |
239 | ||
fe80711e | 240 | .Cd configure |
97772619 | 241 | .Op ports Ar ethX Op ,... |
fe80711e VB |
242 | .Cd med location coordinate |
243 | .Cd latitude Ar latitude | |
244 | .Cd longitude Ar longitude | |
245 | .Cd altitude Ar altitude Ar unit | |
246 | .Cd datum Ar datum | |
247 | .Bd -ragged -offset XXXXXX | |
248 | Advertise a coordinate based location on the given ports (or on all | |
249 | ports if no port is specified). The format of | |
250 | .Ar latitude | |
251 | is a decimal floating point number followed either by | |
252 | .Em N | |
253 | or | |
254 | .Em S . | |
255 | The format of | |
256 | .Ar longitude | |
257 | is a decimal floating point number followed either by | |
258 | .Em E | |
259 | or | |
260 | .Em W . | |
261 | .Ar altitude | |
262 | is a decimal floating point number followed either by | |
263 | .Em m | |
264 | when expressed in meters or | |
265 | .Em f | |
3fc1a10a VB |
266 | when expressed in floors. A space is expected between the floating |
267 | point number and the unit. | |
fe80711e VB |
268 | .Ar datum |
269 | is one of those values: | |
270 | .Bl -bullet -compact -offset XXXXXXXX | |
271 | .It | |
272 | WGS84 | |
273 | .It | |
274 | NAD83 | |
275 | .It | |
276 | NAD83/MLLW | |
277 | .El | |
278 | .Pp | |
279 | A valid use of this command is: | |
3fc1a10a | 280 | .D1 configure ports eth0 med location coordinate latitude 48.85667N longitude 2.2014E altitude 117.47 m datum WGS84 |
fe80711e VB |
281 | .Ed |
282 | ||
283 | .Cd configure | |
97772619 | 284 | .Op ports Ar ethX Op ,... |
fe80711e VB |
285 | .Cd med location address |
286 | .Cd country Ar country | |
287 | .Cd Op Ar type value Op ... | |
288 | .Bd -ragged -offset XXXXXX | |
289 | Advertise a civic address on the given ports (or on all ports if no | |
290 | port is specified). | |
291 | .Ar country | |
292 | is the two-letter code representing the country. The remaining | |
293 | arguments should be paired to form the address. The first member of | |
294 | each pair indicates the type of the second member which is a free-form | |
295 | text. Here is the list of valid types: | |
296 | .Bl -bullet -compact -offset XXXXXXXX | |
297 | .It | |
298 | language | |
299 | .It | |
300 | country-subdivision | |
301 | .It | |
302 | county | |
303 | .It | |
304 | city | |
305 | .It | |
306 | city-division | |
307 | .It | |
308 | block | |
309 | .It | |
310 | street | |
311 | .It | |
312 | direction | |
313 | .It | |
314 | trailing-street-suffix | |
315 | .It | |
316 | street-suffix | |
317 | .It | |
318 | number | |
319 | .It | |
320 | number-suffix | |
321 | .It | |
322 | landmark | |
323 | .It | |
324 | additional | |
325 | .It | |
326 | name | |
327 | .It | |
328 | zip | |
329 | .It | |
330 | building | |
331 | .It | |
332 | unit | |
333 | .It | |
334 | floor | |
335 | .It | |
336 | room | |
337 | .It | |
338 | place-type | |
339 | .It | |
340 | script | |
341 | .El | |
342 | .Pp | |
343 | A valid use of this command is: | |
344 | .D1 configure ports eth1 med location address US street Qo Commercial Road Qc city Qo Roseville Qc | |
345 | .Ed | |
346 | ||
347 | .Cd configure | |
97772619 | 348 | .Op ports Ar ethX Op ,... |
fe80711e VB |
349 | .Cd med location elin |
350 | .Ar number | |
351 | .Bd -ragged -offset XXXXXX | |
352 | Advertise the availability of an ELIN number. This is used for setting | |
353 | up emergency call. If the provided number is too small, it will be | |
354 | padded with 0. Here is an example of use: | |
355 | .D1 configure ports eth2 med location elin 911 | |
356 | .Ed | |
357 | ||
358 | .Cd configure | |
97772619 | 359 | .Op ports Ar ethX Op ,... |
fe80711e VB |
360 | .Cd med policy |
361 | .Cd application Ar application | |
362 | .Op Cd unknown | |
363 | .Op Cd vlan Ar vlan | |
364 | .Op Cd priority Ar priority | |
365 | .Op Cd dscp Ar dscp | |
366 | .Bd -ragged -offset XXXXXX | |
367 | Advertise a specific network policy for the given ports (or for all | |
368 | ports if no port was provided). Only the application type is | |
369 | mandatory. | |
370 | .Ar application | |
371 | should be one of the following values: | |
372 | static const struct value_string port_med_policy_map[] = { | |
373 | .Bl -bullet -compact -offset XXXXXXXX | |
374 | .It | |
375 | voice | |
376 | .It | |
377 | voice-signaling | |
378 | .It | |
379 | guest-voice | |
380 | .It | |
381 | guest-voice-signaling | |
382 | .It | |
383 | softphone-voice | |
384 | .It | |
385 | video-conferencing | |
386 | .It | |
387 | streaming-video | |
388 | .It | |
389 | video-signaling | |
390 | .El | |
391 | .Pp | |
392 | The | |
393 | .Cd unknown | |
394 | flag tells that the network policy for the specified application type | |
395 | is required by the device but is currently unknown. This is used by | |
396 | Endpoint Devices, not by Network Connectivity Devices. If not | |
397 | specified, the network policy for the given application type is | |
398 | defined. | |
399 | .Pp | |
400 | When a VLAN is specified with | |
401 | .Cd vlan | |
402 | tells which 802.1q VLAN ID has to be advertised for the network | |
403 | policy. A valid value is between 1 and 4094. | |
404 | .Cd priority | |
405 | allows one to specify IEEE 802.1d / IEEE 802.1p Layer 2 Priority, also | |
406 | known as Class of Service (CoS), to be used for the specified | |
407 | application type. It should be one of those values: | |
408 | .Bl -bullet -compact -offset XXXXXXXX | |
409 | .It | |
410 | background | |
411 | .It | |
412 | spare | |
413 | .It | |
414 | best-effort | |
415 | .It | |
416 | excellent-effort | |
417 | .It | |
418 | controlled-load | |
419 | .It | |
420 | video | |
421 | .It | |
422 | voice | |
423 | .It | |
424 | network-control | |
425 | .El | |
426 | .Pp | |
427 | .Ar dscp | |
428 | represents the DSCP value to be advertised for the given network | |
429 | policy. DiffServ/Differentiated Services Code Point (DSCP) value as | |
430 | defined in IETF RFC 2474 for the specified application type. Value: 0 | |
431 | (default per RFC 2475) through 63. Note: The class selector DSCP | |
432 | values are backwards compatible for devices that only support the old | |
433 | IP precedence Type of Service (ToS) format. (See the RFCs for what | |
434 | these values mean) | |
435 | .Pp | |
436 | A valid use of this command is: | |
437 | .D1 configure med policy application voice vlan 500 priority voice dscp 46 | |
438 | .Ed | |
439 | ||
440 | .Cd configure | |
97772619 | 441 | .Op ports Ar ethX Op ,... |
fe80711e VB |
442 | .Cd med power pse | pd |
443 | .Cd source Ar source | |
444 | .Cd priority Ar priority | |
445 | .Cd value Ar value | |
446 | .Bd -ragged -offset XXXXXX | |
447 | Advertise the LLDP-MED POE-MDI TLV for the given ports or for all | |
448 | interfaces if no port is provided. One can act as a PD (power | |
449 | consumer) or a PSE (power provider). No check is done on the validity | |
450 | of the parameters while LLDP-MED requires some restrictions: | |
451 | .Bl -bullet | |
452 | .It | |
453 | PD shall never request more power than physical 802.3af class. | |
454 | .It | |
455 | PD shall never draw more than the maximum power advertised by PSE. | |
456 | .It | |
457 | PSE shall not reduce power allocated to PD when this power is in use. | |
458 | .It | |
459 | PSE may request reduced power using conservation mode | |
460 | .It | |
461 | Being PSE or PD is a global paremeter, not a per-port parameter. | |
462 | .Nm | |
463 | does not enforce this: a port can be set as PD or PSE. LLDP-MED also | |
464 | requires for a PSE to only have one power source (primary or | |
465 | backup). Again, | |
466 | .Nm | |
467 | does not enforce this. Each port can have its own power source. The | |
468 | same applies for PD and power priority. LLDP-MED MIB does not allow | |
469 | this kind of representation. | |
470 | .El | |
471 | .Pp | |
472 | Valid types are: | |
473 | .Bl -tag -width "XXX." -compact -offset XX | |
474 | .It Sy pse | |
475 | Power Sourcing Entity (power provider) | |
476 | .It Sy pd | |
477 | Power Device (power consumer) | |
478 | .El | |
479 | .Pp | |
480 | Valid sources are: | |
481 | .Bl -tag -width "XXXXXXX" -compact -offset XX | |
482 | .It Sy unknown | |
483 | Unknown | |
484 | .It Sy primary | |
485 | For PSE, the power source is the primary power source. | |
486 | .It Sy backup | |
487 | For PSE, the power source is the backup power source or a power | |
488 | conservation mode is asked (the PSE may be running on UPS for | |
489 | example). | |
490 | .It Sy pse | |
491 | For PD, the power source is the PSE. | |
492 | .It Sy local | |
493 | For PD, the power source is a local source. | |
494 | .It Sy both | |
495 | For PD, the power source is both the PSE and a local source. | |
496 | .El | |
497 | .Pp | |
498 | Valid priorities are: | |
499 | .Bl -tag -width "XXXXXXXXX" -compact -offset XX | |
500 | .It Sy unknown | |
501 | Unknown priority | |
502 | .It Sy critical | |
503 | Critical | |
504 | .It Sy high | |
505 | High | |
506 | .It Sy low | |
507 | Low | |
508 | .El | |
509 | .Pp | |
510 | .Ar value | |
511 | should be the total power in milliwatts required by the PD device or | |
512 | available by the PSE device. | |
513 | .Pp | |
514 | Here is an example of use: | |
515 | .D1 configure med power pd source pse priority high value 5000 | |
516 | .Ed | |
517 | ||
518 | .Cd configure | |
97772619 | 519 | .Op ports Ar ethX Op ,... |
fe80711e VB |
520 | .Cd dot3 power pse | pd |
521 | .Op Cd supported | |
522 | .Op Cd enabled | |
523 | .Op Cd paircontrol | |
524 | .Cd powerpairs Ar powerpairs | |
525 | .Op Cd class Ar class | |
526 | .Op Cd type Ar type Cd source Ar source Cd priority Ar priority Cd requested Ar requested Cd allocated Ar allocated | |
527 | .Bd -ragged -offset XXXXXX | |
528 | Advertise Dot3 POE-MDI TLV for the given port or for all ports if none | |
529 | was provided. One can act as a PD (power consumer) or a PSE (power | |
530 | provider). This configuration is distinct of the configuration of the | |
531 | transmission of the LLDP-MED POE-MDI TLV but the user should ensure | |
532 | the coherency of those two configurations if they are used together. | |
533 | .Pp | |
534 | .Ar supported | |
535 | means that MDI power is supported on the given port while | |
536 | .Ar enabled | |
537 | means that MDI power is enabled. | |
538 | .Ar paircontrol | |
539 | is used to indicate if pair selection can be controlled. Valid values | |
540 | forr | |
541 | .Ar powerpairs | |
542 | are: | |
543 | .Bl -tag -width "XXXXXX" -compact -offset XX | |
544 | .It Sy signal | |
545 | The signal pairs only are in use. | |
546 | .It Sy spare | |
547 | The spare pairs only are in use. | |
548 | .El | |
549 | .Pp | |
550 | When specified, | |
551 | .Ar class | |
552 | is a number between 0 and 4. | |
553 | .Pp | |
554 | The remaining parameters are in conformance with 802.3at and are optional. | |
555 | .Ar type | |
556 | should be either 1 or 2, indicating which if the device conforms to | |
557 | 802.3at type 1 or 802.3at type 2. Values ofr | |
558 | .Ar source | |
559 | and | |
560 | .Ar priority | |
561 | are the same as for LLDP-MED POE-MDI TLV. | |
562 | .Ar requested | |
563 | and | |
564 | .Ar allocated | |
565 | are expressed in milliwats. | |
566 | .Pp | |
567 | Here are two valid uses of this command: | |
568 | .D1 configure ports eth3 dot3 power pse supported enabled paircontrol powerpairs spare class 3 | |
569 | .D1 configure dot3 power pd supported enabled powerpairs spare class 3 type 1 source pse priority low requested 10000 allocated 15000 | |
570 | .Ed | |
571 | ||
e4ff3ed5 VB |
572 | .Cd pause |
573 | .Bd -ragged -offset XXXXXX | |
574 | Pause | |
575 | .Nm lldpd | |
576 | operations. | |
577 | .Nm lldpd | |
578 | will not send any more frames or receive ones. This can be undone with | |
579 | .Cd resume | |
580 | command. | |
581 | .Ed | |
582 | ||
583 | .Cd resume | |
584 | .Bd -ragged -offset XXXXXX | |
585 | Resume | |
586 | .Nm lldpd | |
587 | operations. | |
588 | .Nm lldpd | |
589 | will start to send and receive frames. This command is issued | |
590 | internally after processing configuration but can be used at any time | |
591 | if a manual | |
592 | .Cd pause | |
593 | command is issued. | |
594 | .Ed | |
595 | ||
fe80711e VB |
596 | .Ed |
597 | .Sh FILES | |
598 | .Bl -tag -width "/var/run/lldpd.socketXX" -compact | |
599 | .It /var/run/lldpd.socket | |
600 | Unix-domain socket used for communication with | |
601 | .Xr lldpd 8 . | |
602 | .El | |
603 | .Sh SEE ALSO | |
604 | .Xr lldpd 8 | |
605 | .Sh AUTHORS | |
606 | .An -nosplit | |
607 | The | |
608 | .Nm | |
609 | program was written by | |
610 | .An Vincent Bernat Aq bernat@luffy.cx . |