Configuring LLDP
This chapter describes how to configure the global and interface LLDP settings. It includes the following sections:
Configuring Global LLDP Commands
SUMMARY STEPSYou can set global LLDP settings. These settings include the length of time before discarding LLDP information received from peers, the length of time to wait before performing LLDP initialization on any interface, the rate at which LLDP packets are sent, the port desription, system capabilities, system description, and system name.
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.
The switch supports the following required management LLDP TLVs:
The Data Center Bridging Exchange Protocol (DCBXP) is an extension of LLDP. It is used to announce, exchange, and negotiate node parameters between peers. DCBXP parameters are packaged into a specific DCBXP TLV. This TLV is designed to provide an acknowledgement to the received LLDP packet.
DCBXP is enabled by default, provided LLDP is enabled. When LLDP is enabled, DCBXP can be enabled or disabled using the [no] lldp tlv-select dcbxp command. DCBXP is disabled on ports where LLDP transmit or receive is disabled.
To configure LLDP settings, perform this task:
2. switch(config)# lldp {holdtime seconds | reinit seconds | timer seconds | tlv-select {dcbxp | management-address | port-description | port-vlan | system-capabilities | system-description | system-name}}
3. switch(config)# no lldp {holdtime | reinit | timer}
DETAILED STEPS
Command or Action Purpose Step 1 switch# configure terminal
Enters configuration mode.
Step 2 switch(config)# lldp {holdtime seconds | reinit seconds | timer seconds | tlv-select {dcbxp | management-address | port-description | port-vlan | system-capabilities | system-description | system-name}}
Configures LLDP options.
Use the holdtime option to set the length of time (10 to 255 seconds) that a device should save LLDP information received before discarding it. The default value is 120 seconds.
Use the reinit option to set the length of time (1 to 10 seconds) to wait before performing LLDP initialization on any interface. The default value is 2 seconds.
Use the timer option to set the rate (5 to 254 seconds) at which LLDP packets are sent. The default value is 30 seconds.
Use the tlv-select option to specify the type length value (TLV). The default is enabled to send and receive all TLVs.
Use the dcbxp option to specify the Data Center Ethernet Parameter Exchange (DCBXP) TLV messages.
Use the managment-address option to specify the management address TLV messages.
Use the port-description option to specify the port description TLV messages.
Use the port-vlan option to specify the port VLAN ID TLV messages.
Use the system-capabilities option to specify the system capabilities TLV messages.
Use the system-description option to specify the system description TLV messages.
Use the system-name option to specify the system name TLV messages.
Step 3 switch(config)# no lldp {holdtime | reinit | timer}
Reset the LLDP values to their defaults.
Step 4 (Optional)switch#show lldp Displays LLDP configurations.
This example shows how to configure the global LLDP hold time to 200 seconds:
switch# configure terminal switch(config)# lldp holdtime 200 switch(config)#This example shows how to to enable LLDP to send or receive the management address TLVs:
switch# configure terminal switch(config)# lldp tlv-select management-address switch(config)#Configuring Interface LLDP Commands
SUMMARY STEPS2. switch(config)# interface type slot/port
3. switch(config-if)# [no] lldp {receive | transmit}
DETAILED STEPS
Command or Action Purpose Step 1 switch# configure terminal
Enters configuration mode.
Step 2 switch(config)# interface type slot/port
Selects the interface to change.
Step 3 switch(config-if)# [no] lldp {receive | transmit}
Sets the selected interface to either receive or transmit.
The no form of the command disables the LLDP transmit or receive.
Step 4 (Optional)switch#show lldp Displays LLDP configurations.
This example shows how to set an interface to transmit LLDP packets:
switch# configure terminalswitch(config)# interface ethernet 1/2switch(config-if)# lldp transmitThis example shows how to configure an interface to disable LLDP:
switch# configure terminalswitch(config)# interface ethernet 1/2switch(config-if)# no lldp transmitswitch(config-if)# no lldp receiveThis example shows how to display LLDP interface information:
switch# show lldp interface ethernet 1/2tx_enabled: TRUErx_enabled: TRUEdcbx_enabled: TRUEPort MAC address: 00:0d:ec:a3:5f:48Remote Peers InformationNo remote peers existThis example shows how to display LLDP neighbor information:
switch# show lldp neighborsLLDP NeighborsRemote Peers Information on interface Eth1/40Remote peer's MSAP: length 12 Bytes:00 c0 dd 0e 5f 3a 00 c0 dd 0e 5f 3aLLDP TLV'sLLDP TLV type:Chassis ID LLDP TLV Length: 7LLDP TLV type:Port ID LLDP TLV Length: 7LLDP TLV type:Time to Live LLDP TLV Length: 2LLDP TLV type:LLDP Organizationally Specific LLDP TLV Length: 55LLDP TLV type:LLDP Organizationally Specific LLDP TLV Length: 5LLDP TLV type:END of LLDPDU LLDP TLV Length: 0Remote Peers Information on interface Eth1/34Remote peer's MSAP: length 12 Bytes:00 0d ec a3 27 40 00 0d ec a3 27 69LLDP TLV'sLLDP TLV type:Chassis ID LLDP TLV Length: 7LLDP TLV type:Port ID LLDP TLV Length: 7LLDP TLV type:Time to Live LLDP TLV Length: 2LLDP TLV type:LLDP Organizationally Specific LLDP TLV Length: 55LLDP TLV type:LLDP Organizationally Specific LLDP TLV Length: 5LLDP TLV type:END of LLDPDU LLDP TLV Length: 0Remote Peers Information on interface Eth1/33Remote peer's MSAP: length 12 Bytes:00 0d ec a3 27 40 00 0d ec a3 27 68LLDP TLV'sLLDP TLV type:Chassis ID LLDP TLV Length: 7LLDP TLV type:Port ID LLDP TLV Length: 7LLDP TLV type:Time to Live LLDP TLV Length: 2LLDP TLV type:LLDP Organizationally Specific LLDP TLV Length: 55LLDP TLV type:LLDP Organizationally Specific LLDP TLV Length: 5LLDP TLV type:END of LLDPDU LLDP TLV Length: 0This example shows how to display LLDP timer information:
switch# show lldp timersLLDP Timersholdtime 120 secondsreinit 2 secondsmsg_tx_interval 30 secondsThis example shows how to display LLDP counters:
switch# show lldp trafficLLDP traffic statistics:Total frames out: 8464Total Entries aged: 6Total frames in: 6342Total frames received in error: 2Total frames discarded: 2Total TLVs unrecognized: 0