![]() ![]() |
|
|
![]() |
![]() |
![]() ![]() |
![]() |
![]() |
||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
![]() ![]() |
![]() |
![]() ![]() |
||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
|
![]() |
|||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||
![]() |
Close Window | ![]() |
|
![]() |
![]() |
![]() |
|
![]() |
![]() |
![]() |
![]() |
All contents copyright © 2003 Cisco Systems, Inc. All rights reserved. |
![]() ![]() |
Overview |
|
![]() ![]() |
4.1 |
![]() |
Discovering and Connecting to Neighbors | |
4.1.1 |
![]() |
Introduction to CDP |
Cisco Discovery Protocol (CDP) is a Layer 2
protocol that connects lower physical media and upper network layer
protocols, as shown in Figure
![]() CDP Version 2 (CDPv2) is the most recent release of the protocol. Cisco IOS (Release 12.0(3)T or later) supports CDPv2. CDP Version 1 (CDPv1) is enabled by default with Cisco IOS (Release 10.3 to 12.0(3)T). When a Cisco device boots up, CDP starts up automatically and allows the device to detect neighboring devices that are also running CDP. It runs over the data link layer and allows two systems to learn about each other, even if they are using different network layer protocols. Each device configured for CDP sends periodic messages, known as advertisements, to multiple routers. Each device advertises at least one address at which it can receive Simple Network Management Protocol (SNMP) messages. The advertisements also contain “time-to-live” or holdtime information, indicating the length of time that receiving devices should hold CDP information before discarding it. Additionally, each device listens to periodic CDP messages sent by others in order to learn about neighboring devices.
|
![]() ![]() |
4.1 |
![]() |
Discovering and Connecting to Neighbors | |
4.1.2 |
![]() |
Information obtained with CDP |
The primary use of CDP is to discover all
Cisco devices that are directly connected to a local device. Use the
show cdp neighbors
command to display CDP updates on the local device.
Figure
The administrator uses the show cdp neighbors command to display information about the networks directly connected to the router. CDP provides information about each CDP neighbor device by transmitting type length values (TLVs), which are blocks of information embedded in CDP advertisements. Device TLVs displayed by the show cdp neighbors command include the following:
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 device.
|
![]() ![]() |
4.1 |
![]() |
Discovering and Connecting to Neighbors | |
4.1.3 |
![]() |
Implementation, monitoring, and maintenance of CDP |
The following commands are used to
implement, monitor, and maintain CDP information:
![]()
The cdp run command is used to enable CDP globally on the router. By default, CDP is globally enabled. The cdp enable command is used to enable CDP on a particular interface. On Cisco IOS Release 10.3 or higher, CDP is enabled by default on all supported interfaces to send and receive CDP information. CDP could be enabled on each of the devices interfaces by using the cdp enable command.
|
![]() ![]() |
4.1 |
![]() |
Discovering and Connecting to Neighbors | |
4.1.4 |
![]() |
Creating a network map of the environment |
CDP was designed and implemented as a
simple, low-overhead protocol. Though a CDP frame can be small, it can
retrieve a great deal of useful information about connected neighboring
Cisco devices.
This information can be used to create a network map of the connected devices. Devices connected to neighboring devices can be discovered by using Telnet to connect to the neighbors, and using the show cdp neighbors command to discover what devices are connected to those neighbors.
|
![]() ![]() |
4.1 |
![]() |
Discovering and Connecting to Neighbors | |
4.1.5 |
![]() |
Disabling CDP |
To disable CDP at the global level, use the
no CDP run
command in global configuration mode.
![]() On Cisco IOS Release 10.3 or higher, CDP is enabled by default on all supported interfaces to send and receive CDP information. However, on some interfaces, such as asynchronous interfaces, CDP is disabled by default. If CDP is disabled use the CDP enable command in interface configuration mode. To disable CDP on a specific interface after it has been enabled, use the no CDP enable command in interface configuration mode.
|
![]() ![]() |
4.1 |
![]() |
Discovering and Connecting to Neighbors | |
4.1.6 |
![]() |
Troubleshooting CDP |
The following commands can be used to show
the version, update information, tables, and traffic:
![]()
|
![]() ![]() |
4.2 |
![]() |
Getting Information about Remote Devices | |
4.2.1 |
![]() |
Telnet |
Telnet is a virtual terminal protocol that
is part of the TCP/IP protocol suite. It allows connections to be made to
remote hosts. Telnet provides a network terminal or remote login capability.
Telnet is an IOS EXEC command used to verify the application layer software
between source and destination. This is the most complete test mechanism
available.
Telnet functions at the application layer of
the OSI model.
A router can have multiple simultaneous incoming Telnet sessions. The range zero through four is used to specify five VTY or Telnet lines. These five incoming Telnet sessions could take place at one time. It should be noted that verifying application layer connectivity is a byproduct of Telnet. The main use of Telnet is remote connection to network devices. Telnet is a simple and universal application program.
|
![]() ![]() |
4.2 |
![]() |
Getting Information about Remote Devices | |
4.2.2 |
![]() |
Establishing and verifying a Telnet connection |
The Telnet IOS EXEC command allows a user to
Telnet from one Cisco device to another. With Cisco's implementation of
TCP/IP, it is not necessary to enter the command
connect
or telnet
to establish a Telnet connection. The hostname or the IP address of the
remote router may be entered. To end a Telnet session, use the EXEC commands
exit
or logout.
![]() To initiate a Telnet session any of the following alternatives can be used:
A hostname table or access to DNS for Telnet must be present for a name to work. Otherwise, the IP address of the remote router must be entered. Telnet can be used to perform a test to
determine whether or not a remote router can be accessed. As shown in Figure
If remote access can be obtained through another router, then at least one TCP/IP application can reach the remote router. A successful Telnet connection indicates that the upper-layer application functions properly. If Telnet to one router can occur, but failure to another router occurs, it is likely that specific addressing, naming, or access permission problems caused the Telnet failure. It is possible that the problem exists on this router or on the router that failed as a Telnet target. In this case, the next step is to try ping, which is covered later in this lesson. Ping allows testing of end-to-end connections at the network layer. Once the Telnet is completed, log off the host. The Telnet connection will terminate after ten minutes of inactivity by default or when the exit command at the EXEC prompt is entered.
|
![]() ![]() |
4.2 |
![]() |
Getting Information about Remote Devices | |
4.2.3 |
![]() |
Disconnecting and suspending Telnet sessions |
One important feature of the Telnet command
is the suspend feature. However, one potential problem exists when a Telnet
session is suspended and the Enter key is pressed. Cisco IOS software
resumes the connection to the most recently suspended Telnet connection. The
Enter key is used frequently. With a suspended Telnet session, it is
possible to reconnect to another router. This is dangerous when changes are
made to the configuration or using EXEC commands. Always pay particular
attention to what router is being used when utilizing the suspended Telnet
feature. A session is suspended for a limited time, to resume a Telnet session that has been suspended, just press Enter. The command show sessions will show what Telnet sessions are taking place. The procedure for disconnecting a Telnet session is as follows:
The procedure for suspending a Telnet session is as follows:
|
![]() ![]() |
4.2 |
![]() |
Getting Information about Remote Devices | |
4.2.4 |
![]() |
Advanced Telnet operation |
There may be several concurrent Telnet
sessions open. A user may switch back and forth between these sessions. The
number of open sessions that are allowed at one time is defined by the
session limit
command. To switch between sessions by
escaping one session and resuming a previously opened session, use the
commands shown in Figure
A new connection can be made while at the EXEC prompt. The 2500 series routers are limited to five sessions. Multiple Telnet sessions can be used and
suspended by using the Ctrl-Shift-6, then x sequence. The
session can be resumed by using the Enter key. If the Enter key is used, the
Cisco IOS Software resumes the connection to the most recently suspended
Telnet connection. If the resume
command is used it requires a connection ID. The connection ID is shown by
using the show sessions
command.
|
![]() ![]() |
4.2 |
![]() |
Getting Information about Remote Devices | |
4.2.5 |
![]() |
Alternative connectivity tests |
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. This is a basic testing mechanism. This operation
can be performed at either the user or privileged EXEC modes.
The ping target 172.16.1.5 in Figure
The traceroute command is the ideal tool for finding where data is being sent in a network. The traceroute command is similar to the ping command, except that instead of testing end-to-end connectivity, traceroute tests each step along the way. This operation can be performed at either the user or privileged EXEC levels. In this example, the path from York to Rome
is being traced. Along the way the path must go through London and Paris. If
one of these routers is unreachable, three asterisks (*) will be returned
instead of the name of the router. The
traceroute
command will continue attempting to reach the next step until the
Ctrl-Shift-6 escape sequence is used.
A basic verification 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. This command will be discussed in more detail in a later module of this course. The procedure to use the ping command is as follows:
The procedure to use the traceroute command is as follows:
|
![]() ![]() |
4.2 |
![]() |
Getting Information about Remote Devices | |
4.2.6 |
![]() |
Troubleshooting IP addressing issues |
Addressing problems are the most common
problems that occur on IP networks. The following three commands are used to
perform address-related troubleshooting:
|
![]() ![]() |
Summary |
An understanding of the following key points
should have been achieved:
|