Objective

Link Layer Discovery Protocol (LLDP) Media Endpoint Discovery (MED) provides additional capabilities to support media endpoint devices such as to enable the advertisement of network policies for applications like voice or video, device location discovery, and troubleshooting information. LLDP and Cisco Discovery Protocol (CDP) are both similar protocols, and the difference is that LLDP facilitates vendor interoperability and CDP is Cisco proprietary.

LLDP enables a device to advertise its identification, configuration, and capabilities to neighboring devices that then store the data in a Management Information Base (MIB). The information shared among the neighbors helps reduce the time needed to add a new device to the Local Area Network (LAN) and also provides details necessary to troubleshoot many configuration problems.

LLDP can be used in scenarios where you need to work between devices which are not Cisco proprietary and devices which are Cisco proprietary. The switch gives all the information about the current LLDP status of ports and you can use this information to fix connectivity problems within the network. This is one of the protocols used by network discovery applications such as FindIT Network Management to discover devices in the network.

A given LAN switch might have devices with any of the following sets of capabilities attached to it:

- Devices that support only LLDP-MED (such as a third party phone)

- Devices that support only CDP (such as an older Cisco switch or older Cisco phone)

- Devices that support only LLDP (such as a third party router or third party switch)

- Devices that support both LLDP and CDP (such as a Cisco router)

- Devices that support both LLDP-MED and CDP (such as a Cisco phone)

- Devices that support LLDP, LLDP-MED, and CDP (such as a Cisco switch)

The diagram below shows a scenario wherein CDP and LLDP or LLDP-MED protocols are simultaneously running on Cisco devices. You can configure the control so that any of these protocols can be disabled.

The diagram below shows a scenario wherein control in protocols have already been configured accordingly: CDP is used between Cisco devices while LLDP-MED is used between Cisco and third party devices.

This article provides instructions on how to configure the LLDP port settings on the switch through the Command Line Interface (CLI).

Note: To learn how to configure the LLDP port settings of your switch through the web-based utility, click here.

Applicable Devices

- Sx300 Series

- Sx350 Series

- SG350X Series

- Sx500 Series

- Sx550X Series

Software Version

- 1.4.7.05 — Sx300, Sx500

- 2.2.8.4 — Sx350, SG350X, Sx550X

Configure LLDP Port Settings on the Switch through the CLI

Configuring the LLDP Port Settings allows you to activate LLDP and SNMP notification per port, and enter the Type-Length Values (TLVs) that are sent in the LLDP Protocol Data Unit (PDU). The LLDP-MED TLVs to be advertised can be configured through LLDP-MED Port Settings, and the management address TLV of the device may be configured. To learn how to configure the LLDP-MED port settings on a switch through the web-based utility, click here. For CLI-based instructions, click here.

The default LLDP global and interface settings are the following:

Feature

Default Setting

LLDP global state

Disabled

LLDP timer (packet update frequency)

30 seconds

LLDP hold multiplier (before discarding)

4 (120 seconds)

LLDP reinitialization delay

2 seconds

LLDP Tx delay

2 seconds

LLDP notifications interval

5 seconds

LLDP packets handling

Filtering (when LLDP is disabled)

LLDP chassis ID

MAC Address

LLDP tlv-select

Enabled to send and receive all TLVs.

LLDP interface state

Enabled

LLDP receive

Enabled

LLDP transmit

Enabled

LLDP med-tlv-select

Enabled to send all LLDP-MED TLVs

Important: Since LLDP is globally disabled by default, you have to enable it first before you configure the LLDP settings on a specific interface. To enable and configure the global LLDP properties on your switch, click here.

Disable LLDP on the Interface

LLDP is disabled globally on the switch and on all supported interfaces. You must enable LLDP globally to allow a device to send LLDP packets. Once enabled, no changes are required at the interface level.

You can configure the interface to selectively not to send and receive LLDP packets on the network. Disabling LLDP on a specific port will allow you to configure CDP to take control. This is advantageous if the connected device on the port is an older Cisco switch or older Cisco phone.

To disable LLDP on a specific interface, follow these steps:

Step 1. Log in to the switch console. The default username and password is cisco/cisco. If you have configured a new username or password, enter the credentials instead.

Note: The commands may vary depending on the exact model of your switch. In this example, the SG350X switch is accessed through Telnet.

Step 2. In the Privileged EXEC mode of the switch, enter the Global Configuration context by entering the following:

SG350X#configure

Step 3. Enter the interface that you want to configure by entering the following:

SG350X(config)#interface [interface-id]

Note: In this example, ge1/0/6 interface is used.

Step 4. To disable LLDP transmit on an interface, enter the following:

SG350X(config-if)#no lldp transmit

Step 5. To disable LLDP receive on an interface, enter the following:

SG350X(config-if)#no lldp receive

Step 6. Enter the end command to go back to the Privilege EXEC context:

SG350X(config-if)#end

