The Cisco Discovery Protocol (CDP) enables you to access configuration information on other routers.
|
Physical media supporting the Subnetwork Access Protocol (SNAP) connect CDP devices.

These include all LANs, Frame Relay and SMDS WANs, and ATM networks.
|
Advertisement and discovery using CDP involves frame exchanges at the data-link layer.
|
So only directly connected routers (neighbors) can exchange CDP information.
|
In the example shown here, you can't obtain CDP information about the lowest router directly.
|
You would have to use Telnet to connect to a router directly connected to the target router.
@@
When a Cisco device running Cisco IOS boots up, CDP runs by default.
|
CDP can then automatically discover neighboring Cisco devices that are running CDP, regardless of which protocol they are running.
|
Once CDP has discovered a device, it can display any of the various upper-layer protocol address entries used on the discovered device's port, such as IPX or AppleTalk Datagram Delivery Protocol.
|
Since CDP operates at the data-link layer, two or more CDP devices that support different network layer protocols can learn about each other.
|
Each router running CDP exchanges information about any protocol entries it knows with its neighbors.
|
You can display the results of this CDP information exchange on a console directly connected to a router configured to run CDP on its interfaces.
|
A router caches any information it receives from its CDP neighbors.
|
If a subsequent CDP frame indicates that any of the information about a neighbor has changed, the router discards the older information in favor of the newer.
@@
You use the show CDP Interface command to display

• the interface status
|
• the encapsulation used by 
  CDP for its advertisement and 
  discovery frame transmissions
|
The timers for the frequency between CDP updates and the holdtime for older CDP entries are set by default at 60 seconds and 180 seconds respectively.
|
If the router receives a more recent update, or if the holdtime value expires, the router must discard that CDP entry.
@@
You can display the results of CDP information exchange between neighboring routers.
|
You use the Show CDP Entry command to display a single cached CDP entry.
|
The output from this command includes all layer 3 addresses present in the neighboring router.

You can see the IP, Apple Talk, and CLNS network addresses of the targeted CDP neighbor with a single command.
|
You use the Show CDP Neighbors command to display the CDP updates received on the local router.
|
For each port the display shows

• the neighbor router's ID
|
• the local port type and 
  number
|
• a decremental holdtime value 
  (in seconds)
|
You can also see the neighbor router's

• device capability code
|
• hardware platform
|
• remote port type and 
  number
|
You can display information combined from the Show CDP Entry and Show CDP Neighbors commands by using the Show CDP Neighbor Detail command.
|
You can see device information for each of the router's CDP neighbors, in this case Dublin and London.
@@
You can use the TCP/IP remote login utility, Telnet, to initiate console sessions with remote routers.
|
So you can log in to other Cisco routers without being physically attached to them.
|
To access a remote router you use the Telnet command along with the IP address of one of the target router's interfaces.
|
In the example shown here, a connection is established to one of the Dublin router's serial ports.
|
If the target router's host name is available on the source router or if it can be reached from a DNS server to which the source router has access, then you can use the host name with the Telnet command.
|
A router's configuration or a Domain Name Service (DNS) server maps IP addresses to more meaningful router host names.

