Download PDF
Home

1. Introduction to LLDP

Link Layer Discovery Protocol (LLDP) is a media-independent link layer protocol used by network devices for advertising their identity, capabilities to neighbors on a LAN segment. LLDP runs over the data-link layer only, allowing two systems running different network layer protocols to learn about each other.

LLDP supports a set of attributes that it uses to discover neighbor devices. These attributes contain type, length, and value descriptions and are referred to as TLVs. LLDP supported devices can use TLVs to receive and send information to their neighbors. Details such as configuration information, device capabilities, and device identity can be advertised using this protocol.

1.1. Guidelines

  • All LLDP packets are sent to the CPU for further processing.

  • LLDP packets will be lower priority packets when compared with the routing protocol packets. In case of a congestion, the LLDP packets may be policed.

1.2. Limitations

  • The LLDP currently does not intend to work on bundle interfaces.

1.3. Interactions with other features

RBFS provides various daemons that run as background processes. LLDP interacts with these daemons for accessing necessary configurations.

lldp interaction

The table below shows the interactions of LLDP with the other daemons of RBFS.

Daemon Name Daemon Description Interaction Details

Confd

Configuration

Confd stores all the LLDP configuration information. LLDP subscribes for the following tables of Confd:

  • global.lldp.config

  • global.lldp.interface.config

IFMD

Interface Monitoring

LLDP is enabled on the physical interface. LLDP subscribes to the IFP table to find the status of the physical link. An LLDP message can be sent only to those interfaces whose link state is UP.

FIBD

Forwarding Information Base

FIBD subscribes for the LLDP interface table which has all the information required for enabling LLDP on the interface. This is used to program in VPP. Any neighbor detected, VPP will notify and this detection is stored in the FIBD table for tracking purpose. Each time a message is received from the neighbor, it will be updated in this table. Thus, the history of the messages received from the neighbor is tracked. This information is stored in one of the FIBD tables. LLDP subscribes to this table to find its neighbor.

2. LLDP Configuration

This section describes how to enable and configure LLDP.

2.1. Default LLDP Configuration

The table below shows the default LLDP configuration. To change the default settings, use the LLDP global configuration and LLDP interface-level configuration commands.

Table 1. Default LLDP Configuration
Feature Default Setting

LLDP global state

Enabled

LLDP holdtime (before discarding)

120 seconds

LLDP transmission interval (packet update frequency)

30 seconds

LLDP interface state

Enabled

LLDP receive

Enabled

2.2. LLDP Global Configuration Commands

2.2.1. Enabling and Disabling LLDP

LLDP is enabled by default. The command "set lldp disable" is used to disable it. If you want to re-enable it, run the "set lldp enable" command.

To disable/enable LLDP globally, enter the following command:

set lldp <disable|enable>

Note There is no delete command for this functionality.
Command arguments

Disable

Disables LLDP.

Enable

Enables LLDP.

Command Modes
[]
[ edit lldp ]
Example
[ ]
root@rtbrick:confd> edit lldp

2.2.2. Configuring System Name

To configure a system name that is sent to the neighbors in the system name TLV, enter the following command.

set lldp system-name <system name>

Note If the system name is not configured, it is fetched from BDS.
Command arguments

system-name

LLDP global system name to be sent to the neighbor

Command Modes
[]
[ edit lldp ]
Example
[ ]
root@rtbrick:confd> edit lldp

[ lldp ]
root@rtbrick:confd> set system-name pod1-bleaf-1

2.2.3. Configuring System Description

To configure a system name that can be sent to the neighbor, enter the following command.

set lldp system-description <system-description>

Command arguments

system-name

LLDP global system description to be sent to the neighbor

Command Modes
[]
[ edit lldp ]
Example
[ ]
root@rtbrick:confd> edit lldp

[ lldp ]
root@rtbrick:confd> set system-description leaf-node-for-msan1

2.2.4. Configuring the Packet Transmission Interval

This interval specifies how often interfaces retransmit advertisements to their neighbors. To configure the interval (in seconds) at which LLDP packets are sent from the interfaces on which LLDP is configured, enter the following command.

set lldp tx-interval <advertisement-interval>

Command arguments

advertisement-interval

interval(in seconds) at which LLDP packets are sent to neighbors. Default interval value is 30 seconds. The transmission interval range is 1 through 3600 seconds.

Command Modes
[]
[ edit lldp ]
Example
[ ]
root@rtbrick:confd> edit lldp

[ lldp ]
root@rtbrick:confd> set tx-interval 40

2.2.5. Configuring the LLDP Transmission Holdtime

Specifies the amount of time (in seconds) a receiving device should hold the packet sent by your device before discarding it.

Command Modes
[]
[ edit lldp ]

set lldp tx-hold <transmit-hold-time>

