# Day 36: CDP and LLDP

# CCNA 200-301 Study Guide: Layer 2 Discovery (CDP &amp; 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 &amp; Management

<div align="left" dir="ltr" id="bkmrk-command-mode-purpose"><table><colgroup><col width="167"></col><col width="89"></col><col width="263"></col></colgroup><tbody><tr><td>Command

</td><td>Mode

</td><td>Purpose

</td></tr><tr><td>cdp run

</td><td>Global

</td><td>Enables CDP globally.

</td></tr><tr><td>no cdp run

</td><td>Global

</td><td>Disables CDP globally.

</td></tr><tr><td>cdp enable

</td><td>Interface

</td><td>Enables CDP on a specific port.

</td></tr><tr><td>cdp timer \[sec\]

</td><td>Global

</td><td>Adjusts advertisement frequency.

</td></tr><tr><td>cdp holdtime \[sec\]

</td><td>Global

</td><td>Adjusts neighbor retention time.

</td></tr></tbody></table>

</div>### 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.

## 3.0 Link Layer Discovery Protocol (LLDP)

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 &amp; Management

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

<div align="left" dir="ltr" id="bkmrk-command-mode-purpose-1"><table><colgroup><col width="167"></col><col width="89"></col><col width="334"></col></colgroup><tbody><tr><td>Command

</td><td>Mode

</td><td>Purpose

</td></tr><tr><td>lldp run

</td><td>Global

</td><td>Enables LLDP globally.

</td></tr><tr><td>lldp transmit

</td><td>Interface

</td><td>Enables sending LLDP frames on the port.

</td></tr><tr><td>lldp receive

</td><td>Interface

</td><td>Enables processing incoming LLDP frames.

</td></tr><tr><td>lldp timer \[sec\]

</td><td>Global

</td><td>Configures advertisement frequency.

</td></tr><tr><td>lldp holdtime \[sec\]

</td><td>Global

</td><td>Configures the holdtime.

</td></tr></tbody></table>

</div>### 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

<div align="left" dir="ltr" id="bkmrk-feature-cisco-discov"><table><colgroup><col width="134"></col><col width="235"></col><col width="233"></col></colgroup><tbody><tr><td>Feature

</td><td>Cisco Discovery Protocol (CDP)

</td><td>Link Layer Discovery (LLDP)

</td></tr><tr><td>Ownership

</td><td>Cisco Proprietary

</td><td>IEEE 802.1AB (Standard)

</td></tr><tr><td>Cisco Default

</td><td>Enabled

</td><td>Disabled

</td></tr><tr><td>Hello Timer

</td><td>60 Seconds

</td><td>30 Seconds

</td></tr><tr><td>Holdtime

</td><td>180 Seconds

</td><td>120 Seconds

</td></tr><tr><td>Interface Logic

</td><td>cdp enable (Binary)

</td><td>transmit / receive (Granular)

</td></tr><tr><td>VTP Support

</td><td>Yes

</td><td>No

</td></tr><tr><td>Capability Code

</td><td>S (Switch)

</td><td>B (Bridge)

</td></tr></tbody></table>

</div>