Configuring LLDP

Information About Global LLDP Commands

You 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 description, 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:
  • Data Center Ethernet Parameter Exchange (DCBXP) TLV

  • Management address TLV

  • Port description TLV

  • Port VLAN ID TLV (IEEE 802.1 organizationally specific TLVs)

  • System capabilities TLV

  • System description TLV

  • System name TLV

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 acknowledgment to the received LLDP packet.

DCBXP is enabled by default, if you enable LLDP. 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.

Configuring LLDP

Before you begin

Ensure that the Link Layer Discovery Protocol (LLDP) feature is enabled on the switch.

SUMMARY STEPS

  1. switch# configure terminal
  2. switch(config)# lldp {holdtime seconds | reinit seconds | timer seconds | tlv-select {dcbxp | management-address [v4 | v6 ] | port-description | port-vlan | system-capabilities | system-description | system-name }}
  3. switch(config)# no lldp {holdtime | reinit | timer }
  4. (Optional)switch# show lldp

DETAILED STEPS

  Command or Action Purpose
Step 1

switch# configure terminal

Enters global configuration mode.

Step 2

switch(config)# lldp {holdtime seconds | reinit seconds | timer seconds | tlv-select {dcbxp | management-address [v4 | v6 ] | 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 management-address option to specify the management address TLV messages.

Use the management-address v4 option to specify the IPv4 management address TLV messages.

Use the management-address v6 option to specify the IPv6 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 }

Resets the LLDP values to their defaults.

Step 4

(Optional)switch# show lldp

Displays LLDP configurations.

Example

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 enable LLDP to send or receive the management address TLVs:

switch# configure terminal
switch(config)# lldp tlv-select management-address
switch(config)#

This example shows how to enable LLDP to send or receive IPv4 management address TLVs:

switch# configure terminal
switch(config)# lldp tlv-select management-address v4
switch(config)#

This example shows how to enable LLDP to send or receive IPv6 management address TLVs:

switch# configure terminal
switch(config)# lldp tlv-select management-address v6
switch(config)#

Information About LLDP Management TLV IP Addresses

You can use the LLDP management TLV to convey the system information of network devices to their neighbors. The LLDP management TLV includes the management address, which can be used by remote managers to obtain information related to the local device. Currently, by default, the IPv4 and IPv6 address of the management port mgmt0 are sent in the management TLV.

Cisco NX-OS Release 6.0(2)U4(1) introduces support for two TLVs, IPv4 and IPv6.

You can explicitly specify the management IPv4 or IPv6 address to be sent in the LLDP management TLV. This address can be one of the following:
  • IPv4 or IPv6 address of a port

  • IPv4 or IPv6 address of a VLAN (SVI)

The following rules are applied while selecting a management address to be sent in the LLDP management TLV for IPv4:
  • If the LLDP management v4 TLV is configured to be sent, and if the LLDP management IPv4 address of a port is configured, the LLDP management IPv4 address configured on the port is used in the management TLV of the LLDP protocol data unit (PDU) to be sent.

  • If the LLDP management v4 TLV is configured to be sent, and if the LLDP VLAN is configured:
    • If the VLAN ID is specified and the SVI on it is operationally enabled, the SVI IPv4 address of the VLAN ID is used in the management v4 TLV of the LLDP PDU to be sent.

    • If the native VLAN is available and the SVI on it is operationally enabled, the SVI IPv4 address of the native VLAN is used in the management v4 TLV of the LLDP PDU to be sent.

  • If the LLDP management v4 TLV is configured to be sent and if neither the LLDP management IPv4 address nor the LLDP VLAN is configured, the IPv4 address of the management port mgmt0 is used in the management v4 TLV of the LLDP PDU to be sent.

  • If the LLDP management v4 TLV has no IPv4 address configured, the interface port's MAC address is sent in one TLV.

  • If the LLDP management v4 TLV is not configured to be sent, no management TLV IPv4 address is sent.

The following rules are applied while selecting a management address to be sent in the LLDP management TLV for IPv6:
  • If the LLDP management v6 TLV is configured to be sent, and if the LLDP management IPv6 address of a port is configured, the LLDP management IPv6 configured on the port is used in the management TLV of the LLDP protocol data unit (PDU) to be sent.

  • If the LLDP management v6 TLV is configured to be sent, and if the LLDP VLAN is configured:
    • If the VLAN ID is specified and the SVI on it is operationally enabled, the SVI IPv6 address of the VLAN ID is used in the management v6 TLV of the LLDP PDU to be sent.

    • If the native VLAN is available and the SVI on it is operationally enabled, the SVI IPv6 address of the native VLAN is used in the management v6 TLV of the LLDP PDU to be sent.

  • If the LLDP management v6 TLV is configured to be sent and if neither the LLDP management IPv6 address nor the LLDP VLAN is configured, the IPv6 address of the management port mgmt0 is used in the management v6 TLV of the LLDP PDU to be sent.

  • If the LLDP management v6 TLV has no IPv6 address configured, the interface port's MAC address is sent in one TLV.

  • If the LLDP management v6 TLV is not configured to be sent, no management TLV IPv6 address is sent.

The following are the TLV selection processes that are followed based on the IPv4 or IPv6 address configured:
  • No IP address configured—The interface port's MAC address is sent in one TLV.

  • Only IPv4 address configured—Two TLVs are sent. One has the IPv4 address and the other has the interface port's MAC address. This process follows the rules applied while selecting a management address to be sent in the LLDP management TLV for IPv4.

  • Only IPv6 address configured—The IPv6 address is sent in one TLV. This process follows the rules applied while selecting a management address to be sent in the LLDP management TLV for IPv6.

  • Both IPv4 and IPv6 addresses configured—Two TLVs are sent. One has the IPv4 address and the other has the IPv6 address. This process follows the rules applied while selecting a management address to be sent in the LLDP management TLV for IPv4 and for IPv6.


    Note

    If you configure both TLVs and no IPv4 address is configured, no interface port's MAC address is sent in the v4 TLV. Only one TLV is sent.

    If only one TLV is sent that has the interface port's MAC address, this address is displayed in both the IPv4 and IPv6 address column of the peer.


