|
|
This chapter describes how to configure the Cisco Discovery Protocol (CDP) on the Catalyst 5000, 4000, 2948G, 2926G, and 2926 series switches.
This chapter consists of these sections:
CDP is a media- and protocol-independent protocol that runs on all Cisco-manufactured equipment including routers, bridges, access and communication servers, and switches. Using CDP, you can view information about all the Cisco devices directly attached to the switch.
In addition, network management applications can retrieve the device type and SNMP-agent address of neighboring Cisco devices. This enables applications to send SNMP queries to neighboring devices. CDP allows network management applications to discover Cisco devices that are neighbors of already known devices, in particular, neighbors running lower-layer, transparent protocols.
CDP runs on all media that support Subnetwork Access Protocol (SNAP), including LAN and Frame Relay. CDP runs over the data link layer only.
Cisco devices never forward CDP packets. When new CDP information is received, Cisco devices discard old information.
These sections describe how to configure CDP:
To enable CDP, perform this task in privileged mode:
| Task | Command |
|---|---|
Step 1 Enable CDP on the desired ports. Use the all keyword to enable CDP on all ports. | set cdp enable {mod_num/port_num | all} |
Step 2 Verify the CDP configuration. | show cdp port [mod_num[/port_num]] |
Step 3 View information about CDP neighbors. | show cdp neighbors [mod_num[/port_num]] [detail] |
This example shows how to enable CDP on all ports, verify the configuration, and display information about CDP neighbor devices:
Console> (enable) set cdp enable all
CDP enabled for all ports.
Console> (enable) show cdp port
Port CDP Status Message-Interval
-------- ---------- ----------------
1/1 enabled 60
1/2 enabled 60
2/1 enabled 60
2/2 enabled 60
<...output truncated...>
2/23 enabled 60
2/24 enabled 60
Console> (enable) show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater
Port Device-ID Port-ID Platform Capability
-------- ----------------------- ----------------- ------------------ ----------
1/1 002267633 3/3 WS-C5000 T S
Console> (enable) show cdp neighbors detail
Device-ID: 002267633
Device Addresses:
IP Address: 172.20.52.2
Holdtime: 122 sec
Capabilities: TRANSPARENT_BRIDGE SWITCH
Version:
WS-C5000 Software, Version McpSW: 3.2(1) NmpSW: 3.2(1b)
Copyright (c) 1995-1998 by Cisco Systems
Platform: WS-C5000
Port-ID (Port on Device): 3/3
Port (Our Port): 1/1
Console> (enable)
To set the CDP message interval, perform this task in privileged mode:
| Task | Command |
|---|---|
Step 1 Set the message interval for CDP. The allowed range is 5-900 seconds. The default is 60 seconds. | set cdp interval {mod_num/port_num | all} interval |
Step 2 Verify the CDP configuration. | show cdp port [mod_num[/port_num]] |
This example shows how to configure the CDP message interval to 100 seconds on ports 2/1 and 2/2 and verify the configuration:
Console> (enable) set cdp interval 2/1-2 100
CDP message interval set to 100 seconds for ports 2/1-2.
Console> (enable) show cdp port 2
Port CDP Status Message-Interval
-------- ---------- ----------------
2/1 enabled 100
2/2 enabled 100
2/3 enabled 60
2/4 enabled 60
<...output truncated...>
2/23 enabled 60
2/24 enabled 60
Console> (enable)
To disable CDP, perform this task in privileged mode:
| Task | Command |
|---|---|
Step 1 Disable CDP on the desired ports. Use the all keyword to disable CDP on all ports. | set cdp disable {mod_num/port_num | all} |
Step 2 Verify the CDP configuration. | show cdp port [mod_num[/port_num]] |
This example shows how to disable CDP on ports 2/1 and 2/2 and verify the configuration:
Console> (enable) set cdp disable 2/1-2
CDP disabled on ports 2/1-2.
Console> (enable) show cdp port 2
Port CDP Status Message-Interval
-------- ---------- ----------------
2/1 disabled 60
2/2 disabled 60
2/3 enabled 60
2/4 enabled 60
<...output truncated...>
2/23 enabled 60
2/24 enabled 60
Console> (enable)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Tue Mar 30 16:04:34 PST 1999
Copyright 1989-1999©Cisco Systems Inc.