cc/td/doc/product/lan/cat6000/sw_5_4
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Configuring CDP

Configuring CDP

This chapter describes how to configure the Cisco Discovery Protocol (CDP) on the Catalyst 6000 family switches.


Note For complete syntax and usage information for the commands used in this chapter, refer to the Catalyst 6000 Family Command Reference publication.

This chapter consists of these sections:

Understanding How CDP Works

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, CDP detects native VLAN and port duplex mismatches.

Network management applications can retrieve the device type and SNMP-agent address of neighboring Cisco devices using CDP. 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). 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.

Default CDP Configuration

Table 23-1 shows the default CDP configuration.


Table 23-1: CDP Default Configuration
Feature Default Value

CDP global enable state

Enabled

CDP port enable state

Enabled on all ports

CDP message interval

60 seconds

CDP holdtime

180 seconds

Configuring CDP

These sections describe how to configure CDP:

Setting the CDP Global Enable and Disable States

To set the CDP global enable state, perform this task in privileged mode:
Task Command

Step 1 Set the CDP global enable state on the switch.

set cdp {enable | disable}

Step 2 Verify the CDP configuration.

show cdp

This example shows how to enable CDP globally and verify the configuration:

Console> (enable) set cdp enable
CDP enabled globally
Console> (enable) show cdp
CDP               : enabled
Message Interval  : 60
Hold Time         : 180
Console> (enable) 
 
 

This example shows how to disable CDP globally and verify the configuration:

Console> (enable) set cdp disable 
CDP disabled globally
Console> (enable) show cdp
CDP               : disabled
Message Interval  : 60
Hold Time         : 180
Console> (enable) 

Setting the CDP Enable and Disable States on a Port

You can enable or disable CDP on a per-port basis. You must enable CDP globally before the switch will transmit CDP messages on any ports.

To change the CDP enable state on a per-port basis, perform this task in privileged mode:
Task Command

Step 1 Set the CDP enable state on individual ports.

set cdp {enable | disable} [mod_num/port_num]

Step 2 Verify the CDP configuration.

show cdp port [mod_num[/port_num]]

This example shows how to enable CDP on ports 3/1-2 and verify the configuration:

Console> (enable) set cdp enable 3/1-2
CDP enabled on ports 3/1-2.
Console> (enable) show cdp port 3
CDP               : enabled
Message Interval  : 60
Hold Time         : 180
 
Port      CDP Status
--------  ----------
 3/1      enabled     
 3/2      enabled     
 3/3      disabled    
 3/4      disabled    
 3/5      disabled    
 3/6      disabled    
 3/7      enabled     
 3/8      enabled     
 3/9      enabled     
 3/10     enabled     
 3/11     enabled     
 3/12     enabled     
Console> (enable) 
 
 

This example shows how to disable CDP on ports 3/1-6 and verify the configuration:

Console> (enable) set cdp disable 3/1-6
CDP disabled on ports 3/1-6.
Console> (enable) show cdp port 3
CDP               : enabled
Message Interval  : 60
Hold Time         : 180
 
Port      CDP Status
--------  ----------
 3/1      disabled    
 3/2      disabled    
 3/3      disabled    
 3/4      disabled    
 3/5      disabled    
 3/6      disabled    
 3/7      enabled     
 3/8      enabled     
 3/9      enabled     
 3/10     enabled     
 3/11     enabled     
 3/12     enabled     
Console> (enable)     
 
 

Setting the CDP Message Interval

The CDP message interval specifies how often the switch will transmit CDP messages to directly connected Cisco devices.

To change the default CDP message interval, perform this task in privileged mode:
Task Command

Step 1 Change the default CDP message interval. The allowed range is 5-900 seconds.

set cdp interval interval

Step 2 Verify the CDP configuration.

show cdp

This example shows how to change the default CDP message interval to 100 seconds and verify the configuration:

