2.3.3 Packet Tracer – Cisco Discovery Protocol (CDP) Answers

2.3.3 Packet Tracer – Cisco Discovery Protocol (CDP) Answers

Topology

2.3.3 Packet Tracer - Cisco Discovery Protocol (CDP) Answers 2

Device Interface IP Address Subnet Mask Default Gateway
R1 Fa0/0 172.16.3.1 255.255.255.0 N/A
S0/0 172.16.2.1 255.255.255.0 N/A
R2 Fa0/0 172.16.1.1 255.255.255.0 N/A
S0/0 172.16.2.2 255.255.255.0 N/A
S0/1 192.168.1.2 255.255.255.0 N/A
R3 Fa0/0 192.168.2.1 255.255.255.0 N/A
S0/0 192.168.1.1 255.255.255.0 N/A
PC1 NIC 172.16.3.10 255.255.255.0 172.16.3.1
PC2 NIC 172.16.1.10 255.255.255.0 172.16.1.1
PC3 NIC 192.168.2.10 255.255.255.0 192.168.2.1

Introduction:

Cisco Discovery Protocol (CDP) is an OSI Layer 2 protocol that operates between Cisco devices such as routers and switches. CDP messages contain information about the device such as device ID, platform, connected interface, IOS version, and Layer 3 address. Because CDP operates at Layer 2, only directly connected devices exchange information.

Learning Objectives:

  • Examine CDP show commands.
  • View CDP configuration settings.
  • View CDP neighbor information.
  • Examine CDP configuration commands.
  • Disable and enable CDP globally on a router.
  • Disable and enable CDP on an interface.

Task 1: Examine CDP show commands.

Step 1 – View CDP configuration settings.

From the CLI on router R1 issue the command show cdp, the output shows timer and version information. Issue the command show cdp ? to see a list of the other CDP show commands. Issue the command show cdp interface, the output shows timer information for all of the interfaces on the router. An interface may be specified to show timer information for that interface only by using the command show cdp interface interface type slot/port. Issue the command show cdp interface Fa 0/0 to see CDP information for the FastEthernet 0/0 interface.

Step 2 – View CDP neighbor information.

A router builds a table of information about neighboring devices from CDP messages received from those devices. From the CLI on router R1 issue the command show cdp neighbors. Examine the output. A single line of information is displayed for each device. Information is displayed for switch S1 and router R2 that are directly connected but not for router R3 which is not directly connected. Issue the command show cdp entry R2. Examine the output. More detailed information about router R2 is displayed including the IP address we can use to reach the router. Issue the command show cdp entry *. Examine the output. Detailed information about all directly connected devices is displayed. Issue the command show cdp neighbors detail. Examine the output. The same information as the show cdp entry * command is displayed.

Task 2: Examine CDP configuration commands.

Step 1 – Disable and enable CDP globally on a router.

From the CLI on router R2 issue the command show cdp neighbors. The output shows information about the three directly connected devices. Enter global configuration mode. Issue the command no cdp run to disable CDP on the router. Exit configuration mode and issue the command show cdp neighbors. The output shows that CDP is not enabled. From the CLI on router R1 issue the command show cdp neighbors, if the output shows an entry for router R2, wait the number of seconds shown for the Holdtime for router R2’s entry and reissue the command. The entry for router R2 will no longer be shown because no CDP messages were received before the Holdtime expired. From the CLI on router R2 enter global configuration mode. Issue the command cdp run to enable CDP on the router.

Step 2 – Disable and enable CDP on an interface.

You may not want to send CDP information to Cisco devices on an untrusted network. It is possible to disable CDP on a specific interface. From the CLI on router R2 enter global configuration mode, enter interface configuration mode for interface Serial0/0/1 and issue the command no cdp enable to disable CDP on the interface. Exit configuration mode. Issue the command show cdp neighbors on both router R2 and router R3, until the entry for router R3 times out of the CDP table on router R2 and the entry for router R2 times out of the CDP table on router R3. From the CLI on router R2 enter global configuration mode, then the interface configuration mode for interface Serial0/0/1 and issue the command cdp enable to enable CDP on the interface.

Download Packet Tracer (.pka) file:

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x