Configuring LLDP

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)#

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 7.0(3)F3(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 7.0(3)F3(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
 

LLDP Multi-Neighbor Support

Often times a network device sends multiple LLDP packets, out of which one is from the actual host. If a Cisco Nexus switch is communicating with the device but can only manage a single LLDP neighbor per interface, there is a good chance that becoming a neighbor with the actual required host will fail. To minimize this, Cisco Nexus switch interfaces can support multiple LLDP neighbors creating a better opportunity of becoming an LLDP neighbor with the correct device.

Support for multiple LLDP neighbors over the same interface requires LLDP multi-neighbor support to be configured globally.


Note


You must disable DCBX globally before configuring LLDP multi-neighbor support. Failure to do so invokes an error message.


Enabling or Disabling LLDP Multi-Neighbor Support on Interfaces

Before you begin

Consider the following before enabling LLDP multi-neighbor support on the interfaces:

  • Make sure that you have globally enabled LLDP on the device (global configuration command feature lldp ).


    Note


    After you globally enable LLDP, it is enabled on all supported interfaces by default.


  • A maximum of three (3) neighbors are supported on an interface.

  • LLDP multi-neighbor is not supported on FEX interfaces.

SUMMARY STEPS

  1. configure terminal
  2. no lldp tlv-select dcbxp
  3. [no] lldp multi-neighbor
  4. interface port / slot
  5. (Optional) [no] lldp transmit
  6. (Optional) [no] lldp receive
  7. (Optional) show lldp interfacel port / slot
  8. (Optional) copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

no lldp tlv-select dcbxp

Example:

switch(config)# no lldp tlv-select dcbxp
switch(config)#

Disables DCBXP TLVs globally.

Note

 

This command must be entered to avoid invoking an error message once LLDP multi-neighbor support is configured.

Step 3

[no] lldp multi-neighbor

Example:

switch(config)# lldp multi-neighbor
switch(config)#

Enables or disables LLDP multi-neighbor support for all interfaces globally.

Step 4

interface port / slot

Example:

switch(config)# interface 1/1
switch(config-if)#

Specifies the interface on which you are enabling LLDP and enters the interface configuration mode.

Step 5

(Optional) [no] lldp transmit

Example:

switch(config-if)# lldp transmit
(Optional)

Disables (or enables) the transmission of LLDP packets on the interface.

Note

 

The transmission of LLDP packets on this interface was enabled using the global feature lldp command. This option is to disable the feature for this specific interface.

Step 6

(Optional) [no] lldp receive

Example:

switch(config-if)# lldp receive
(Optional)

Disables (or enables) the reception of LLDP packets on the interface.

Note

 

The reception of LLDP packets on this interface was enabled using the global feature lldp command. This option is to disable the feature for this specific interface.

Step 7

(Optional) show lldp interfacel port / slot

Example:

switch(config-if)# show lldp interface 1/1
(Optional)

Displays the LLDP configuration on the interface.

Step 8

(Optional) copy running-config startup-config

Example:

switch(config)# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Enabling or Disabling LLDP Support on Port-Channel Interfaces

Before you begin

Consider the following before enabling LLDP support on port-channels:

  • Make sure that you have globally enabled LLDP on the device (global configuration command feature lldp ).


    Note


    After you globally enable LLDP, it is enabled on all supported interfaces by default.


  • Applying the lldp transmit and lldp receive configuration commands to a port-channel does not affect the configuration for the members of the port-channel.

  • LLDP neighbors form between the port-channels only when LLDP transmit and receive is configured on both sides of the port-channel.

  • The LLDP transmit and receive commands do not work on MCT, VPC, fex-fabric, FEX port-channels, and port-channel sub-interfaces.


    Note


    If you enable the LLDP port-channel feature globally, the LLDP configuration is not applied to any of these port types. If the configuration is removed from the port-channels or the port type feature is disabled globally, you cannot use the lldp port-channel command to enable it on the newly supported port-channels. The command was already issued. To enable LLDP port-channel on the port-channels in question, configure lldp transmit and lldp receive for each port-channel (see steps 4, 5, and 6 in the following procedure).


SUMMARY STEPS

  1. configure terminal
  2. no lldp tlv-select dcbxp
  3. [no] lldp port-channel
  4. interface port-channel [port-channel-number | port-channel-range]
  5. (Optional) [no] lldp transmit
  6. (Optional) [no] lldp receive
  7. (Optional) show lldp interface port-channelport-channel-number
  8. (Optional) copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

no lldp tlv-select dcbxp

Example:

switch(config)# no lldp tlv-select dcbxp
switch(config)#

Disables DCBXP TLVs globally. You must enter this command before configuring LLDP on port-channels.

Step 3

[no] lldp port-channel

Example:

switch(config)# lldp port-channel
switch(config)#

Enables or disables LLDP transmit and receive for all port channels globally.

Step 4

interface port-channel [port-channel-number | port-channel-range]

Example:

switch(config)# interface port-channel 3
switch(config-if)#

Example:

Enter a range of port-channel numbers if you are configuring LLDP over more than one port-channel:

switch(config)# interface port-channel 1-3
switch(config-if-range)#

Specifies the interface port-channel on which you are enabling LLDP and enters the interface configuration mode.

Specifies the interface port-channel range on which you are enabling LLDP and enters the interface range configuration mode.

Step 5

(Optional) [no] lldp transmit

Example:

switch(config-if)# lldp transmit
(Optional)

Disables (or enables) the transmission of LLDP packets on the port-channel or range of port-channels.

Note

 

The transmission of LLDP packets on this port-channel was enabled using the global lldp port-channel command in step 3. This option is to disable the feature for this specific port-channel.

Step 6

(Optional) [no] lldp receive

Example:

switch(config-if)# lldp receive
(Optional)

Disables (or enables) the reception of LLDP packets on the port-channel or range of port-channels.

Note

 

The reception of LLDP packets on this port-channel was enabled using the global lldp port-channel command in step 3. This option is to disable the feature for this specific port-channel.

Step 7

(Optional) show lldp interface port-channelport-channel-number

Example:

switch(config-if)# show lldp interface port-channel 3
(Optional)

Displays the LLDP configuration on the port-channel.

Step 8

(Optional) copy running-config startup-config

Example:

switch(config)# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.