1. Trang chủ
  2. » Công Nghệ Thông Tin

Network Administration and Troubleshooting

36 305 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Backing Up and Restoring Cisco IOS Software and Configurations
Trường học Unknown University
Chuyên ngành Network Administration
Thể loại lecture notes
Định dạng
Số trang 36
Dung lượng 4,97 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

PART VII Network Administration and TroubleshootingChapter 16 Backing Up and Restoring Cisco IOS Software and Configurations Chapter 17 Password Recovery Procedures and the Configurati

Trang 1

PART VII Network Administration and Troubleshooting

Chapter 16 Backing Up and Restoring Cisco IOS Software

and Configurations

Chapter 17 Password Recovery Procedures and the

Configuration Register

Chapter 18 Cisco Discovery Protocol (CDP)

Chapter 19 Telnet and SSH

Chapter 20 The ping and traceroute Commands

Chapter 21 SNMP and Syslog

Chapter 22 Basic Troubleshooting

Trang 2

This page intentionally left blank

Trang 3

CHAPTER 16 Backing Up and Restoring Cisco IOS Software and

Configurations

This chapter provides information and commands concerning the following topics:

• Boot system commands

• The Cisco IOS File System

• Backing up configurations to a TFTP server

• Restoring configurations from a TFTP server

• Backing up the Cisco IOS Software to a TFTP server

• Restoring/upgrading the Cisco IOS Software from a TFTP server

• Restoring the Cisco IOS Software from ROM Monitor mode using Xmodem

• Restoring the Cisco IOS Software using the ROM Monitor environmental

variables and tftpdnld command

Boot System Commands

If you enter boot system flash first, that is the first place the router will go to look for

the Cisco IOS Software If you want to go to a TFTP server first, make sure that the

boot system tftp command is the first one you enter.

Router(config)#bbboooootott sssyysyststteeemmm ffflllaaasshsh h

image-name

Loads the Cisco IOS

Software with image-name.

Router(config)#bbboooootot t sssyysyssttteeemmm tttfffttptp p image-name

1

1777222 116166 11100.0.3.3

Loads the Cisco IOS

Software with image-name

from a TFTP server.

Router(config)#bbboooootott sssyysyststteeemmm rrrooomm Loads the Cisco IOS

Software from ROM.

Router(config)#eeexxxiitit

Router#cccoopopypyy rrruununnnnniiinngng-g cccoononfnffiiiggg ssstttaaarrtrtutuuppp -ccocoonnnfffiigig Saves the running

configuration to NVRAM The router will execute commands in their order

on the next reload.

Trang 4

186 Backing Up Configurations to a TFTP Server

The Cisco IOS File System

NOTE: The Cisco IOS File System (IFS) provides a single interface to all the file systems available on a routing device, including the flash memory file system; network file systems such as TFTP, Remote Copy Protocol (RCP), and File Transfer Protocol (FTP); and any other endpoint for reading and writing data, such as NVRAM, or the running configuration

The Cisco IFS minimizes the required prompting for many commands Instead

of entering in an EXEC-level copy command and then having the system prompt

you for more information, you can enter a single command on one line with all necessary information

Backing Up Configurations to a TFTP Server

Cisco IOS Software Commands IFS Commands

c

coopoppyyy ttftftfttppp rruruunnnnnniininnggg -ccocononnfffiiigg g ccoopoppyyy ttftftfttppp::: sssyyyssstteteemmm:::rrurununnnnniiinngngg -cccoononfnffiiiggg c

coopoppyyy ttftftfttppp sststtaaarrrttutuuppp -ccocononnfffiiigg g ccoopoppyyy ttftftfttppp::: nnnvvvrrraamamm:::sssttatararrtttuuupp-p cccooonnfnfifiiggg s

nvvrvrraaammm::s:ststtaaarrrttutuuppp -ccocoonnnfffiigig gc

coopoppyyy rrurununnnnniiinngngg -cccoononnfffiiigg g tttffftttpp p ccoopoppyyy ssysysyssttteeemm:m::rrruuunnnnnniiinnngg-g-c-ccooonnnffifiiggg ttftftfttppp::: s

shhohoowww rrurununnnnniiinngngg -cccoononnfffiiigg g mmoororreee ssysysyssttteeemm:m::rrruuunnnnnniiinnngg-g-c-ccooonnnffifiiggg