Step 7. (Optional) In the Privileged EXEC mode of the switch, save the configured settings to the startup configuration file, by entering the following:

SG350X#copy running-config startup-config

Step 8. (Optional) Press Y for Yes or N for No on your keyboard once the Overwrite file [startup-config]… prompt appears.

You should now have disabled LLDP on a specific port of your switch through the CLI.

View LLDP Settings on an Interface

Step 1. To display the current configuration settings of the port or ports that you want to configure, enter the following:

SG350X#show lldp configuration [interface-id | detailed]

The options are:

- interface-id — (Optional) Specifies the port ID.

- detailed — (Optional) Displays information for non-present ports in addition to present ports.

Note: In this example, the LLDP configuration settings for ge1/0/6 is displayed. The global LLDP properties below are pre-configured settings.

The LLDP configuration displays the following information:

- LLDP state — The state of LLDP in the switch.

- Timer — The time interval between LLDP updates.

- Hold multiplier — The amount of time (as a multiple of the timer interval) that the receiving device holds an LLDP packet before discarding it.

- Reinit delay — The minimum time interval an LLDP port waits before re-initializing an LLDP transmission.

- Tx delay — The delay between successive LLDP frame transmissions initiated by value/status changes in the LLDP local systems MIB.

- Notifications Interval — The maximum transmission rate of LLDP notifications.

- LLDP packets handling — The LLDP packet handling when LLDP is globally disabled.

- Chassis ID — Identifier of chassis. The default chassis ID is MAC address.

- Port — The port number.

- State — The LLDP state of the port. The default is Rx and Tx.

- Optional TLVs — Optional TLVs that are advertised. The default values are SN and SC. Possible values are:

- PD — Port description

- SN — System name

- SD — System description

- SC — System capabilities

- Address — The management address that is advertised. The default value is automatic.

- Notifications — Indicates whether LLDP notifications are enabled or disabled. This is disabled by default.

- 802.3 optional TLVs — The TLVs the switch is going to publish. Available TLVs are:

- 802.3 MAC-PHY — Duplex and bit rate capability and the current duplex and bit rate settings of the sending device. It also indicates whether the current settings are due to auto-negotiation or manual configuration.

- 802.3 power via MDI — Maximum power transmitted via Multiple Document Interface (MDI).

- 802.3 Link Aggregation—Whether the link (associated with the port on which the LLDP PDU is transmitted) can be aggregated. It also indicates whether the link is currently aggregated, and if so, provides the aggregated port identifier.

- 802.3 Maximum Frame Size — Maximum frame size capability of the MAC-PHY implementation.

- 802.1 optional TLVs

- PVID — Port VLAN ID advertised. This feature is disabled by default.

- PPVID — Protocol Port VLAN ID advertised.

- VLANs — The VLANs that will be advertised.

- Protocols — The protocols that will be advertised.

Step 2. (Optional) To display the LLDP information that is advertised from a specific interface, enter the following:

SG350X#show lldp local [interface-id]

- interface-id — (Optional) Specifies a port ID.

You should now have successfully viewed the LLDP settings on a specific interface on your switch through the CLI.

Configure LLDP Settings on the Interface

To enable LLDP on an interface that has been disabled, follow these steps:

Step 1. In the Privileged EXEC mode of the switch, enter the Global Configuration context by entering the following:

SG350X#configure

Step 2. Enter the interface that you want to configure by entering the following:

Note: Make sure that the device connected to this port supports LLDP, such as a third party router or third party switch.

SG350X(config)#interface [interface-id]

Note: In this example, ge1/0/6 interface is used.

Step 3. To enable LLDP transmit on the interface, enter the following:

SG350X(config-if)#lldp transmit

Step 4. To enable LLDP receive on the interface, enter the following:

SG350X(config-if)#lldp receive

Step 5. To enable sending LLDP notifications on an interface, enter the following:

SG350X(config-if)#lldp notifications [enable | disable]

The options are:

- enable — Enables sending LLDP notifications.

- disable — Disables sending LLDP notifications.

Note: Sending LLDP notifications is disabled by default. Alternatively, you can use the no lldp notifications command to disable sending LLDP notifications.

Note: In this example, LLDP notifications is enabled.

Step 6. To specify which optional TLVs are transmitted on the interface, enter the following:

SG350X(config-if)#lldp optional-tlv [tlv-name | none]

Important: Entering a new optional TLV replaces the default optional TLVs.

The options are:

- - tlv — Specifies the TLVs to be included. Available optional TLVs are:

- port-desc — Port Description optional TLV.

- sys-name — System name optional TLV. This is transmitted by default.

- sys-desc — The system description optional TLV.

- sys-cap — System capabilities optional TLV. This is transmitted by default.

- 802.3-mac-phy — Duplex and bit rate capability and the current duplex and bit rate settings of the sending device. It also indicates whether the current settings are due to auto-negotiation or manual configuration.

