Link Layer Discovery Protocol (LLDP) Commands

Link Layer Discovery Protocol (LLDP) Commands

Link Layer Discovery Protocol (LLDP), is a neighbor discovery protocol that is used for network devices to advertise information about themselves to other devices on the network. This protocol runs over the data-link layer, which allows two systems running different network layer protocols to learn about each other.

LLDP is unidirectional, operating only in an advertising mode. LLDP does not solicit information or monitor state changes between LLDP nodes. LLDP periodically sends advertisements to a constrained multicast address. Devices supporting LLDP can send information about themselves while they receive and record information about their neighbors. Additionally, devices can choose to turn off the send or receive functions independently. Advertisements are sent out and received on every active and enabled interface, allowing any device in a network to learn about all devices to which it is connected.

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.

lldp receive

To receive LLDP on an interface, use the lldp receive command. To stop receiving LLDP on an interface, use the no form of this command.

lldp receive

no lldp receive

Command Modes

Switch configuration (config-switch)

Command History

Release Modification
3.9.1

This command was introduced.

Usage Guidelines

LLDP manages LAG ports individually. LLDP data received through LAG ports is stored individually per port.

LLDP operation on a port is not dependent on the STP state of a port. I.e. LLDP frames are received on blocked ports.

If a port is controlled by 802.1x, LLDP operates only if the port is authorized.

Examples

The following example enables receiving LLDP on an interface:


nfvis(config-switch)# interface gigabitEthernet1/0
nfvis(config-switch-if)# lldp receive
nfvis(config-switch-if)# commit 

lldp run

To enable LLDP, use the lldp run command. To disable LLDP, use the no lldp run command.

lldp run

no lldp run

Command Modes

Switch configuration (config-switch)

Command History

Release Modification
3.9.1

This command was introduced.

Usage Guidelines

None

Examples

The following example globally enables LLDP:


nfvis(config-switch)# lldp run
nfvis(config-switch)# commit
nfvis(config-switch)# end 

lldp timer

To specify how often the software sends LLDP updates, use the lldp timer command. To restore the default configuration, use the no form of this command.

lldp timer seconds

no lldp timer

Syntax Description

seconds

Specifies, in seconds, how often the software sends LLDP updates. Valid range is from 5 to 32768.

Command Default

30 seconds.

Command Modes

Switch configuration (config-switch)

Command History

Release Modification
3.9.1

This command was introduced.

Usage Guidelines

None.

Examples

The following example sets the interval for sending LLDP updates to 135 seconds.


nfvis(config-switch-if)# lldp timer 135
nfvis(config-switch-if)# commit 

lldp transmit

To enable transmitting LLDP on an interface use the lldp transmit command. Use the no form of this command to stop transmitting LLDP on an interface.

lldp transmit

no lldp transmit

Command Modes

Switch configuration (config-switch)

Command History

Release Modification
3.9.1

This command was introduced.

Usage Guidelines

LLDP manages LAG ports individually. LLDP data received through LAG ports is stored individually per port.

LLDP operation on a port is not dependent on the STP state of a port. I.e. LLDP frames are received on blocked ports.

If a port is controlled by 802.1x, LLDP operates only if the port is authorized.

Examples

The following example enables transmitting LLDP on an interface:


nfvis(config-switch)# interface gigabitEthernet1/0
nfvis(config-switch-if)# lldp transmit
nfvis(config-switch-if)# commit 

show lldp neighbors

To display information about neighboring devices discovered using LLDP, use the show lldp neighbors command. The information can be displayed for all ports or for a specific port.

show lldp neighbors [ interface-id ]

Syntax Description

interface-id

Specifies the port ID.

Command Default

If no port ID is entered, the command displays information for all ports.

Command Modes

Switch configuration (config-switch)

Command History

Release Modification
3.9.1

This command was introduced.

Usage Guidelines

A TLV value that cannot be displayed as an ASCII string is displayed as an hexadecimal string.

Examples

The following example displays information about LLDP neighbors:

nfvis# show switch lldp neighbors
                                                             
SYSTEM
INDEX PORT DEVICE ID PORT ID NAME CAPABILITIES TTL
----------------------------------------------------------------------
1 gi1/1 00:1a:6c:81:f0:80 Gi1/0/31 SW-026 Bridge 93
2 gi1/6 2c:0b:e9:3c:89:00 Gi1/0/5 Switch Bridge 119

show lldp statistics

To display LLDP statistics on all ports or a specific port, use the show lldp statistics command.

show lldp statistics { interface-id | detailed }

Syntax Description

interface-id

Specifies the port ID.

detailed

Displays information for non-present ports in addition to present ports.

Command Default

If no port ID is entered, the command displays information for all ports. If detailed is not used, only present ports are displayed.

Command Modes

Switch configuration (config-switch)

Command History

Release Modification
3.9.1

This command was introduced.

Usage Guidelines

None.

Examples

The following example displays LLDP statistics:


nfvis# show switch lldp statistics 
                                                                 RX       
      TX             RX FRAMES          RX         TLVS          AGEOUTS  
PORT  FRAMES  TOTAL  DISCARDED  ERRORS  DISCARDED  UNRECOGNIZED  TOTAL    
--------------------------------------------------------------------------
1/0   0       0      0          0       0          0             0        
1/1   0       0      0          0       0          0             0        
1/2   792     756    0          0       0          0             0        
1/3   791     756    0          0       0          0             0        
1/4   0       0      0          0       0          0             0        
1/5   0       0      0          0       0          0             0        
1/6   792     756    0          0       0          0             0        
1/7   791     756    0          0       0          0             0