Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

CDP (Cisco Discovery Protocol)

Direct answer

CDP (Cisco Discovery Protocol) is a Cisco Layer 2 protocol that announces device ID, port, platform, software version, IP addresses, native VLAN and duplex to directly connected Cisco devices every 60 seconds.

When to use this

Use it to identify Cisco neighbours, find their management address, and spot native VLAN and duplex mismatches.

First 30 seconds

1. show cdp neighbors (and show lldp neighbors) — is the expected neighbour on the expected port?

2. Wrong neighbour or port → cabling or documentation is wrong.

3. No neighbour → protocol off on either side, or a non-Cisco device without LLDP.

4. show cdp neighbors <if> detail — management address to reach the neighbour.

5. Watch logs for native VLAN and duplex mismatch messages from CDP.

Operational verification

protocol enabled on both ends → advertisements sent on the link → neighbour entry created → device name and remote port match the design

Evidence · next step

Verify the peer interface and service-specific VLAN/routing state using independent commands.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE · IOS/IOS XE
Key commandcdp run
Scope / prerequisiteUse it to identify Cisco neighbours, find their management address, and spot native VLAN and duplex mismatches.
Configure · 2Show · 4Reference · 3
What next?3 suggested next steps
Catalog command links9
Evidence4
On this pageJump to a specific section
Cisco IOS / IOS XE first

Primary Commands

Configuration and operational commands for this Topic.

Verification

Show Commands

Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.

show cdp entry {* | <device-name>} [protocol | version]Reference
Show CDP entry for one neighbor

Shows everything CDP knows about one named neighbor (or all with *): addresses, platform, local and remote port, and software version.

Use when: You know the neighbor name and need its management IP, model or IOS version without reading the whole neighbor table.

Quick note: The name must match the Device ID as CDP shows it. A trailing * works as a wildcard, for example "show cdp entry core*".

Cisco IOS / IOS XE · state · verifies
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification and output interpretation Verify boundary

Use show cdp neighbors for the concise neighbor table and show cdp neighbors detail when you need management address, software/platform detail, advertised capabilities and additional TLVs. Verify the local interface and remote port ID against the intended cabling or topology record. Use show cdp interface or equivalent status output to confirm where CDP is enabled and its timer/encapsulation state. A healthy neighbor entry should refresh within the expected timer and remain associated with the correct local interface. If an expected neighbor is absent, first separate “CDP disabled/not supported” from “link not operational”; interface state and counters are independent evidence. For discovery-based documentation, record both local and remote interface identities rather than relying only on device names.

Evidence references

Evidence · 4 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

command output · 3other · 1
Command lookup Jump straight to Cisco syntax
Key points

On by default globally and per interface. Disable per port with no cdp enable on edge and internet-facing ports, or globally with no cdp run. IP phones use CDP to learn the voice VLAN, so keep it on phone ports.

Key checks
  • show cdp neighbors — neighbour, local and remote port, platform.
  • show cdp neighbors <if> detail — IP address, software, native VLAN, duplex.
  • show cdp interface <if> — CDP enabled and timers.
  • show cdp traffic — CDP packets sent and received.
ReferenceImportant terms & boundaries6 sections · depth on demand

Key points

  • cdp run controls CDP globally
  • cdp enable controls CDP on an interface
  • show cdp neighbors is the fastest topology summary
  • show cdp neighbors detail adds management/platform/version and remote-port detail
  • CDP neighbor presence is not evidence of VLAN, STP, EtherChannel, IP or application forwarding.

CDP evidence boundary

CDP can reveal the neighboring Cisco device ID, platform, capabilities, local interface, remote port ID and often a management address/version in detailed output. Those fields are advertised metadata. Validate forwarding and reachability with the relevant interface, VLAN, STP, EtherChannel or IP commands.

In depth

CDP in detail

CDP advertises a set of TLVs to directly connected Cisco devices. Cisco's IOS XE system management guide lists them: Device-ID, Address, Port-ID, Capabilities, Version, Platform, IP Network Prefix, Native VLAN, Full or Half Duplex, VTP Management Domain, Location and Application. CDP version 2, advertised by default, adds error reporting for mismatched native VLANs and duplex settings. Advertisements go out every 60 seconds by default (cdp timer) and are held for 180 seconds (cdp holdtime).

Commands (system management guide)

CommandScopeEffect
cdp run / no cdp runGlobalEnable or disable CDP on the device
cdp enable / no cdp enableInterfaceEnable or disable CDP per interface
cdp timer <s>GlobalAdvertisement interval
cdp holdtime <s>GlobalHow long receivers keep the entry
cdp advertise-v2GlobalVersion 2 advertisements (on by default)
show cdp entry <name>ExecDetail for one neighbour
show cdp trafficExecPacket counts and checksum errors
clear cdp tableExecFlush the neighbour table
SW1# show cdp
Global CDP information:
        Sending CDP packets every 60 seconds
        Sending a holdtime value of 180 seconds
        Sending CDPv2 advertisements is  enabled
