Recent Posts

Friday, 18 August 2017

CDP - (Cisco Discovery Protocol) Lab work

CDP (Cisco Discovery Protocol)

In this tutorial we will explain about CDP (Cisco Discovery Protocol) in detail with examples. CDP ( Cisco Discovery Protocol) is a proprietary protocol designed by Cisco System for Cisco devices. CDP helps administrators in collecting information about cisco devices.

CDP is a data link layer protocol. It is available in IOS from version 10.3. Routers and catalyst switches support CDP. CDP is enabled by default on all supporting devices. Supporting device can receive and send CDP messages. CDP messages are not forwarded. It means you can get CDP information only about the directly connected devices.
CDP messages are generated as layer two frames and distributed as multicasts. CDP uses SNAP ( Subnetwork Access Protocol) frame type. SNAP is not supported by all media types. Media types supported by SNAP are Ethernet, Token Ring, fiber distributed data interface (FDDI), Asynchronous Transfer Mode (ATM), Point-to-Point Protocol (PPP), High- Level Data Link Control (HDLC), and Frame Relay. With SNAP, CDP is also limited with these media types only.
Note: CDP messages are generated in every 60 seconds. Hold down time for missing neighbor is 180 seconds. Since CDP is a layer two protocol, CDP messages are not routed across the device.
For example: we can learn to do CDP in cisco packet tracer simulator version 7.0
Create a topology as show in screen shot given below;



 In this topology we are using two routers and two switches with following connections.
  • Switch1(Port GigabitEthernet 0/1) is connected with Router0(Port FastEthernet 0/0).
  • Router0(Port serial 0/0/0) is connected with Router1(Port serial 0/1/0).
  • Router1(Port FastEthernet 0/0) is connected with Switch0(FastEthernet 0/24).

CDP is enabled by default of all supporting device, but not all interfaces on supporting device are enabled by default. Interfaces on router are by default administratively down. We need to enable them before they can send or receive any data packet. 

For example, enter show cdp neighbors command in privileged mode on switch 1.



Switch is not getting any CDP messages from Router0. Switch is connected with router on FastEthernet 0/0 port, which is by default administratively down.

You can verify it by entering show ip interface brief command in privileged mode of Router0.



In CDP configuration part, We need to configure and enable associated interface on router, before we can take advantage of CDP. 

Now Assign IP Address on FastEthernet0/0 , Serial0/1/0 and enable that which is shown in a screen shot to understand given below;

Router0 



Same as Router0, assign IP address and enable interface on Router1.

 Router1



If you are following this practice on packet tracer, connection lines should be change to green after above configuration.

CDP Status

CDP is enabled by default on all supporting devices unless you have manually turned it off. Use show cdp command to check the status of CDP on your device.



show cdp command provides this information globally. To get interface by interface information use show cdp interface command.


How we can show CDP neighbors

CDP information is stored locally without forwarding it to neighbors. CDP protocol collects information about device and format it in layer two frame. This frame is being multicast in every 60 seconds. Supporting device can receive this frame and update their CDP tables. Device can get information only from directly connected devices. In our example Router0 is directly connected with Router1 and Switch1. So it will contain information only about Router1 and Switch1. Use show cdp neighbors to all connected devices. 

Use show cdp neighbors detail or show cdp entry * commands to display additional information about connected devices.



show cdp entry * command provide the same details shown in screen shot given below;


This command displays additional information about all connected devices. To get information about specific device use.

show entry Router command is shown below;


From above output we can see that connected device is a 2600 series router running IOS 12.2 (28) and has an IP address of 10.10.10.2 configured on the connected Serial0/0 interface.


How to disable cdp command

CDP is enabled by default on all supporting devices. Unless your router is connected with wan link or entrusted device, you should keep CDP enable. CDP protocol take extra caution of bandwidth. CDP information is only 80 bytes in length. If you still need to disable CDP, use following commands.
To disable CDP globally use no cdp run in global configuration mode.

To disable CDP on interface basis use no cdp enable in interface specific mode.



How to enable cdp process


CDP is enabled by default. Due to some reason if you have disabled it, enabling it again is quite simple process.
To enable it globally use cdp run command from global configuration mode.

To enable it on interface basis use cdp enable command from interface specific mode.

Finally, We have completed the CDP lab simulation with the help of cisco packet tracer version 7.0.

No comments:

Post a Comment

Popular Posts