Objective

The Cisco Discovery Protocol (CDP) is a protocol used by Cisco devices to share device information with other connected Cisco devices. This includes the type of device, firmware version, IP address, serial number, and other identifying information. CDP settings can be adjusted globally or on an individual port basis on the switch. .

Similar to Link Layer Discovery Protocol (LLDP), CDP is a link layer protocol for directly connected neighbors to advertise themselves and their capabilities to each other. However, unlike LLDP, CDP is a Cisco proprietary protocol.

This article provides instructions on how to configure CDP settings on a switch through the Graphical User Interface (GUI) which covers the following workflow:

1. Configure CDP global parameters on the switch.

2. Configure CDP settings per interface.

3. (Optional) If Auto Smartport is used to detect the capabilities of CDP devices, configure CDP settings on the Smartport properties. For instructions, click here.

Applicable Devices

- Sx350 Series

- SG350X Series

- Sx500 Series

- Sx550X Series

Software Version

- 2.3.0.130

Configure CDP Properties

Configure CDP Global Properties

Step 1. Log in to the web-based utility of your switch then choose Advanced in the Display Mode drop-down list.

Note: The available menu options may vary depending on the device model. In this example, SG350X-48MP is used.

Step 2. Choose Administration > Discovery - CDP > Properties.

Step 3. In the CDP Status area, check the Enable check box to activate CDP on the switch. This is enabled by default. If you enabled CDP, skip to Step 5.

Step 4. (Optional) In the CDP Frames Handling area, choose a radio button corresponding to the action you want the switch to take when it receives a CDP packet. This area is only available if CDP is disabled on the switch. After choosing an option, skip to Step 13.

The options are:

- Bridging - When CDP is globally disabled, CDP packets are bridged as regular data packets and forwarded based on the Virtual Local Area Network (VLAN).

- Filtering - When CDP is globally disabled, CDP packets are filtered or deleted.

- Flooding - When CDP is globally disabled, CDP packets are flooded to all the ports in the product that are in Spanning Tree Protocol (STP) forwarding state, ignoring the VLAN filtering rules.

Step 5. In the CDP Voice VLAN Advertisement area, check the Enable check box to have the switch advertise the voice VLAN over CDP on all ports that have CDP enabled and are members of the voice VLAN.

Step 6. In the CDP Mandatory TLVs Validation area, check the Enable check box to discard incoming CDP packets that do not contain the mandatory type-length-value (TLV).

Step 7. In the CDP Version area, click on a radio button to choose which version of CDP to use. CDPv2 is the most recent release of the protocol and provides more intelligent device tracking features.

Note: In this example, Version 2 is chosen.

Step 8. In the CDP Hold Time area, click on a radio button to determine the amount of time CDP packets are held before being discarded.

The options are:

- Use Default - Click to use the default amount of time of 180 seconds.

- User Defined - Click to enter a custom amount of time between 10 and 255 seconds in the provided field.

Note: In this example, hold time period is set to 240 seconds.

Step 9. In the CDP Transmission Rate field, select a radio button to determine the transmission rate of CDP packets in seconds.

The options are:

- Use Default - Click to use the default amount of time of 60 seconds.

- User Defined - Click to enter a custom amount of time between 5 and 254 seconds in the provided field.

Step 10. In the Device ID Format field, click on a radio button to determine what the format of the device ID will be.

The options are:

- MAC Address - Specifies that the Device-ID TLV contains the MAC address of the device.

- Serial Number - Specifies that Device-ID TLV contains the hardware serial number of the device.

- Hostname - Specifies that Device-ID TLV contains the hostname of the device.

Note: In this example, MAC Address is chosen.

Step 11. In the Source Interface area, choose a radio button to determine what IP address will be put in the TLV field of outgoing CDP packets.

The options are:

- Use Default - Click to use the IP address of the outgoing interface. If this option is chosen, skip to Step 13.

- User Defined - Click to choose an interface (the selected IP address of the interface will be used) from the drop-down lists in the Interface area.

Note: In this example, User Defined is chosen.

Step 12. (Optional) In the Interface area, choose the unit and Port from the corresponding drop-down lists.

Step 13. In the Syslog Voice VLAN Mismatch area, check the Enable check box to send a syslog message when a voice VLAN mismatch is detected. A VLAN mismatch is when VLAN information in an incoming frame does not match the advertised capabilities of the local device.

Step 14. In the Syslog Native VLAN Mismatch area, check the Enable check box to send a syslog message when a native VLAN mismatch is detected.

Step 15. In the Syslog Duplex Mismatch area, check the Enable check box to send a syslog message when a duplex mismatch is detected.

Step 16. Click Apply.

You should now have successfully configured the global CDP settings on your switch.

Configure CDP Interface Properties

Step 1. Log in to the web-based utility and choose Administration > Discovery-CDP > Interface Settings.