Denver#cccoooppypy y rrruuunnnnnniiinnngg-g-c-ccooonnnffifiiggg sststataarrrtttuupupp -cccoononnfffiiigg Saves the running

configuration from DRAM

to NVRAM (locally).

Denver#cccoooppypy y rrruuunnnnnniiinnngg-g-c-ccooonnnffifiiggg ttftftfttpp Copies the running

configuration to the remote TFTP server.

Address or name of remote host[ ]?

192.168.119.20

The IP address of the TFTP server.

Trang 5

Restoring Configurations from a TFTP Server 187

NOTE: You can also use the preceding sequence for a copy startup-config tftp

command sequence

Restoring Configurations from a TFTP Server

NOTE: You can also use the preceding sequence for a copy tftp startup-config

command sequence

Destination Filename [Denver-confg]?® The name to use for the file

saved on the TFTP server.

!!!!!!!!!!!!!!! Each bang symbol (!) = 1

datagram of data.

624 bytes copied in 7.05 secs

Denver# File has been transferred

successfully.

Denver#cccoooppypy y tttfffttptpp rrruununnnnniiinnngg-g cccooonnfnfifiigg Copies the configuration

file from the TFTP server

Source filename [ ]?Denver-confg Enter the name of the file

you want to retrieve.

Destination filename [running-config]?®

Accessing

tftp://192.168.119.20/Denver-confg…

Loading Denver-confg from 192.168.119.02

(via Fast Ethernet 0/0):

!!!!!!!!!!!!!!

[OK-624 bytes]

624 bytes copied in 9.45 secs

Denver# File has been transferred

successfully.

Trang 6

188 Restoring/Upgrading the Cisco IOS Software from a TFTP Server

Backing Up the Cisco IOS Software to a TFTP Server

Restoring/Upgrading the Cisco IOS Software from a TFTP Server

Destination filename [c2600-js-l_121-3.bin]?

® The destination filename is the same as the source

filename, so just press

Erase flash: before copying? [confirm]

Erasing the flash file system will remove

all files

Continue? [confirm] ® Press Ç-C if you want to

cancel.

Trang 7

Restoring the Cisco IOS Software from ROM Monitor Mode Using Xmodem 189

Restoring the Cisco IOS Software from ROM Monitor Mode Using Xmodem

The output that follows was taken from a 1720 router Some of this output might vary from yours, depending on the router model that you are using.

Erasing device eeeeeeeeeeeeeeeeee…erased Each e represents data being

rommon 1 >ccocoonnnfffrrereegg Shows the configuration summary

Step through the questions, answering defaults until you can change the console baud rate

Trang 8

190 Restoring the Cisco IOS Software from ROM Monitor Mode Using Xmodem

do you wish to change the configuration?

y/n [n]: yy

enable “diagnostic mode”? y/n [n]: nn

enable “use net in IP bcast address”?

the configuration register Answer n

to all questions except the one that asks you to change the console baud rate For the enter rate, choose

7 because that is the number that

represents a baud rate of 115200.

or default to: cisco2-c1700

do you wish to change the configuration?

y/n [n]: nn

rommon2>

After the summary is shown again,

choose n to not change the

configuration and go to the rommon> prompt again.

rommon 2>rreresesseeett Reloads the router at the new com

speed Change the HyperTerminal

setting to 115200 to match the

router’s new console setting.

Rommon 1>xxmxmomoodddeeemm m ccc111770700000 -jjjss-s lll _112121211 -33.3.b.bbiiinn Asking to transfer this image using

Xmodem.

Trang 9

Restoring the Cisco IOS Software from ROM Monitor Mode Using Xmodem 191

Figure 16-1 Finding the Cisco IOS Software Image File

Do you wish to continue? y/n [n ]:yy Choose y to continue.

In HyperTerminal, go to Transfer, then Send File (see Figure 16-1) Locate the Cisco IOS Software file

on the hard drive and click Send

(see Figure 16-2).

Router will reload when transfer is completed.

Reset baud rate on router.

Router(config)#llliiinnnee e cccooonnn 00

Router(config-line)#ssspppeeeeededd 99966060000

Router(config-line)#eeexxxiitit HyperTerminal will stop

responding Reconnect to the router using 9600 baud, 8-N-1.

Trang 10

192 Restoring IOS software using tftpdnld