Command arguments

transmit-hold-time

Specifies the amount of time (in seconds) a receiving device should hold the packet sent by your device before discarding it. Default value is 120 seconds. The hold-time range is 1 through 360000.

Example
[ ]
root@rtbrick:confd> edit lldp

[ lldp ]
root@rtbrick:confd> set lldp tx-hold 160

2.3. Interface level LLDP Configuration Commands

2.3.1. Enabling and Disabling LLDP on an Interface

By default, LLDP is enabled on all supported interfaces. You can disable it on an individual interface using the "set lldp interface ifp-name disable" command. If you want to re-enable it, run the "set lldp interface ifp-name enable" command.

To disable/enable LLDP on an interface, enter the following command:

set lldp interface <ifp-name> [disable|enable]

Command arguments

ifp-name

Name of the interface on which you are disabling LLDP

Note
  • There is no delete for this functionality.

  • Interface level configuration will override the global lldp enable/disable functionality.

Command Modes
[]
[ edit lldp ]
Example
[ ]
root@rtbrick:confd> edit lldp

[ lldp ]
root@rtbrick:confd> set lldp interface ifp-0/0/2

2.3.2. Configuring the Port Description

To configure the port description that is sent to the neighbor, enter the following command.

set lldp interface <ifp-name> port-desc <port-desc>

Note If the port description is not configured, the description configured under interface is taken as LLDP port description.
Command arguments

ifp-name

Name of the interface

port-desc

LLDP port description to be sent to the neighbor

Command Modes
[]
[ edit lldp ]
Example
[ ]
root@rtbrick:confd> edit lldp

[ lldp ]
root@rtbrick:confd>set lldp interface ifp-0/0/2 port-description “leaf to bleaf”

3. LLDP Show Commands

3.1. Displaying LLDP System Summary

To display the summary information such as system name, frequency of transmissions, the holdtime for packets being sent, TLVs, and and the disabled TLVs, enter the following command:

show lldp summary

Command Modes
rtb lldpd
Example
root@leaf:lldpd> show lldp summary

LLDP Summary:
LLDP Config : Disabled
System Name : leaf
System Description : leaf router connected to host1
Tx-Interval(sec) : 30
Tx-Hold(sec) : 120

3.2. Displaying LLDP Interface Summary

To display the information about interfaces where LLDP is enabled, enter the following command:

show lldp interface summary

Command Modes
rtb lldpd
Example
root@leaf:lldpd> show lldp interface summary
+---------+----------------+---------------------+-------------+-------------+-------------+
 Interface     Peer Port-ID     Peer System Name     Last Heard     Last Sent    Status
+---------+----------------+---------------------+-------------+-------------+-------------+
 ifp-0/0/1                                           Never        1 secs ago     Down
 ifp-0/0/2                                           Never       29 secs ago     Down
 memif-0/1/1   memif-0/1/1         spine           25 secs ago   25 secs ago      Up
               memif-0/1/2         leaf           126 secs ago   15 secs ago     Down
+---------+----------------+---------------------+-------------+-------------+-------------+

3.3. Displaying LLDP Interface Details

To display the information of an interface, enter the following command:

show lldp interface <ifp-name>

Command arguments

ifp-name

Name of the interface

Command Modes
rtb lldpd
Example
root@leaf:lldpd> show lldp interface memif-0/0/0
memif-0/0/0
LLDP Config : Enabled
Port Description : Physical interface #0 from node 0, chip 0
Chassis ID : 02:dc:5c:30:00:00
System Name : vpp-lac
System Description : NA
TTL Sent : 121
Other TLVs : END-OF-LLDPDU
Peer MAC Address : 02:dc:5c:30:00:00
Peer Port ID : memif11/11
Peer Port Description : Physical interface #0 from node 0, chip 0
Peer System Name : vpp-lac
Peer TTL : 121
Last Sent : 26 secs ago
Last Heard : 26 secs ago
LLDP Status : UP

4. Monitoring and Maintaining LLDP

This section explains the commands that help you monitor and maintain LLDP on your device.

4.1. Clearing LLDP Neighbor

To reset the neighbor and clear the LLDP counters, enter the following command:

clear lldp neighbor all

Command Modes
rtb lldpd
Example to reset all the neighbors
leaf:lldpd> clear lldp neighbor all
Example to reset a specific neighbor
leaf:lldpd> clear lldp neighbor memif-0/1/1

©Copyright 2020 RtBrick, Inc. All rights reserved. The information contained herein is subject to change without notice. The trademarks, logos and service marks ("Marks") displayed in this documentation are the property of RtBrick in the United States and other countries. Use of the Marks are subject to RtBrick’s Term of Use Policy, available at https://www.rtbrick.com/privacy. Use of marks belonging to other parties is for informational purposes only.