CDP protocol
CDP protocol
Features of CDP:
1. It is a Layer 2 Protocol:
- Operates at the Data Link Layer (Layer 2) of the OSI model.
- Works on point-to-point connections.
2. Device Discovery:
- CDP allows a Cisco device to discover other Cisco devices (routers,
switches, etc.) that are directly connected.
- Helps in network topology mapping and troubleshooting.
https://www.youtube.com/@techwithravish
CDP protocol:
CDP
R1 R2
CDP
CDP CDP Info Collected by CDP Protocol: -
-Device ID (Hostname of the device)
- Local interface (Interface on which192.168.11.2
CDP is running)
- Remote interface (Interface of the neighboring device)
- Platform (Type of Cisco device, e.g., Router, Switch)
VLAN 20
- Capabilities (Switch, Router, etc.)
CDP CDP
- IP address of the neighbor
- VLAN information (in CDPv2)
- Duplex mismatch warnings
https://www.youtube.com/@techwithravish
Key Features of CDP:
3. Periodic Updates:
- Devices send CDP advertisements periodically (default: 60 seconds).
- Advertisement messages contain device information.
4. Protocol Independent:
- CDP runs independently of Layer 3 protocols like IP or IPX.
5. Supports Multiple Protocols:
- Can provide details about IP address, VLAN, and other protocol-
related information.
6. CDP Versions:
- CDPv1: Basic information exchange.
- CDPv2: Adds additional features like VTP domain details, native VLAN
mismatch detection, and more.
https://www.youtube.com/@techwithravish
CDP Information Shared: -
CDP provides the following details about a neighboring
Cisco device:
- Device ID (Hostname of the device)
- Local interface (Interface on which CDP is running)
- Remote interface (Interface of the neighboring device)
- Platform (Type of Cisco device, e.g., Router, Switch)
- Capabilities (Switch, Router, etc.)
- IP address of the neighbor
- VLAN information (in CDPv2)
- Duplex mismatch warnings
https://www.youtube.com/@techwithravish
CDP Timers: -
CDP (Cisco Discovery Protocol) uses two main timers to control how
often information is sent and how long neighbor information is
retained.
1. CDP Timer
- Controls how often CDP advertisements are sent.
- Default value: 60 seconds.
2. CDP Holdtime
-Specifies how long a device retains neighbor information if no new
CDP packets are received.
-Default value: 180 seconds.
-If the holdtime expires before receiving a new advertisement, the
neighbor entry is removed.
https://www.youtube.com/@techwithravish
CDP timer Commands:-
Command to modify the CDP timer:
Router(config)# cdp timer <seconds>
Router(config)# cdp timer 30
Yes Yes
VLAN Information
https://www.youtube.com/@techwithravish
Conditions in Which CDP Disabled:
CDP can expose network details to attackers if not controlled
properly.
- Disable CDP on External Interfaces (e.g., Internet-facing
ports)
-Disable CDP on Trunk Links where it's unnecessary.