Feature Default Setting:
LLDP global state Enabled
LLDP holdtime (before discarding) 120 seconds
LLDP timer (packet update frequency) 30 seconds
LLDP interface state Enabled
LLDP receive Enabled
LLDP transmit Enabled
The following example shows how to enable LLDP:
Switch# configure terminal
Switch(config)# lldp run
Switch(config)# end
Use the no lldp run command to disable.
The following example shows how to enable LLDP on an interface:
Switch# configure terminal
Switch(config)# interface GigabitEthernet0/1
Switch(config-if)# lldp transmit
Switch(config-if)# lldp receive
Switch(config-if)# end
Prefix all LLDP commands with no, to disable transmit or receive on a particular interface.
Example:
Switch(config)# interface GigabitEthernet0/1
Switch(config-if)# no lldp transmit
Now the switch only receive the neighbour device update connected on f0/1 but not share its own.
Monitoring and Maintaining LLDP
To monitor and maintain LLDP on your device, perform one or more of these tasks, beginning in
privileged EXEC mode.
Command Description:
clear lldp counters- Reset the traffic counters to zero.
clear lldp table- Delete the LLDP table of information about neighbours.
show lldp- Display global information, such as frequency of transmissions, the holdtime for packets being sent, and the delay time for LLDP to initialize on an interface.
show lldp entry [entry-name]- Display information about a specific neighbour.
show lldp interface [interface-id]- Display information about interfaces where LLDP is enabled.
You can limit the display to the interface about which you want information.
show lldp neighbors [interface-id] [detail]- Display information about all neighbours, including device type, interface type and number, holdtime settings, capabilities, and port ID.
You can limit the display to neighbours of a specific interface or expand the display to provide more detailed information.
show lldp traffic- Display LLDP counters, including the number of packets sent and received, number of packets discarded, and number of unrecognized TLVs.