0% found this document useful (0 votes)
4 views

CDP protocol

CDP (Cisco Discovery Protocol) is a Layer 2 proprietary protocol that enables Cisco devices to discover and share information with directly connected devices. It provides details such as device ID, local and remote interfaces, platform type, capabilities, and IP address, with periodic updates every 60 seconds. CDP can be configured and managed through various commands, and it is important to disable it on external interfaces to prevent security risks.

Uploaded by

mike916457
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

CDP protocol

CDP (Cisco Discovery Protocol) is a Layer 2 proprietary protocol that enables Cisco devices to discover and share information with directly connected devices. It provides details such as device ID, local and remote interfaces, platform type, capabilities, and IP address, with periodic updates every 60 seconds. CDP can be configured and managed through various commands, and it is important to disable it on external interfaces to prevent security risks.

Uploaded by

mike916457
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

CDP (Cisco Discovery Protocol)

CDP (Cisco Discovery Protocol) is a Layer 2 proprietary protocol


developed by Cisco that allows Cisco devices to discover and share
information with directly connected Cisco devices.

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

Command to modify the CDP holdtime:


Router(config)# cdp holdtime <seconds>
Router(config)# cdp holdtime 120

Verifying CDP Timers:


Router# show cdp
https://www.youtube.com/@techwithravish
CDP Commands:
CDP must be enabled globally and on an interface to function.
1. Enable or Disable CDP Globally
- Enable CDP globally
Router(config)# cdp run
- Disable CDP globally
Router(config)# no cdp run

2. Enable or Disable CDP on an Interface


- Enable CDP on an interface:
Router(config-if)# cdp enable
- Disable CDP on an interface
Router(config-if)# no cdp enable
https://www.youtube.com/@techwithravish
Show CDP Information:
- Display basic details of neighbors
Router# show cdp neighbors
- Detailed info, including IP address
Router# show cdp neighbors detail
- Show information for all neighbors:
Router# show cdp entry
- Shows interfaces running CDP
Router# show cdp interface
Displays CDP statistics (packets sent/received)
Router# show cdp traffic
https://www.youtube.com/@techwithravish
Basic Neighbor Table:-
Command for CDP Neighbors
Router# show cdp neighbors
Device ID Local Intf Holdtime Capability Platform Port ID
Switch-1 Gig0/1 180 SI WS-C2960X Gig0/24
Router-2 Gig0/2 120 RSI ISR4331 Gig0/1
Device ID: Neighbor’s hostname
Local Intf: Interface on the local device where CDP is running
Holdtime: Time before the CDP entry expires
Capability: S (Switch), R (Router), I (IGMP), etc.
Platform: Model of the neighboring device
Port ID: Neighbor’s interface https://www.youtube.com/@techwithravish
CDP vs LLDP:
Feature CDP LLDP

Vendor-Specific Multi-Vendor (IEEE


Cisco Only
802.1AB)
Layer
Layer 2 Layer 2

Default Timer 60 sec 30 sec

Default Holdtime 180 sec 120 sec

Protocol Support Cisco devices All devices

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.

Command to Disable CDP:


- Disable globally:
Router(config)# no cdp run
- Disable on a specific interface
Router(config-if)# no cdp enable https://www.youtube.com/@techwithravish

You might also like