- Preface
- New and Changed Information
- Overview
- Using the Cisco NX-OS Setup Utility
- Using PowerOn Auto Provisioning
- Understanding the Command-Line Interface
- Configuring Terminal Settings and Sessions
- Basic Device Management
- Using the Device File Systems, Directories, and Files
- Working with Configuration Files
- Configuring CDP
- Configuring NTP
- Managing System Hardware
- Managing Modules
- Index
Contents
- Configuring CDP
- Information About CDP
- CDP Overview
- High Availability for CDP
- Configuring CDP
- Enabling or Disabling CDP Globally
- Enabling or Disabling CDP on an Interface
- Configuring Optional CDP Parameters
- Verifying the CDP Configuration
- Clearing CDP Counters and Tables
- CDP Example Configuration
- Default Settings for CDP
Configuring CDP
This chapter describes how to configure the Cisco Discovery Protocol (CDP) on Cisco MDS 9000 Family switches.
- Information About CDP
- Configuring CDP
- Verifying the CDP Configuration
- Clearing CDP Counters and Tables
- CDP Example Configuration
- Default Settings for CDP
Information About CDP
This section includes information about CDP.
CDP Overview
The Cisco Discovery Protocol (CDP) is an advertisement protocol used by Cisco devices to advertise itself to other Cisco devices in the same network. CDP runs on the data link layer and is independent of Layer 3 protocols. Cisco devices that receive the CDP packets cache the information to make it accessible through the CLI and SNMP.
The Cisco NX-OS software supports CDP on the management Ethernet (mgmt0) interface on the supervisor module and the Gigabit Ethernet interfaces on the IP Storage Services (IPS) and 14/2-port Multiprotocol Services (MPS-14/2) modules. The CDP daemon is restartable and switchable. The running and startup configurations are available across restarts and switchovers.
CDP version 1 (v1) and version 2 (v2) are supported in Cisco MDS 9000 Family switches. CDP packets with any other version number are silently discarded when received.
When the interface link is established, CDP is enabled by default and three CDP packets are sent at 1-second intervals. Following this action, the CDP frames are sent at the globally configured refresh interval.
High Availability for CDP
The Cisco NX-OS software supports stateless restarts for CDP. After a reboot or a supervisor module switchover, the Cisco NX-OS software applies the running configuration. For more information on high availability, see the Cisco MDS 9000 Family NX-OS High Availability and Redundancy Configuration Guide.
Configuring CDP
This section describes how to configure CDP.
- Enabling or Disabling CDP Globally
- Enabling or Disabling CDP on an Interface
- Configuring Optional CDP Parameters
Enabling or Disabling CDP Globally
CDP is enabled by default. You can disable CDP and then reenable it.
CDP must be enabled on the device before you enable CDP on any interfaces. If CDP is disabled globally and you enable CDP on specified interfaces, CDP will not be active on those interfaces. The system does not return an error message when this occurs.
1.
configure terminal
2.
cdp enable
3.
(Optional)
copy running-config startup-config
DETAILED STEPS
Enabling or Disabling CDP on an Interface
CDP is enabled by default on an interface. You can disable CDP on an interface.
If CDP is disabled globally and you enable CDP on specified interfaces, CDP will not be active on those interfaces. The system does not return an error message when this occurs.
Ensure that CDP is enabled on the device.
1.
configure terminal
2.
interface
interface-type slot/port
3.
cdp enable
4.
(Optional)
show cdp interface
interface-type slot/port
5.
(Optional)
copy running-config startup-config
DETAILED STEPS
Configuring Optional CDP Parameters
You can use the following optional commands in global configuration mode to modify CDP:
Verifying the CDP Configuration
Use the following commands to verify the CDP configuration:
|
Command |
Purpose |
|---|---|
|
show cdp all |
Displays all interfaces that have CDP enabled. |
|
show cdp entry {all | name entry-name} |
Displays the CDP database entries. |
|
show cdp global |
Displays the CDP global parameters. |
|
show cdp interface interface-type slot/port |
Displays the CDP interface status. |
|
show cdp neighbors {device-id | interface interface-type slot/port} [detail] |
Displays the CDP neighbor status. |
|
show cdp traffic interface interface-type slot/port |
Displays the CDP traffic statistics on an interface. |
Clearing CDP Counters and Tables
Use the clear cdp counters command to clear CDP traffic counters for all interfaces. You can issue this command for a specified interface or for all interfaces (management and Gigabit Ethernet interfaces).
switch# clear cdp counters
Use the clear cdp table command to clear neighboring CDP entries for all interfaces. You can issue this command for a specified interface or for all interfaces (management and Gigabit Ethernet interfaces).
switch# clear cdp table interface gigabitethernet 4/1
CDP Example Configuration
This example enables the CDP feature and configures the refresh and hold timers:
configure terminal cdp enable cdp timer 50 cdp holdtime 100
Default Settings for CDP
|
Parameters |
Default |
|---|---|
|
CDP |
Enabled globally and on all interfaces |
|
CDP version |
Version 2 |
|
CDP device ID |
Serial number |
|
CDP timer |
60 seconds |
|
CDP hold timer |
180 seconds |