Routers and routing basics ccna 2
Download
1 / 54

Routers and Routing Basics CCNA 2 - PowerPoint PPT Presentation


  • 351 Views
  • Updated On :

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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Routers and Routing Basics CCNA 2' - gali


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Learning about other devices l.jpg
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


Neighbor discovery tools l.jpg
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


Neighbor discovery tools on the osi model l.jpg
Neighbor Discovery Toolson the OSI Model

4


Discovering neighbors using cdp l.jpg
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


Internetwork with three routers and two switches l.jpg
Internetwork with Three Routers and Two Switches

R2 can discover information about R1 and SW2, but not

about SW1 or R4

6


Internetwork with three routers and two switches continued l.jpg
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


Cdp protocol operations l.jpg
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


Cdp advertisements with tlvs l.jpg
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


Cdp advertisements with tlvs10 l.jpg
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


Cdp versions 1 and 2 l.jpg
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


Types of information learned by cdp l.jpg
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


Types of information learned by cdp continued l.jpg
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


Cdp timers l.jpg
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


Cdp update interval and holdtime l.jpg
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


Information learned by cdp l.jpg
Information Learned by CDP

The show cdp Commands

That List Information About Neighbors

15


Information learned by cdp continued l.jpg
Information Learned by CDP(Continued)

The show cdp neighbors detail Command

16


Information learned by cdp continued18 l.jpg
Information Learned by CDP(Continued)

The show cdp neighbors detail Command (Continued)

17


Information learned by cdp continued19 l.jpg
Information Learned by CDP(Continued)

The show cdp entry Command

18


Configuring and verifying cdp operations l.jpg
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



How to enable and disable cdp in a cisco router l.jpg
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


Verifying disabling and enabling cdp l.jpg
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


Verifying disabling and enabling cdp continued l.jpg
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


Verifying disabling and enabling cdp continued25 l.jpg
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


Verifying disabling and enabling cdp continued26 l.jpg
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


Using cdp to construct a network map l.jpg
Using CDP to Construct a Network Map

29


Using cdp to construct a network map continued l.jpg
Using CDP to Construct a Network Map (Continued)

30


Using cdp to construct a network map continued29 l.jpg
Using CDP to Construct a Network Map (Continued)

31


Using cdp to construct a network map continued30 l.jpg
Using CDP to Construct a Network Map (Continued)

32



Getting information and troubleshooting remote devices l.jpg
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


Osi layers tested by various ios tools l.jpg
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


Osi layers tested by various ios tools continued l.jpg
OSI Layers Tested by Various IOS Tools (Continued)

36


Telnet basics l.jpg
Telnet Basics

Telnet Client/Server Operation

37


Cisco ios telnet command l.jpg
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



Basic telnet troubleshooting l.jpg
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


Issues with the default name resolution method l.jpg
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


Issues with the default name resolution method continued l.jpg
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


Suspending and switching between telnet connections l.jpg
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


Suspending and resuming a telnet connection l.jpg
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


Suspending and resuming a telnet connection continued l.jpg
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


Switching between multiple telnet connections l.jpg
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


Switching between multiple telnet connections continued l.jpg
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


Suspending and resuming a telnet connection46 l.jpg
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


Suspending and resuming a telnet connection continued47 l.jpg
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


Number of concurrent telnets l.jpg
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


Cisco ios ping command l.jpg
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


Cisco ios ping command continued l.jpg
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


The ping command on router r1 l.jpg
The ping Command on Router R1

  • The output of the ping command says that it is sending five 100-byte-long ICMP echo messages.

  • The output shows five exclamation points, each of which means that the ping command received five reply messages from 172.16.2.254.

  • The last line of output states that the command was 100 percent successful, going five for five.

  • The ping command notices the round-trip time, which is the time between when the echo request is sent and the corresponding echo reply is received.

  • The ping command then lists the smallest, average, and largest round-trip time.

57


Cisco ios traceroute command l.jpg
Cisco IOS traceroute Command

  • The traceroute command tests whether the IP route to another host works and it also identifies the routers in the route.

  • The traceroute command begins by sending a few packets (typically three) to the destination address listed in the command, but these packets have a Time to Live (TTL) field in the IP header set to 1.

  • Routers decrement the TTL field by 1 when forwarding a packet, but if the router decrements a packet’s TTL to 0, the router discards the packet.

  • The first router that gets these three packets,

    discards the packets.

59


Cisco ios traceroute command continued l.jpg
Cisco IOS traceroute Command(Continued)

The following occurs due to the traceroute command:

1. R1 sends three packets, source 172.16.4.251, destination 172.16.2.254, with TTL=1.

2. R2 receives the packets, decrements the TTL to 0, and discards the packets.

3. R2 also sends an ICMP TTL Exceeded message back to 172.16.4.251 (R1) for each discarded packet.

4. The traceroute command on R1, upon seeing that all the ICMP TTL Exceeded messages came from the same IP address (172.16.4.252), now knows that 271.16.4.252 is the first router in the route to reach the destination. So, the traceroute command lists 172.16.4.252 as the first router in the route.

60


Summary l.jpg
Summary

  • Cisco routers, switches, and other Cisco devices use CDP to obtain information about directly connected Cisco devices. The information includes the router interfaces on the local and neighboring devices, the model number and software version of the neighboring device, and the Layer 3 addresses if configured.

  • The IOS telnet or connect commands allow to remotely access another device.

  • The hostname or IP address can be entered on the command line without the telnet or connect command.

  • The ping command determines whether a working route exists, determines the round-trip time for packets to go to the remote host and back.

  • The traceroute command tests the same general features as ping, with the added benefit that it lists the routers at each hop of the route to the destination.

62


ad