Cisco Discovery Protocol
Sniffing and Evasion
Cisco Discovery Protocol (CDP) is a Layer 2, media-independent protocol developed by Cisco Systems. It enables Cisco devices to discover information about directly connected devices, facilitating efficient network management and troubleshooting.
Objectives:
Understand the purpose and benefits of CDP.
Learn how to configure basic settings on Cisco devices to utilize CDP.
Use Wireshark to analyze CDP packets.
1. Network Topology:
The network setup for this tutorial includes a Cisco router (R1) connected to a PC (PC-1) via a FastEthernet interface.

2. Configuring Basic Settings:
On Router R1:
R1#configure terminal
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 172.16.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface loopback 0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#^Z
R1#write memory
Warning: Attempting to overwrite an NVRAM configuration previously written
by a different version of the system image.
Overwrite the previous NVRAM configuration?[confirm]
Building configuration...
[OK]
R1#
On PC-1:
Set IP Configuration:
PC> ip 172.16.1.100/24 172.16.1.1
Checking for duplicate address...
PC : 172.16.1.100 255.255.255.0 gateway 172.16.1.1
PC> show ip
NAME : PC[1]
IP/MASK : 172.16.1.100/24
GATEWAY : 172.16.1.1
DNS :
MAC : 00:50:79:66:68:01
LPORT : 20004
RHOST:PORT : 127.0.0.1:20005
MTU : 1500
PC> save
Saving startup configuration to startup.vpc
. done
PC>
Verify Configuration:
/R1#ping 172.16.1.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/8/16 ms
R1#
3. Analyzing CDP Packets with Wireshark:
Install Wireshark:
Download and install Wireshark from the official website.
Capture Traffic:
Launch Wireshark and start a capture on the interface connected to the network.
Apply Display Filter:
Use the filter to display only CDP packets:
dcp
Examine CDP Packets:
Observe details such as device ID, IP address, platform, and capabilities.

Keywords
CDP
,Cisco Discovery Protocol
,network topology
,router configuration
,Wireshark
,packet analysis
,IP addressing
,troubleshooting
,network management
,FastEthernet
,loopback interface
,console access
,SSH
,network discovery
,device identification
,subnet mask
,default gateway
,Cisco devices
,interface configuration
,network monitoring
, وایرشارک
Last updated