Cisco CCENT Advacned IOS Part II – Cisco Discovery Protocol


Cisco Discovery Protocol (CDP) is a proprietary protocol designed by Cisco to help administrators collect information about both locally attached and remote devices.

By using CDP, you can gather hardware and protocol information about neighbor devices, regardless of the routed protocols enabled on the interface since it operates at layer 2.  This is very useful information for troubleshooting and documenting your Cisco-based networks.  CDP is turned on by default on all Cisco routers and switches.

Cisco CCENT Cisco Discovery Protocol


The show cdp command (sh cdp for short) gives us information about two CDP global parameters that can be configured on Cisco devices:

CDP timer is how often CDP packets are transmitted to all active interfaces.

CDP holdtime is the amount of time that the device will hold packets received from neighbor devices.

Cisco CCENT Cisco Discovery Protocol


The “show cdp neighbor command (sh cdp nei for short) delivers information about directly connected devices.

It’s important to remember that CDP packets aren’t passed through a Cisco switch, and that you only see what’s directly attached. So this means that if your a router is connected to a switch, you won’t see any of the devices hooked up to that switch, you will need to get that information from the switch itself.

Another valuable CDP command to get more information about a neighbor is the “show cdp neighbor detail command (show cdp nei de for short). This command can be run on both  routers and switches, and it displays detailed information about each device connected to the device you’re running the command on.

The “show cdp entry * command is the same as “show cdp nei detail”. However, on a router or switch, type “show cdp entry * ? and you’ll see there are two helpful subcommands you can use.

Cisco CCENT show cdp neighbors


Field Descriptions:

Device ID – The configured ID (name), MAC address, or serial number of the neighbor device.

Local Intrfce – (Local Interface) The protocol being used by the connectivity media.

Holdtime – (Holdtime) The remaining amount of time, in seconds, the current device will hold the CDP advertisement from a transmitting router before discarding it.

Capability – The capability code discovered on the device. This is the type of the device listed in the CDP Neighbors table.

Platform – The product number of the device.

Port ID – The protocol and port number of the device.

Command syntax:

show cdp neighbors

[type number] [detail]

type – (Optional) Type of the interface connected to the neighbors about which you want information.

number – (Optional) Number of the interface connected to the neighbors about which you want information.

detail – (Optional) Displays detailed information about a neighbor (or neighbors) including network address, enabled protocols, hold time, and software version.

Cisco CCENT Using CDP Example


1. You first need to administratively mark up the s0/0 interface on the Vail router so you can receive CDP information


Vail#config t

Vail(config)#int s0/0

Vail(config-if)#no shutdown

2. You need to find the Keystone routers IP address and set the address of the Vail s0/0 to the next address in the available pool



Vail#show cdp neighbors detail

3. Once you find the IP address of the Keystone router, configure the Vail interface with the correct IP address – the next available IP address in the pool.

4. Telnet from the Vail router into the Keystone router and verify the configuration. Enable the F0/0 with a no shutdown if needed.

5. Finally, connect to HostB and make sure you can ping the server at

Cisco CCENT Telnet for Remote Access


Telnet is a virtual terminal protocol that’s part of the TCP/IP protocol suite  that allows you to make connections to remote devices, gather information, and run programs.

After your routers and switches are configured, you can use the Telnet program to reconfigure and/or check up on your routers and switches without using a console cable.

You run the Telnet program by typing telnet from any command prompt (DOS or Cisco). You have to have VTY passwords set on the routers for this to work.

If you telnet to a router or switch, you can end the connection by typing exit at any time, but what if you want to keep your connection to a remote device but still come back to your original router console?

To do that, you can press the Ctrl+Shift+6 key combination, release it, and then press X.

Cisco CCENT SSH (Secure Shell)


SSH is similar to telnet with the advantage of being more secure.

Cisco CCENT SSH (Secure Shell)


Shows options when utilizing the SSH command from a router.

Cisco CCENT Telnet / SSH (continued)


To see the connections made from your router to a remote device, use the show sessions command.

You can list all active consoles and VTY ports in use on your router with the show users command.

You can end Telnet or SSH sessions a few different ways—typing exit or disconnect is probably the easiest and quickest.

Cisco CCENT Setting and Determining IP Address on a Windows PC


The Local Area Connection Properties is where the LAN settings for a NIC are configured (figure on the left).  To set the IPv4 address, highlight “Internet Protocol Version 4 (TCP/IPv4)” and click .  The figure on the right will appear.  Typically in today’s networks Dynamic Host Configuration Protocol (DHCP) is utilized to obtain an IP address and DNS configuration.  This is the case on the figure as indicated by “Obtain an IP address automatically” and “Obtain DNS server address automatically” being selected.

Cisco CCENT Using Command Tool to view IP Settings on a Windows PC


The “ipconfig” command, issued from a command prompt, has numerous parameters.  It can be used to view the IP settings, change ip settings, release DHCP settings, etc.  The slide above shows all the different qualifiers.  Available qualifiers may vary between different versions of windows.

Cisco CCENT Domain Name System (DNS)


Domain Name System (DNS) is utilized to translate symbolic names (i.e. into IP addresses which are utilized for communication at Layer3 of the OSI reference model.  DNS makes the Internet more useable as users do not have to remember IP addresses but instead can utilize names.

Cisco CCENT Domain Name System (DNS)


The “ip domain-lookup” command enables DNS host name to ip address translation.

The “ip name-server” command specifies one or more name servers.

The “ip domain-name” command specifies the domain name that Cisco IP S utilizes to complete unqualified host names.

Cisco CCENT Resolving Host Names (DNS)


In order to use a hostname rather than an IP address to connect to a remote device, the device that you are using to make the connection must be able to translate the hostname to an IP address.

There are two ways to resolve hostnames to IP addresses: building a host table on each router or building a Domain Name System (DNS) server, which is kind of like a dynamic host table.

A host table provides name resolution on the router that it was built upon only. The command to build a host table on a router is:

ip host name tcp_port_number ip_address

The default is TCP port number 23 but you can create a session using Telnet with a different TCP port number if you want. You can also assign up to eight IP addresses to a hostname.

And to see the newly built host table, just use the show hosts command, which shows the temporary DNS entries and permanent IP host entries.

Cisco CCENT Basic Testing


You can use the ping and traceroute commands to test connectivity to remote devices, and both of them can be used with many protocols, not just IP.

Cisco CCENT Troubleshooting LAN Connectivity Problems


The best network test would be telnet, FTP or even HTTP between two hosts. If you can use an upper layer application between two hosts, you know they are working end-to-end.

Remember: tracert and ipconfig are Windows commands, not Cisco commands!

Note: If you can ping and telnet into a server but cannot access the server via it’s network name, you probably have some type of DNS failure.  Also, be aware of your network topology as firewalls are typical problems when one protocol works between a source and destination but another protocol doesn’t.  Another problem with why one protocol would work but another would not could be with the application itself.  For example if you are able to telnet to a server but not HTTP to it, check if HTTP service is running on the server and that it is utilizing the default port TCP of 80.

Cisco CCENT IP Troubleshooting


To verify the local IP stack you would ping the loopback address which is  Example is as follows:


If you can ping the loopback address then the protocol stack is fine.  Other problems you might have are not having the respective interface administratively up, not having routing properly configured so your routing table is not fully populated, you might have a firewall or just ACLs blocking traffic or you might have a physical problem.

Troubleshooting can be frustrating but also fun at the same time.  As you get more familiar with networks your troubleshooting skills will grow and you will get better at it.

Cisco CCENT IP Troubleshooting


HostA can get to the default gateway, but fails when it gets to hop 2, which is Router 2.