Figure 16-2 Sending the Cisco IOS Software Image File to the Router

Restoring the Cisco IOS Software Using the ROM Monitor

Environmental Variables and tftpdnld Command

NOTE: Commands and environmental variables are case sensitive, so be sure that you have not accidentally added spaces between variables and answers

rommon 1>IIPIP_P AAADDDDDRDRREEESSSSS=S=1=11999222 1.11666888 1.10100000 1.1 Indicates the IP address for this

rommon 5>TTFTFTFTTPPP _FFIFIILLLEEE== = ccc222666000000 -jjjss-s-l-ll _112121211 -333 b.bbiiinn Indicates the filename to fetch

from the TFTP server.

rommon 6>ttftftfttpppdddnnlnlldd Starts the process.

Trang 11

CHAPTER 17 Password-Recovery Procedures and the Configuration Register

This chapter provides information and commands concerning the following topics:

• The configuration register

— A visual representation

— What the bits mean

— The boot field

— Console terminal baud rate settings

— Changing the console line speed: CLI

— Changing the console line speed: ROM Monitor mode

• Password-recovery procedures for Cisco routers

• Password-recovery procedures for 2960 series switches

The Configuration Register

A Visual Representation

The configuration register is a 16-bit field stored in NVRAM The bits are numbered from 15 to 0 looking at the bit stream from left to right Bits are split up into groups

of 4, and each group is represented by a hexadecimal digit.

router#ssshhohoowww vvevererrsssiioionon The last line of output tells you what

the configuration register is set to.

router#cccoononnfffiiiggugururreee tteteerrrmmmiininnaaall Moves to global configuration mode.

Trang 12

194 The Configuration Register

What the Bits Mean

The Boot Field

NOTE: Even though there are 16 possible combinations in the boot field, only

3 are used

TIP: Because the default boot field has 14 different ways to represent it, a

configuration register setting of 0x2102 is the same as 0x2109, or 210F The boot

system command is described in Chapter 16, “Backing Up and Restoring Cisco

IOS Software and Configurations.”

Bit Number Hexadecimal Meaning

00–03 0x0000–0x000F Boot field.

09 0x0200 Causes system to use secondary bootstrap

(typically not used).

10 0x0400 IP broadcast with all 0s.

5, 11, 12 0x0020, 0x0800,

0x1000

Console line speed.

13 0x2000 Boots default ROM software if network boot fails.

14 0x4000 IP broadcasts do not have net numbers.

15 0x8000 Enables diagnostic messages and ignores NVRAM

contents.

Boot Field Meaning

00 Stays at the ROM Monitor on a reload or power cycle

01 Boots the first image in flash memory as a system image

02–F Enables default booting from flash memory

Enables boot system commands that override default booting from

flash memory

Trang 13

The Configuration Register 195

Console Terminal Baud Rate Settings

Changing the Console Line Speed: CLI

TIP: Cisco IOS Software does not allow you to change the console speed bits

directly with the config-register command.

Changing the Console Line Speed: ROM Monitor Mode

router(config)#llliiinnnee e cccooonnnssosoollleee 00 Enters console line mode

router(config-line)#ssspppeeeeededd 11199292200000 Changes speed to 19200 baud

rommon1>cccoononfnffrrreeegg Shows configuration

summary Step through the questions,

answering with the defaults until you can change the console baud rate.

Trang 14

196 Password-Recovery Procedures for Cisco Routers

TIP: Make sure that after you change the console baud rate, you change your terminal program to match the same rate!

Password-Recovery Procedures for Cisco Routers

do you wish to change the configuration? y/n [n]: yy

enable “diagonstic mode”? y/n [n]: nn

enable “use net in IP bcast address”? y/n [n]: nn

disable “load rom after netboot fails”? y/n [n]: nn

enable “use all zero broadcast”? y/n [n]: nn

enable “break/abort has effect”? y/n [n]: nn

enable “ignore system config info”? y/n [n]: nn

change console baud rate? y/n [n]: yy

boot: image specified by the boot system commands

or default to: x (name of system image)

change the boot characteristics? y/n [n]: nn After the summary is

shown again, choose n

to not change the configuration and go to the rommon>prompt again.

rommon2>

1700/2600/ISR Series Commands

Step 1: Boot the router

and interrupt the boot

sequence as soon as text

appears on the screen.

Press Ç-ı

>

