Cisco Systems


 


 

Modules:  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |  9  |  10  |  11  |  CS  |  All  |
Module 4: Learning about Other Devices
Module Overview  
4.1 Discovering and Connecting to Neighbors
 
4.1.1 Introduction to CDP
4.1.2 Information obtained with CDP
4.1.3 Implementation, monitoring, and maintenance of CDP
4.1.4 Creating a network map of the environment
4.1.5 Disabling CDP
4.1.6 Troubleshooting CDP
 
4.2 Getting Information about Remote Devices
 
4.2.1 Telnet
4.2.2 Establishing and verifying a Telnet connection
4.2.3 Disconnecting and suspending Telnet sessions
4.2.4 Advanced Telnet operation
4.2.5 Alternative connectivity tests
4.2.6 Troubleshooting IP addressing issues
 
Module Summary  
Module Quiz

 

 
Close Window
All contents copyright © 2003 Cisco Systems, Inc. All rights reserved.

 

Overview
 
Sometimes network administrators are faced with situations where network documentation is incomplete or inaccurate. Cisco Discovery Protocol (CDP) can be a useful tool in these situations because it can help to build a basic picture of the network. CDP is a media and protocol independent, Cisco proprietary protocol used for neighbor discovery. CDP will only show information about directly connected neighbors but it is nevertheless a powerful tool.

In many cases after a router is initially configured it is difficult or inconvenient for a network administrator to connect directly to the router for configuration changes or other activities. Telnet is a TCP/IP-based application that allows remote connection to the router command-line interface (CLI) for configuration, monitoring, and troubleshooting purposes. It is an essential tool for the network professional.

Students completing this module should be able to:

  • Enable and disable CDP
  • Use the show cdp neighbors command
  • Determine which neighboring devices are connected to which local interfaces
  • Gather network address information about neighboring devices using CDP
  • Establish a Telnet connection
  • Verify a Telnet connection
  • Disconnect from a Telnet session
  • Suspend a Telnet session
  • Perform alternative connectivity tests
  • Troubleshoot remote terminal connections

    

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 is used to obtain information about neighboring devices, such as the types of devices connected, the router interfaces they are connected to, the interfaces used to make the connections, and the model numbers of the devices. CDP is media and protocol independent, and runs on all Cisco equipment over the Subnetwork Access Protocol (SNAP).

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.

  Web Links

Tech Notes

http://www.cisco.com/en/US/ tech/tk389/tk214/ tech_tech_notes_list.html

                     

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 displays an example of how CDP delivers its collection of information to a network administrator. Each router that is running CDP exchanges protocol information with its neighbors. The network administrator can display the results of this CDP information exchange on a console that is connected to a local router.

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:

  • Device ID
  • Local Interface
  • Holdtime
  • Capability
  • Platform
  • Port ID
  • VTP Management Domain Name (CDPv2 only)
  • Native VLAN (CDPv2 only)
  • Full/Half-Duplex (CDPv2 only)

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.

  Web Links

CDP Commands

http://www.cisco.com/en/US/ products/sw/ iosswrel/ps1831/ products_command_ reference_ chapter09186a00800d983f.html

                     

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:
  • cdp run
  • cdp enable
  • clear cdp counters
  • show cdp
  • show cdp entry {*|device-name[*][protocol | version]}
  • show cdp interface [type number]
  • show cdp neighbors [type number] [detail]

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.

  Lab Activity

e-Lab Activity: Implementation, Monitoring, and Maintenance of CDP

In this lab, the students will learn some commands associated with the Cisco Discovery Protocol (CDP) and learn to view some CDP information.

 

   

  Web Links

CDP Commands

http://www.cisco.com/en/US/ products/sw/ iosswrel/ps1831/ products_command_ reference_ chapter09186a00800d983f.html

                     

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.

  Lab Activity

Lab Exercise: Creating a Network Map using CDP

In this lab, the students will use CDP commands to get information about neighboring network devices.

 

   

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. If CDP is disabled globally, individual interfaces cannot be enabled for CDP.

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.

  Web Links

CDP Commands

