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:
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.
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.
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:
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 transmitStep 5. To disable LLDP receive on an interface, enter the following:
SG350X(config-if)#no lldp receiveStep 6. Enter the end command to go back to the Privilege EXEC context:
SG350X(config-if)#endStep 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-configStep 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.
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:
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:
- PD — Port description
- SN — System name
- SD — System description
- SC — System capabilities
- 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.
- 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]You should now have successfully viewed the LLDP settings on a specific interface on your switch through the CLI.
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#configureStep 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 transmitStep 4. To enable LLDP receive on the interface, enter the following:
SG350X(config-if)#lldp receiveStep 5. To enable sending LLDP notifications on an interface, enter the following:
SG350X(config-if)#lldp notifications [enable | disable]The options are:
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:
- 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).
Step 7. (Optional) To restore the default optional TLVs configuration settings, enter the following:
SG350X(config-if)#no lldp optional-tlvStep 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:
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 pvidStep 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:
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:
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:
Make sure the protocol is globally configured on your switch. The available protocols are:
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:
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)#endStep 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]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-configStep 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.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
13-Dec-2018 |
Initial Release |