Press Ç-ı

rommon 1>

Trang 15

Password-Recovery Procedures for Cisco Routers 197

Step 2: Change the

> rommon 2>

Step 3: Reload the router. >ii rommon 2>rrreeseseseett

Step 4: Enter privileged

mode (Do not enter setup

mode.)

Router>eeennnaaabblblele Router>eeennnaaabblblele

Router# Router#

Step 5: Copy the startup

configuration into the

running configuration.

Router#cccooopppyy y ssstttaaarrtrttuuuppp-c

-cooonnfnffiiiggg rrruuunnnnninininnggg -ccocoonnnfffiigig

Router#cccooopppyy y ssstttaarartrttuuuppp-c

teeerrmrmmiiinnnaalal

Denver#cccooonnnffifigigguuurrere et

teerermrmmiiinnnaalalDenver(config)#eenennaaabbbllele e

s

seeeccrcrreeettt new

Denver(config)#eenennaaabbbllelee s

seececrcrreeettt newDenver(config)# Denver(config)#

Step 7: Reset the

configuration register back

to its default value.

Denver(config)#ccocoonnnfffiigig-gr

-reeeggigiisssttteererr 000xx2x2121100022

Denver(config)#ccocoonnnfffiigigg-r

-cooonnfnffiiiggg ssstttaaarrtrtutuuppp -ccocoonnnfffiigig

Denver#cccooopppyy y rrruuunnnnniniinnnggg-c

-coononfnffiiiggg ssstttaaarrtrtutuuppp -ccocoonnnfffiigigDenver# Denver#

Trang 16

198 Password Recovery for 2960 Series Switches

Password Recovery for 2960 Series Switches

Step 9: Verify the

Configuration register

is 0x2142 (will be 0x2102 at next reload)Denver# Denver#

Step 10: Reload the router. Denver#rrreeelllooaoadad Denver#rrreeelllooaoadad

Unplug the power supply from the back of the switch.

Press and hold the Mode button on the front of the

switch.

Plug the switch back in.

Release the Mode button when the SYST LED blinks

amber and then turns solid green When you release

the Mode button, the SYST LED blinks green.

Issue the following commands:

switch: fffllalasasshhh _iininniiitt Initializes the flash memory.

switch: lllooaoadadd _hhheelellpppeeerr

switch: dddiirir r ffflllaasasshhh:: Do not forget the colon This

displays which files are in flash memory.

switch: bbboooootot Boots the switch.

Trang 17

Password Recovery for 2960 Series Switches 199

When asked whether you want to enter the

configuration dialog, enter n to exit out to the switch

prompt.

Takes you to user mode.

switch>eeennnaabablbllee Enters privileged mode.

768 bytes copied in 0.624 seconds

2960Switch# The configuration file is now

reloaded Notice the new prompt.

2960Switch#cccooonnnffifiiggguuurrere e ttteeerrmrmmiiinnnaalal Enters global configuration

Trang 18

This page intentionally left blank

Trang 19

CHAPTER 18

Cisco Discovery Protocol (CDP)

This chapter provides information and commands concerning the following topic:

• Cisco Discovery Protocol (CDP)

Cisco Discovery Protocol

Router#ssshhohowoww cccddpdp Displays global CDP information

(such as timers)

Router#ssshhohowoww cccddpdpp nnneeieigigghhhbbobororrss Displays information about neighbors

Router#ssshhohowoww cccddpdpp nnneeieigigghhhbbobororrsss ddedeetttaaaiilil Displays more detail about the

neighbor device

Router#ssshhohowoww cccddpdpp eeenntntrtrryyy wwowoorrrdd Displays information about the device

named word

Router#ssshhohowoww cccddpdpp eeenntntrtrryyy ** Displays information about all devices

Router#ssshhohowoww cccddpdpp iiinntnteteerrrffafacaccee Displays information about interfaces

that have CDP running

Router#ssshhohowoww cccddpdpp iiinntnteteerrrffafacacceee x Displays information about specific

Router(config)#cccdddpp p rrruuunn Enables CDP globally (on by default)

Router(config)#nnnooo cccdddppp rruruunn Turns off CDP globally

Router(config-if)#cccdddppp eenennaaabbbllele Enables CDP on a specific interface

Ngày đăng: 19/10/2013, 00:20

TỪ KHÓA LIÊN QUAN