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