Octet

What are CDP and LLDP, and how do they differ?

Show the answer

Say this first

Both are one-way layer 2 discovery protocols: a device advertises its name, port, platform, addresses and capabilities, and each neighbor caches it. CDP is Cisco proprietary, sent every 60 seconds with a 180-second holdtime to 0100.0ccc.cccc. LLDP is IEEE 802.1AB, sent every 30 seconds with a 120-second TTL to 0180.c200.000e, EtherType 0x88CC. I use LLDP in multi-vendor networks and turn both off on untrusted ports.

Go deeper

Side by side

CDPLLDP
StandardCiscoIEEE 802.1AB
Timer / hold60 s / 180 s30 s / 120 s (4 x 30)
Destination MAC0100.0ccc.cccc0180.c200.000e
Default on Cisco IOSOnOff until lldp run
PhonesVoice VLAN, powerLLDP-MED: network policy, power, location

LLDP has four mandatory TLVs (chassis ID, port ID, TTL, end) and optional ones such as system name, port description, capabilities and management address. CDPv2 also carries native VLAN and duplex, and logs %CDP-4-NATIVE_VLAN_MISMATCH and %CDP-4-DUPLEX_MISMATCH when neighbors disagree.

Defaults elsewhere

NX-OS runs CDP by default and needs feature lldp. Arista EOS and Junos on EX switches run LLDP by default.

Configuration

Cisco IOS
lldp run
interface GigabitEthernet1/0/1
 no cdp enable
Output
SW1# show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,
                  D - Remote, C - CVTA, M - Two-port Mac Relay

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
SW2              Gig 1/0/48        157              S I   C9300-48P Gig 1/0/48

Traps

  • Saying LLDP needs a reply from the neighbor. Neither protocol has requests or acknowledgments.
  • Assuming LLDP is on by default on Cisco IOS. It is off until lldp run.
How did you do?