4.3

Router's Network Neighbors

 

4.3.1

Gaining access to other routers by using Cisco Discovery Protocol (CDP)

Cisco Discovery Protocol (CDP) provides a single proprietary command that enables network administrators to access a summary of what the configurations look like on other directly-connected routers. CDP runs over a data link layer that connects lower physical media and upper network layer protocols, as shown in the Figure. Because it operates at this level, CDP devices that support different network layer protocols can learn about each other. (Remember that a data link address is the same as a MAC address.)

When a Cisco device that is running Cisco IOS (Release 10.3 or later) boots up, CDP starts up automatically, which then allows the device to detect neighboring Cisco devices that are also running CDP. Such devices extend beyond those using TCP/IP, and include directly-connected Cisco devices, regardless of which Layer 3 and 4 protocol suite they run.

 

4.3

Router's Network Neighbors

 

4.3.2

Showing CDP neighbor entries

The primary use of CDP is to discover platforms and protocols on your neighboring devices. Use the show cdp neighbors command to display the CDP updates on the local router.

The Figure displays an example of how CDP delivers its collection of information to a network administrator. Each router that is running CDP exchanges information regarding any protocol entries with its neighbors. The administrator can display the results of this CDP information exchange on a console that is connected to a router configured to run CDP on its interfaces.

The network administrator uses a show command to display information about the networks directly connected to the router. CDP provides information about each CDP neighbor device. Values include the following:

  • device identifiers -- e.g. the router's configured host name and domain name (if any)
  • address list -- at least one address for SNMP, up to one address for each supported protocol
  • port identifier -- e.g. Ethernet 0, Ethernet 1, and Serial 0
  • capabilities list -- e.g. if the device acts as a source route bridge as well as a router
  • version -- information such as that provided by the local command show version
  • platform -- the device's hardware platform, e.g. Cisco 7000

Notice that the lowest router in the figure is not directly connected to the administrator's console router. To obtain CDP information about this device, the administrator would need to Telnet to a router that is directly connected to this target.

 

 

4.3

Router's Network Neighbors

 

4.3.3

A CDP configuration example

CDP begins automatically upon a device's system startup. The CDP function normally starts by default when a Cisco product boots up with Cisco IOS Release 10.3 or later.

Only directly connected neighbors exchange CDP frames. 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 and replaces it with the new information.

Use the command show cdp interface, as shown in Figure , to display the values of the CDP timers, the interface status, and the encapsulation used by CDP for its advertisement and discovery frame transmission. Default values for timers set the frequency for CDP updates and for aging CDP entries. These timers are set automatically at 60 seconds and 180 seconds, respectively. If the device receives a more recent update, or if this hold-time value expires, the device must discard the CDP entry.

 

4.3

Router's Network Neighbors

 

4.3.4

Showing CDP entries for a device and CDP neighbors

CDP was designed and implemented as a very simple, low-overhead protocol. A CDP frame can be small yet retrieve a lot of useful information about neighboring routers. You use the command show cdp entry {device name} to display a single cached CDP entry. Notice that the output from this command includes all the Layer 3 addresses present in the neighbor router, Router B. An administrator can view the IP addresses of the targeted CDP neighbor (Router B) with the single command entry on Router A. The hold-time value indicates the amount of elapsed time since the CDP frame arrived with this information. The command includes abbreviated version information about Router B.

You use the command show cdp neighbors, as shown in Figure , to display the CDP updates received on the local router. Notice that for each local port, the display shows the following:

  • neighbor device ID
  • local port type and number
  • decremental hold-time value, in seconds
  • neighbor device capability code
  • neighbor hardware platform
  • neighbor remote port type and number

To display this information as well as information like that from show cdp entry, you use the optional show cdp neighbors detail.

 

 

4.3

Router's Network Neighbors

 

4.3.5

Lab: CDP Neighbors

Lab Activity

 

In this lab, you will use the show cdp command. Cisco Discovery Protocol (CDP) discovers and shows information about directly connected Cisco devices (routers and switches). CDP is a Cisco proprietary protocol that runs at the data link layer (layer 2) of the OSI model. This allows devices that may be running different network layer 3 protocols such as IP or IPX to learn about each other. CDP begins automatically upon a device's system startup, however if you are using Cisco IOS Release 10.3 or newer version of IOS you must enable it on each of the device's interfaces by using the cdp enable command. Using the command show cdp interface you will gather information CDP uses for its advertisement and discovery frame transmission. Use show cdp neighbors and show cdp neighbors detail to display the CDP updates received on the local router.

 

 

