|
NAMElldpcli , lldpctl —
control LLDP daemon
SYNOPSIS
DESCRIPTIONThelldpcli program controls
lldpd(8)
daemon.
When no command is specified, The options are as follows:
When invoked as The following commands are supported by
exit
Quit
lldpcli .
Display general help or help about a command. Also,
you can get help using the completion or by pressing the ? key. However,
completion and inline help may be unavailable if
lldpcli was compiled without readline support but
help command is always available.
Display information about each neighbor known by
lldpd(8)
daemon. With
summary , only the name and the port
description of each remote host will be displayed. On the other hand, with
details , all available information will be displayed,
giving a verbose view. When using hidden , also display
remote ports hidden by the smart filter. When specifying one or several ports,
the information displayed is limited to the given list of ports.
Display information about each local interface
known by
lldpd(8)
daemon. With
summary , only the name and the port
description of each local interface will be displayed. On the other hand, with
details , all available information will be displayed,
giving a verbose view. When using hidden , also display
local ports hidden by the smart filter. When specifying one or several ports,
the information displayed is limited to the given list of ports.
Display information about local chassis. With
summary , most details are skipped. On the other hand,
with details , all available information will be
displayed, giving a verbose view.
Watch for any neighbor changes and report them as
soon as they happen. When specifying ports, the changes are only reported when
happening on the given ports.
hidden ,
summary and details have the
same meaning than previously described. If limit is
specified, lldpcli will exit after receiving the
specified number of events.
Display global configuration of
lldpd(8)
daemon.
Report LLDP-related statistics, like the number of
LLDPDU transmitted, received, discarded or unrecognized. When specifying
ports, only the statistics from the given port are reported. With
summary the statistics of each port is summed.
Make
lldpd(8)
update its information and send new LLDP PDU on all interfaces.
Override system hostname with the provided value.
By default, the system name is the FQDN found from the resolved value of
uname -n . As a special value, use "." (dot)
to use the short hostname instead of a FQDN.
Do not override system hostname and restore the use
of the node name.
Override chassis description with the provided
value instead of using kernel name, node name, kernel version, build date and
architecture.
Do not override chassis description and use a value
computed from node name, kernel name, kernel version, build date and
architecture instead.
Override chassis ID with the provided value instead
of using MAC address from one interface or host name.
Do not override chassis ID and use a value computed
from one of the interface MAC address (or host name if none is found).
Override platform description with the provided
value instead of using kernel name. This value is currently only used for
CDP.
Do not override platform description and use the
kernel name. This option undoes the previous one.
Specify which interface to listen and send LLDPDU
to. Without this option,
lldpd will use all available
physical interfaces. This option can use wildcards. Several interfaces can be
specified separated by commas. It is also possible to remove an interface by
prefixing it with an exclamation mark. It is possible to allow an interface by
prefixing it with two exclamation marks. An allowed interface beats a
forbidden interfaces which beats a simple matched interface. For example, with
eth*,!eth1,!eth2 lldpd will only use
interfaces starting by eth with the exception of
eth1 and eth2. While with
*,!eth*,!!eth1 lldpcli will use all
interfaces, except interfaces starting by eth with the
exception of eth1. When an exact match is found, it will
circumvent some tests. For example, if eth0.12 is specified,
it will be accepted even if this is a VLAN interface.
Remove any previously configured interface pattern
and use all physical interfaces. This option undoes the previous one.
Specify interfaces whose configuration is
permanently kept by
lldpd . By default,
lldpd disregard any data about interfaces when they
are removed from the system (statistics, custom configuration). This option
allows one to specify a pattern similar to the interface pattern. If an
interface disappear but matches the pattern, its data is kept in memory and
reused if the interface reappear at some point. For example, on Linux, one
could use the pattern eth*,eno*,enp*, which should match
fixed interfaces on most systems.
Remove any previously configured permanent
interface pattern. Any interface removed from the system will be forgotten.
This option undoes the previous one.
Some OS allows the user to set a description for an
interface. Setting this option will enable
lldpd to
override this description with the name of the peer neighbor if one is found
or with the number of neighbors found.
Do not update interface description with the name
of the peer neighbor. This option undoes the previous one.
Enable promiscuous mode on managed interfaces.
When the interface is not managed any more (or when quitting
This option is known to be useful when the remote switch is a Cisco 2960 and the local network card features VLAN hardware acceleration. In this case, you may not receive LLDP frames from the remote switch. The most plausible explanation for this is the frame is tagged with some VLAN (usually VLAN 1) and your network card is filtering VLAN. This is not the only available solution to work-around this problem. If you are concerned about performance issues, you can also tag the VLAN 1 on each interface instead. Currently, this option has no effect on anything else than Linux. On other OS, either disable VLAN acceleration, tag VLAN 1 or enable promiscuous mode manually on the interface.
Do not set promiscuous mode on managed interfaces.
This option does not disable promiscuous mode on interfaces already using this
mode.
Specify the management addresses of this system. As
for interfaces (described above), this option can use wildcards and
inversions. Without this option, the first IPv4 and the first IPv6 are used.
If an exact IP address is provided, it is used as a management address without
any check. If only negative patterns are provided, only one IPv4 and one IPv6
addresses are chosen. Otherwise, many of them can be selected. If you want to
remove IPv6 addresses, you can use !*:*. If an interface
name is matched, the first IPv4 address and the first IPv6 address associated
to this interface will be chosen.
Unset any specific pattern for matching management
addresses. This option undoes the previous one.
Set the type of src mac in lldp frames sent on bond
slaves
Valid types are:
Default value for
Change the maximum number of neighbors accepted
(for each protocol) on an interface. This is a global value. The default is
32. This setting only applies to future neighbors.
The destination MAC address used to send LLDPDU
allows an agent to control the propagation of LLDPDUs. By default, the
01:80:c2:00:00:0e MAC address is used and limit the
propagation of the LLDPDU to the nearest bridge
(nearest-bridge ). To instruct
lldpd to use the
01:80:c2:00:00:03 MAC address instead, use
nearest-nontpmr-bridge instead. To use the
01:80:c2:00:00:00 MAC address instead, use
nearest-customer-bridge instead.
Force port ID subtype. By default,
lldpd will use the MAC address as port identifier and
the interface name as port description, unless the interface has an alias. In
this case, the interface name will be used as port identifier and the
description will be the interface alias. With this command, you can force the
port identifier to be the interface name (with
ifname ), the MAC address (with
macaddress ) or a local value (with
value ). In the latest case, the local value should be
provided.
Force port description to the provided
string.
Change transmit delay to the specified value in
seconds. The transmit delay is the delay between two transmissions of LLDP
PDU. The default value is 30 seconds. Note:
lldpd also
starts another system based refresh timer on each port to detect changes such
as a hostname. This is the value of the tx-interval multiplied by 20.
You can specify an
Change transmit hold value to the specified value.
This value is used to compute the TTL of transmitted packets which is the
product of this value and of the transmit delay. The default value is 4 and
therefore the default TTL is 120 seconds.
Configure the administrative status of the given
port. By default, all ports are configured to be in
rx-and-tx mode. This means they can receive and transmit
LLDP frames (as well as other protocols if needed). In
rx-only mode, they won't emit any frames and in
tx-only mode, they won't receive any frames. In
disabled mode, no frame will be sent and any incoming
frame will be discarded. This setting does not override the operational mode
of the main daemon. If it is configured in receive-only mode (with the
-r flag), setting any transmit mode won't have any
effect.
Configure the given port to send LLDP frames over a
specified VLAN. With VLAN Identifier (VID) as vlan_id,
Priority Code Point (PCP) as priority, and Drop Eligible
Indicator (DEI) as dei.
lldpd
accepts LLDP frames on all VLANs.
Emit a custom TLV for OUI
oui, with subtype subtype and
optionally with the bytes specified in content. Both
oui and content should be a
comma-separated list of bytes in hex format. oui must be
exactly 3-byte long. If add is specified then the TLV
will be added. This is the default action. If replace is
specified then all TLVs with the same oui and
subtype will be replaced.
When no oui is specified, remove all previously
configured custom TLV. When OUI oui and subtype
subtype is specified, remove specific instances of
custom TLV.
Configure LLDP-MED fast start mechanism. When a new
LLDP-MED-enabled neighbor is detected, fast start allows
lldpd to shorten the interval between two LLDPDU.
enable should enable LLDP-MED fast start while
tx-interval specifies the interval between two LLDPDU
in seconds. The default interval is 1 second. Once 4 LLDPDU have been sent,
the fast start mechanism is disabled until a new neighbor is detected.
Disable LLDP-MED fast start mechanism.
Advertise a coordinate based location on the given
ports (or on all ports if no port is specified). The format of
latitude is a decimal floating point number followed
either by N or S. The format of
longitude is a decimal floating point number followed
either by E or W.
altitude is a decimal floating point number followed
either by m when expressed in meters or f
when expressed in floors. A space is expected between the floating point
number and the unit. datum is one of those values:
A valid use of this command is: configure ports eth0 med location coordinate latitude
48.85667N longitude 2.2014E altitude 117.47 m datum WGS84
Advertise a civic address on the given ports (or on
all ports if no port is specified). country is the
two-letter code representing the country. The remaining arguments should be
paired to form the address. The first member of each pair indicates the type
of the second member which is a free-form text. Here is the list of valid
types:
A valid use of this command is: configure ports eth1 med location address country US
street “Commercial Road” city “Roseville”
Advertise the availability of an ELIN number. This
is used for setting up emergency call. If the provided number is too small, it
will be padded with 0. Here is an example of use:
configure ports eth2 med location elin 911
Advertise a specific network policy for the given
ports (or for all ports if no port was provided). Only the application type is
mandatory. application should be one of the following
values:
The When a VLAN is specified with vlan tells
which 802.1q VLAN ID has to be advertised for the network policy. A valid
value is between 1 and 4094. priority allows one to specify IEEE 802.1d / IEEE 802.1p Layer 2 Priority, also known as Class of Service (CoS), to be used for the specified application type. This field is usually ignored if no VLAN is specified. The names match 802.1D-2004 standard (table G-2). Some more recent standards may use different labels. Only the numeric values should be relied upon. The accepted labels are:
dscp represents the DSCP value to be advertised for the given network policy. 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) A valid use of this command is: configure med policy application voice vlan 500
priority voice dscp 46
Advertise the LLDP-MED POE-MDI TLV for the given
ports or for all interfaces if no port is provided. 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:
Valid types are:
Valid sources are:
Valid priorities are:
value should be the total power in milliwatts required by the PD device or available by the PSE device. Here is an example of use: configure med power pd source pse priority high value
5000
Advertise Dot3 POE-MDI TLV for the given port or
for all ports if none was provided. One can act as a PD (power consumer) or a
PSE (power provider). This configuration is distinct of the configuration of
the transmission of the LLDP-MED POE-MDI TLV but the user should ensure the
coherency of those two configurations if they are used together.
supported means that MDI power is supported on the given port while enabled means that MDI power is enabled. paircontrol is used to indicate if pair selection can be controlled. Valid values for powerpairs are:
When specified, class is a number between 0 and 4. The remaining parameters are in conformance with 802.3at and are optional. type should be either 1 or 2, indicating which if the device conforms to 802.3at type 1 or 802.3at type 2. Values of source and priority are the same as for LLDP-MED POE-MDI TLV. requested and allocated are expressed in milliwats. Here are two valid uses of this command: configure ports eth3 dot3 power pse supported enabled
paircontrol powerpairs spare class class-3
configure dot3 power pd supported enabled powerpairs
spare class class-3 type 1 source pse priority low requested 10000 allocated
15000
Pause
lldpd operations.
lldpd will not send any more frames or receive ones.
This can be undone with resume command.
Resume
lldpd operations.
lldpd will start to send and receive frames. This
command is issued internally after processing configuration but can be used at
any time if a manual pause command is issued.FILES
SEE ALSOlldpd(8)AUTHORSThelldpcli program was written by
Vincent Bernat ⟨bernat@luffy.cx⟩.
Visit the GSP FreeBSD Man Page Interface. |