NAME¶
lldpctl —
control LLDP daemon
SYNOPSIS¶
lldpctl |
[-d]
[-L
location]
[-P
policy]
[-O poe]
[-o poe]
[interface ...] |
DESCRIPTION¶
The
lldpctl program controls
lldpd(8)
daemon.
When no specific option is given,
lldpctl displays the list of
discovered neighbors along with some of their advertised capabilities. If some
interfaces are given, only those interfaces will be displayed.
The options are as follows:
- -d
- Enable more debugging information.
- -f
format
- Choose the output format. Currently
plain, xml and
keyvalue formats are available. The default is
plain.
- -L
location
- Enable the transmission of LLDP-MED location TLV for the
given interfaces. This option can be repeated several times to enable the
transmission of the location in several formats. Several formats are
accepted:
- Coordinate
based location
- The format of location is
1:48.85667:N:2.2014:E:117.47:m:1 The first digit
is always 1. It is followed by the latitude, a
letter for the direction ( E or
W for East or West), the longitude and a letter
for the direction ( N or S
). The next figure is the altitude. It can be expressed in meters (the
next letter is then m ) or in floors (the letter
should be f ). The last digit is the datum. It
can either be 1 (WGS84), 2
(NAD83) or 3 (NAD83/MLLW).
- Civic
address
- The location can be expressed as an address. The format
of the location is then 2:FR:6:Commercial
Rd:3:Roseville:19:4 The first digit is always
2. The next two letters are the country code.
Then, arguments are paired to form the address. The first member of
the pair is a digit indicating the type of the second member. Here is
the list of valid types:
- 0
- Language
- 1
- National subdivisions
- 2
- County, parish, district
- 3
- City, township
- 4
- City division, borough, ward
- 5
- Neighborhood, block
- 6
- Street
- 16
- Leading street direction
- 17
- Trailing street suffix
- 18
- Street suffix
- 19
- House number
- 20
- House number suffix
- 21
- Landmark or vanity address
- 22
- Additional location info
- 23
- Name
- 24
- Postal/ZIP code
- 25
- Building
- 26
- Unit
- 27
- Floor
- 28
- Room number
- 29
- Place type
- 128
- Script
- ECS ELIN
- This is a numerical string using for setting up
emergency call. The format of the location is then the following:
3:0000000911 where the first digit should be
3 and the second argument is the ELIN
number.
When setting a location for a given port, all previous locations are erased.
To erase all location, just use the empty string. There is currently no
way to get the location from the command line.
- -P
policy
- Enable the transmission of LLDP-MED Network Policy TLVs for
the given interfaces. This option can be repeated several times to specify
different policies. Format (without spaces!):
App-Type : U :
T : VLAN-ID :
L2-Prio : DSCP
- App-Type
- Valid application types (see ANSI/TIA-1057 table 12):
- 1
- Voice
- 2
- Voice Signaling
- 3
- Guest Voice
- 4
- Guest Voice Signaling
- 5
- Softphone Voice
- 6
- Video Conferencing
- 7
- Streaming Video
- 8
- Video Signaling
- U
- Unknown Policy Flag.
- 0
- Network policy for the specified application type
is defined.
- 1
- Network policy for the specified application type
is required by the device but is currently unknown. This is used
by Endpoint Devices, not by Network Connectivity Devices.
- T
- Tagged Flag.
- 0
- Untagged VLAN. In this case the VLAN ID and the
Layer 2 Priority are ignored and only the DSCP value has
relevance.
- 1
- Tagged VLAN.
- VLAN-ID
- IEEE 802.1q VLAN ID (VID). A value of 1 through 4094
defines a VLAN ID. A value of 0 means that only the priority level is
significant.
- L2-Prio
- IEEE 802.1d / IEEE 802.1p Layer 2 Priority, also known
as Class of Service (CoS), to be used for the specified application
type.
- 1
- Background
- 2
- Spare
- 0
- Best Effort (default)
- 3
- Excellent Effort
- 4
- Controlled Load
- 5
- Video
- 6
- Voice
- 7
- Network Control
- DSCP
- DiffServ/Differentiated Services Code Point (DSCP)
value as defined in IETF RFC 2474 for the specified application type.
Value: 0 (default per RFC 2475) through 63. Note: The class selector
DSCP values are backwards compatible for devices that only support the
old IP precedence Type of Service (ToS) format. (See the RFCs for what
these values mean.)
- Examples:
-
- 1:0:1:500:6:46
- Voice (1): not unknown (0), tagged (1), VLAN-ID
500, l2 prio Voice (6), DSCP 46 (EF, Expedited Forwarding)
- 2:0:1:500:3:24
- Voice Signaling (2): not unknown (0), tagged (1),
VLAN-ID 500, l2 prio Excellent Effort (3), DSCP 24 (CS3, Class
Selector 3)
- -O
poe
- Enable the transmission of LLDP-MED POE-MDI TLV for the
given interfaces. One can act as a PD (power consumer) or a PSE (power
provider). No check is done on the validity of the parameters while
LLDP-MED requires some restrictions:
- PD shall never request more power than physical
802.3af class.
- PD shall never draw more than the maximum power
advertised by PSE.
- PSE shall not reduce power allocated to PD when this
power is in use.
- PSE may request reduced power using conservation
mode
- Being PSE or PD is a global paremeter, not a
per-port parameter. lldpctl does not enforce this: a
port can be set as PD or PSE. LLDP-MED also requires for a PSE to only
have one power source (primary or backup). Again,
lldpctl does not enforce this. Each port can have
its own power source. The same applies for PD and power priority.
LLDP-MED MIB does not allow this kind of representation.
This option is distinct of -o option. You may want to use
both options at the same time.
The format of this option is (without spaces):
type : source :
priority : value
- type
- Valid types are:
- PSE
- Power Sourcing Entity (power provider)
- PD
- Power Device (power consumer)
- source
- Valid sources are:
- 0
- Unknown
- 1
- For PD, the power source is the PSE. For PSE, the
power source is the primary power source.
- 2
- For PD, the power source is a local source. For
PSE, the power source is the backup power source or a power
conservation mode is asked (the PSE may be running on UPS for
example).
- 3
- For PD, the power source is both the PSE and a
local source. For PSE, this value should not be used.
- priority
- Four priorities are available:
- 0
- Unknown priority
- 1
- Critical
- 2
- High
- 3
- Low
- value
- For PD, the power value is the total power in tenth of
watts required by a PD device from the PSE device. This value should
range from 0 to 1023 tenth of watts.
- -o
poe
- Enable the transmission of Dot3 POE-MDI TLV for the given
interfaces. One can act as a PD (power consumer) or a PSE (power
provider). This option is distinct of the -O option. You
might want to use both. Contrary to LLDP-MED POE-MDI TLV, Dot3 POE-MDI TLV
are strictly per-port values.
The format of this option is (without spaces):
type : supported :
enabled : paircontrol :
powerpairs : class [ :
powertype : source :
priority : requested :
allocated ]
- type
- Valid types are:
- PSE
- Power Sourcing Entity (power provider)
- PD
- Power Device (power consumer)
- powerpairs
- Valid sources are:
- 1
- The signal pairs only are in use.
- 2
- The spare pairs only are in use.
- class
- Five classes are available:
- 1
- class 0
- 2
- class 1
- 3
- class 2
- 4
- class 3
- 5
- class 4
- 0
- no class
supported, enabled and
paircontrol can be set to to 0 or 1.
supported means that MDI power is supported on the
given port. enabled means that MDI power is enabled
on the given port. paircontrol is used to indicate
if the pair selection can be controlled on the given port.
powertype, source,
priority (and remaining values) are optional. They
are only requested in conformance with 802.3at. type
should be either 1 or 2. For the possible values of the next two fields,
see the possible values of source and
priority for LLDP-MED MDI/POE.
requested and allocated are
respectively the PD requested power value and the PSE allocated power
value. This should be expressed in tenth of watts from 1 to 255.
FILES¶
- /var/run/lldpd.socket
- Unix-domain socket used for communication with
lldpd(8).
SEE ALSO¶
lldpd(8)
AUTHORS¶
The
lldpctl program was written by
Vincent
Bernat ⟨bernat@luffy.cx⟩.