- New and Changed Information
- Preface
- Overview
- Configuring CDP
- Configuring the Domain
- Managing Server Connections
- Managing the Configuration
- Working with Files
- Managing Users
- Configuring NTP
- Configuring Local SPAN and ERSPAN
- Configuring SNMP
- Configuring NetFlow
- Configuring System Message Logging
- Configuring iSCSI Multipath
- Configuration Limits
- Index
Configuring CDP
This chapter describes how to configure the Cisco Discovery Protocol (CDP), and includes the following sections:
•
Verifying the CDP Configuration
•
Configuration Example for CDP
Information About CDP
Cisco Discovery Protocol (CDP) runs over the data link layer and is used to advertise information to all attached Cisco devices, and to discover and view information about attached Cisco devices. CDP runs on all Cisco-manufactured equipment.
CDP gathers protocol addresses of neighboring devices and discovers the platform of those devices. CDP runs over the data link layer only. Two systems that support different Layer 3 protocols can learn about each other.
Each device you configure for CDP sends periodic advertisements to a multicast address. Each device advertises at least one address at which it can receive SNMP messages. The advertisements also contain hold-time information, which indicates the length of time that a receiving device should hold CDP information before discarding it. You can configure the advertisement or refresh timer and the hold timer.
CDP Version 2 (CDPv2) allows you to track instances where the native VLAN ID or port duplex states do not match between connecting devices.
CDP advertises the following type-length-value fields (TLVs):
•
Device ID
•
Address
•
Port ID
•
Capabilities
•
Version
•
Platform
•
Native VLAN
•
Full/Half Duplex
•
MTU
•
SysName
•
SysObjectID
•
Management Address
•
Physical Location
All CDP packets include a VLAN ID. The CDP packet is untagged, so it goes over the native/access VLAN, which is then also added to the packet.
For more information on VLANs, see the Cisco Nexus 1000V Layer 2 Switching Configuration Guide, Release 4.2(1)SV1(4).
High Availability
Stateless restarts are supported for CDP. After a reboot or a supervisor switchover, the running configuration is applied.
Guidelines and Limitations
CDP has the following configuration guidelines and limitations:
•
CDP can discover up to 256 neighbors per port if the port is connected to a hub with 256 connections.
•
CDP must be enabled globally before you can configure CDP on an interface. CDP is enabled globally by default, but can be disabled using the "Enabling or Disabling CDP Globally" procedure.
•
You can configure CDP on physical interfaces and port channels only.
Defaults
Table 2-1 lists the CDP default settings.
|
|
|
|---|---|
CDP |
Enabled globally and on all interfaces |
CDP version |
Version 2 |
CDP device ID |
System name |
CDP timer |
60 seconds |
CDP hold timer |
180 seconds |
Configuring CDP
This section includes the following topics:
•
Disabling CDP on an Interface
CDP Global Configuration
This section includes the following topics:
•
Enabling or Disabling CDP Globally
Enabling or Disabling CDP Globally
Use this procedure to enable or disable CDP globally.Although CDP is enabled globally by default, should it be disabled, you can use this procedure to enable it again.
BEFORE YOU BEGIN
Before beginning this procedure, you must know or do the following:
•
You are logged in to the CLI in EXEC mode.
•
CDP must be enabled globally before you can configure it on an interface.
•
When you globally disable the CDP feature, all CDP configurations are removed.
SUMMARY STEPS
1.
config t
2.
[no] cdp enable
DETAILED STEPS
Advertising a CDP Version
Use this procedure to designate the CDP version to advertise on the device.
BEFORE YOU BEGIN
Before beginning this procedure, you must know or do the following:
•
You know the version of CDP currently supported on the device.
•
Only one version of CDP (version 1 or version 2) is advertised at a time for all uplinks and port channels on the switch.
•
For more information about CDP, see the "Information About CDP" section.
SUMMARY STEPS
1.
config t
2.
cdp advertise {v1 | v2}
3.
(Optional) show cdp global
4.
(Optional) copy running-config startup-config
DETAILED STEPS
Configuring CDP Options
Use this procedure to configure the following for CDP:
•
the device ID format to use
Note
Only the system-name device ID format is supported.
•
the maximum hold time for neighbor information
•
the refresh time for sending advertisements
BEFORE YOU BEGIN
Before beginning this procedure, you must know or do the following:
•
You can view output from upstream cat6k switch using the show cdp neighbor command.
•
If you are setting the holdtime, you know how long you want CDP to retain neighbor information.
•
If you are setting the CDP timer, you know how often you want CDP to advertise.
•
For more information about CDP, see the "Information About CDP" section.
SUMMARY STEPS
1.
config t
2.
(Optional) cdp format device-id system-name
3.
show cdp neighbors from the upstream device
4.
show cdp neighbors from your device
5.
(Optional) cdp timer seconds
6.
(Optional) cdp holdtime seconds
7.
(Optional) show cdp global
8.
(Optional) copy running-config startup-config
DETAILED STEPS
CDP Interface Configuration
This section includes the following procedures:
•
Disabling CDP on an Interface
Enabling CDP on an Interface
Use this procedure to enable CDP on a specific interface. Although CDP is enabled by default on all interfaces, should it become disabled, you can use this procedure to enable it again.
BEFORE YOU BEGIN
Before beginning this procedure, you must know or do the following:
•
The CDP feature is enabled globally. CDP is enabled globally by default, but can also be re-enabled using the "Enabling or Disabling CDP Globally" procedure.
•
For more information about CDP, see the "Information About CDP" section.
SUMMARY STEPS
1.
config t
2.
interface interface-type number
3.
no cdp enable
4.
cdp enable
5.
show cdp interface interface-type number
6.
copy running-config startup-config
DETAILED STEPS
This example shows how to enable CDP on port channel 2:
n1000v# config t
n1000v(config)# interface port-channel 2
n1000v(config-if)# no cdp enable
n1000v(config-if)# cdp enable
n1000v(config-if)# copy running-config startup-config
Disabling CDP on an Interface
Use this procedure to disable CDP on a specific interface.
BEFORE YOU BEGIN
Before beginning this procedure, you must know or do the following:
•
CDP is currently enabled on the device.
Note
If CDP is disabled on the device, then it is also disabled for all interfaces.
•
CDP is currently enabled on the specific interface you want to configure.
•
For more information about CDP, see the "Information About CDP" section.
SUMMARY STEPS
1.
config t
2.
interface interface-type number
3.
no cdp enable
4.
(Optional) show cdp interface interface-type number
5.
(Optional) copy running-config startup-config
DETAILED STEPS
This example shows how to disable CDP on mgmt0:
n1000v# config t
n1000v(config)# interface mgmt0
n1000v(config-if)# no cdp enable
n1000v(config-if)# show cdp interface mgmt0
mgmt0 is up
CDP disabled on interface
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
n1000v(config-if)# copy running-config startup-config
Monitoring CDP
To monitor CDP traffic, use the following command:
|
|
|
|---|---|
show cdp traffic interface interface-type slot/port |
Displays the CDP traffic statistics on an interface. See Example 2-7 |
Clearing CDP Statistics
To clear CDP statistics, use one of the following commands.
Verifying the CDP Configuration
To verify the CDP configuration, use one of the following commands:
|
|
|
|---|---|
show cdp all |
Displays all interfaces that have CDP enabled. See Example 2-1 |
show cdp entry {all | name entry-name} |
Displays the CDP database entries. See Example 2-2 |
show cdp global |
Displays the CDP global parameters. See Example 2-4 |
show cdp interface interface-type slot/port |
Displays the CDP interface status. See Example 2-5 |
show cdp neighbors {detail | interface interface-type slot/port} |
Displays the CDP neighbor status. See Example 2-6 |
Example 2-1 show cdp all
n1000v# show cdp all
Ethernet2/2 is up
CDP enabled on interface
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Ethernet2/3 is up
CDP enabled on interface
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Ethernet2/4 is up
CDP enabled on interface
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Ethernet2/5 is up
CDP enabled on interface
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Ethernet2/6 is up
CDP enabled on interface
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
mgmt0 is up
CDP enabled on interface
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Example 2-2 show cdp entry name
n1000v# show cdp entry name swordfish-6k-2
----------------------------------------
Device ID:swordfish-6k-2
System Name:
Interface address(es):
IPv4 Address: 172.28.30.2
Platform: cisco WS-C6503-E, Capabilities: Router Switch IGMP Filtering
Interface: Ethernet2/2, Port ID (outgoing port): GigabitEthernet1/14
Holdtime: 152 sec
Version:
Cisco IOS Software, s72033_rp Software (s72033_rp-IPBASE-M), Version 12.2(33)SXH2a, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2008 by Cisco Systems, Inc.
Compiled Fri 25-Apr-08 09:11 by prod_rel_team
Example 2-3 show cdp entry all
n1000v# show cdp entry all
----------------------------------------
Device ID:swordfish-6k-2
System Name:
Interface address(es):
IPv4 Address: 172.28.30.2
Platform: cisco WS-C6503-E, Capabilities: Router Switch IGMP Filtering
Interface: Ethernet2/2, Port ID (outgoing port): GigabitEthernet1/14
Holdtime: 140 sec
Version:
Cisco IOS Software, s72033_rp Software (s72033_rp-IPBASE-M), Version 12.2(33)SXH2a, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2008 by Cisco Systems, Inc.
Compiled Fri 25-Apr-08 09:11 by prod_rel_team
Advertisement Version: 1
----------------------------------------
Device ID:swordfish-6k-2
System Name:
Interface address(es):
IPv4 Address: 172.28.30.2
Platform: cisco WS-C6503-E, Capabilities: Router Switch IGMP Filtering
Interface: Ethernet2/3, Port ID (outgoing port): GigabitEthernet1/15
Holdtime: 129 sec
Version:
Cisco IOS Software, s72033_rp Software (s72033_rp-IPBASE-M), Version 12.2(33)SXH2a, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2008 by Cisco Systems, Inc.
Compiled Fri 25-Apr-08 09:11 by prod_rel_team
Advertisement Version: 1
----------------------------------------
Device ID:swordfish-6k-2
System Name:
Interface address(es):
IPv4 Address: 7.7.8.1
Platform: cisco WS-C6503-E, Capabilities: Router Switch IGMP Filtering
Interface: Ethernet2/4, Port ID (outgoing port): GigabitEthernet1/16
Holdtime: 154 sec
Version:
Cisco IOS Software, s72033_rp Software (s72033_rp-IPBASE-M), Version 12.2(33)SXH2a, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2008 by Cisco Systems, Inc.
Compiled Fri 25-Apr-08 09:11 by prod_rel_team
Advertisement Version: 1
----------------------------------------
Device ID:swordfish-6k-2
System Name:
Interface address(es):
IPv4 Address: 7.7.8.1
Platform: cisco WS-C6503-E, Capabilities: Router Switch IGMP Filtering
Interface: Ethernet2/5, Port ID (outgoing port): GigabitEthernet1/17
Holdtime: 156 sec
Version:
Cisco IOS Software, s72033_rp Software (s72033_rp-IPBASE-M), Version 12.2(33)SXH2a, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2008 by Cisco Systems, Inc.
Compiled Fri 25-Apr-08 09:11 by prod_rel_team
Advertisement Version: 1
----------------------------------------
Device ID:swordfish-6k-2
System Name:
Interface address(es):
IPv4 Address: 172.28.15.229
Platform: cisco WS-C6503-E, Capabilities: Router Switch IGMP Filtering
Interface: Ethernet2/6, Port ID (outgoing port): GigabitEthernet1/18
Holdtime: 171 sec
Version:
Cisco IOS Software, s72033_rp Software (s72033_rp-IPBASE-M), Version 12.2(33)SXH2a, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2008 by Cisco Systems, Inc.
Compiled Fri 25-Apr-08 09:11 by prod_rel_team
Advertisement Version: 1
Example 2-4 show cdp global
n1000v(config)# show cdp global
Global CDP information:
CDP enabled globally
Sending CDP packets every 60 seconds
Sending a holdtime value of 180 seconds
Sending CDPv2 advertisements is disabled
Sending DeviceID TLV in Default Format
Example 2-5 show cdp interface
n1000v(config)# show cdp interface ethernet 2/3
Ethernet2/3 is up
CDP enabled on interface
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Example 2-6 show cdp neighbors interface
n1000v(config)# show cdp neighbors interface ethernet 2/3
Capability Codes: R - Router, T - Trans-Bridge, B - Source-Route-Bridge
S - Switch, H - Host, I - IGMP, r - Repeater,
V - VoIP-Phone, D - Remotely-Managed-Device,
s - Supports-STP-Dispute
Device ID Local Intrfce Hldtme Capability Platform Port ID
swordfish-6k-2 Eth2/3 173 R S I WS-C6503-E Gig1/15
Example 2-7 show cdp traffic interface
n1000v(config)# show cdp traffic interface ethernet 2/3
----------------------------------------
Traffic statistics for Ethernet2/3
Input Statistics:
Total Packets: 98
Valid CDP Packets: 49
CDP v1 Packets: 49
CDP v2 Packets: 0
Invalid CDP Packets: 49
Unsupported Version: 49
Checksum Errors: 0
Malformed Packets: 0
Output Statistics:
Total Packets: 47
CDP v1 Packets: 47
CDP v2 Packets: 0
Send Errors: 0
Configuration Example for CDP
This example enables the CDP feature and configures the refresh and hold timers:
config t
cdp enable
cdp timer 50
cdp holdtime 100
Additional References
This section includes the following additional information related to CDP:
Related Documents
Standards
|
|
|
|---|---|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. |
— |
Feature History for CDP
This section provides the CDP feature release history.
|
|
|
|
|---|---|---|
CDP |
4.0(4)SV1(1) |
This feature was introduced. |
Feedback