Use it to confirm what is at the other end of a cable, to trace a path switch by switch, and when a phone or access point does not get its VLAN or power.
LLDP & CDP Reference
LLDP and CDP checks
Cisco IOS / IOS XE. CDP is usually enabled by default; LLDP often needs lldp run. Disable both on untrusted edge ports.
| Observed state | Possible cause | Command | Observation and next check |
|---|---|---|---|
| No neighbor shown | Protocol disabled globally or on the interface, or the peer does not speak it | show cdp neighbors | A neighbor with local interface and port ID. Next: show cdp interface <interface>; for LLDP use show lldp neighbors and show lldp interface <interface>. |
| CDP neighbor present, LLDP neighbor missing | LLDP not enabled on this switch or the peer | show lldp | Whether LLDP is enabled, and its timers. Next: Enable lldp run globally; check lldp transmit / lldp receive on the interface. |
| Neighbor or port differs from documentation | Cabling is not as documented | show cdp neighbors detail | Device ID, platform, port ID and management address of the peer. Next: Confirm the physical port, then correct the cabling or the documentation. |
| Mismatch messages in the log | CDP detects native VLAN or duplex mismatch | show logging | include CDP-4 | %CDP-4-NATIVE_VLAN_MISMATCH or %CDP-4-DUPLEX_MISMATCH with the interface. Next: Align native VLAN or duplex on both ends of that link. |
Example output and interpretation
Illustrative output · not captured Evidence
Switch# show cdp neighbors Capability Codes: R - Router, S - Switch, I - IGMP Device ID Local Intrfce Holdtme Capability Platform Port ID core-sw1 Gig 1/0/48 154 R S I C9300 Gig 1/0/1
Illustrative output: Gi1/0/48 connects to Gi1/0/1 on core-sw1. Discovery confirms which device and port are adjacent; it does not prove that VLANs or routing on the link are correct.
Technical sources
Detailed reference and supporting material
Additional explanation, verification and reference tables.
Operational reference
Fast context before you go deeper.
1. show cdp neighbors and show lldp neighbors — is the expected device on the expected port?
2. Nothing shown → protocol enabled on both ends? LLDP needs lldp run.
3. Unexpected neighbour → something in between passes the frames on, or the cabling differs from the documentation.
4. Phone without voice VLAN → CDP or LLDP disabled on the port.
protocol enabled globally and on the port, both ends → announcements sent at the protocol's interval → received and stored for the hold time → neighbour and remote port match the cabling record
Context & applicabilityCommon mistakes · platform/version boundaries
Additional verification procedures
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Typical faults & boundaries Narrow the fault
- No neighbour is shown. The protocol is off globally or on the interface — on either side. LLDP needs
lldp run; the other vendor's device may not speak CDP at all. - The neighbour shown is not the device that is cabled directly. Something in between does not understand the protocol and forwards the frames: an unmanaged switch, a media converter, a provider circuit.
- Several neighbours on one port. A hub or simple switch sits behind the port.
- A neighbour is still listed after being unplugged. The entry is kept until its hold time runs out.
- The log reports a native VLAN or duplex mismatch. CDP compared the two ends and they differ; correct the configuration.
- A phone does not get its voice VLAN or power. CDP or LLDP-MED is disabled on the port.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
show cdp neighbors/show cdp neighbors detail— device, local and remote port, platform, address.show lldp neighbors/show lldp neighbors detail— the same via LLDP.show cdp interface <interface>,show lldp interface <interface>— enabled on the port?
ReferenceWhy it matters1 section · depth on demand
Why it matters operationally
They are the quickest way to confirm what is actually at the other end of a cable — and so to check documentation, trace a path switch by switch, or find where a phone or access point is plugged in. They also expose model, software version and addresses to anyone connected, which is a reason to limit them on ports facing users or other organisations.
ReferenceHow it works1 section · depth on demand
How it works
| CDP | LLDP | |
|---|---|---|
| Origin | Cisco proprietary | IEEE 802.1AB, multi-vendor |
| Default on Cisco IOS | On | Usually off; enable with lldp run |
| Sent every | 60 seconds | 30 seconds |
| Held for | 180 seconds | 120 seconds |
| Destination address | 01:00:0C:CC:CC:CC | 01:80:C2:00:00:0E |
Both carry the device name, the sending port, the platform, capabilities (router, switch, phone) and a management address. CDP additionally carries the native VLAN and duplex setting, which lets a Cisco switch log a mismatch with its neighbour. LLDP has an extension, LLDP-MED, used by phones and access points to learn the voice VLAN and negotiate power.
Two properties define what the output means:
- One hop only. The frames are not forwarded by switches that understand them. A neighbour listed is directly connected — or connected through a device that does not understand the protocol, such as an unmanaged switch, which passes the frames on.
- One-way announcements. Each side announces independently. Seeing a neighbour means its announcements arrive; it does not confirm the neighbour sees you.
Control per interface:
interface GigabitEthernet1/0/10
no cdp enable
no lldp transmit
no lldp receive
A common policy is to keep them on links between network devices and towards phones, and to turn them off on ports facing other organisations.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
CDP and LLDP answer the same question, "who is on the other end of this cable?", in different ways. Cisco's IOS XE system management guide describes CDP:
- Cisco-proprietary, sent to the multicast address 01:00:0C:CC:CC:CC every 60 seconds by default.
- Neighbour entries are held for 180 seconds.
- Never forwarded by Cisco devices.
- Version 2 adds reports of native VLAN and duplex mismatches.
LLDP (IEEE 802.1AB) is the vendor-neutral equivalent, and its LLDP-MED extensions add voice VLAN, power and location for endpoints.
Comparison
| CDP | LLDP | |
|---|---|---|
| Standard | Cisco | IEEE 802.1AB |
| Default on Cisco switches | Enabled | Often disabled; enable with lldp run |
| Default timer / hold time | 60 s / 180 s | 30 s / 120 s |
| Mismatch warnings | Native VLAN, duplex (CDPv2) | None built in |
| Endpoint provisioning | Voice VLAN for Cisco phones | LLDP-MED network policy for any vendor |
| Per-direction control | cdp enable only | lldp transmit / lldp receive |
Common uses
| Use | Command |
|---|---|
| Map cabling | show cdp neighbors, show lldp neighbors |
| Find a neighbour's management IP | ... neighbors detail |
| Spot native VLAN mismatches | CDP log messages |
| Phone VLAN assignment | CDP (Cisco phones) or LLDP-MED (others) |
| Automation | Neighbour data in Catalyst Center or scripts to build topology maps |
SW1# show cdp neighbors GigabitEthernet1/0/7 detail | include Device ID|Platform|Native|Duplex|IP address
SW1# show lldp neighbors GigabitEthernet1/0/12 detail | include System Name|Port id|Capabilities|IP
SW1# show cdp traffic
SW1# show lldp traffic
SW1(config)# lldp run
SW1(config)# interface GigabitEthernet1/0/48
SW1(config-if)# no cdp enable
SW1(config-if)# no lldp transmit
Behaviour to remember (CDP guide)
| Behaviour | Effect |
|---|---|
| Changing the encapsulation re-enables CDP on that interface | Re-check after interface changes |
| Trunks with a non-default native VLAN send CDP tagged in VLAN 1 | Matters when connecting routers |
| A neighbour may report another interface's address | Verify before using it for management |
Neither protocol authenticates its data. Treat neighbour information as a troubleshooting hint, and disable both protocols on ports facing untrusted networks.
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Network & Protocols → LLDP & CDP Reference. 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%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.