Pcornel
Networking · Network & Protocols › Ethernet & VLANs

LLDP & CDP Reference

Cheat sheet · https://pcornel.dk/topic.php?topic=206

Back to the Topic

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.

Remember

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.

First 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?

Commands

show cdp neighbors
show lldp neighbors

Verify in this order

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

Where it usually breaks

media/optics → administrative state → carrier/line protocol → negotiation → error/drop counters → neighbor discovery → upper-layer adjacency

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=206

Confirmation

Confirm action

Continue?