Console> (enable) set cdp interval 100    
CDP message interval set to 100 seconds for all ports.
Console> (enable) show cdp
CDP               : enabled
Message Interval  : 100
Hold Time         : 180
Console> (enable)

Setting the CDP Holdtime

The CDP holdtime specifies how much time can pass between CDP messages from neighboring devices before the device is no longer considered connected and the neighboring entry is aged out.

To change the default CDP holdtime, perform this task in privileged mode:
Task Command

Step 1 Change the default CDP holdtime. The allowed range is 10-255 seconds.

set cdp holdtime interval

Step 2 Verify the CDP configuration.

show cdp

This example shows how to change the default CDP holdtime to 225 seconds and verify the configuration:

Console> (enable) set cdp holdtime 225
CDP holdtime set to 225 seconds.
Console> (enable) show cdp
CDP               : enabled
Message Interval  : 100
Hold Time         : 225
Console> (enable) 

Displaying CDP Neighbor Information

To display information about directly connected Cisco devices, use the show cdp neighbors command. Use the vlan keyword to display the native VLAN for the connected ports. Use the duplex keyword to display the duplex mode for the connected ports. Use the capabilities keyword to display the device capability codes for the connected device. Use the detail keyword to display detailed information about the neighboring device.


Note If you enter the show cdp neighbors command for a device that supports earlier versions of CDP, "unknown" is displayed in the following fields: VTP Management Domain, Native VLAN, and Duplex.

To display information about directly connected Cisco devices, perform this task:
Task Command

Display information about CDP neighbors.

show cdp neighbors [mod_num[/port_num]] [vlan | duplex | capabilities | detail]

This example shows how to display CDP neighbor information for connected Cisco devices:

Console> (enable) show cdp neighbors
* - indicates vlan mismatch.
# - indicates duplex mismatch.
Port     Device-ID                       Port-ID                   Platform
-------- ------------------------------- ------------------------- ------------
 2/3     JAB023807H1(2948)               2/2                       WS-C2948
 3/1     JAB023806JR(4003)               2/1                       WS-C4003
 3/2     JAB023806JR(4003)               2/2                       WS-C4003
 3/5     JAB023806JR(4003)               2/5                       WS-C4003
 3/6     JAB023806JR(4003)               2/6                       WS-C4003
Console> (enable)
 
 

This example shows how to display the native VLAN for each port connected on the neighboring device (there is a native VLAN mismatch between port 3/6 on the local switch and port 2/6 on the neighboring device, as indicated by the asterisk [*]):

Console> (enable) show cdp neighbors vlan
* - indicates vlan mismatch.
# - indicates duplex mismatch.
Port     Device-ID                       Port-ID                   NativeVLAN
-------- ------------------------------- ------------------------- ----------
 2/3     JAB023807H1(2948)               2/2                       522   
 3/1     JAB023806JR(4003)               2/1                       100   
 3/2     JAB023806JR(4003)               2/2                       100   
 3/5     JAB023806JR(4003)               2/5                       1     
 3/6     JAB023806JR(4003)               2/6*                      1     
Console> (enable) 
 
 

This example shows how to display detailed information about the neighboring device:

Console> (enable) show cdp neighbors 2/3 detail
Port (Our Port): 2/3     
Device-ID: JAB023807H1(2948)
Device Addresses:
  IP Address: 172.20.52.36
Holdtime: 132 sec
Capabilities: TRANSPARENT_BRIDGE SWITCH 
Version: 
  WS-C2948 Software, Version McpSW: 5.1(57) NmpSW: 5.1(1)
  Copyright (c) 1995-1999 by Cisco Systems, Inc.
Platform: WS-C2948
Port-ID (Port on Neighbors's Device): 2/2
VTP Management Domain: Lab_Network
Native VLAN: 522
Duplex: full
Console> (enable)

hometocprevnextglossaryfeedbacksearchhelp
Posted: Mon Feb 21 16:15:29 PST 2000
Copyright 1989 - 2000©Cisco Systems Inc.