L2 · switching · reviewed
CDP
Cisco Discovery Protocol
Cisco’s proprietary neighbour advertisement — still required by some phones for voice VLAN.
Why it exists
Some endpoints still speak only CDP for voice VLAN and power. It also surfaces native VLAN mismatches between Cisco trunks.
Leave CDP on toward phones and trusted inter-switch links; disable it toward untrusted edges.
Cisco neighbours exchange TLVs
Two Cisco switches exchange CDP frames. Version 2 TLVs can carry native VLAN and power information that LLDP base does not.
SW1 sends a CDP frame to 01:00:0C:CC:CC:CC. SW2 records platform, software, and interface. SW1. SW2: Neighbour SW1.
- Link
- Blocking
- Packet in flight
- Discarded
- Emphasis
Text equivalent of this diagram
| Element | Kind | State |
|---|---|---|
| SW1 | switch | — |
| SW2 | switch | Neighbour: SW1 |
| SW1 — SW2 | link | up · trunk |
SW1 sends a CDP frame to 01:00:0C:CC:CC:CC. SW2 records platform, software, and interface.
What changed
- CDP: SW1 → SW2
- SW2: Neighbour → SW1
How it works
Version 2 TLVs carry native VLAN and power. Frames are consumed by the first Cisco device that receives them. It is not a translation of LLDP.
On the wire
Constructed examples, encoded from the field table below them — not captured traffic.
- Physical
- A preamble and start-of-frame delimiter precede this, and the hardware removes them before any capture sees the frame. IEEE 802.3-2022
- MAC header
- Destination address, source address, and the EtherType naming the payload. IEEE 802.3-2022
- Payload and FCS
- Between 46 and 1500 octets, padded to the minimum, followed by a four-octet frame check sequence. IEEE 802.3-2022
Configure it
cdp runTurns on CDP system-wide. Many platforms enable it by default; explicit `cdp run` documents intent after a disable.
Cisco IOS XE — Configuring CDP §Information About CDP
interface GigabitEthernet1/0/1 cdp enablePer-interface enable when global CDP is on but the port was previously silenced. Edge ports facing untrusted hosts are often left disabled.
Common mistake: Disabling CDP on the uplink that phones still need for voice-VLAN advertisement.
Cisco IOS XE — Configuring CDP §How to Configure CDP
cdp timer 60 cdp holdtime 180Advertisement interval and holdtime. Holdtime must stay greater than timer so a missed advertisement does not immediately flush the neighbour.
Cisco IOS XE — Configuring CDP §Information About CDP
Verify
show cdp neighbors- Device ID, local interface, and capability for each neighbour.
show cdp neighbors detail- Platform, software version, and native VLAN where advertised.
Caveats
- Marked draft: syntax has not been checked against Cisco documentation or a device.
- CDP is Cisco-proprietary (destination 01:00:0C:CC:CC:CC). No Junos/FRR stanza belongs here — use LLDP for multi-vendor discovery.
- Do not invent CDP TLV captures; verify only with show commands on real gear.
When it breaks
Symptom first, because that is what you have when it happens.
Expected Cisco neighbour missing from the CDP table.
Narrow it down
- show cdp neighbors
- Check no cdp enable on the interface
- Confirm the peer is Cisco and speaking CDP
Cause
CDP disabled on one side, or the peer only speaks LLDP.
Fix
Enable CDP where phones/Cisco neighbours need it; use LLDP for mixed vendors.
CDP reports a native VLAN mismatch on a trunk.
Narrow it down
- Compare native VLAN on both ends
- Check trunk encapsulation
Cause
Different native VLANs on a trunk — a VLAN-hopping setup waiting to happen.
Fix
Align native VLANs or tag the native VLAN consistently.
Phone never learns voice VLAN after LLDP-only enable.
Narrow it down
- Confirm phone vendor docs for CDP vs LLDP-MED
- Check CDP on the phone port
Cause
Some phones still learn voice VLAN only from CDP.
Fix
Leave CDP on the phone port; disable it on untrusted edges.
Internet-facing port advertises platform and software via CDP.
Narrow it down
- List interfaces with CDP enabled
- Confirm the related configuration and counters.
Cause
CDP left on an untrusted edge.
Fix
no cdp enable on untrusted edges.
CDPv1 neighbour lacks TLVs operators expect.
Narrow it down
- Check CDP version
- Compare detail output
Cause
Version 1 omits TLVs Version 2 carries (for example native VLAN).
Fix
Prefer CDPv2 where supported.
Design notes
Leave CDP on toward phones and trusted inter-switch links; disable it toward untrusted edges.
Misconceptions
- “CDP is harmless because it is only informational.”
- It advertises model, software version, and native VLAN to anything listening. On an untrusted edge that is an inventory leak.
- “CDP and LLDP are interchangeable.”
- They do not interoperate. A phone that only speaks CDP will not learn voice VLAN from LLDP-MED unless it also speaks MED.
- “Disabling CDP everywhere is always safer.”
- On phone ports and trusted trunks it still earns its keep. Disable it where the listener is untrusted, not as a blanket.
More walkthroughs
Native VLAN mismatch warningfailure
CDP compares the native VLAN it advertises with what it hears. Untagged frames land in different VLANs at each end while the link still looks up.
Both ends forward; CDP logs a native VLAN mismatch. Untagged frames from SW1 enter VLAN 20 on SW2. SW1 · native 10: Native 10. SW2 · native 20: Native 20.
- Link
- Blocking
- Packet in flight
- Discarded
- Emphasis
Text equivalent of this diagram
| Element | Kind | State |
|---|---|---|
| SW1 · native 10 | switch | Native: 10 |
| SW2 · native 20 | switch | Native: 20 |
| SW1 · native 10 — SW2 · native 20 | link | up · trunk |
Both ends forward; CDP logs a native VLAN mismatch. Untagged frames from SW1 enter VLAN 20 on SW2.
What changed
- SW1 · native 10: Native → 10
- SW2 · native 20: Native → 20
- CDP: native mismatch
- Emphasis: Silent VLAN leak
Phone learned voice VLAN from CDP onlyfailure
A phone that learned its voice VLAN from CDP fails on a non-Cisco switch that only speaks LLDP-MED.
The phone waits for CDP voice-VLAN information. The switch advertises LLDP correctly and never speaks CDP. IP phone: Voice VLAN missing. Non-Cisco · LLDP only.
- Link
- Blocking
- Packet in flight
- Discarded
- Emphasis
Text equivalent of this diagram
| Element | Kind | State |
|---|---|---|
| IP phone | host | Voice VLAN: missing |
| Non-Cisco · LLDP only | switch | — |
| IP phone — Non-Cisco · LLDP only | link | up |
The phone waits for CDP voice-VLAN information. The switch advertises LLDP correctly and never speaks CDP.
What changed
- IP phone: Voice VLAN → missing
- No CDP