Tải bản đầy đủ (.pdf) (10 trang)

CCNA 1 and 2 Companion Guide, Revised (Cisco Networking Academy Program) part 69 pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (195.32 KB, 10 trang )

Locating and Loading Cisco IOS Software 649
Configuration Register Values
The order in which the router looks for Cisco IOS Software images to load depends on
the boot field setting in the configuration register. You can change the default configu-
ration register setting with the global configuration command config-register. Use a
hexadecimal number as the argument for this command, as shown in Example 14-4.
The configuration register is set so that the router examines the startup file in NVRAM
for boot system options. The configuration register is a 16-bit register in NVRAM. The
lowest 4 bits of the configuration register (bits 3, 2, 1, and 0) form the boot field. To
change the boot field and leave all other bits set at their original values, follow these
guidelines:
■ Set the configuration register value to 0x100 if the ROM monitor needs to be
entered. This setting is primarily a programmer’s environment. Boot the operat-
ing system manually from the ROM monitor. Use the b command at the ROM
monitor prompt to boot the system. This value sets the boot field bits to 0-0-0-0.
■ Set the configuration register to 0x101 to configure the system to boot automati-
cally from the limited Cisco IOS Software image in ROM. This value sets the
boot field bits to 0-0-0-1.
Example 14-3 Booting from ROM
Router# configure terminal
Router#(config)# boot system rom
[Ctrl-Z]
Router# copy running-config startup-config
Lab Activity Using the boot system Command
In this activity, you gather information about the Cisco IOS Image and deter-
mine its boot source. You also check the config register settings and document
a fallback boot sequence.
Example 14-4 Chaging the Boot Field Setting in the Configuration Register
Router# configure terminal
Router(config)# config-register 0x10F
[Ctrl – Z]


1102.book Page 649 Tuesday, May 20, 2003 2:53 PM
650 Chapter 14: Managing Cisco IOS Software

■ Set the configuration register to any value from 0x102 to 0x10F to configure the
system to use the boot system commands in NVRAM. This setting is the default.
These values set the boot field bits to 0-0-1-0 through 1-1-1-1.
If there are no boot system commands in NVRAM, the system will typically look to
Flash memory for the Cisco IOS Software image.
Table 14-1 shows the boot field values in the configuration register.
To check the boot field setting and to verify the config-register command, use the show
version command.
Displaying the Currently Running Cisco IOS Software Version
The show version command, as shown in Example 14-5, displays information about
the Cisco IOS Software version that is currently running on the router. This version
information includes the configuration register and the boot field setting.
Table 14-1 Boot Field Values in the Configuration Register
Value Description
0x100 Use ROM monitor mode (manually boot
using the b command).
0x101 Automatically boot from ROM (default if
router has no Flash memory).
0x102 to 0x10F Examine NVRAM for boot system commands
(0x102 is the default if the router has Flash
memory).
Lab Activity Troubleshooting Config Register Boot Problems
In this activity, you check and document the configuration register settings
related to boot method and configure the router to boot from Flash.
Example 14-5 Configuration Register

Router#


show version

Cisco Internetwork Operating System Software IOS (tm) 2500 Software (C2500-JS-L),
Version 12.1(5), RELEASE SOFTWARE (fc1) Copyright (c) 1986-2000 by
cisco Systems, Inc. Compiled Wed 25-Oct-00 05:18 by cmong Image text-base:
0x03071DB0, data-base: 0x00001000
2500 Software (C2500-JS-L),

chpt_14.fm Page 650 Tuesday, May 27, 2003 2:16 PM
Managing Cisco IOS Software Images 651
In the example, the Cisco IOS Software version and descriptive information are
highlighted on the second line of output. The screen captured shows Software
Release 12.1(5).
The next highlighted portion of the output shows the system image file is c2500-js-l,
booted using Flash. Notice the portion of the filename that indicates that this image is
for a Cisco 2500 platform.
As the output of the show version command continues, information is displayed about
the type of platform on which the version of Cisco IOS Software is currently running.
The final highlighted output provides the targeted results of the command—config-
register 0x2142. This information is used to enter configuration register values.
Managing Cisco IOS Software Images
Routers and switches depend on software for their operation. The two types of software
required are operating systems and configuration.
The operating system used in almost all Cisco devices is the Cisco Internetwork
Operating System (IOS). Cisco IOS Software allows the hardware to function as a
router or switch. The Cisco IOS Software file is several megabytes in size. Cisco IOS
Software is the platform that ensures that the network provides the connectivity, reli-
ability, security, quality of service, scalability, and management capabilities required
for applications.

