• No results found

to Managing a Cisco Internetwork

In document Ccna Virtual Lab (Page 186-191)

In this section, you will learn how to manage Cisco routers in an internetwork. The Internetworking Operating System (IOS) and configuration files reside in different loca-tions in a Cisco device, and it is important to understand where these files are located and how they work.

Host E is running a TFTP server daemon and will be used in this section to both back up and restore the Cisco IOS and configuration of the 2621 A router.

The following labs are covered:

N

N 3.1: Password Recovery Techniques

N

N 3.2: Backing up a Cisco IOS to a TFTP server

N

N 3.3: Upgrading or restoring a Cisco IOS from a TFTP server

N

N 3.4: Backing up a Cisco router configuration using a TFTP server

N

N 3.5: Restoring a Cisco router configuration from a TFTP server

N

N 3.6: Using the Cisco Discovery Protocol to gather information about neighbor devices

N

N 3.7: Using Telnet

N

N 3.8: Using Secure Shell in Place of Telnet

N

N 3.9: Verifying Secure Shell in Place of Telnet

N

N 3.10: Creating a hosts table on a router and resolving host names to IP addresses

N

N 3.11: Configuring IGRP Routing

N

N 3.12: Verifying IGRP Routing

The commands covered in this section are as follows:

Command Description

cdp enable Turns on CDP on an individual interface cdp holdtime Changes the holdtime of CDP packets

cdp run Turns on CDP on a router

cdp timer Changes the CDP update timer

Lab 3: Introduction to Managing a Cisco Internetwork 167

Command Description

config-register (confreg) Tells the router how to boot and to change the configu-ration register setting

copy flash tftp Copies a file from flash memory to a tftp host

copy run start Copies the running-config file to the startup-config file

copy run tftp Copies the running-config file to a tftp host copy tftp flash Copies a file from a tftp host to flash memory

copy tftp run Copies a configuration from a tftp host to the running-config file

Ctrl+Shift+6, then X (keyboard

combination) Used to take you back to the originating router when you telnet to numerous routers

disconnect Disconnects a connection to a remote router from the originating router

erase startup-config Deletes the contents of NVRAM on a router

exit Disconnects a connection to a remote router via Telnet

ip host Creates a host table on a router

no cdp enable Turns off CDP on an individual interface no cdp run Turns off CDP completely on a router

no ip host Removes a hostname from a host table

o/r 0x2142 Changes a router to boot without using the contents of NVRAM

show cdp Displays the CDP timer and holdtime frequencies show cdp entry * Same as show cdp neighbor detail, but does not work

on a 1900 switch

show cdp neighbor Shows the directly connected neighbor and the details about them

Command Description

show cdp neighbor detail Shows the IP address and IOS version and type, and includes all of the information from the show cdp neighbor command

show cdp traffic Shows the CDP packets sent and received on a device and any errors

show flash Views the files in flash memory

show hosts Shows the contents of the host table

show run Displays the running-config file

show sessions Shows your connections via Telnet to remote devices show start Displays the startup-config file

show version Displays the IOS type and version as well as the con-figuration register

Lab 3.1: Password Recovery Techniques

All Cisco® routers have a 16-bit software register, which is written into NVRAM. By default, the configuration register is set to load the Cisco IOS from flash memory and to look for and load the startup-config file from NVRAM.

By changing the configuration register, you can perform password recovery on a Cisco router.

If you are locked out of a router because you forgot the password, you can change the configuration register to help you recover. Bit 6 in the configuration register is used to tell the router whether or not to use the contents of NVRAM to load a router configuration.

The default configuration register value for bit 6 is 0x2102 (the 0 is bit 6), which means that bit 6 is off. With the default setting, the router will look for and load a router configu-ration stored in NVRAM (startup-config). To recover a password, you need to turn on bit 6, which will tell the router to ignore the NVRAM contents. The configuration register value to turn on bit 6 is 0x2142.

(continued)

Lab 3.1: Password Recovery Techniques 169

Lab Steps

1. You can see the current value of the configuration register by using the show version command (sh version or show ver for short), as in the following example on 2621 Router A:

2621A#show version

Cisco Internetwork Operating System Software

IOS (tm) C2621 Software (C2621-BIN-M), Version 12.2(13)T1, RELEASE SOFTWARE (fc1)

[output cut]

Configuration register is 0x2102

The last information given from this command is the value of the configuration register.

In this example, the value is 0x2102, which is the default setting.

2. You can change the configuration register by using the config-register command.

For example, the following commands tell the router to boot from ROM monitor mode and then to verify the current configuration register value:

2621A(config)#config-register 0x0101 2621A(config)#ctrl+z

Network Layout

Load Standard Layout.rsm or whatever you named the file when you saved your work while working in section 2.

2621A#sh ver [output cut]

Configuration register is 0x2102 (will be 0x0101 at next reload)

Notice that the show version command shows the current configuration register value, as well as what it will be when the router reboots. Any change to the configuration reg-ister will not take effect until the router is reloaded.

3. From 2621 Router A, type reload at the privileged mode prompt.

2621A#copy run start 2621A#reload

4. You will then see this output on your screen: “System configuration has been modified.

Save? [yes/no]: “. Press Y.

5. You will then be asked to confirm the reload. Press Enter.

6. When the router is rebooting, press and hold ctrl+break on the keyboard, until it takes you into rom monitor mode.

System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1) Copyright (c) 1999 by Cisco Systems, Inc.

TAC:Home:SW:IOS:Specials for info

PC = 0xfff0a530, Vector = 0x500, SP = 0x680127b0 C2621 platform with 32768 Kbytes of main memory PC = 0xfff0a530, Vector = 0x500, SP = 0x80004374

monitor: command "boot" aborted due to user interrupt rommon 1 >

7. To change the bit value on a Cisco 2621 series router, simply enter the confreg (mean-ing config register) command at the <rommon 1> prompt:

rommon 1 >confreg 0x2142

You must reset or power cycle for new config to take effect.

8. At this point, reset the router.

rommon 1 >reset

9. When the router reloads, say no to entering setup mode.

10. Enter privileged mode and then type copy startup-config running-config.

11. Change your passwords and then save your configuration with the copy run start command.

12. Change your configuration register back to 0x2102.

rommon 1 > confreg 0x2102

Lab 3.1: Password Recovery Techniques 171

In document Ccna Virtual Lab (Page 186-191)