4.4

Basic Networking Testing

 

4.4.1

Testing process that uses the OSI model

The most common problems that occur on IP networks result from errors in the addressing scheme. It is important to test your address configuration before continuing with further configuration steps. Basic testing of a network should proceed in sequence from one OSI reference model layer to the next. Each test presented in this section focuses on network operations at a specific layer of the OSI model. As shown in the Figure, telnet, ping, trace, show ip route, show interfaces and debug are commands that allow you to test your network.

 

4.4

Basic Networking Testing

 

4.4.2

Testing the application layer by using telnet

Another way to learn about a remote router is to connect to it. Telnet, a virtual terminal protocol that is part of the TCP/IP protocol suite, allows connections to be made to hosts. You can set a connection between a router and a connected device. Telnet allows you to verify the application-layer software between source and destination stations. This is the most complete test mechanism available. A router can have up to five simultaneous incoming Telnet sessions.

Let's begin testing by initially focusing on upper-layer applications. As shown in Figure , the telnet command provides a virtual terminal so administrators can use Telnet operations to connect with other routers running TCP/IP.

With Cisco's implementation of TCP/IP, you do not need to enter the command connect or telnet to establish a Telnet connection. If you prefer, you can just enter the learned host name. To end a Telnet session, use the EXEC commands exit or logout.

The following list shows alternative commands for the operations listed in the figure:

  • Initiate a session from Denver:
    Denver> connect paris
    Denver> paris
    Denver> 131.108.100.152
  • Resume a session (enter session number or name):
    Denver>1
    Paris>
  • End a session:
    Paris> exit

As you have already learned, the Telnet application provides a virtual terminal so that you can connect to other hosts that are running TCP/IP. You can use Telnet to perform a test to determine whether or not you can access a remote router. As is shown in Figure , if you can successfully use Telnet to connect the York router to the Paris router, then you have performed a basic test of the network connection.

If you can remotely access another router through Telnet, then you know that at least one TCP/IP application can reach the remote router. A successful Telnet connection indicates that the upper-layer application (and the services of lower layers, as well) function properly.

If we can Telnet to one router but not to another router, it is likely that the Telnet failure is caused by specific addressing, naming, or access permission problems. These problems can exist on your router or on the router that failed as a Telnet target. The next step is to try ping, which is covered in this section. This command lets you test end-to-end at the network layer.

Lab Activity

 

In this lab, you will work with the telnet (remote terminal) utility to access routers remotely. You will telnet from your "local" router into another "remote" router in order to simulate being at the console on the remote router.

 

4.4

Basic Networking Testing

 

4.4.3

Testing the network layer using the ping command

As an aid to diagnosing basic network connectivity, many network protocols support an echo protocol. Echo protocols are used to test whether protocol packets are being routed. The ping command sends a packet to the destination host and then waits for a reply packet from that host. Results from 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 Figure, the ping target 172.16.1.5 responded successfully to all five datagrams sent. The exclamation points (!) indicate each successful echo. If you receive one or more periods (.) instead of exclamations on your display, the application on your router timed out waiting for a given packet echo from the ping target. You can use the ping user EXEC command to diagnose basic network connectivity. The ping uses the ICMP (Internet Control Message Protocol).

Lab Activity

 

In this lab you will use ICMP or Internet Control Message Protocol. ICMP will give you the ability to diagnose basic network connectivity. Using ping xxx.xxx.xxx.xxx will send an ICMP packet to the specified host and then wait for a reply packet from that host. You can ping the host name of a router but you must have a static host lookup table in the router or DNS server for name resolution to IP addresses.

 

 

4.4

Basic Networking Testing

4.4.4

Testing the network layer with the trace command

The trace command is the ideal tool for finding where data is being sent in your network. The trace command is similar to the ping command, except that instead of testing end-to-end connectivity, trace tests each step along the way. This operation can be performed at either the user or privileged EXEC levels.

The trace command takes advantage of the error messages generated by routers when a packet exceeds its Time To Live (TTL) value. The trace command sends several packets and displays the round-trip time for each. The benefit of the trace command is that it tells which router in the path was the last one to be reached. This is called fault isolation.

In this example, we are tracing the path from York to Rome. Along the way the path must go through London and Paris. If one of these routers had been unreachable, you would have seen three asterisks (*) instead of the name of the router. The trace command would continue attempting to reach the next step until you escaped using the Ctrl-Shift-6 escape sequence.