ROM: System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE BOOTFLASH:
3000 Bootstrap Software (IGS-RXBOOT), Version 10.2(8a), RELEASE SOFTWARE (fc1)
Router uptime is 7 minutes System returned to ROM by reload System image file
is "flash:c2500-js-l_121-5.bin"
cisco 2500 (68030) processor (revision D) with 16384K/2048K bytes of memory.
Processor board ID 03867477, with hardware revision 00000000 Bridging software.
X.25 software, Version 3.0.0. SuperLAT software (copyright 1990 by
Meridian Technology Corp). TN3270 Emulation software. 1 Token Ring/IEEE 802.5
interface(s) 2 Serial network interface(s) 32K bytes of non-volatile
configuration memory. 16384K bytes of processor board System flash (Read ONLY)
Configuration register is 0x2142
Example 14-5 Configuration Register (Continued)
"flash:c2500-js-l_121-5.bin"
NOTE
There is no evidence
of any config-register
setting in output
from either the show
running-config or
show startup-config
command.
chpt_14.fm Page 651 Tuesday, May 27, 2003 2:16 PM
652 Chapter 14: Managing Cisco IOS Software
The software a router or switch uses is referred to as the configuration file or the config.
The configuration file contains the instructions that define how the device is to route
or switch. A network administrator creates a configuration file that defines the desired
functions of the Cisco device. Examples of the functions that can be specified by the
config are the IP addresses of the interfaces, routing protocols, and networks to be
advertised. The configuration file typically is a few hundred to a few thousand bytes
in size.

Each of the software components is stored in memory as a separate file. These files are
also stored in different types of memory.
The Cisco IOS Software image is stored in a memory area called Flash. Flash memory
provides nonvolatile storage of a Cisco IOS Software image that can be used as an
operating system at startup. Flash allows you to upgrade Cisco IOS Software or to
store multiple Cisco IOS Software files. In many router architectures, the Cisco IOS
Software image is copied from Flash and run from random-access memory (RAM).
A copy of the configuration file is stored in NVRAM to be used as a configuration
during startup. This NVRAM configuration is referred to as the startup config. The
startup config is copied into RAM at boot time. This configuration in RAM is the
configuration used to operate the router. The RAM configuration is referred to as the
running config.
A single interface to all the file systems that a router uses is provided in Software
Release 12 of Cisco IOS Software. This version is referred to as the Cisco IOS File
System (IFS). The IFS provides a single method to perform all the file system manage-
ment that a router uses. This IFS includes the Flash memory file systems, the network
file systems, and reading or writing data. The network file systems include TFTP, remote
copy protocol (RCP), and File Transfer Protocol (FTP). The reading or writing data
includes NVRAM, the running configuration, and ROM. The IFS uses a common set
of prefixes to specify file system devices. Table 14-2 provides an overview of the IFS.
Table 14-2 IOS File System
Prefix Description
bootflash: Boot flash memory.
flash: Flash memory. This prefix is available on all
platforms. For platforms that do not have a
device named Flash, the prefix flash: is aliased
to slot0:. Therefore, the prefix flash: can be
used to refer to the main Flash memory stor-
age area on all platforms.
1102.book Page 652 Tuesday, May 20, 2003 2:53 PM