Configuring LLDP Management TLV IP Addresses on an Interface

Before you begin

Ensure that the LLDP management TLV option is configured.

SUMMARY STEPS

  1. switch# configure terminal
  2. switch(config)# interface ethernet slot/port
  3. switch(config-if)# [no ] lldp tlv-set { management-address ip-address [ipv6 ] | vlan [vlan-id] }

DETAILED STEPS

  Command or Action Purpose
Step 1

switch# configure terminal

Enters global configuration mode.

Step 2

switch(config)# interface ethernet slot/port

Specifies an interface to configure and enters interface configuration mode.
Step 3

switch(config-if)# [no ] lldp tlv-set { management-address ip-address [ipv6 ] | vlan [vlan-id] }

Specifies the management IPv4 address, IPv6 address, or the VLAN ID.

The lldp tlv-set vlan command must be run on Layer 2 ports only. If you run this command on Layer 3 ports, this configuration will be ignored while determining the management IPv4 or IPv6 address for the LLDP management TLV. However, the configuration will not be removed. When the port layer mode is changed to Layer 2 again, this configuration will be considered again.

Example

This example shows how to specify the management IPv4 address in the management TLV:

switch# configure terminal
switch(config)# interface ethernet 1/8
switch(config-if)# lldp tlv-set management-address 1.1.1.20


This example shows how to specify the management IPv6 address in the management TLV:

switch# configure terminal
switch(config)# interface ethernet 1/8
switch(config-if)# lldp tlv-set management-address 0dc3:0dc3:0000:0000:0218:baff:fed8:239d ipv6


This example shows how to specify the VLAN ID in the management TLV:

switch# configure terminal
switch(config)# interface ethernet 1/8
switch(config-if)# lldp tlv-set vlan 10

Configuring Interface LLDP

SUMMARY STEPS

  1. switch# configure terminal
  2. switch(config)# interface type slot/port
  3. switch(config-if)# [no ] lldp {receive | transmit }
  4. (Optional) switch# show lldp {interface | neighbors [detail | interface | system-detail ] | timers | traffic }

DETAILED STEPS

  Command or Action Purpose
Step 1

switch# configure terminal

Enters global 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 {interface | neighbors [detail | interface | system-detail ] | timers | traffic }

(Optional)

Displays LLDP configurations.

Example

This example shows how to set an interface to transmit LLDP packets:

switch# configure terminal
switch(config)# interface ethernet 1/2
switch(config-if)# lldp transmit
 

This example shows how to configure an interface to disable LLDP:

switch# configure terminal
switch(config)# interface ethernet 1/2
switch(config-if)# no lldp transmit
switch(config-if)# no lldp receive
 

This example shows how to display LLDP interface information:

switch# show lldp interface ethernet 1/2
tx_enabled: TRUE
rx_enabled: TRUE
dcbx_enabled: TRUE
Port MAC address:    00:0d:ec:a3:5f:48
Remote Peers Information
No remote peers exist
 

This example shows how to display LLDP neighbor information:

switch# show lldp neighbors
Capability codes:
  (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
  (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
Device ID             Local Intf      Hold-time  Capability  Port ID
BLR-VPC2-QS8          Eth1/25         120       BR          Ethernet1/25
BLR-VPC2-QS8          Eth1/26         120       BR          Ethernet1/26
BLR-VPC2-QS8          Eth1/27         120       BR          Ethernet1/27
BLR-VPC2-QS8          Eth1/28         120       BR          Ethernet1/28
Total entries displayed: 4
switch#

This example shows how to display the interface details about LLDP neighbors:

switch(config-if)# show lldp neighbor interface ethernet 1/4 detail
Capability codes:
  (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
  (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
Device ID            Local Intf      Hold-time  Capability  Port ID

Chassis id: 0022.bddf.548b
Port id: Ethernet1/4
Local Port id: Eth1/4
Port Description: Ethernet1/4
System Name: abc.mycompany.com
System Description: Cisco Nexus Operating System (NX-OS) Software 6.0(2)U4(1)
TAC support: http://www.cisco.com/tac
Copyright (c) 2002-2014, Cisco Systems, Inc. All rights reserved.
Time remaining: 108 seconds
System Capabilities: B, R
Enabled Capabilities: B, R
Management Address: 10.105.215.235
Management Address IPV6: 0022.bddf.548b
Vlan ID: 1

Total entries displayed: 1
switch(config-if)#

This example shows how to display the system details about LLDP neighbors:

switch# sh lldp neighbors system-detail
Capability codes:
	(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
	(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
Device ID	Local Intf	Chassis ID	PortID	Hold-time	Capability

switch-2		Eth1/7		0005.73b7.37ce	Eth1/7		120	B
switch-3		Eth/9			0005.73b7.37d0	Eth1/9		120	B
switch-4		Eth1/10	0005.73b7.37d1	Eth1/10	120	B
Total entries displayed: 3

This example shows how to display LLDP timer information:

switch# show lldp timers
LLDP Timers
holdtime 120 seconds
reinit 2 seconds
msg_tx_interval 30 seconds
 

This example shows how to display information about LLDP counters:

switch# show lldp traffic
LLDP traffic statistics:
 
    Total frames out: 8464
    Total Entries aged: 6
    Total frames in: 6342
    Total frames received in error: 2
    Total frames discarded: 2
    Total TLVs unrecognized: 0