Objective

Link Layer Discovery Protocol (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, and 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.

Note: It is your responsibility to manually create the Virtual Local Area Networks (VLANs) and their port memberships based on the network policies and their associated interfaces. To learn how to configure port VLAN membership settings on your switch through the web-based utility, click here.

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-MED network policy on the switch through the CLI.

Note: To learn how to configure the LLDP port settings of your switch through the web-based utility, click here. For CLI-based instructions, 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-MED Network Policy on the Switch through the CLI

Network Policy Discovery is one of the most important 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 VoIP traffic that instructs VoIP phone to:

- Send voice traffic on VLAN 10 as tagged packet and with 802.1p priority 5.

- Send voice traffic with Differentiated Services Code Point (DSCP) 46.

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.

View LLDP MED Configuration Settings on the Switch

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:

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

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

Note: In this example, detailed is used. The LLDP-MED configuration settings shown below are all set to the default values.

You should now have successfully viewed the LLDP-MED settings on your switch through the CLI.

Disable LLDP-MED Network Policy

Important: The default setting of LLDP-MED network policy for voice application is set to Auto. This setting generates an LLDP-MED network policy for voice, if the voice VLAN operation mode is auto voice VLAN. The voice VLAN, 802.1p priority, and the DSCP of the voice VLAN are used in the policy. The network policy is attached automatically to the voice VLAN. When this feature is enabled, you cannot manually configure a voice network policy.

To manually configure an LLDP-MED network policy, you must disable the LLDP-MED auto network policy on your switch.

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

SG350X#configure

Step 2. To disable the LLDP-MED auto network policy on your switch, enter the following:

SG350X(config)#no lldp med network-policy voice auto

Step 3. (Optional) To enable the LLDP-MED auto network policy, enter the following:

SG350X(config)#lldp med network-policy voice auto

Step 4. Enter the exit command to go back to the Privilege EXEC context:

SG350X(config)#exit

Step 5. (Optional) To verify the configured setting, enter the following:

Note: In this example, the LLDP-MED network policy is changed from auto to manual.

You should now have successfully disabled the LLDP-MED auto network policy setting on your switch through the CLI.

Configure LLDP-MED Network Policy

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

SG350X#configure

Step 2. To define LLDP-MED network policy on your switch, enter the following:

SG350X(config)#lldp med network-policy [number] [application] [vlan vlan-id] {{vlan-type [tagged | untagged]}} [up priority] [dscp value]

The options are:

- number — Network policy sequential number. The range is from 1 up to 32.

- application — The name or the number of the primary function of the application defined for this network policy. Available application names are:

- voice — Apply the network policy to a voice application.

- voice-signaling — Apply the network policy to a Voice Signaling application.

- guest-voice — Apply the network policy to a guest voice application.

- guest-voice-signaling — Apply the network policy to a guest voice signaling application.

- softphone-voice — Apply the network policy to a softphone voice application.

- video-conferencing — Apply the network policy to a video conferencing application.

- streaming-video — Apply the network policy to a streaming video application.

-video-signaling — Apply the network policy to a video signaling application.

- vlan vlan-id — (Optional) VLAN identifier for the application.

- vlan-type — (Optional) Specifies if the application is using a tagged or an untagged VLAN.

- Tagged — The interface is a member of the chosen VLAN and packets sent from this interface destined to the chosen VLAN have the packets tagged with the VLAN ID.

- Untagged — The interface is a member of the chosen VLAN and packets sent from this interface destined to the chosen VLAN are not tagged with the VLAN ID. A port can be added as untagged only to one VLAN.

- up priority — (Optional) User Priority or Layer 2 priority to be used for the specified application. The least priority is 0 and 7 is the highest priority.

- dscp value — (Optional) The DSCP value to associate with application data sent by neighbors. This informs the neighbors how they should mark the application traffic that they send to the switch. It ranges from 0 to 63.

Note: In this example, the network policy number is 1 for the voice application. The VLAN ID is 40 with a tagged VLAN type. The user priority is set to 5 and the DSCP value is 4.

Step 3. (Optional) To remove a specific LLDP-MED network policy, enter the following:

SG350X(config)#no lldp med network-policy [number]

Step 4. (Optional) When a port comes up, LLDP can send packets more quickly than usual using its fast-start mechanism. To define the number of packets that is sent during the activation of the fast-start mechanism, enter the following:

SG350X(config)#lldp med fast-start repeat-count [number]

- repeat-count number — Specifies the number of times the fast start LLDP Data Unit (LLDPDU) is being sent during the activation of the fast start mechanism. The range is 1 to 10 and the default value is 3.

Note: In this example, the fast-start repeat count is set to 5.

Step 5. (Optional) To return the LLDP-MED fast-start mechanism value to the default setting, enter the following:

SG350X(config)#no lldp med fast-start repeat-counter

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

SG350X(config)#exit

Step 7. (Optional) To verify the configured settings, enter the following:

SG350X#copy running-config startup-config

Step 8. (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 9. (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 network policy settings of your switch through the CLI. To learn and understand more about LLDP and LLDP-MED, click here.

Network policies are associated with ports by configuring the LLDP-MED port settings. You can manually configure one or more network policies and the interfaces where the policies are to be sent. To learn how to associate network policies with ports, click here for web-based utility-based instructions. For CLI-based, click here.

You can also configure the device to automatically generate and advertise a network policy for voice application based on the voice VLAN maintained by the device. To learn about how to configure this function through the web-based utility, click here. For CLI-based instructions, click here.