This article provides instructions on how to configure the Link Layer Discovery Protocol (LLDP) port settings on the switch through the Command Line Interface (CLI).
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). LLDP and Cisco Discovery Protocol (CDP) are both similar protocols, but the difference is that LLDP facilitates vendor interoperability and CDP is Cisco proprietary. 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.
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. An LLDP-MED network policy is a set of configuration settings used for real-time applications such as voice or video. Each outgoing LLDP packets to the attached media endpoint device will have a network policy included to it. The MED sends its traffic as defined on the network policy.
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.
Important: The LLDP-MED Network Policy configuration is a prerequisite for this configuration. To know how to configure network policy through the web-based utility, click here for instructions. For CLI-based instructions, click here.
Network Policy Discovery is one of the most important feature because it provides a mechanism for a switch to notify a phone of the VLAN number that it should use. The phone can plug into any switch, obtain its VLAN number, and then start communications with the call control. Network Policy Discovery solves the major problem today with third party phones working with Cisco switches as well as Cisco phones working with third party switches. For both of these cases, an inter-working problem makes deployment problematic.
A network policy, if configured, can be included in the outgoing LLDP packets to the attached LLDP media endpoint device. The media endpoint device must send its traffic as specified in the network policy it receives. For example, a policy can be created for Voice over Internet Protocol (VoIP) traffic that instructs VoIP phone to:
By default, there is no configured network policy on the switch. The default LLDP-MED global and interface settings are the following:
Feature |
Default Setting |
LLDP-MED Network Policy Voice |
Auto |
LLDP-MED Fast Start Repeat Count |
3 |
LLDP-MED Capabilities (Interface) |
Yes |
LLDP-MED Network Policy (Interface) |
Yes (Auto) |
LLDP-MED Location (Interface) |
No |
LLDP-MED PoE (Interface) |
No |
LLDP-MED Notifications (Interface) |
Disabled |
LLDP-MED Inventory (Interface) |
No |
Important: Since LLDP is globally disabled by default, you have to enable it first before you configure the LLDP-MED settings on your switch. To enable and configure the global LLDP properties on your switch, click here.
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. To display the current configuration settings of the port or ports that you want to configure, enter the following:
SG350X#show lldp med configuration [interface-id | detailed]The options are:
Note: In this example, the LLDP configuration settings for ge1/0/5 is displayed. The LLDP-MED configuration settings for the specified interface are all set to the default values.
You should now have successfully viewed the LLDP-MED settings on your switch through the CLI.
You can configure the interface to selectively not to send and receive LLDP-MED packets on the network. Disabling LLDP-MED on a specific port will allow you to configure CDP to take control. This is advantageous if the connected device on the port is a Cisco switch or Cisco phone.
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:
SG350X(config)#interface [interface-id]Step 3. To disable LLDP-MED on the specific port, enter the following:
SG350X(config)#lldp med disableStep 4. Enter the end command to go back to the Privilege EXEC context:
Step 5. (Optional) To verify the configured settings, enter the following:
You should now have successfully disabled LLDP-MED on the specific port on your switch through the CLI.
Configuring the LLDP-MED settings on a port enables the selection of LLDP-MED Type-Length Values (TLVs) and/or the network policies that are to be included in the outgoing LLDP-MED advertisement for each interface. LLDP-MED TLVs are used to describe individual pieces of information that the protocols transfer.
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 Cisco phone, a third party phone, or a Cisco switch.
SG350X(config)#interface [interface-id]Note: In this example, interface ge1/0/5 is used.
Step 3. To define LLDP-MED settings on the specific port, enter the following:
SG350X(config-if)#lldp med enable [tlv]The options are:
Note: By default, LLDP-MED is enabled with the network-policy TLV. The Capabilities TLV is always included if LLDP-MED is enabled.
Step 4. (Optional) To return the LLDP-MED settings of the port, enter the following:
SG350X(config-if)#nolldp medStep 5. To define LLDP-MED network policy on the port, enter the following:
SG350X(config)#lldp med network-policy [add | remove] numberThe options are:
Note: For each port, you can only attach only one network policy per application such as voice, voice-signaling, and so on. In this example, network policy 1 is added.
Step 6. (Optional) To remove all LLDP-MED network policies from the port, enter the following:
SG350X(config-if)#nolldp med network-policy [number]Step 7. (Optional) To configure the sending of LLDP-MED topology change Simple Network Management Protocol (SNMP) notifications on a specific port, enter the following:
SG350X(config-if)#lldp med notifications topology-change [enable | disable]The options are:
Note: In this example, SNMP notifications are enabled. The default setting is Disabled.
Step 8. To configure the location information for the LLDP-MED of a port, enter the following:
SG350X(config-if)#lldp med location {{[coordinate data] | [civic-address data] | [ecs-elin data]}}The options are:
Note: In this example, civic-address 12AB34CD56EF and ecs-elin 12AB34CD56EF78AB90CD12EF are used.
Step 9. Enter the end command to go back to the Privilege EXEC context:
SG350X(config-if)#endStep 10. (Optional) To verify the configured settings, enter the following:
SG350X#show lldp med configuration [interface-id]Step 11. (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 12. (Optional) Press Y for Yes or N for No on your keyboard once the Overwrite file [startup-config].... prompt appears.
You should now successfully configured the LLDP-MED settings on the port of 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 |