This is the documentation for the 21.07 version. Looking for the documentation of the latest version? Have a look here.
Link Layer Discovery Protocol¶
The Link Layer Discovery Protocol (LLDP) service provides a method for discovering which routers are connected to a LAN segment, and offers a way to discover the topology of a network.
Configuring the LLDP Service¶
LLDP is configured in two places: Global router parameters and per-interface parameters.
To enable LLDP, TNSR requires global settings for LLDP and at least one interface must participate in LLDP.
LLDP Router Configuration¶
Three LLDP commands are available in configuration mode (Configuration Mode) to configure global LLDP parameters for this router. All of these commands are required to activate LLDP.
- lldp system-name <name>
The router hostname advertised by LLDP.
- lldp tx-interval <seconds>
Transmit interval, which controls the time between LLDP messages in seconds.
- lldp tx-hold <value>
Transmit hold multiplier, which is multiplied by the transmit interval to calculate the total time used for the Time-To-Live (TTL) of the LLDP message.
If the transmit interval is
30 and the transmit hold multiplier is
4, then the advertised TTL of the LLDP message is
The LLDP timer options do not have default values and must be manually set.
tnsr(config)# lldp system-name MyRouter tnsr(config)# lldp tx-interval 30 tnsr(config)# lldp tx-hold 4
These parameters can be changed at any time.
LLDP Interface Configuration¶
Additional LLDP commands are available in
(Interface Command) to configure per-interface LLDP identification:
- lldp port-name <name>
The name of the interface as advertised by LLDP. This must be present on an interface for it to participate in LLDP.
- lldp management (ipv4|ipv6) <ip-address>
The IPv4 and/or IPv6 address advertised by LLDP as a means to manage this router on this interface.
- lldp management oid <oid>
An object identifier associated with the management IP address on this interface.
lldp port-name to be present on at least one
interface to function.
tnsr(config)# interface TenGigabitEthernet3/0/0 tnsr(config-interface)# lldp port-name MyPort tnsr(config-interface)# lldp management ipv4 192.0.2.123 tnsr(config-interface)# lldp management ipv6 2001:db8::1:2:3:4 tnsr(config-interface)# exit tnsr(config)#
Due to a limitation of the underlying API, all LLDP interface parameters must be configured at the same time. When LLDP parameters change, TNSR requires a dataplane restart for the new settings to take effect. See Known Issues.
LLDP status cannot be viewed natively in TNSR at this time, but the status may
be obtained directly from the dataplane at the CLI using the command
shell sudo vppctl show lldp:
tnsr# dataplane shell sudo vppctl show lldp Local interface Peer chassis ID Remote port ID Last heard Last sent Status TenGigabitEthernet3/0/0 54:78:1a:c0:ab:80 Fa0/1 17.1s ago 25.3s ago active
Alternately, run the command directly from a host shell prompt and not through
the TNSR CLI using
sudo dp-exec vppctl show lldp.
In either of these examples, the user account must have access to
sudo to run the command.