http://www.cisco.com/en/US/products/sw/ iosswrel/ps1831/products_command_reference_ chapter09186a00800d983f.html#xtocid2

                     

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:
  • clear cdp table
  • clear cdp counters
  • show cdp traffic
  • show debugging
  • debug cdp adjacency
  • debug cdp events
  • debug cdp ip
  • debug cdp packets
  • cdp timer
  • cdp holdtime
  • show cdp
  Lab Activity

Lab Exercise: Using CDP Commands

In this lab, the students will use CDP commands to obtain information about neighboring networks and devices.

   

  Lab Activity

e-Lab Activity: Address Resolution Protocol

In this lab, the students will use the show ARP command, which is another means of learning about neighboring devices.

 

   

  Lab Activity

e-Lab Activity: CDP Neighbors

In this lab, the students will use Cisco Discovery Protocol (CDP) commands.

 

   

  Web Links

Configuring Cisco Discovery Protocol (CDP)

http://www.cisco.com/en/US/products/sw/ iosswrel/ps1831/products_configuration_guide_ chapter09186a00800ca66d.html#xtocid7

                     

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. Telnet depends on TCP to guarantee the correct and orderly delivery of data between the client and server.

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:

Denver>connect paris
Denver>paris
Denver>131.108.100.152
Denver>telnet paris

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 Telnet is used successfully to connect the York router to the Paris router, then a basic test of the network connection is successful. This operation can be performed at either the user or privileged EXEC levels.

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.

  Lab Activity

Lab Exercise: Establishing and Verifying a Telnet Connection

In this lab, the students will establish a Telnet connection to a remote router and verify that the application layer between source and destination is working properly.

 

  Web Links

A Telnet Tutorial

http://oregonstate.edu/aw/ tutorials/telnet/

   

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:

  • Enter the command disconnect
  • Follow the command with the name or IP address of the router. Example:

    Denver>disconnect paris

The procedure for suspending a Telnet session is as follows:

  • Press Ctrl-Shift-6, then x
  • Enter the name of the router or IP address
  Lab Activity

Lab Exercise: Suspending and Disconnecting Telnet Sessions

In this lab, the students will establish a Telnet session with a remote router and then suspend and re-establish a telnet session.

  

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.

  Lab Activity

Lab Exercise: Advanced Telnet Operations

This lab is to use the telnet command to remotely access other routers.

 

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 responded successfully to all five datagrams sent. The exclamation points (!) indicate each successful echo. If one or more periods (.) are received instead of exclamations on the display, the application on the router timed out waiting for a given packet echo from the ping target. The ping user EXEC command can be used to diagnose basic network connectivity. The command ping uses ICMP (Internet Control Message Protocol).

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:

  • ping IP address or name of destination
  • press the Enter key

The procedure to use the traceroute command is as follows:

  • traceroute IP address or name of destination
  • press the Enter key
  Lab Activity

Lab Exercise: Connectivity Tests – Ping

In this lab, the students will use the ping command to send ICMP datagrams to a target host.

 

   

  Lab Activity

Lab Exercise: Connectivity Tests – Traceroute

In this lab, the student will use the traceroute command to determine the path from a source to a destination.

 

   

  Lab Activity

e-Lab Activity: Alternate Connectivity Tests – Ping

In this lab, the students will use the ping command to send ICMP datagrams to a target host and using the information retrieved, accomplish the tasks.

 

   

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:
  • ping uses the ICMP protocol to verify the hardware connection and the IP address of the network layer. This is a basic testing mechanism.
  • telnet verifies the application layer software between source and destination. This is the most complete test mechanism available.
  • traceroute allows the location of failures in the path from the source to the destination. Trace uses Time to Live values to generate messages from each router along the path. 
  Lab Activity

Lab Exercise: Troubleshooting IP Address Issues

In this lab, the students will configure two routers and two workstations in a small WAN.

   

Summary
  An understanding of the following key points should have been achieved:
  • Enabling and disabling CDP
  • Using the show cdp neighbors command
  • Determining which neighboring devices are connected to which local interfaces
  • Gathering network address information about neighboring devices using CDP
  • Establishing a Telnet connection
  • Verifying a Telnet connection
  • Disconnecting from a Telnet session
  • Suspending a Telnet session
  • Performing alternative connectivity tests
  • Troubleshooting remote terminal connections