- 802.3-lag — Whether the link (associated with the port on which the LLDP PDU is transmitted) can be aggregated. It also indicates whether the link is currently aggregated, and if so, provides the aggregated port identifier.

- 802.3-max-frame-size — Maximum frame size capability of the MAC-PHY implementation.

- Power-via-MDI — Maximum power transmitted via Multiple Document Interface (MDI).

- 4-wirePower-via-MDI — (relevant to PoE ports supporting 60W PoE) Proprietary Cisco TLV defined to support power over Ethernet that allow for 60 watts power (standard support is up to 30 watts).

- none — (Optional) Clear all optional TLVs from the interface.

Step 7. (Optional) To restore the default optional TLVs configuration settings, enter the following:

SG350X(config-if)#no lldp optional-tlv

Step 8. (Optional) To specify whether to transmit the 802.1 PVID, enter the following:

SG350X(config-if)#lldp optional-tlv 802.1 pvid [enable | disable]

The options are:

- enable — PVID is advertised.

- disable — PVID is not advertised.

Note: In this example, the transmission of optional TLV 802.1 PVID is enabled.

Step 9. (Optional) To revert the transmission of 802.1 PVID to the default configuration, enter the following:

SG350X(config-if)#no lldp optional-tlv 802.1 pvid

Step 10. (Optional) To specify whether to transmit the 802.1 PPVID, enter the following:

SG350X(config-if)#lldp optional-tlv 802.1 ppvid [add | remove] [ppvid]

The options are:

- add — The PPVID is advertised. The PPVID is the PVID that is used depending on the protocol of the packet.

- remove — The PPVID is not advertised.

Note: The PPVID range is from 0 to 4094. If the PPVID is 0, it indicates that the port is not capable of supporting port and protocol VLANs and/or the port is not enabled with any protocol VLANs. In this example, 802.1 PPVID is left with the default configuration.

Step 11. (Optional) To specify whether to transmit the 802.1 VLAN ID, enter the following:

SG350X(config-if)#lldp optional-tlv 802.1 vlan [add | remove] [vlan-id]

The options are:

- add — The VLAN ID is advertised.

- remove — The VLAN ID is not advertised.

Note: The VLAN ID range is from 0 to 4094. In this example, VLAN 20 is used.

Step 12. (Optional) To specify whether to transmit the 802.1 protocol, enter the following:

SG350X(config-if)#lldp optional-tlv 802.1 protocol [add | remove] [protocol]

The options are:

- add — Specifies to advertise the specified protocol.

- remove — Specifies not to advertise the specified protocol.

Make sure the protocol is globally configured on your switch. The available protocols are:

- stp — Spanning Tree Protocol optional TLV

- rstp — Rapid Spanning Tree Protocol optional TLV

- mstp — Multiple Spanning Tree Protocol optional TLV

- pause — Pause optional TLV

- 802.1x — Port-based Network Access Control (PNAC) optional TLV

- lacp — Link Aggregation Control Protocol optional TLV

- gvrp — GARP VLAN Registration Protocol optional TLV

Note: In this example, RSTP is used.

Step 13. (Optional) To specify the management address advertised by an interface, enter the following:

SG350X(config-if)#lldp management-address {ip-address | none | automatic [interface-id]}

The options are:

- ip-address — Specifies the static management address to advertise.

- none — Specifies that no address is advertised.

- automatic — Specifies that the software automatically selects a management address to advertise from all the IP addresses of the product. In case of multiple IP addresses, the software selects the lowest IP address among the dynamic IP addresses. If there are no dynamic addresses, the software selects the lowest IP address among the static IP addresses. This is the default advertisement.

- automatic interface-id — Specifies that the software automatically selects a management address to advertise from the IP addresses that are configured on the interface ID. In case of multiple IP addresses, the software selects the lowest IP address among the dynamic IP addresses of the interface. If there are no dynamic addresses, the software selects the lowest IP address among the static IP addresses of the interface. The interface ID can be one of the following types: Ethernet port, port-channel or VLAN. Note that if the port or port- channel are members in a VLAN that has an IP address, that address is not included because the address is associated with the VLAN.

Note: By default, no IP address is advertised. In this example, 192.168.1.150 is used.

Step 14. Enter the end command to go back to the Privilege EXEC context:

SG350X(config-if)#end

Step 15. (Optional) To display the current configuration settings of the port or ports that you have configured, enter the following:

SG350X#show lldp configuration [interface-id]

Step 16. (Optional) To display the LLDP information that is advertised from a specific interface, enter the following:

SG350X#show lldp local [interface-id]

- interface-id — (Optional) Specifies a port ID.

Step 17. (Optional) In the Privileged EXEC mode of the switch, save the configured settings to the startup configuration file, by entering the following:

SG350X#copy running-config startup-config

Step 18. (Optional) Press Y for Yes or N for No on your keyboard once the Overwrite file [startup-config]… prompt appears.

You should now have successfully configured the LLDP port settings on your switch through the CLI.

To learn and understand more about LLDP and LLDP-MED, click here.