Note: This page is only available in advanced display mode. The display mode can be changed with the drop-down list in the top right corner of the web utility.

Step 2. (Optional) To choose a filter, choose a unit and click Go. In this example, Port of Unit 1 is chosen.

Note: If the switch is part of a stack, you can display the interfaces of other units in the stack by using the drop-down list at the top of the table.

Step 3. In the CDP Interface Settings Table, select the radio button of the interface you want to configure.

Step 4. Scroll down then click Edit.

Step 5. The Interface area displays the chosen port in the CDP Interface Settings Table. You can use the Unit and Port drop-down lists to choose another unit and port to configure, respectively.

Step 6. In the CDP Status area, check the Enable check box to enable CDP on the port specified.

Step 7. In the Syslog Voice VLAN Mismatch area, check the Enable check box to send a syslog message when a voice VLAN mismatch is detected on the port specified. A VLAN mismatch is when VLAN information in an incoming frame does not match the advertised capabilities of the local device.

Step 8. In the Syslog Native VLAN Mismatch area, check the Enable check box to send a syslog message when a native VLAN mismatch is detected on the port specified.

Step 9. In the Syslog Duplex Mismatch area, check the Enable check box to send a syslog message when a duplex mismatch is detected on the port specified.

Step 10. Click Apply then click Close. The changes will be applied to the specified port.

Step 11. (Optional) To quickly copy the settings of a port to another port or ports, choose its radio button, scroll down, and click the Copy Settings button.

Note: In this example, GE2 is chosen.

Step 12. (Optional) In the Copy configuration from entry field, enter the port or ports (separated by commas) that you want to copy the settings of the specified port to. You can also enter a range of ports.

Note: In this example, the CDP settings of port 2 will be applied to ports 13 and 15 to 20.

Step 13. Click Apply then click Close. The CDP port settings should be copied.

You should now have successfully configured the CDP settings on the ports on your switch.

Display or Clear the CDP Settings

CDP Local Information

Step 1. To display CDP local information of the switch, choose Administration > Discovery - CDP > CDP Local Information.

Step 2. In the Interface area, choose the unit and port from the corresponding drop-down lists.

Note: In this example, the CDP local information of port GE1 of Unit 1 is displayed.

The following details are displayed:

CDP State - Displays whether CDP is enabled or not.

Device ID TLV

- Device ID Type - Type of the device ID advertised in the device ID TLV.

- Device ID - Device ID advertised in the device ID TLV.

System Name TLV

- System Name - System name of the device.

Address TLV

- Address 1-3 - IP addresses (advertised in the device address TLV).

Port TLV

- Port ID - Identifier of port advertised in the port TLV.

Capabilities TLV

- Capabilities - Capabilities advertised in the port TLV.

Version TLV

- Version - Information about the software release on which the device is running.

Platform TLV

- Platform - Identifier of platform advertised in the platform TLV.

Native VLAN TLV

- Native VLAN - The native VLAN identifier advertised in the native VLAN TLV.

Full/Half Duplex TLV

- Duplex - Whether port is half or full duplex advertised in the full/half duplex TLV.

Appliance TLV

- Appliance ID - Type of device attached to port advertised in the appliance TLV.

- Appliance VLAN ID - VLAN on the device used by the appliance. For instance, if the appliance is an IP phone, this is the voice VLAN.

Extended Trust TLV

- Extended Trust - Enabled indicates that the port is trusted, meaning that the host/server from which the packet is received is trusted to mark the packets itself. In this case, packets received on such a port are not remarked. Disabled indicates that the port is not trusted in which case, the following field is relevant.

CoS for Untrusted Ports TLV

- CoS for Untrusted Ports - If Extended Trust is disabled on the port, this field displays the Layer 2 CoS value, meaning, an 802.1D/802.1p priority value. This is the COS value with which all packets received on an untrusted port are remarked by the device.

Power Available TLV

- Request ID - Last power request ID received echoes the Request-ID field last received in a Power Requested TLV. It is 0 if no Power Requested TLV was received since the interface last transitioned to Up.

- Power Management ID - Value incremented by 1 (or 2, to avoid 0) each time any one of the following events occur:

Available-Power or Management Power Level change

A Power Requested TLV is received with a Request-ID area that is different from the last-received set (or when the first value is received). The interface transitions to Down.

- Available Power - Amount of power consumed by port.

- Management Power Level - Displays the request of the suppliers to the pod device for its Power Consumption TLV. The device always displays “No Preference” in this field.

4-Wire Power via MDI (UPOE) TLV

Displays whether this TLV is supported.

- 4-Pair PoE Supported - Displays whether PoE is supported.

- Spare Pair Detection/Classification Required - Displays whether this classification is required.

- PD Spare Pair Desired State - Displays the PD spare pair desired state.

