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.
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:
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:
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:
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:
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:
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.
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.
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
System Name TLV
Address TLV
Port TLV
Capabilities TLV
Version TLV
Platform TLV
Native VLAN TLV
Full/Half Duplex TLV
Appliance TLV
Extended Trust TLV
CoS for Untrusted Ports TLV
Power Available TLV
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.
4-Wire Power via MDI (UPOE) TLV
Displays whether this TLV is supported.
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):
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:
Power Request
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.
4-Wire Power via MDI
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.
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:
- 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.
- 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.