Skip to main content

Day 36: CDP and LLDP

CCNA 200-301 Study Guide: Layer 2 Discovery (CDP & LLDP)

1.0 Fundamentals of Layer 2 Discovery

Layer 2 discovery protocols act as the "digital handshake" of a network, allowing devices to identify neighbors without requiring an IP address. They operate at the Data Link Layer, meaning discovery occurs as long as the physical link is up and the protocol is enabled.

Core Attributes

  • Operational Scope: Information is strictly point-to-point. Discovery frames are processed by the direct neighbor and then discarded; they are never forwarded.

  • Shared Data: Device IDs (Hostnames), IP addresses (for management), platform/capabilities, and local/remote interface mappings.

  • Security Risk: These protocols are "chatty" and broadcast sensitive topology data. Standard Practice: Disable discovery on untrusted ports (e.g., user-facing access ports) to prevent reconnaissance.

2.0 Cisco Discovery Protocol (CDP)

CDP is a Cisco-proprietary protocol used for identifying and managing Cisco hardware.

Operational Defaults

  • Status: Enabled globally and on all interfaces by default.

  • Multicast MAC: 0100.0CCC.CCCC

  • Default Timers:

    • Hello Timer: 60 seconds.

    • Holdtime: 180 seconds.

  • Version 2 (Default): Includes enhanced features like Native VLAN and duplex mismatch detection.

Configuration & Management

Command

Mode

Purpose

cdp run

Global

Enables CDP globally.

no cdp run

Global

Disables CDP globally.

cdp enable

Interface

Enables CDP on a specific port.

cdp timer [sec]

Global

Adjusts advertisement frequency.

cdp holdtime [sec]

Global

Adjusts neighbor retention time.

Verification Commands

  • show cdp: Checks global status and timers.

  • show cdp neighbors: Provides a summary table of adjacent Cisco devices.

  • show cdp neighbors detail: Provides Layer 3 addresses and software versions.

  • show cdp entry [name]: Focuses on a specific neighbor.

LLDP (IEEE 802.1AB) is the vendor-neutral standard required for discovery in multi-vendor environments.

Operational Defaults

  • Status: Typically disabled by default on Cisco switches.

  • Multicast MAC: 0180.C200.000E

  • Default Timers:

    • Hello Timer: 30 seconds.

    • Holdtime: 120 seconds.

    • Reinit Delay: 2 seconds.

Configuration & Management

Unlike CDP, LLDP allows for granular control over transmission and reception.

Command

Mode

Purpose

lldp run

Global

Enables LLDP globally.

lldp transmit

Interface

Enables sending LLDP frames on the port.

lldp receive

Interface

Enables processing incoming LLDP frames.

lldp timer [sec]

Global

Configures advertisement frequency.

lldp holdtime [sec]

Global

Configures the holdtime.

Verification Commands

  • show lldp

  • show lldp neighbors

  • show lldp neighbors detail

    • Note: LLDP uses B (Bridge) in its capability codes where CDP uses S (Switch).

4.0 Protocol Comparison Matrix

Feature

Cisco Discovery Protocol (CDP)

Link Layer Discovery (LLDP)

Ownership

Cisco Proprietary

IEEE 802.1AB (Standard)

Cisco Default

Enabled

Disabled

Hello Timer

60 Seconds

30 Seconds

Holdtime

180 Seconds

120 Seconds

Interface Logic

cdp enable (Binary)

transmit / receive (Granular)

VTP Support

Yes

No

Capability Code

S (Switch)

B (Bridge)