For example, the IP address 172.16.67.2 corresponds to the host name Dublin on the router.
|
Here a connection is established with the Dublin router.
|
In fact, given access to a DNS server or the router configuration, you can establish a Telnet connection with a remote router using just the host name.
|
In the example shown here, you enter £RDublin£r to access that router.
@@
Once you have established a Telnet session with another router, you can enter the escape sequence £UCtrl+Shift+6+X£u to get back to the command prompt of the source router without ending the Telnet session.
|
And you can initiate another session from the router, this time to the London router.
|
You can display details of the currently open Telnet sessions from your router using the Show Sessions command.
|
You can see that each session has an associated connection number.
|
You resume the session by pressing £UReturn£u.
|
And by entering the appropriate session number you can resume that Telnet connection.
|
In the example shown here, you enter £R1£r to resume the connection to the Dublin router.
|
From the local router prompt you can end (or disconnect) a Telnet session using the disconnect command.
|
In this example, you disconnect the second session to the London router.
|
You can also end a Telnet session by entering £Rquit£r or £Rexit£r at the remote target router's prompt.
|
In the example shown here, you end the session with the Dublin router and return to the SanFran router.
|
Entering £Rexit£r logs you out of the remote router whereas the escape sequence (£UCtrl+Shift+6+X£u) moves you back to your own router without ending any sessions.
@@
It is a good idea to perform basic testing of internetwork connectivity following the layers of the OSI model.
|
So you begin testing by focusing on upper-layer applications.
|
You can use Telnet to determine if a remote router can be accessed.
|
If you can remotely access another router using Telnet, then you know that one TCP/IP application can reach that router.
|
A successful Telnet connection indicates that the upper-layer application, and the services provided by the lower layers function properly.
|
You may find that you can Telnet to one router, but not to another.
|
In this case it is likely that the Telnet failure is caused by specific addressing, naming, or access permission problems.
|
These problems can exist on the local router or on the router that failed as a Telnet target.
@@
The Ping utility provides a simple mechanism to determine whether packets are reaching a particular destination.
|
When you use the Ping command your router sends a special datagram to the destination host.
|
It then waits for a reply datagram from that host.
|
The results of this echo protocol can help evaluate the path-to-host reliability, delays over the path, and whether the host can be reached or is functioning.
|
In the example shown here, the Ping target responded successfully to all five datagrams sent.
|
The exclamation marks (!) indicate each successful echo.
|
Here, the router timed out waiting for a datagram echo from the Ping target.
|
The periods (.) indicate that the requests have timed out.
|
The Ping User Exec command can be used to diagnose basic network connectivity on AppleTalk, CLNS, IP, Novell IPX, Apollo, VINES, DECnet, or XNS networks.
@@
You can use the Trace command to discover the routes that packets take when traveling to their destinations.
|
The Trace command takes advantage of the error messages generated by routers when a datagram exceeds its time-to-live (TTL) value.
|
The Trace command starts by sending probe datagrams with a TTL value of 1.
|
The low TTL value causes the router to discard the probe datagram and send back an error message.
|
Several probes are sent at each TTL level and the round-trip time for each is displayed.
|
The next basic test focuses on the network layer.
|
You use the Show IP route command to determine whether a routing table entry exists for the target network.
|
In the example shown here, the network (a subnet) 172.16.129.0 is present, but the network 172.16.192.0 is not available.
@@
The next step is to examine the data-link and physical layers.
|
You use the Show Interface command to display the line and data link protocol status.
|
The line status is triggered by a carrier detect signal.
|
This refers to the physical layer.
|
The line protocol is triggered by keepalive frames, which refer to the data-link layer.
|
If the line and line protocol are up then the link is operational.
|
If the line is up, but the line protocol is down, there is a connection or clocking problem.
|
If the line is down and the line protocol is down, then there is an interface problem.
|
If the line is displayed as being administratively down and the line protocol is down, then that interface is disabled.
|
The Show Interface command lets you see real-time statistics related to an interface that can help indicate the source of a problem.
|
For example, an increasing number of input errors may indicate faulty equipment or a noisy line.
@@
You can use Debug commands to see what protocol messages are being sent and received by a router.
|
The Debug Privileged Exec commands can provide a wealth of information about the traffic being seen (or not seen) on an interface.
|
You can examine error messages generated by nodes on the network, protocol-specific diagnostic packets, and other useful troubleshooting data.
|
You should be aware that the Debug commands often generate data that is of little use for a specific problem.
|
Also, the high overhead of debug commands can disrupt router operation.
|
So you should use Debug commands only when you have narrowed your problems to a likely subset of causes, not to monitor normal network operation.
|
By default, the router sends output from system error messages and the Debug commands to the console terminal.
|
But messages can also be redirected to a UNIX host or to an internal buffer.
@@
Now you'll use the Telnet utility to access remote routers.
|
If your router does not have access to a DNS server or does not contain a particular host's name in its configuration, you have to us the full IP address with the Telnet command.
|
You enter £UCtrl+Shift+6+X£u to return to your router without ending the session with Sydney.
|
You can access the London router by simply entering £RLondon£r, since name translation is available from a DNS server.
|
You can return to your router by entering £UCtrl+Shift+6+X£u.
|
You can display information about your router's current Telnet sessions by entering £Rshow sessions£r.
|
Here there are sessions open with Sydney and London.
|
You can resume the last-initiated session by pressing £UReturn£u.
|
And you can use the escape sequence £UCtrl+Shift+6+X£u to return to your router.
|
You can resume the first initiated Telnet session (with Sydney) by entering £R1£r.
|
Back at your router prompt you can end the session with the London router by entering £Rdisconnect 2£r.
|
Say now that you resume the session with the Sydney router by entering £R1£r.
|
You can end the session with the Sydney router by entering £Rexit£r or £Rquit£r while at the Sydney router.
@@