Managing Cisco IOS Software Images 653
The IFS uses the Universal Resource Locator (URL) convention to specify files on
network devices and the network. The URL convention identifies the location of the
configuration files following the colon as [[[//location]/directory]/filename]. The IFS
also supports FTP file transfer. Table 14-3 lists the commands used to manage Cisco
IOS Software for Software Release 12.0 and compares them against counterpart com-
mands used in Cisco IOS Software releases prior to 12.0.
flh: Flash load helper log files.
nvram: NVRAM.
rcp: Remote copy protocol (RCP) network server.
Slot0: First Personal Computer Memory Card
Industry Association (PCMCIA) Flash
memory card.
Slot1: Second PCMCIA Flash memory card.
system: Contains the system memory, including the
running configuration.
Tftp: TFTP network server.
Table 14-3 Commands for Managing Cisco IOS Software Release 12.0 and Earlier
Pre Cisco IOS Software Release 12.0 Commands
Cisco IOS Software Release 12.x
Commands
configure network (pre-Cisco IOS Software
Release 10.3)
copy rcp running-config
copy tftp running-config
copy ftp: system:running-config
copy rcp: system:running-config
copy tftp: system:running-config
continues
Table 14-2 IOS File System (Continued)

Prefix Description
1102.book Page 653 Tuesday, May 20, 2003 2:53 PM
654 Chapter 14: Managing Cisco IOS Software
Cisco IOS Software Naming Conventions
Cisco develops many different versions of Cisco IOS Software. Cisco IOS Software
supports varied hardware platforms and features. Cisco continuously develops and
releases new versions of Cisco IOS Software.
Cisco has a naming convention for Cisco IOS Software files to identify the different
versions of these Cisco IOS Software files, as illustrated by Figure 14-3.
configure overwrite-network
(pre-Cisco IOS Software Release 10.3)
copy rcp startup-config
copy tftp startup-config
copy ftp: nvram:startup-config
copy rcp: nvram:startup-config
copy tftp: nvram:startup-config
show configuration
(pre-Cisco IOS Software Release 10.3)
show startup-config
more nvram:startup-config
write erase
(pre-Cisco IOS Software Release 10.3)
erase startup-config
erase nvram:
write memory
(pre-Cisco IOS Software Release 10.3)
copy running-config startup-config
copy system:running-config
nvram:startup-config
write network

(pre-Cisco IOS Software Release 10.3)
copy running-config rcp
copy running-config tftp
copy system:running-config ftp:
copy system:running-config rcp:
copy system:running-config tftp
write terminal
(pre-Cisco IOS Software Release 10.3)
show running-config
more system:running-config
Table 14-3 Commands for Managing Cisco IOS Software Release 12.0 and Earlier (Continued)
Pre Cisco IOS Software Release 12.0 Commands
Cisco IOS Software Release 12.x
Commands
1102.book Page 654 Tuesday, May 20, 2003 2:53 PM
Managing Cisco IOS Software Images 655
Figure 14-3 Cisco IOS Software Naming Conventions
As Figure 14-3 shows, this Cisco IOS Software naming convention uses different fields
in the name:
■ Hardware Platform—The first part of the filename identifies the hardware plat-
form. This image is designed for the hardware platform.
■ Feature Set—The second part of the filename identifies the various features that
the Cisco IOS Software file contains. You can choose from many different features,
and these features are packaged in “software images.” Each feature set contains
a specific subset of Cisco IOS Software features. Examples of the feature set cate-
gories are as follows:
— Basic—Basic is a basic feature set for the hardware platform. Examples
of Basic are IP and IP/FW.
— Plus—Plus is a basic feature set plus additional features such as IP Plus,
IP/FW Plus, and Enterprise Plus.

— Encryption—Encryption has the 56-bit data encryption feature sets added
to either a Basic or Plus feature set. Examples include IP/ATM PLUS IPSEC
56 or Enterprise Plus 56. The encryption designators are k8/k9 starting
with the Cisco IOS Software Release 12.2. k8 is less than or equal to 64-bit
encryption on Release 12.2 and up. k9 is greater than 64-bit encryption on
Release 12.2 and up.
■ File Format—The third part of the IOS filename indicates the file format. The
third part specifies if Cisco IOS Software is stored in Flash memory in a com-
pressed format and if the Cisco IOS Software image is relocatable. If the Flash
image is compressed, Cisco IOS Software must be expanded during boot as the
image is copied to RAM. A relocatable image is copied from Flash memory into
RAM to run. A non-relocatable image is run directly from Flash memory.
1102.book Page 655 Tuesday, May 20, 2003 2:53 PM
656 Chapter 14: Managing Cisco IOS Software
■ Version and Release—The fourth part of the IOS filename identifies the version
number and release of Cisco IOS Software. As Cisco develops newer versions of
Cisco IOS Software, the numerical version number increases.
Managing Configuration File Using TFTP
In a Cisco router or switch, the active configuration is in RAM. The default location
for the startup configuration in a Cisco router or switch is NVRAM. In the event the
configuration is lost, you should back up this startup configuration. You can store one
of these backup copies of the configuration on a TFTP server. You can use the copy
running-config tftp command to back up the configuration. The steps to perform this
backup process are as follows:
Step 1 Enter copy tftp running-config.
Step 2 Enter the IP address of the TFTP server that is to store the configuration
file at the prompt.
Step 3 Enter the name to assign to the configuration file or accept the default
name.
Step 4 Confirm the choices by typing yes each time.

Example 14-6 demonstrates the actual process.
You can restore the router configuration by loading the backup configuration file from
a TFTP server. The steps you can take to restore the configuration are as follows:
Step 1 Enter copy tftp running-config.
Step 2 Select a host or network configuration file at the prompt.
Step 3 At the system prompt, enter the IP address of the TFTP server where the
configuration file is located.
Step 4 At the system prompt, enter the name of the configuration file or accept
the default name.
Step 5 Confirm the configuration filename and the server address that the system
supplies.
Example 14-6 Backing Up the Startup Configuration on a TFTP Server
Cougar# copy running-config tftp
Address or name of remote host [] 192.168.119.20
Destination file name [Cougar-config]?
!!!!!!!!!!!!!!!!!!!!!!!!
624 bytes copied in 7.05 secs
Cougar#
N
O
TE
If the router config
file is missing or if the
erase startup-config
and reload commands
have been used, the
router will not have
any interfaces config-
ured. TFTP requires
IP to make a connec-

tion, so you will need
to connect to the
router using the con-
sole port and config-
ure an IP address for
the interface that will
provide access to the
TFTP server.
1102.book Page 656 Tuesday, May 20, 2003 2:53 PM
Managing Cisco IOS Software Images 657
Example 14-7 demonstrates the process of restoring the configuration from a TFTP
server.
To copy the configuration file from the TFTP server back to the router, perform the fol-
lowing steps:
Step 1 Enter configuration mode by entering the copy tftp running-config
command.
Step 2 At the system prompt, select a host or network configuration file. The
network configuration file contains commands that apply to all routers
and terminal servers on the network. The host configuration file contains
commands that apply to one router in particular. At the system prompt,
enter the optional IP address of the remote host where the configuration
file is located. In Example 14-8, the router is configured from the TFTP
server at IP address 131.108.2.155.
Step 3 At the system prompt, enter the name of the configuration file or accept
the default name. The filename convention is UNIX-based. The default
filename is hostname -config for the host file and network -config for the
network configuration file. In the DOS environment, the server filenames
are limited to eight characters plus a three-character extension. An
example is router.cfg. Confirm the configuration filename and the server
address that the system supplies. Notice in Example 14-8 that the router

prompt changes to tokyo immediately. This change is evidence that the
reconfiguration happens as soon as the new file is downloaded.
Example 14-7 Restoring the Startup Configuration from a TFTP Server
Cougar# copy tftp running-config
Address or name of remote host [] 192.168.119.20
Source filename []? Cougar-confg
Destination filename [running-config]?

Accessing tftp://192.168.119.20/GAD-confg…
Loading GAD-confg from 192.168.119.20
(via FastEthernet 0/0): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK-624 bytes]
624 bytes copied in 9.45 secs Cougar#
1102.book Page 657 Tuesday, May 20, 2003 2:53 PM
658 Chapter 14: Managing Cisco IOS Software
Example 14-8 demonstrates the process of copying the configuration file from a
TFTP server.
Managing Configuration Files with HyperTerminal
Capturing the output of the show running-config command is another way to create a
backup copy of the configuration. You can perform this backup from the terminal ses-
sion by copying the output, pasting to a text file, and saving the text file. However, this
file needs some editing done before you can use it to restore configuration to the router.
Figure 14-4 shows an example of cutting and pasting configurations.
To capture the configuration in HyperTerminal text that is displayed on the screen to a
text file, use the following steps:
Step 1 Select Transfer.
Step 2 Select Capture Text.
Step 3 Specify the name for the text file to the capture configuration.
Step 4 Select Start to start capturing text.
Step 5 Display the configuration to the screen by entering show running-config.

Step 6 Press the space bar when each “-More -” prompt appears, which contin-
ues with the configuration until the end is reached.
Step 7 When the complete configuration has been displayed, stop the capture
using the following steps:
a. Select Transfer.
b. Select Capture Text.
c. Select Stop.
Example 14-8 Copying the Configuration File from a TFTP Server
tokyo# copy tftp running-config
Host or network configuration file [host]?
IP address of remote host [255.255.255.255]? 131.108.2.155
Name of configuration file [Router-config]? tokyo.2
Configure using tokyo.2 from 131.108.2.155? [confirm] y
Booting tokyo.2 from 131.108.2.155:!! [OK-874/16000 bytes]
tokyo#
Lab Activity Managing Configuration Files with TFTP
In this activity, you copy a router configuration file to a TFTP server and
then configure the router by copying the file back from the TFTP server.
1102.book Page 658 Tuesday, May 20, 2003 2:53 PM

×