1 / 54

Routers and Routing Basics CCNA 2

Routers and Routing Basics CCNA 2 . Chapter 4. 1. Learning About Other Devices. Discovering Neighbors Using CDP CDP Protocol Operations Information Learned by CDP Configuring and Verifying CDP Operations Creating a Network Map Using CDP Information

gali
Download Presentation

Routers and Routing Basics CCNA 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Routers and Routing Basics CCNA 2 Chapter 4 1

  2. Learning About Other Devices Discovering Neighbors Using CDP CDP Protocol Operations Information Learned by CDP Configuring and Verifying CDP Operations Creating a Network Map Using CDP Information Additional CDP Verification and Troubleshooting Commands Getting Information and Troubleshooting Devices Verifying Which Networking Layers Are Working Telnet Basics Advanced Telnet Cisco IOS ping and traceroute Commands Summary 2

  3. Neighbor Discovery Tools The chapter focuses on four Cisco IOS tools that help you learn information about other routers and switches • Cisco Discovery Protocol (CDP) allows a user to learn information about neighboring devices • The telnet command allows a user to telnet to another router or switch • The ping and traceroute commands supply more information about other networking devices and help troubleshoot problems in an internetwork 3

  4. Neighbor Discovery Toolson the OSI Model 4

  5. Discovering Neighbors Using CDP Routers, switches, and other Cisco devices can use the Cisco Discovery Protocol (CDP) to dynamically discover information about neighboring devices • CDP is a Cisco-proprietary protocol • CDP discovers information about neighboring devices • CDP defines protocol messages that flow between neighboring devices to discover the information. 5

  6. Internetwork with Three Routers and Two Switches R2 can discover information about R1 and SW2, but not about SW1 or R4 6

  7. Internetwork with Three Routers and Two Switches(Continued) Basic CDP Information on R2 The show cdp neighbors command lists a single line of output per neighboring device with a lot of information. 7

  8. CDP Protocol Operations • A router discovers information using CDP by listening for CDP advertisements sent by neighboring devices. • The advertisements list information about the neighboring device sending the advertisement. • The advertisements include a series of Type Length Value (TLV) data structures - information, such as the hostname, the device model number, or the interface out which the advertisement was sent. 8

  9. CDP Advertisements with TLVs • By default, all the routers and switches would send periodic CDP advertisements, but the figure focuses just on the CDP advertisements sent by R1 and SW2. • CDP encapsulates its messages inside data-link headers and trailers, without relying on any Layer 3 protocols. 9

  10. CDP Advertisements with TLVs • The data link layer protocol must support the use of a Subnetwork Access Protocol (SNAP) header. • By not using IP or any other Layer 3 protocol, CDP can work ever if IP does not. • SNAP is supported by most data link protocols including Ethernet, HDLC, PPP and Frame Relay) 9

  11. CDP Versions 1 and 2 • The CDP protocol has two versions, depending on the IOS version. • On routers, CDP version 1 has been supported for a long time, beginning with IOS Version 10.3, which came out in the mid-1990s. • CDP version 2 has been supported since the introduction of IOS 12.0T versions, which were released around 2000. • It supports three new TLVs • CDP versions 1 and 2 are backward-compatible. 10

  12. Types of information learned by CDP • Device ID (name of the device) • Local Interface (the local device’s interface or port) • Holdtime (the time before the device will remove this CDP entry unless another CDP message refreshes the information) • Capability (functions supported on the device) 11

  13. Types of information learned by CDP(Continued) • Platform (model series number of the device) • Port ID (interface or port number information) • VTP Management Domain Name (CDP version 2 only) • Native VLAN (CDP version 2 only) • Full/Half Duplex (CDP version 2 only) 12

  14. CDP Timers • The CDP specifications define two important timers: • CDP update interval • CDP holdtime • Devices are required to send advertisements on a regular, periodic time cycle, called the CDP update interval (default 60 sec.) • The CDP holdtime defines how long the information in an advertisement should be considered valid. When a device receives another CDP advertisement, the holdtime timer is refreshed. • When a device fails, the neighbor ceases to receive advertisements, and the holdtime defines how long the information is retained. 13

  15. CDP Update Interval and Holdtime 1. R1 sends the first CDP advertisement, which states a (default) holdtime of 180 seconds. 2. R2 receives the CDP advertisement, believes the information, and sets its holdtime for to 180 seconds. 3. R2 counts down from 180 seconds toward 120 seconds. 4. R1 sends next CDP advertisement 60 seconds after the first one. 5. R2 receives the CDP advertisement and resets its holdtime to 180. 6. The serial link fails. 7. R2’s holdtime eventually counts down to 0 and R2 discards its CDP information about R1. 14

  16. Information Learned by CDP The show cdp Commands That List Information About Neighbors 15

  17. Information Learned by CDP(Continued) The show cdp neighbors detail Command 16

  18. Information Learned by CDP(Continued) The show cdp neighbors detail Command (Continued) 17

  19. Information Learned by CDP(Continued) The show cdp entry Command 18

  20. Configuring and Verifying CDP Operations • By default, Cisco routers and switches have CDP enabled on every interface. • Administrators can disable CDP on a per-interface basis, or they can disable CDP globally (CDP is disabled on all interfaces). • It is useful to know how to verify whether CDP is enabled globally and, if so, on which interfaces it is enabled. 19

  21. Commands Used to Verify CDP Operations 20

  22. How to enable and disable CDP in a Cisco router • To globally enable CDP, use the cdp run global configuration command. • To globally disable CDP, use the no cdp run global configuration command. • To enable CDP on an interface, use the cdp enable interface subcommand. • To disable CDP on an interface, use the no cdp enable interface subcommand 21

  23. Verifying, Disabling, and Enabling CDP • Several show commands on R1 verify that, by default, CDP is enabled globally and on each interface. 2. CDP is then disabled on interface S0/0, which is connected to R2, using the no cdp enable interface subcommand. 22

  24. Verifying, Disabling, and Enabling CDP(Continued) 3. The show cdp interface command shows that CDP is enabled. 4. CDP is disabled globally using the no cdp run global command. 5. The show commands confirm that CDP is disabled globally and that the traffic counters are not displayed. 24

  25. Verifying, Disabling, and Enabling CDP(Continued) 6. CDP is then enabled globally and re-enabled on interface S0/0. 7. The show cdp traffic command shows statistics, but the counters were not reset to 0 when CDP was globally disabled. 8. The clear cdp counters command is used to reset the counters. (See comments on the next slide) 25

  26. Verifying, Disabling, and Enabling CDP(Continued) 9. The show cdp traffic command’s counters now show low numbers, but they show only global counters, not per-interface counters. 10. To verify that CDP messages are being sent and received on each interface, the debug cdp packet command is used. 27

  27. Using CDP to Construct a Network Map 29

  28. Using CDP to Construct a Network Map (Continued) 30

  29. Using CDP to Construct a Network Map (Continued) 31

  30. Using CDP to Construct a Network Map (Continued) 32

  31. Additional CDP Verification and Troubleshooting Commands 33

  32. Getting Information and Troubleshooting Remote Devices Although CDP does provide some convenient and useful information about other devices,the telnet, ping, and traceroute provide vital information about an internetwork: • The telnet command allows the user to connect to other routers and switches and issue commands on the remote devices, learning about the devices’ configuration and current operations. • The ping and traceroute IOS EXEC commands enable an to test Layer 3 by verifying whether IP packets can be delivered in an internetwork, and determine the route used by those packets. 34

  33. OSI Layers Tested by Various IOS Tools Each tool focuses on one layer of the OSI model, while each can be used to prove whether multiple layers are working. • Ping focuses on Layer 3, butreally tests OSI Layers 1 through 3, because although IP and IP routing are Layer 3 functions, IP cannot deliver packets unless Layers 1 & 2 are functional. • Telnet tests all seven layers of the OSI model because it focuses on the application layer, and the application layer cannot work unless the rest of the layers below it are working. • When a router is receiving CDP advertisements on an interface, it indicates that the underlying Layer 1 and Layer 2 functions of that interface are working. 35

  34. OSI Layers Tested by Various IOS Tools (Continued) 36

  35. Telnet Basics Telnet Client/Server Operation 37

  36. Cisco IOS telnet Command • Telnetallows a user to gain access to the CLI of a remote device. • The telnet {hostname | address} command connects a CLI user to the host at the IP address or hostname listed in the command. If a hostname is used, IOS first resolves the name into an IP Address. • The connect {hostname | address} command can be used as an alternative to telnet. Beyond that, just by entering an IP address or hostname on the command line in EXEC mode—without either the telnet or connect command in front of it—IOS assumes that the user wants to telnet to that name or address. • Two alternatives exist for terminating the Telnet connection: exit and logout commands. 38

  37. Telnet from R1 to R2 39

  38. Basic Telnet Troubleshooting Although a Telnet connection to a router or switch can fail for many reasons, three of the reasons are relatively common: • IP routing is not working between the two devices. • Name resolution is not working on the router at which the telnet command is use (this condition occurs only when the telnet command refers to a hostname). • The router being telnetted to (the Telnet server) does not have its vty password configured. 40

  39. Issues with the Default Name Resolution Method If command in EXEC mode is not recognized by IOS as a valid command, IOS assumes you want to telnet to a host of that name. By default, here is what happens when a user simply mistypes a command, something as simple as typing shw interfaces instead of show interfaces: 1. IOS does not recognize the command (in this example, shw). 2. IOS tries to telnet to that name. The first step is to resolve the name (shw) into an IP address. 41

  40. Issues with the Default Name Resolution Method (Continued) 3. IOS broadcasts DNS resolution requests on all interfaces, looking for a DNS server to resolve the name. 4. Assuming no DNS servers hear the request, the user waits 30 to 40 seconds for IOS to finally time out its DNS request, during which time the user cannot enter any other commands! To solve the problem in a lab, just add the no ip domain- lookup global configuration command to the routers’ configurations, and IOS will no longer attempt to broadcast to find a DNS, and the mistyped commands will fail immediately. 42

  41. Suspending and Switching BetweenTelnet Connections Suspending a Telnet connection means that the user does not close or terminate the Telnet connection, but instead, the Telnet connection is temporarily “set aside”. By suspending a Telnet connection, the user can switch back and forth between router command prompts very quickly and easily. Pay close attention to the command prompts. 43

  42. Suspending and Resuming a Telnet Connection Step 1 The user at R1 telnets into R2, logs in, and gets into enable mode. Step 2 The user enters a command on R2, just to emphasize which router the user is using. Step 3 The user suspends the Telnet connection, giving the user a command prompt back on R1. 44

  43. Suspending and Resuming a Telnet Connection (Continued) Step 4 The user issues a command on R1, again to emphasize which router the user is using. Step 5 The user resumes the suspended Telnet connection using the resume 1 command. Step 6 The user issues a command on R2 again, just to emphasize which router the user is using. 46

  44. Switching Between Multiple Telnet Connections By creating, suspending, and resuming multiple Telnet connections, a user can easily switch between the CLIs of multiple routers. IOS uses the following logic when there is at least one Suspended Telnet connection: • If the resume session-number command is used, IOS resumes the suspended Telnet connection identified by the session number. (Continued) 48

  45. Switching Between Multiple Telnet Connections (Continued) • If the resume command is used, without a session number, IOS resumes the most recently suspended Telnet connection. • If a single number is entered on the command line, and there is a suspended Telnet connection using that same number, IOS resumes that Telnet connection. • If the user presses the Enter key when the command line has no text on it, IOS assumes that the user wants to resume the most recently suspended Telnet connection, and IOS resumes that Telnet connection. 49

  46. Suspending and Resuming a Telnet Connection Step 1 The user telnets from R1 to R2. Step 2 The user suspends the Telnet connection, moving back to R1. Step 3 The user telnets from R1 to R4. Step 4 The user suspends the Telnet connection, moving back to R1 again. Step 5 At R1, the user issues the show sessions command,which lists both suspended Telnet connections. 50

  47. Suspending and Resuming a Telnet Connection (Continued) Step 6 The user resumes the Telnet connection to R4 by using the resume command, without a session number. Step 7 The user suspends the Telnet connection, moving back to R1 again. Step 8 The user resumes the Telnet connection to R2 by using the 1 command, which simply identifies the session number for the Telnet connection to R2. Step 9 The user suspends the Telnet connection, moving back to R1 again. Step 10 At the R1 command prompt, the user simply presses Enter, resuming the last-suspended Telnet connection (R2). 52

  48. Number of Concurrent Telnets There are three methods to restrict the number of Telnet connections into a router: • The first method prevents all Telnets into a router by simply not configuring a Telnet password. To disable Telnet access to a router, simply do not configure vty passwords. • The second restriction relates to the maximum number of vty lines supported by IOS. • The third way to limit Telnet connections is to configure a limit. The engineer can configure the maximum number of concurrent Telnet connections into a router by configuring the session limit number command in vty line configuration mode. 54

  49. Cisco IOS ping Command • The IOS ping command sends a series of ICMP echo request messages (default five messages) to another host. • TCP/IP host that receives an ICMP echo request should reply with an aptly named ICMP echo reply message. • If the ping command sends some number of echo requests and gets a reply to each request, the route to reach the remote host and back is working well. 55

  50. Cisco IOS ping Command(Continued) • The IOS ping command tests whether packets can be routed to the remote host, as well as the time for the echo packet to go to the remote host, and the reply to come back. • The ping command gives some sense of the amount of packet loss happening over a route, because the command states how many of the echo reply messages were received correctly. • There are three types of information provided by the ping command. 56

More Related