8.8. Configuring LLDP

Overview

Function Introduction

LLDP Link Layer Discovery Protocol is the discovery protocol on link layer defined as standard in IEEE 802.1ab. Discovery on Layer 2 can locate interfaces attached to the devices exactly with connection information on layer 2, such as VLAN attribute of port and protocols supported, and present paths among client, switch, router, application servers and other network servers. This detailed description is helpful to get useful information for diagnosing network fast, like topology of devices attached, conflict configuration between devices, and reason of network failure.

Principle Description

N/A

Configuration

image

Fig. 8.9 LLDP

step 1 Enter the configure mode

Switch# configure terminal

step 2 Enable SNMP globally

Switch(config)# lldp enable

step 3 Enter the interface configure mode and set the attributes of LLDP on the interface

Switch(config)# interface eth-0-9
Switch(config)# no shutdown
Switch(config-if)# no lldp tlv 8021-org-specific vlan-name
Switch(config-if)# lldp tlv med location-id ecs-elin 1234567890
Switch(config-if)# lldp enable txrx
Switch(config-if)# exit

step 4 Set LLDP timers (optional)

Configure the transmitting interval of LLDP packet to 40 seconds; Configure the transmitting delay of LLDP packet to 3 seconds; Configure the reinit delay of LLDP function to 1 second.

Switch(config)# lldp timer msg-tx-interval 40
Switch(config)# lldp timer tx-delay 3
Switch(config)# lldp timer reinitDelay 1

step 5 Exit the configure mode

Switch(config)# end

step 6 Validation

To display the LLDP configuration, use following command:

Switch# show lldp local config
LLDP global configuration:
 ============================================================
LLDP function global enabled : YES
LLDP msgTxHold : 4
LLDP msgTxInterval : 40
LLDP reinitDelay : 1
LLDP txDelay : 3
Switch# show lldp local config interface eth-0-9
LLDP configuration on interface eth-0-9 :
 ============================================================
LLDP admin status : TXRX
Basic optional TLV Enabled:
Port Description TLV
System Name TLV
System Description TLV
System Capabilities TLV
Management Address TLV
IEEE 802.1 TLV Enabled:
Port Vlan ID TLV
Port and Protocol Vlan ID TLV
Protocol Identity TLV
IEEE 802.3 TLV Enabled:
MAC/PHY Configuration/Status TLV
Power Via MDI TLV
Link Aggregation TLV
Maximum Frame Size TLV
LLDP-MED TLV Enabled:
Med Capabilities TLV
Network Policy TLV
Location Identification TLV
Extended Power-via-MDI TLV
Inventory TLV
Switch# show running-config
 !
lldp enable
lldp timer msg-tx-interval 40
lldp timer reinit-delay 1
lldp timer tx-delay 3
 !
interface eth-0-9
lldp enable txrx
no lldp tlv 8021-org-specific vlan-name
lldp tlv med location-id ecs-elin 1234567890
 !
Switch# show lldp neighbor
Local Port eth-0-1 has 0 neighbor(s)
Local Port eth-0-2 has 0 neighbor(s)
Local Port eth-0-9 has 2 neighbor(s)
Remote LLDP Information of port eth-0-9
 ============================================================
Neighbor Index : 1
Chassis ID type: Mac address
Chassis ID : 48:16:be:a4:d7:09
Port ID type : Interface Name
Port ID : eth-0-9
TTL : 160
Expired time: 134
...
Location Identification :
ECS ELIN: 1234567890