Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

LLDP & CDP Reference

Direct answer

CDP and LLDP are discovery protocols: each device regularly tells its directly connected neighbours who it is and which port it is sending from. CDP is Cisco's; LLDP is the multi-vendor standard.

First checks

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 statePossible causeCommandObservation and next check
No neighbor shownProtocol disabled globally or on the interface, or the peer does not speak itshow 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 missingLLDP not enabled on this switch or the peershow 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 documentationCabling is not as documentedshow 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 logCDP detects native VLAN or duplex mismatchshow 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
    Command lookup Jump straight to Cisco syntax
    Detailed reference and supporting material

    Additional explanation, verification and reference tables.

    At a glance

    Operational reference

    Fast context before you go deeper.

    PlatformCisco IOS / IOS XE
    Verificationprotocol enabled globally and on the port, both ends → announcements sent at the protocol's interval → received and stored for the hold tim…
    Scope / prerequisiteUse 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 poi…
    What next?3 suggested next steps
    Evidence1
    On this pageJump to a specific section
    When to use this

    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.

    First 30 seconds

    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.

    Operational verification

    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
    Platform / version applicability
    Cisco IOS / IOS XE
    applies
    Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
    Additional verification procedures
    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 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 references

    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.

    observation · 1
    Key points

    A neighbour shown is one hop away — or reached through a device that does not understand the protocol. CDP is on by default; LLDP usually needs lldp run. Both reveal model and software version, so limit them on ports facing other organisations.

    Key checks
    • 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?
    ReferenceWhat it is1 section · depth on demand

    Mechanics & mental model

    CDP and LLDP are discovery protocols: each device regularly tells its directly connected neighbours who it is and which port it is sending from. CDP is Cisco's own protocol; LLDP is the IEEE standard that every vendor supports.

    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

    CDPLLDP
    OriginCisco proprietaryIEEE 802.1AB, multi-vendor
    Default on Cisco IOSOnUsually off; enable with lldp run
    Sent every60 seconds30 seconds
    Held for180 seconds120 seconds
    Destination address01:00:0C:CC:CC:CC01: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 side by side

    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

    CDPLLDP
    StandardCiscoIEEE 802.1AB
    Default on Cisco switchesEnabledOften disabled; enable with lldp run
    Default timer / hold time60 s / 180 s30 s / 120 s
    Mismatch warningsNative VLAN, duplex (CDPv2)None built in
    Endpoint provisioningVoice VLAN for Cisco phonesLLDP-MED network policy for any vendor
    Per-direction controlcdp enable onlylldp transmit / lldp receive

    Common uses

    UseCommand
    Map cablingshow cdp neighbors, show lldp neighbors
    Find a neighbour's management IP... neighbors detail
    Spot native VLAN mismatchesCDP log messages
    Phone VLAN assignmentCDP (Cisco phones) or LLDP-MED (others)
    AutomationNeighbour 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)

    BehaviourEffect
    Changing the encapsulation re-enables CDP on that interfaceRe-check after interface changes
    Trunks with a non-default native VLAN send CDP tagged in VLAN 1Matters when connecting routers
    A neighbour may report another interface's addressVerify 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.

    Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
    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 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%
    Terminology layer

    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.

    Aliases that resolve here
    lldpcdpneighborsneighbor discovery l2
    Confirmation

    Confirm action

    Continue?