- PD Spare Pair Operational State - Displays the PSE spare pair state.

CDP Neighbor Information

Step 1. To display CDP neighbor information of the switch, choose Administration > Discovery - CDP > CDP Neighbor Information.

Step 2. (Optional) To choose a filter, check the Filter check box, choose a Local interface, and click Go.

The CDP Neighbor Information page contains the following fields for the link partner (neighbor):

- Device ID - Neighbors device ID.

- System Name - Neighbors system name.

- Local Interface - Number of the local port to which a neighbor is connected.

- Advertisement Version - CDP protocol version.

- Time to Live (sec) - Time interval (in seconds) after which the information for this neighbor is deleted.

- Capabilities - Capabilities advertised by neighbor.

- Platform - Information from Platform TLV of a neighbor.

- Neighbor Interface - Outgoing interface of a neighbor.

Step 3. (Optional) To view the CDP Neighbor details of a specific neighbor, click its Device ID radio button then click the Details button.

Note: In this example, the information of the Device ID 40a6e8e6f4d3 is displayed.

This page contains the following information about the neighbor:

- Device ID - Identifier of the neighboring device ID.

- System Name - Name of the neighboring device ID.

- Local Interface - Interface number of port through which frame arrived.

- Advertisement Version - Version of CDP.

- Time to Live - Time interval (in seconds) after which the information for this neighbor is deleted.

- Capabilities - Primary functions of the device. The capabilities are indicated by two octets. Bits 0 through 7 indicate Other, Repeater, Bridge, WLAN AP, Router, Telephone, DOCSIS cable device, and station, respectively. Bits 8 through 15 are reserved.

- Platform - Identifier of the neighbor platform.

- Neighbor Interface - Interface number of the neighbor through which frame arrived.

- Native VLAN - Neighbors native VLAN.

- Application - Name of application running on the neighbor.

- Duplex - Whether neighbors interface is half or full duplex.

- Addresses - Addresses of the neighbor.

- Power Drawn - Amount of power consumed by the neighbor on the interface.

- Version - Software version of the neighbor.

Power Request

- Request ID - Last power request ID received echoes the Request-ID field last received in a Power Requested TLV. It is 0 if no Power Requested TLV was received since the interface last transitioned to Up.

- Power Management ID - Value incremented by 1 (or 2, to avoid 0) each time any one of the following events occur:

Available-Power or Management Power Level areas change value. A Power Requested TLV is received with a Request-ID field that is different from the last-received set (or when the first value is received). The interface transitions to Down.

- Available Power - Amount of power consumed by port.

- Management Power Level - Displays the request of the supplier to the pod device for its Power Consumption TLV. The device always displays “No Preference” in this area.

4-Wire Power via MDI

- 4-Pair PoE Supported - Indicates system and port support enabling the 4-pair wire (true only for specific ports that have this hardware ability).

- Spare Pair Detection/Classification Required - Indicates that the 4-pair wire is needed.

- PD Spare Pair Desired State - Indicates a pod device requesting to enable the 4-pair ability.

- PD Spare Pair Operational State - Indicates whether the 4-pair ability is enabled or disabled.

Step 4. (Optional) Click the Close button to close the detailed CDP neighbor window.

Step 5. (Optional) Click the Clear Table button to disconnect all connected devices if from CDP, and if Auto Smartport is enabled, it will change all port types to default.

Step 6. (Optional) Click the Refresh button to refresh the CDP Neighbor Information Table.

CDP Statistics

The CDP Statistics page displays information regarding CDP frames that are sent or received from a port. CDP packets are received from devices attached to the switches interfaces, and are used for the Smartport feature.

Step 1. To display CDP statistics of the switch, choose Administration > Discovery - CDP > CDP Statistics.

Step 2. (Optional) To choose a filter, choose a unit and click Go. In this example, Port of Unit 1 is chosen.

The following fields are displayed for every interface including the OOB port:

- Packets Received/Transmitted:

- Version 1 - Number of CDP version 1 packets received/transmitted.

- Version 2 - Number of CDP version 2 packets received/transmitted.

- Total - Total number of CDP packets received/transmitted.

- CDP Error Statistics - This section displays the CDP error counters.

- Illegal Checksum - Number of packets received with illegal checksum value.

- Other Errors - Number of packets received with errors other than illegal checksums.

- Neighbors Over Maximum - Number of times that packet information could not be stored in cache because of lack of room.

Step 3. (Optional) To clear counters on a specific interface, click the radio button of the corresponding interface then click Clear Interface Counters.

In this example, GE26 is chosen.

Step 4. (Optional) To clear all counters on all interfaces, click Clear All Interface Counters. To refresh all counters, click Refresh.

You should now have successfully configured CDP settings on your switch using the GUI.

To configure CDP settings on a switch using command line interface (CLI), click here.