SW1# show cdp neighbors TenGigabitEthernet1/1/1 detail | include Device ID|IP address|Platform|Interface|Native VLAN|Duplex
Device ID: dist1.example.net
  IP address: 10.255.0.21
Platform: cisco C9500-24Y4C,  Capabilities: Router Switch IGMP
Interface: TenGigabitEthernet1/1/1,  Port ID (outgoing port): TwentyFiveGigE1/0/3
Native VLAN: 99
Duplex: full
SW1(config)# interface GigabitEthernet1/0/48
SW1(config-if)# description Internet handoff
SW1(config-if)# no cdp enable

Behaviour worth knowing (guide)

BehaviourConsequence
Cisco devices never forward CDPYou only ever see direct neighbours, unless a non-Cisco switch sits in between
Changing an interface's encapsulation re-enables CDPRe-apply no cdp enable after such a change
Trunks with a non-default native VLAN send CDP tagged with VLAN 1Relevant when connecting routers to such trunks
A neighbour without an IP on the link may report another interface's addressCheck the detail before trusting the address
Disabled by default on ATM point-to-point PVCsEnable on both ends if needed

Security

CDP reveals platform, software version and addresses to anyone on the link. Keep it on internal infrastructure links and phone ports, and disable it on edge, guest and provider-facing ports.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

CDP (Cisco Discovery Protocol) is a Cisco Layer 2 protocol that advertises device name, platform, software version, interface and management addresses to directly connected neighbors every 60 seconds. It helps map topology and verify cabling.

show cdp neighbors
show cdp neighbors detail
no cdp run                    ! globally off
interface Gi0/0
 no cdp enable                ! off on untrusted ports

Documented example, not captured output.

CDP reveals useful information to attackers too; disable it on internet-facing and untrusted user ports, and use LLDP for multi-vendor discovery.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

State model and protocol mechanics

Cisco Discovery Protocol sends periodic Layer 2 advertisements on enabled interfaces and learns corresponding advertisements from directly connected Cisco-capable neighbors. The learned record can include device ID, local interface, remote port ID, platform, capabilities, management/IP information, native VLAN or other TLVs depending on device and version. Because discovery happens at Layer 2, neighbors can appear even when IP addressing or routing is incomplete. Holdtime controls how long learned information remains valid in the absence of fresh advertisements, so an entry can persist briefly after the underlying device or link changes. CDP is therefore especially useful for establishing physical/logical adjacency identity: which local port connects to which remote device/port and what role the neighbor advertises. It is not a routing adjacency protocol and does not install IP reachability.

Limits and common misconceptions

CDP neighbor presence is local adjacency evidence only. It does not show that the neighbor is reachable by IP, that VLANs/trunks are correct, that routing protocols are established or that a management address is usable from the current VRF. Absence of CDP does not show there is no connected device because the protocol may be disabled or unsupported. Advertised capabilities describe what a device reports about itself and should not be mistaken for a complete security or functional assessment. Because CDP may disclose infrastructure information, enabling it on every interface is not automatically desirable. Keep physical/link discovery, IP reachability, routing state and service health as separate layers.

ReferenceConfiguration & state1 section · depth on demand

Design and configuration model

CDP can be enabled globally and disabled or enabled per interface. In a controlled Cisco infrastructure, decide deliberately where discovery information is operationally useful and where advertising device identity, software/platform or addressing information is undesirable. Infrastructure-facing links often benefit from discovery, while untrusted external/customer-facing interfaces may intentionally suppress it. Timer and holdtime defaults are usually adequate; changing them affects discovery freshness and protocol chatter but not forwarding itself. Avoid treating CDP as the source of truth for topology inventory without corroborating interface descriptions, LLDP where relevant, device inventory or configuration management, because cabling moves and stale holdtime entries can temporarily misrepresent current topology.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

Authoritative/upstream documentation reviewed for bounded claims in Switching → Layer 2 Discovery → CDP. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%
Embedded reference data

Quick lookup tables

CDP detail field map

Common information exposed by detailed CDP output

FieldOperational useCaveat
Device IDidentify expected peernaming may not equal DNS/reachability
Local interfaceidentify local attachmentdoes not prove forwarding state
Port IDidentify remote attachmentnaming can vary by platform
Platformidentify device familyadvertised metadata
Capabilitiesinfer device roleadvertised capability, not service health
Management/IP addresscandidate management identitydoes not prove current IP reachability
Holdtimeneighbor aging timerchanges over time

CDP · operational reference

Compact state and interpretation boundaries for fast lookup.

CDP fieldUseful meaningBoundary
Device IDNeighbor identity hintNot authenticated identity
Local/Port IDDirect interface relationshipDoes not prove VLAN/routing correctness
CapabilityAdvertised device roleNot complete functional proof
HoldtimeRemaining learned lifetimeEntry can be briefly stale
Depth when you need it

Deep reference

Additional depth

Exposure and policy note

Discovery protocols intentionally reveal topology and device metadata to a directly connected peer. On untrusted or policy-restricted interfaces, determine whether CDP should be disabled globally or per interface. Do not disable it blindly on infrastructure links where operations depend on neighbor discovery.

Confirmation

Confirm action

Continue?