Get My Exclusive FREE 7-Part Report,
"How To Pass The CCNA", Daily FREE
Cisco And CompTIA Exam Questions,
And All The Latest Certification News
In My Daily Newsletter!

Privacy Policy

Name:
Email:
  More Testimonials >
Visit my blog for free daily Cisco CCNA and CCNP certification questions, my latest free articles and tutorials, and more!


 

Cisco CCENT / CCNA 640-802 Certification Exam Training :

Using Cisco Discovery Protocol (CDP) In Network Troubleshooting

By Chris Bryant, CCIE #12933

Perhaps the most important skill you can acquire in earning your CCENT and Cisco CCNA certification is learning how to troubleshoot. If you've worked with real-world networks, though, you know that things don't always quite match up with what we read in study guides! That's particularly true when it comes to dealing with your client's network documentation - or lack of network documentation, as the case may be!

Some networks have clear, concise network maps that show you every router, every switch, and every physical connection.

Some networks do not.

Part of troubleshooting is quietly verifying what a client is telling you.  Fact is, you can't always take what a client says at face value; just because he says two switches are physically connected, it doesn't mean that they are - but you need to know!   You can check a Cisco device's physical connections with Cisco Discovery Protocol, which runs by default on Cisco routers and switches, both globally and on a per-interface level.

For security purposes, many admins choose to disable CDP.  Here's the command to see if CDP is indeed running on a router or switch:

Router1#show cdp
Global CDP information:
        Sending CDP packets every 60 seconds
        Sending a holdtime value of 180 seconds
        Sending CDPv2 advertisements is  enabled

That output means that CDP is indeed enabled. If you see the following, it's off.  But you didn't need me to tell you that!

Router1#show cdp
% CDP is not enabled
Router1#

This show output is unusual in that we were given a message even though the protocol is not enabled.  As you'll see in future studies, you generally get no output if the protocol specified in the show command is not running.  Instead, you're just put right back at the prompt.  To illustrated, here's the output of show ip route rip on a router where the routing protocol RIP is not running.

Router1#show ip route rip

Router1#

The article continues after this brief message!

Five Minutes From Now, You Can Be Studying For Exam Success Just As Thousands Of Other Candidates Around The World Have - With Chris Bryant, CCIE #12933 With You Every Step Of The Way - With The Ultimate CCNA Exam Study Package!

CCNA Exam Study Package

If You Prefer Video Training, You Can Earn Your CCNA Using My Exclusive CCNA Video Boot Camp - The Only CBT That Brings You 25 Hours Of Instruction From Chris Bryant, CCIE #12933, AND Free Membership In My Exclusive Online Cisco Certification Forum, Where You Can The Instructor Questions Personally!

Just Click The Image For More Details And Video Samples!

CCNA Boot Camp Video

 

Now back to our router!  Here's how to enable CDP:

Router1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#cdp run

The most commonly used CDP command is show cdp neighbor.  I'll move over to a switch that has three physical connections to other hosts to show you the output of this command.

SW1#show cdp neighbor
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone

Device ID     Local Intrfce     Holdtme  Capability  Platform          Port ID
SW2              Fas 0/12           170          S I          WS-C2950-1     Fas 0/12
SW2              Fas 0/11           170          S I          WS-C2950-1     Fas 0/11
R2                  Fas 0/2            131           R            2520                 Eth 0

This command shows us every device this switch is physically connected to, and gives us a wealth of information as well!  From left to right...

Device ID is the remote device's hostname.

Local Interface is the local switch's interface connected to the remote host.

Holdtime is the number of seconds the local device will retain the contents of the last CDP Advertisement received from the remote host. 

Capability shows you what type of device the remote host is.  The first two connections are to a switch, and the third is to a router. 

Platform is the remote device's hardware platform.  The top two connections are to a 2950 switch, and the third is to a 2520 router.

Port ID is the remote device's interface on the direct connection. 

This is an excellent command to verify what you're seeing on a network map or what a client is telling you.  I've been in more than one situation where a client said one thing and CDP directly proved them wrong.  It may be best to use it when they're not around, but it can also prove what you're telling the client.

Real-world courtesy:  If your client has CDP turned off, and you turn it on for troubleshooting, turn it back off before you leave.

The commands cdp run and no cdp run enable and disable CDP on a global basis.  CDP runs globally on a Cisco device by default.

You may want to leave CDP on globally, but disable it on a particular interface. To enable or disable CDP on a per-interface basis, use cdp enable and no cdp enable.

SW1(config)#int fast 0/12
SW1(config-if)#no cdp enable
SW1(config-if)#cdp enable

There are some other CDP commands you may find helpful, the first being show cdp neighbors detail.  This command gives you a lot of detail about every CDP neighbor, so I won't put it all here, but here's a clip of the output dealing with just one of SW1's neighbors.  Note that you can even see the neighbor's IOS version with this command!

SW1#show cdp neighbor detail
-------------------------
Device ID: SW2
Entry address(es):
Platform: cisco WS-C2950-12,  Capabilities: Switch IGMP
Interface: FastEthernet0/12,  Port ID (outgoing port): FastEthernet0/12
Holdtime : 148 sec

Version :
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(19)EA1c, RELEASE SOFTWARE
 (fc2)
Copyright (c) 1986-2004 by cisco Systems, Inc.
Compiled Mon 02-Feb-04 23:29 by yenanh

And right before I leave the client site, I'd run show cdp interface to verify that CDP is running on the interfaces that it should be running on - and not running on the others!  Here's the partial output of this command on SW1:

SW1#show cdp interface
FastEthernet0/1 is down, line protocol is down
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet0/2 is up, line protocol is up
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet0/3 is down, line protocol is down
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds

We’ll take a look at more troubleshooting tools and how they're used in the next installment of my exclusive Cisco CCENT / CCNA certification exam tutorial series!

 

CCNA Exam Study Package

 

CCNA Boot Camp Video

 

To your success,

Chris Bryant

CCIE #12933

chris@thebryantadvantage.com

 

 

The Ultimate CCNA Study Package | The Ultimate CCNA Study Guide

Binary Math And Subnetting Mastery

Cisco Rack Rentals

CCNP BSCI Exam Study Package

CCNP BCMSN Exam Study Package

CCNP BCRAN Exam Study Package

CCNP CIT Exam Study Package | CCNP BSCI Exam Study Guide

CCNA CBT Video Boot Camp | CCNP BSCI Video Boot Camp

Cisco Training Tutorials And Cisco Certification Articles

CCNP CBT BCMSN Video Boot Camp | CCNP CBT BCRAN Video Boot Camp

CompTIA Network+ Exam Study Package

CompTIA Security+ Exam Study Package

CompTIA A + Certification Exam Study Package

CCNA Training Store | CCNP Certification Training Store

CompTIA Certification Training Store

Cisco Lab Router And Switch Home Lab Help

Site Map | Home Page | Testimonials

Microsoft Windows Vista Certification Updates And News

The Bryant Advantage Blog | About Chris Bryant, CCIE #12933