Lab Activity

 

In this lab you will use the IOS traceroute command. The traceroute command uses ICMP packets and the error message generated by routers when the packet exceeds its Time To Live (TTL).

 

 

4.4

Basic Networking Testing

 

4.4.5

Testing network layer with the show ip route command

The router offers some powerful tools at this point in the search. You can actually look at the routing table - the directions that the router uses to determine how it will direct traffic across the network.

The next basic test also focuses on the network layer. Use the show ip route command to determine whether a routing table entry exists for the target network. The highlight in the graphic shows that Rome (131.108.33.0) is reachable by Paris (131.108.16.2) via the Enternet1 interface.

 

4.4

Basic Networking Testing

 

4.4.6

Using the show interfaces serial command to test the physical and data link layers

As shown in Figure , the interface has two pieces, physical (hardware) and logical (software):

  • The hardware -- such as cables, connectors, and interfaces -- must make the actual connection between the devices.
  • The software is the messages -- such as keepalive messages, control information, and user information -- that are passed between adjacent devices. This information is data being passed between two connected router interfaces.

When you test the physical and data link, you ask these questions:

  • Is there a Carrier Detect signal?
  • Is the physical link between devices good?
  • Are the keepalive messages being received?
  • Can data packets be sent across the physical link?

One of the most important elements of the show interfaces serial command output is display of the line and data link protocol status. Figure indicates the key summary line to check the status meanings.

The line status in this example is triggered by a Carrier Detect signal, and refers to the physical layer status. However, the line protocol, triggered by keepalive frames, refers to the data link framing.

 

 

4.4

Basic Networking Testing

 

4.4.7

The show interfaces and clear counters commands

The router tracks statistics that provide information about the interface. You use the show interfaces command to display the statistics as shown in the figure. The statistics reflect router operation since the last time the counters were cleared, as shown in the top highlighted line in the graphic. This graphic shows that it was two weeks and four days earlier. The bottom set of highlights shows the critical counters. Use the clear counters command to reset the counters to 0. By starting from 0, you get a better picture of the current status of the network.

Lab Activity

 

In this lab you will use show interface and clear counters. The router keeps very detailed statistics about data traffic it has sent and received on its interfaces. This is very important in troubleshooting a network problem. The clear counters command resets the counters that are displayed when you issue the show interface command. By clearing the counters you get a clearer picture of the current status of the network.

 

4.4

Basic Networking Testing

 

4.4.8

Checking real-time traffic with debug

The router includes hardware and software to aid it in tracking down problems, on it, or on other hosts in the network. The debug privileged EXEC command starts the console display of the network events specified in the command parameter. Use the terminal monitor command to forward debug output to your Telnet session terminal.

In this example, data link broadcasts received by the router are displayed. Use the undebug all command (or no debug all) to turn debugging off when you no longer need it. Debugging is really intended for solving problems.

CAUTION:

Be very careful with this tool on a live network. Substantial debugging on a busy network will slow down the network significantly. Do not leave debugging turned on; use it to diagnose a problem, and then turn it off.)

By default, the router sends system error messages and output from the debug EXEC command to the console terminal. Messages can be redirected to a UNIX host or to an internal buffer. The terminal monitor command gives you the capability to redirect these messages to a terminal.

 

4.5

Challenge Lab

 

4.5.1

Troubleshooting tools challenge

Lab Activity

 

As you know, having the topology of a network is extremely useful. It allows a network administrator to know exactly what equipment he or she has in what area (for bandwidth needs), how many devices are on the network and the physical layout of the network. In this lab you will need to figure out what a topology looks like based on the information you can gather while navigating through the network using IOS commands.

Through the use of show commands, you should be able to see which interfaces are up (using show interface ), what devices the router is connected to (using show CDP neighbors) and how the user can get there (using show protocols ). With the information received from the show commands, you should be able to remotely access the neighboring routers (using telnet ) and through the use of troubleshooting commands (such as ping and trace ) you should be able to see which devices are connected. Your final goal is to construct a logical topology drawing of the network by making use of all the above commands without referring to any diagrams ahead of time.

 

 

Summary

In this chapter, you learned that:

  • The router is made up of configurable components and has modes for examining, maintaining, and changing the components.
  • show commands are used for examination.
  • You use CDP to show entries about neighbors.
  • You can gain access to other routers by using Telnet.
  • You should test network connectivity layer by layer.
  • Testing commands include telnet, ping, trace, and debug.

 

1