LLDP (Link Layer Discovery Protocol) is an IEEE (Institute of Electrical and Electronics Engineers) standard protocol (IEEE 802.1AB) that defines messages, encapsulated in Ethernet frames for the purpose of giving devices a means of announcing basic device information to other devices on the LAN (Local Area Network) through periodic retransmissions out each port every 30 seconds by default.
Fig 13.1 Link Layer Discovery Protocol Concept
What is the need for LLDP?
With all kinds of devices connecting to the network these days, installing, tracking and managing each of them can be quite difficult in large networks.
There are many applications for LLDP. Some of them are,
13.1 LLDP
Use “lldp” command to enable LLDP RX/TX ability. The LLDP enable status is displayed by “show lldp” command. Use the “no” form of this command to disable the LLDP. When LLDP is disabled, the behavior of receiving LLDP PDU would be decided by “lldp” command.
Switch# configure terminal
Switch (config)#lldp
Switch (config)#no lldp
Syntax |
lldp no lldp |
Mode |
Global Configuration |
Example |
The following example sets LLDP enable/disable. Switch# configure terminal Switch (config)# lldp Switch# show lldp |
13.2 LLDP RX
Use “lldprx” command to enable the LLDP PDU RX ability. The configuration could be shown by “show lldp” command. Use the “no” form of this command to disable the RX ability.
Switch# configure terminal
Switch(config)#interface {Interface-ID}
Switch(config-if)# lldprx
Switch(config-if)# no lldprx
Syntax |
lldprx no lldprx |
Mode |
Port Configuration |
Example |
This example sets port gi1 to enable LLDP TX, port gi2 to disable RX but enable TX, port gi3 to enable RX but disable TX, port gi4 to disable RX and TX. Switch# configure terminal Switch(config)# interface range g1-10 Switch(config-if-range)# lldp rx Switch(config-if-range)# lldp tx Switch# show lldp interfaces g1-10 |
13.3 LLDP TX-INTERVAL
Use “lldptx-interval” command to configure the LLDP TX interval. It should be noticed that both “lldptx-interval” and “lldptx-delay” affects the LLDP PDU TX time. The larger value of the two configurations decides the TX interval. The configuration could be shown by “show lldp” command. Use the “no” form of this command to restore the interval to default value.
Switch# configure terminal
Switch(config)# lldp tx-interval <5-32768>
Switch(config)# no lldp tx-interval
Syntax |
lldptx-interval <5-32768> no lldptx-interval |
Parameter |
<5-32768>Specify the LLDP PDU TX interval in unit of second |
Default |
Default TX interval is 30 seconds |
Mode |
Global Configuration |
Example |
This example sets LLDP TX interval to 100 seconds. Switch# configure terminal Switch(config)# lldp tx-interval 100 Switch# show lldp |
13.4 LLDP REINIT-DELAY
Use “lldpreinit-delay” to configure the LLDP re-initials delay. This delay avoids LLDP generate too many PDU if the port is up and down frequently. The delay starts to count when the port links down. The port would not generate LLDP PDU until the delay counts to zero. The configuration could be shown by “show lldp” command. Use the “no” form of this command to restore the delay to default value.
Switch# configure terminal
Switch(config)# lldp reinit-delay <1-10>
Switch(config)# no lldp reinit-delay
Syntax |
Lldp reinit-delay <1-10> no lldp reinit-delay |
Parameter |
<1-10>Specify the LLDP re-initial delay time in unit of second. |
Default |
Default reinital delay is 2 seconds |
Mode |
Global Configuration |
Example |
This example sets LLDP re-initial delay to 5 seconds. Switch# configure terminal Switch(config)# lldp reinit-delay 5 Switch# show lldp |
13.5 LLDP HOLDTIME-MULTIPLIER
Use “lldp holdtime-multiplier” command to configure the LLDP PDU hold multiplier that decides time-to-live (TTL) value sent in LLDP advertisements: TTL = (tx-interval * holdtime-multiplier). The configuration could be shown by “show lldp” command. Use the “no” form of this command to restore the multiplier to default value.
Switch# configure terminal
Switch(config)# lldp holdtime-multiplier <2-10>
Switch(config)# no holdtime-multiplier
Syntax |
lldp holdtime-multiplier <2-10> no holdtime-multiplier |
Parameter |
<2-10>Specify the LLDP hold time multiplier |
Default |
lldpholdtime-multiplier 4 |
Mode |
Global Configuration |
Example |
This example sets LLDP hold time multiplier to 3. Switch# configure terminal Switch(config)# lldp holdtime-multiplier 3 Switch# show lldp |
13.6 LLDP LLDPDU
Use “lldp lldpdu” command to configure the LLDP PDU handling behavior when LLDP is globally disabled. It should be noticed that if LLDP is globally enabled and per port LLDP RX status is configured to disabled, the received LLDP PDU would be dropped instead of taking the global disable behavior. The configuration could be shown by “show lldp” command. Use the “no” form of this command to restore the behavior to default.
Switch# configure terminal
Switch(config)# lldp lldpdu (filtering|flooding|bridging)
Syntax |
lldp lldpdu (filtering|flooding|bridging) |
Parameter |
bridging When LLDP is globally disabled, LLDP packets are bridging (bridging LLDP PDU to VLAN member ports). filtering When LLDP is globally disabled, LLDP packets are filtered (deleted). flooding When LLDP is globally disabled, LLDP packets are flooded (forwarded to all interfaces). |
Default |
Default LLDP PDU handling behavior when LLDP disabled is flooding |
Mode |
Global Configuration |
Example |
This example sets LLDP disable action to bridging. Switch# configure terminal Switch(config)# lldp lldpdu bridging Switch# show lldp |
13.7 LLDP MED
Use “lldp med” to configure the LLDP MED enable status. If LLDP MED is enabled, LLDP MED capability TLV and other selected MED TLV would be attached. The configuration could be shown by “show lldp med” command. Use the “no” form of this command to disable the LLDP MED status.
Switch# configure terminal
Switch(config)# interface {Interfac-ID}
Switch(config-if)# lldp med
Switch(config-if)# no lldp med
Syntax |
lldp med no lldp med |
Default |
lldp med |
Mode |
Port Configuration |
Example |
This example sets port gi1 to enable LLDP MED, port gi2 to disable LLDP MED. Switch# configure terminal Switch(config)# interface range g1-10 Switch(config-if-range)# lldp med Switch# show lldp interfaces g 1-10 med |
13.8 LLDP MED FAST-START-REPEAT-COUNT
Use “lldp med fast-start-repeat-count” command to configure the LLDP PDU fast start TX repeat count. When port links up, it will send LLDP PDU immediately to notify link partner. The number of LLDP PDU sends when it links up depends on fast-start-repeat-count configuration. The LLDP PDU fast-start transmits in interval of one second. The fast start behavior works no matter LLDP MED is enabled or not. The configuration could be shown by “show lldp med” command. Use the “no” form of this command to restore count to default.
Switch# configure terminal
Switch(config)# lldp med fast-start-repeat-count <1-10>
Switch(config)# no lldp med fast-start-repeat-count
Syntax |
lldp med fast-start-repeat-count <1-10> no lldp med fast-start-repeat-count |
Parameter |
<1-10> LLDP PDU fast start TX repeat counts. |
Default |
Default fast start TX repeat count is 3 |
Mode |
Global Configuration |
Example |
This example sets fast start repeat count to 10. Switch# configure terminal Switch(config)# lldp med fast-start-repeat-count 10 Switch# show lldp med |
13.9 LLDP MED LOCATION
Use “lldp med location” command to configure the LLDP MED location data. The “coordinate”, “civic-address”, “ecs-elin” locations are independent, so at most three location TLVs could be sent if their data are not empty. The configuration of location could be shown by “show lldp interface PORT med” command. Use the “no” form of this command to clear location data.
Switch# configure terminal
Switch(config)#interface {Interface-ID}
Switch(config-if)# lldp med location (coordination|civic-address|ecs-elin) ADDR
Switch(config-if)# no lldp med location (coordination|civic-address|ecs-elin)
Syntax |
lldp med location (coordination|civic-address|ecs-elin) ADDR no lldp med location (coordination|civic-address|ecs-elin) |
Parameter |
Co-ordination civic-address ecs-elin ADDR Location type to be configured. “ecs-elin” is abbreviation of emergency call service – emergency location identifier number Specify the location data. Input format is hexadecimal values without colon (for example: 1234AB). For coordination location type, the length of ADDR is 16 bytes. For civic-address, the length is 6 to 160 bytes. For ecs-elin, the length is 10 to 25 bytes. |
Default |
Default Deafult is no location data. |
Mode |
Mode Port Configuration |
Example |
This example sets location data for interface gi1. Switch# configure terminal Switch(config)# interface gi1 Switch(config-if)# lldp med location coordinate 112233445566778899AABBCCDDEEFF00 Switch(config-if)# lldp med location civic-address 112233445566 Switch(config-if)# lldp med location ecs-elin 112233445566778899AA Switch# show lldp interfaces gi1 med |
13.10 LLDP MED NETWORK-POLICY
Use “lldp med network-policy” command to configure the LLDP MEDnetwork policy table and add a network policy entry that can be bind to ports. If LLDP MED network policy voice auto mode is enabled, “voice” type network policy cannot be created since it is in auto mode. The network policy table configuration could be shown by “show lldp med” command.
Use the “no” form of this command to remove network policy entry of specific index. A network policy can be removed only when it is not bind to any port.
Switch# configure terminal
Switch(config)# lldp med network-policy <1-32> app (voice|voice-signaling|guest- voice|guest-voice-signaling|softphone-voice |video-conferencing|streaming- video|video-signaling) vlan <1-4094> vlan-type (tag|untag) priority <0- 7> dscp <0-63>
Switch(config)# no lldp med network-policy <1-32>
Syntax |
lldp med network-policy <1-32> app (voice|voice-signaling|guest- voice|guest-voice-signaling|softphone-voice|video-conferencing|streaming- video|video-signaling) vlan <1-4094> vlan-type (tag|untag) priority <0- 7> dscp <0-63> no lldp med network-policy <1-32> |
Parameter |
<1-32>Specify the network policy index. voice-signaling Specify the network policy application type. <1-4094>Specify the VLAN IDtag untag Specify the VLAN tag status <0-7>Specify the L2 priority <0-63>Specify the DSCP value |
Mode |
Global Configuration |
Example |
This example create 2 network policies. Switch# configure terminal Switch(config)# lldp med network-policy 1 app voice-signaling vlan 2 vlan-type tag priority 3 dscp 4 Switch(config)# lldp med network-policy 32 app video- conferencing vlan 5 vlan-type tag priority 1 dscp 63 Switch# show lldp med |
13.11 LLDP MED NETWORK-POLICY (INTERFACE)
Use “lldp med network-policy” command to bind the network policy to port interface. The bonded network policy of one port should be with different types. If network policy TLV is selected over a port, the bonded network policies would be attached in LLDP MED PDU. The configuration of network policy binding could be shown by “show lldp med” command.
Switch# configure terminal
Switch(config)# interface {Interface-ID ranges}
Switch(config-if-range)#lldp med network-policy (add|remove) <1-32>
Syntax |
lldp med network-policy (add|remove) <1-32> |
Parameter |
addAdd network policy binding for ports. removeRemove network policy binding for ports. <1-32> Specify the network policy index |
Mode |
Port Configuration |
Example |
This example binds network policy for interface gi1 and gi2. Switch# show lldp med Switch# configure terminal Switch(config)# interface range g1-10 Switch(config-if-range)#lldp med network-policy add 1 Switch# show lldp interfaces g1-10 med |
13.12 LLDP MED TLV-SELECT
Use “lldp med tlv-select” command to configure the LLDP MED TLV selection. It should be noticed that even no MED TLV is selected, MED capability TLV would be attached if LLDP MED is enable. The configuration could be shown by “show lldp med” command. Use the “no” form of this command to remove all selected MED TLV over the dedicated ports.
Switch# configure terminal
Switch(config)# interface {Interface-ID}
Switch(config-if)# lldp med tlv-select MEDTLV [MEDTLV] [MEDTLV] [MEDTLV]
Switch(config-if)# no lldp med tlv-select
Syntax |
lldp med tlv-select MEDTLV [MEDTLV] [MEDTLV] [MEDTLV] no lldp med tlv-select |
Parameter |
MEDTLV MED optional TLV. Available optional TLVs are : network-policy, location, poe-pse, inventory. |
Default |
network-policy TLV |
Mode |
Port Configuration |
Example |
This example sets port gi1-2 to select LLDP MED network policy, location, POE-PSE, inventory TLVs, and it sets port gi3-4 to un-select all LLDP MED TLVs. Switch# configure terminal Switch(config)# interface g1 Switch(config-if)# lldp med tlv-select network-policy location inventory Switch(config)# interface g2 Switch(config-if)# no lldp med tlv-select Switch# show lldp interfaces g1-2 med |
13.13 LLDP TLV-SELECT
Use “lldptlv-select” command to attach selected TLV in PDU. The configuration could be shown by “show lldp” command. Use the “no” form of this command to remove all selected TLV.
Switch# configure terminal
Switch(config)# interface {Interface-ID ranges}
Switch(config-if-range)# lldp tlv-select TLV [TLV] [TLV] [TLV] [TLV] [TLV] [TLV] [TLV]
Switch(config-if-range)# no lldp tlv-select
Syntax |
Lldp tlv-select TLV [TLV] [TLV] [TLV] [TLV] [TLV] [TLV] [TLV] no lldp tlv-select |
Parameter |
TLV Specify the selected optional TLV. Available optional TLVs are : sys-name (system name), sys-desc (system description), sys-cap (system capability), mac-phy (802.3 MAC-PHY), lag (802.3 link aggregation), max- frame-size (802.3 max frame size), and management- addr (management address). |
Mode |
Port Configuration |
Example |
This example selects system name, system description, system capability, 802.3 MAC-PHY, 802.3 link aggregation, 802.3 max frame size, and management address TLVs for interface gi1 and gi3. Switch# configure terminal Switch(config)# interface range g 1,3 Switch(config-if-range)# lldp tlv-select port-desc sys-name sys-desc sys-cap mac-phy lag max-frame-size Switch# show lldp interfaces g 1,3 |
13.14 LLDP TLV-SELECT PVID
Use “lldptlv-select pvid” command to configure the 802.1 PVID TLV attachenable status. The configuration could be shown by “show lldp” command. Use the “no” form of this command to restore the pvid to default value.
Switch# configure terminal
Switch(config)# interface {Interface-ID}
Switch(config-if)# lldp tlv-select pvid (disable|enable)
Switch(config-if)# no lldp tlv-select pvid
Syntax |
Lldp tlv-select pvid (disable|enable) no lldp tlv-select pvid |
Parameter |
Disable Disable LLDP 802.1 PVID TLV attach state Enable Enable LLDP 802.1 PVID TLV attach state |
Mode |
Port Configuration |
Example |
This example sets port gi1 PVID TLV attaches status to disable and port gi2 to enable. Switch# configure terminal Switch(config)# interface gi1 Switch(config-if)# lldp tlv-select pvid disable Switch(config-if)# interface gi2 Switch(config-if)# lldp tlv-select pvid enable Switch# show lldp interfaces gi1,gi2 |
13.15 LLDP TLV-SELECT VLAN-NAME
Use “lldp tlv-select vlan-name” command to add or remove VLAN list for 802.1 VLAN-NAME TLV. The configuration could be shown by “show lldp” command.
Switch# configure terminal
Switch(config)# interface {Interface-ID}
Switch(config-if)# lldp tlv-select vlan-name (add|remove) {VLAN-LIST}
Syntax |
lldp tlv-select vlan-name (add|remove) {VLAN-LIST} |
Parameter |
addVLAN-LIST Add VLAN list for LLDP 802.1 VLAN-NAME TLV on the specific interface. The configured ports should be member of all the specified VLANs or the VLAN- LIST is not valid. remove VLAN-LIST Remove VLAN list of LLDP 802.1 VLAN-NAME TLV from interface |
Mode |
Port Configuration |
Example |
This example add VLAN 100 to VLAN-NAME TLV for port gi10. Switch# configure terminal Switch(config)# vlan 100 Switch(config-vlan)# exit Switch(config)# interface g2 Switch(config-if)# switchport trunk allowed vlan add 1,100 Switch(config-if)# lldp tlv-select vlan-name add 100 Switch(config-if)# end Switch# show lldp interfaces gi1 Switch# show lldp interfaces g2 |
13.16 LLDP TX
Use “lldp tx” command to enable the LLDP PDU TX ability. The configuration could be shown by “show lldp” command. Use the “no” form of this command to disable the TX ability.
Switch# configure terminal
Switch(config)# interface {Interface-ID}
Switch(config-if)# lldp tx
Switch(config-if)# no lldp tx
Syntax |
lldp tx no lldp tx |
Mode |
Port Configuration |
Example |
This example sets port gi1 to enable LLDP TX, port gi2 to disable RX but enable TX, port gi3 to enable RX but disable TX, port gi4 to disable RX and TX. Switch# configure terminal Switch(config)# interface g1 Switch(config-if)# lldp rx Switch(config-if)# lldp tx Switch(config-if)# interface g2 Switch(config-if)# no lldp rx Switch(config-if)# lldp tx Switch(config-if)# interface g3 Switch(config-if)# lldp rx Switch(config-if)# no lldp tx Switch(config-if)# interface g4 Switch(config-if)# no lldp rx Switch(config-if)# no lldp tx Switch(config-if)# end Switch# show lldp interfaces g 1-4 |
13.17 LLDP TX-DELAY
Use “lldp tx-delay” command to configure the delay in seconds between successive LLDP frame transmissions. The delay starts to count in any case LLDP PDU is sent such as by LLDP PDU advertise routine, LLDP PDU content change, port link up, etc. The configuration could be shown by “show lldp” command. Use the “no” form of this command to restore the delay to default value.
Switch# configure terminal
Switch(config)# lldp tx-delay <1-8192>
Switch(config)# no lldp tx-delay
Syntax |
lldp tx-delay <1-8192> no lldp tx-delay |
Parameter |
<1-8192>Specify the LLDP tx delay in unit of seconds. |
Default |
Default TX delay is 2 seconds |
Mode |
Global Configuration |
Example |
This example sets LLDP PDU TX delay to 10 seconds. Switch# configure terminal Switch(config)# lldp tx-delay 1 Switch# show lldp |
13.18 SHOW LLDP
Use “show lldp” and “show lldp interface” commands to display LLDP global information including LLDP enable status, LLDP PDU TX interval, hold time multiplier, re-initial delay, TX delay, and LLDP packet handling when LLDP is disabled. Single port information displayed includes port LLDP RX/TX enable status, selected TLV to TX and IP address. The abbreviations in optional TLVs are: port description (PD), system name (SN), system description (SD), and system capability (SC).
Switch# show lldp
Switch# show lldp interface {IF_NMLPORTS}
Syntax |
show lldp show lldp interface {IF_NMLPORTS} |
Parameter |
IF_NMLPORTS Specify the ports to display information |
Mode |
Privileged EXEC |
Example |
This example displays lldp information of port gi1 and gi2 Switch# show lldp interfaces gi1,gi2 |
13.19 SHOW LLDP LOCAL-DEVICE
Use “show lldp local-device” command to show the local configuration of LLDP PDU. By the commands, a user can view the contents of LLDP/ LLDP-MED TLVs that would be attached in LLDP PDU.
Switch# show lldp local-device
Switch# show lldp interfaces{IF_NMLPORTS}local-device
Syntax |
show lldp local-device show lldp interfaces{IF_NMLPORTS}local-device |
Parameter |
IF_NMLPORTS Specify the ports to display information |
Mode |
Privileged EXEC |
Example |
This example displays the local device information. Switch# show lldp local-device |
13.20 SHOW LLDP MED
Use “show lldp med” command to display the LLDP MED configuration information.
Switch# show lldp med
Switch# show lldp interfaces{IF_NMLPORTS}med
Syntax |
show lldp med show lldp interfaces{IF_NMLPORTS}med |
Parameter |
IF_NMLPORTS Specify the ports to display information |
Mode |
Privileged EXEC |
Example |
This example displays the LLDP MED information. Switch# show lldp med |
13.21 SHOW LLDP NEIGHBOR
Use “show lldp neighbor” command to display the received neighbor LLDP PDU information. When LLDP PDU is received on LLDP RX enable ports, system would store the PDU information in database until time to live of the PDU counts down to zero.
Switch# show lldp neighbor
Switch# show lldp interfaces{IF_NMLPORTS}neighbor
Syntax |
show lldp neighbor show lldp interfaces{IF_NMLPORTS}neighbor |
Parameter |
IF_NMLPORTS Specify the ports to display information |
Mode |
Privileged EXEC |
Example |
This example displays the neighbor information. Switch# show lldp neighbor |
13.23 SHOW LLDP STATISTICS
Use “show lldp statistics” command to display the LLDP RX/TX statistics.
Switch# show lldp statistics
Switch# show lldp interfaces{IF_NMLPORTS}statistics
Syntax |
show lldp statistics show lldp interfaces{IF_NMLPORTS}statistics |
Parameter |
IF_NMLPORTS Specify the ports to display information |
Mode |
Privileged EXEC |
Example |
This example display the LLDP statistics. Switch# show lldp statistics
Switch(config)# show lldp interfaces gi1 statistics |
13.24 CLEAR LLDP STATISTICS
Use “clear lldp globle statistics” command to clear the LLDP RX/TX statistics.
Switch# clear lldp globle statistics
Syntax |
clear lldp globle statistics |
Mode |
Privileged EXEC |
Example |
This example shows how to clear LLDP statistics. Switch# clear lldp statistics |
13.25 SHOW LLDP TLV-OVERLOADING
The LLDP PDU is composed by TLVs and selected number TLVs may compose a large PDU that the system cannot handle. The maximum PDU length is to take the smaller number of jumbo frame size minus 30 bytes (30 bytes kept for header) or 1488 bytes. Use “show lldptlv-overloading” command to display the length of LLDP TLVs and if the TLVs overload the PDU length. The TLVs with status marked “overload” would not be transmitted.
Switch# show lldp interfaces{IF_NMLPORTS}tlvs-overloading
Syntax |
show lldp interfaces{IF_NMLPORTS}tlvs-overloading |
Parameter |
IF_NMLPORTS Specify the ports to display information |
Mode |
Privileged EXEC |
Example |
This example display the LLDP TLVs overloading status of port gi1. Switch# show lldp interfaces gi1 tlvs-overloading |