The objective of this lab exercise is for you to learn and understand how to enable CDP and adjust CDP timers.
Understanding CDP is a fundamental skill. CDP is a proprietary Cisco protocol that can be used for device discovery as well as internetwork troubleshooting. As a Cisco engineer, as well as in the Cisco CCNA exam, you will be expected to know how to enable and use CDP in internetwork discovery and troubleshooting.
This lab is suitable for CCENT and CCNA certification exam preparation.
This lab has a difficulty rating of 5/10.
When you are ready for your certification exam, you should complete this lab in no more than 10 minutes.
Please use the following topology to complete this lab:
Configure hostnames on R1 and Sw1 as illustrated in the topology.
Configure an IP address of 172.29.100.1/24 on R1 F0/0.
Configure VLAN200 on Sw1 and name it CDP_VLAN. Configure interface VLAN200 on Sw1 and assign it the IP address 172.29.100.2/24. Assign port FastEthernet0/2 on Sw1 to this VLAN.
Enable CDP on R1 and Sw1 globally (it’s already on by default but you can practice the command). Configure R1 and Sw1 to send CDP packets every 10 seconds. The timer command won’t work on Packet Tracer so use live equipment or GNS3.
Use CDP to see detailed information about Sw1 from R1. Familiarize yourself with the information provided.
Now disable CDP on the router interface and disable CDP globally on the switch.
Configuration and Verification
For reference information on configuring hostnames, please refer to earlier labs.
R1#conf t Enter configuration commands, one per line. End with CTRL/Z. R1(config)#int fa0/0 R1(config-if)#ip address 172.29.100.1 255.255.255.0 R1(config-if)#no shut R1(config-if)#^Z R1#
Sw1#config t Enter configuration commands, one per line. End with CTRL/Z. Sw1(config)#vlan200 Sw1(config-vlan)#name CDP_VLAN Sw1(config-vlan)#exit Sw1(config)#interface vlan1 Sw1(config-if)#shut Sw1(config-if)#exit Sw1(config)#int vlan200 Sw1(config-if)#no shut Sw1(config-if)#ip address 172.29.100.2 255.255.255.0 Sw1(config-if)#exit Sw1(config)#int f0/2 Sw1(config-if)#switchport mode access Sw1(config-if)#switchport access vlan200 Sw1(config-if)#end Sw1#ping 172.29.100.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.29.100.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/203/1000 ms Sw1#
R1#conf t Enter configuration commands, one per line. End with CTRL/Z. R1(config)#cdp run R1(config)#cdp timer 10 R1(config)#^Z R1#show cdp interface fastethernet0/0 FastEthernet0/0 is up, line protocol is up Encapsulation ARPA Sending CDP packets every 10 seconds Holdtime is 180 seconds Sw1#conf t Enter configuration commands, one per line. End with CTRL/Z. Sw1(config)#cdp run Sw1(config)#cdp timer 10 Sw1(config)#end Sw1# Sw1#show cdp interface fastethernet0/2 FastEthernet0/2 is up, line protocol is up Encapsulation ARPA Sending CDP packets every 10 seconds Holdtime is 180 seconds
R1#show cdp neighbors detail ------------------------- Device ID: Sw1 Entry address(es): IP address: 172.29.100.2 Platform: cisco WS-C2950G-24-EI, Capabilities: Switch IGMP Interface: FastEthernet0/0, Port ID (outgoing port): FastEthernet0/2 Holdtime : 178 sec Version : Cisco Internetwork Operating System Software IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(13)EA1, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2003 by cisco Systems, Inc. Compiled Tue 04-Mar-03 02:14 by yenanh advertisement version: 2 Protocol Hello: OUI=0x00000C, Protocol ID=0x0112; payload len=27, value=00000000FFFFFFFF010221FF000000000000000DBD064100FF0000 VTP Management Domain: “CISCO” Duplex: full
NOTE: The show cdp neighbors detail command provides detailed information about devices. This is a very useful troubleshooting command as you can find out the IP addresses (and more) of connected devices and access them remotely. Try this command on Sw1 and see the information you find out about on R1. Familiarize yourself with the contents of this command for both routers and switches.
R1#conf t Enter configuration commands, one per line. End with CTRL/Z. R1(config)#int fa0/0 R1(config-if)#no cdp enable Sw1(config)#no cdp run
NOTE: The CDP entries will still remain until they time out. You can clear the entries with the clear cdp table command, and then issue show commands to check that there are no entries. Knowing how to disable CDP is an important security task for the CCNA exam.