Objective

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

Introduction

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:

- 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.

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.

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 Port Settings on the Switch through the CLI

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:

- 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, 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.

Disable LLDP-MED on a Port

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

Step 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 disable

Step 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.

Configure LLDP-MED Port Settings

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

- enable - Enable LLDP-MED on the port.

- tlv - Specifies the TLV that should be included. Available TLVs are:

- network-policy - Specifies whether the Network Policy TLV is transmitted.

- location - Specifies whether Location TLV is transmitted.

- poe-pse - Specifies whether Power over Ethernet Power Sourcing Equipment (PoE-PSE) is transmitted.

- inventory - Specifies whether Inventory TLV is transmitted.

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 med

Step 5. To define LLDP-MED network policy on the port, enter the following:

SG350X(config)#lldp med network-policy [add | remove] number

The options are:

- add or remove number - Attaches or removes the specified network policy to the interface accordingly.

- number - Specifies the network policy sequential number. The range is 1-32

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:

- enable - Enables sending LLDP-MED topology change notifications.

- disable - Disables sending LLDP-MED topology change notifications.

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:

- coordinate data - Specifies the location data as coordinates in hexadecimal format. This gives the coordinate location such as ID, latitude, altitude, longitude, altitude type and so on. You can enter 16 pairs of hexadecimal numbers in this field.

- civic-address data - Specifies the location data as a civic address in hexadecimal format. This gives the location civic addresses such as Name, Postal code, Building number, Unit, Floor, Landmark and so on. You can enter 6 to 160 pairs of hexadecimal numbers in this field.

- ecs-elin data - Specifies the location data as an Emergency Call Service Emergency Location Identification Number (ECS ELIN) in hexadecimal format. This is used to specify the location of the network device by its ELIN information. You can enter 10 to 25 pairs of hexadecimal numbers in this field.

- data - Specifies the location data in the format defined in ANSI/TIA 1057: dotted hexadecimal data. Each byte in a hexadecimal character string is two hexadecimal digits. Bytes are separated by a period or colon.

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

Step 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-config

Step 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.

View a video related to this article...

Click here to view other Tech Talks from Cisco