0% found this document useful (0 votes)
30 views12 pages

514.configuring Ios

The document discusses configuring Cisco IOS software. It covers managing configuration files, checking initial configurations using the setup command, and preparing initial configurations by enabling IP. It also describes configuration mode and context-setting commands to navigate different configuration submodes.

Uploaded by

John A Phiri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views12 pages

514.configuring Ios

The document discusses configuring Cisco IOS software. It covers managing configuration files, checking initial configurations using the setup command, and preparing initial configurations by enabling IP. It also describes configuration mode and context-setting commands to navigate different configuration submodes.

Uploaded by

John A Phiri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

02 CCNA Exam_Ch 02.

fm Page 39 Thursday, March 7, 2002 11:44 AM

Configuring Cisco IOS Software 39

Configuring Cisco IOS Software

43 Manage configuration files from the privileged exec mode.

47 Check an initial configuration using the setup command.

53 Prepare the initial configuration of your router and enable IP.

You must understand how to configure a Cisco router to succeed on the exam—or to succeed
in supporting Cisco routers. This section covers the basic configuration processes, including the
concept of a configuration file and the locations in which the configuration files can be stored.
As mentioned in Chapter 1, configuration mode is another mode for the Cisco CLI, similar to
user mode and privileged mode. User mode allows commands that are not disruptive to be
issued, with some information being displayed to the user. Privileged mode supports a superset
of commands compared to user mode, including commands that might harm the router.
However, none of the commands in user or privileged mode changes the configuration of the
router. Configuration mode is another mode in which configuration commands are typed.
Figure 2-5 illustrates the relationships among configuration mode, user exec mode, and
privileged exec mode.

Figure 2-5 CLI Configuration Mode versus Exec Modes

enable Privileged exec


User exec mode
mode

Ctrl-Z config t
or
exit
Each command
RAM Configuration
(Active config) mode
in succession

Commands typed in configuration mode update the active configuration file. These changes to
the configuration occur immediately each time you press the Enter key at the end of a command.
Be careful when you type in a configuration command!
Configuration mode itself contains a multitude of subcommand modes. Context-setting
commands move you from one configuration subcommand mode to another. These context-
setting commands tell the router the topic about which you will type the next few configuration
commands. More importantly, they tell the router what commands to list when you ask for help.
02 CCNA Exam_Ch 02.fm Page 40 Thursday, March 7, 2002 11:44 AM

40 Chapter 2: Cisco IOS Software Fundamentals

After all, the whole reason for these contexts is to make online help more convenient and clear
for you. So, if you are confused now, hang on—the next sample will clarify what I mean.

NOTE Context setting is not a Cisco term—it’s just a term used here to help make sense of
configuration mode.

The interface command is the most commonly used context-setting configuration command.
As an example, the CLI user could enter interface configuration mode after typing the interface
ethernet 0 configuration command. Command help in Ethernet interface configuration mode
displays only commands that are useful when configuring Ethernet interfaces. Commands used
in this context are called subcommands—or, in this specific case, interface subcommands. If
you have significant experience using the CLI in configuration mode, much of this will be
second nature. From a CCNA exam perspective, recalling whether popular commands are
global commands or subcommands will be useful, but you should really focus on the particular
commands covered here. As a side effect, you will learn whether the commands are global
configuration commands or subcommands.
No set rules exist for what commands are global commands or subcommands. Generally,
however, when multiple instances of a parameter can be set in a single router, the command
used to set the parameter is likely a configuration subcommand. Items that are set once for the
entire router are likely global commands. For instance, the hostname command is a global
command because there is only one host name per router. The interface ethernet 0 command
is a global configuration command because there is only one such interface in this router.
Finally, the ip address command is an interface subcommand that sets the IP address on the
interface; each interface will have a different IP address.
Use Ctrl-z from any part of configuration mode (or use the exit command from global
configuration mode) to exit configuration mode and return to privileged exec mode. The
configuration mode end command also exits from any point in the configuration mode back to
privileged exec mode. The exit commands from submodes or contexts of configuration mode
back up one level toward global configuration mode.

Example Configuration Process


Example 2-1 illustrates how the console password is defined; provides banner, host name,
prompt, and interface descriptions; and shows the finished configuration. The lines beginning
with “!” are comment lines that highlight significant processes or command lines within the
example. The show running-config command output also includes comment lines with just a
“!” to make the output more readable—many comment lines in the examples in this book were
added to explain the meaning of the configuration. You should remember the process as well as
these particular commands for the CCNA exam.
02 CCNA Exam_Ch 02.fm Page 41 Thursday, March 7, 2002 11:44 AM

Configuring Cisco IOS Software 41

Example 2-1 Configuration Process Example


User Access Verification

Password:
Router>enable
Password:
Router #configure terminal
Router(config)#enable password lu
Router(config)#line console 0
Router(config-line)#login
Router(config-line)#password cisco
Router(config-line)#hostname Critter
Critter(config)#prompt Emma
Emma(config)#interface serial 1
Emma(config-if)#description this is the link to Albuquerque
Emma(config-if)#exit
Emma(config)#exit
Emma#
Emma#show running-config
Building configuration...

Current configuration:
!
version 12.2 934 bytes
! Version of IOS on router, automatic command

service timestamps debug uptime


service timestamps log uptime
no service password-encryption
!
hostname Critter
prompt Emma
!
enable password lu
!
ip subnet-zero
no ip domain-lookup
!
interface Serial0
!
interface Serial1
description this is the link to Albuquerque
!
interface Ethernet0
!
ip classless
no ip http server
line con 0
password cisco

continues
02 CCNA Exam_Ch 02.fm Page 42 Thursday, March 7, 2002 11:44 AM

42 Chapter 2: Cisco IOS Software Fundamentals

Example 2-1 Configuration Process Example (Continued)


login
!
line aux 0
line vty 0 4
!
end

Several differences exist between user and privileged mode, compared to configuration mode.
The configure terminal command is used to move into configuration mode. The command
prompt changes based on the configuration subcommand mode that you are in. Plus, typing a ?
in configuration mode gives you help just on configuration commands.
When you change from one configuration mode to another, the prompt changes. Example 2-2
repeats the same example as in Example 2-1, but with annotations for what is happening.
Example 2-2 Configuration Process with Annotations
User Access Verification

Password:
Router>enable
!In user mode, then you type the enable command
Password:
Router #configure terminal
!In privileged mode, using the configure terminal command to enter global
Router(config)#enable password lu
!The enable password command is a global command – so the prompt stays as a global
command prompt
Router(config)#line console 0
!line console changes the context to console line configuration mode
Router(config-line)#login
!login is a console subcommand, so the prompt remains the same
Router(config-line)#password cisco
!password is also a console sub-command
Router(config-line)#hostname Critter
!hostname is a global command, so it is used, and the mode changes back to global
config mode
Critter(config)#prompt Emma
!prompt is a global command, so the prompt stays as a global command mode prompt
Emma(config)#interface serial 1
!interface changes contexts to interface subcommand mode
Emma(config-if)#description link to Albuquerque
!description is a sub-command in interface config mode, so prompt stays the same
Emma(config-if)#exit
!exit backs up one mode towards global
Emma(config)#exit
!exit in global mode exits back to privileged mode
02 CCNA Exam_Ch 02.fm Page 43 Thursday, March 7, 2002 11:44 AM

Configuring Cisco IOS Software 43

Router Memory, Processors, and Interfaces


The configuration file contains the configuration commands that you have typed, as well as
some configuration commands entered by default by the router. The configuration file can be
stored in a variety of places, including two inside a router. The router has a couple of other types
of memory as well:
• RAM—Sometimes called DRAM for dynamic random-access memory, RAM is used by
the router just as it is used by any other computer: for working storage. The running or
active configuration file is stored here.
• ROM—This type of memory (read-only memory) stores a bootable IOS image, which is
not typically used for normal operation. ROM contains the code that is used to boot the
router until the router knows where to get the full IOS image, or as a backup bootable
image in case there are problems.
• Flash memory—Either an EEPROM or a PCMCIA card, Flash memory stores fully
functional IOS images and is the default location where the router gets its IOS at boot
time. Flash memory also can be used to store configuration files on some Cisco routers.
• NVRAM—Nonvolatile RAM stores the initial or startup configuration file.
All these types of memory, except RAM, are permanent memory. No hard disk or diskette
storage exists on Cisco routers. Figure 2-6 summarizes the use of memory in Cisco routers.

Figure 2-6 Cisco Router Memory Types

RAM Flash ROM NVRAM


(Working (Cisco IOS (Basic Cisco (Startup
memory and Software) IOS Software) configuration)
running
configuration)

The processors in the routers vary from model to model. Although knowledge of them is not
specifically listed as a requirement for the CCNA exam, some reference to terminology is
useful. In most routers, only one processor option is available; thus, you would not order a
specific processor type or card. The exception to this is the 7200 and 7500 families of routers.
For instance, on the 7500 series, you choose either a Route Switch Processor 1 (RSP-1), RSP-
2, or RSP-4 processor. In any case, all 7200 and 7500 routers, as well as most of the other Cisco
router families, run IOS. This commonality enables Cisco to formulate exams, such as CCNA,
that cover the IOS features without having to cover many hardware details.
The terminology used to describe the physical interfaces used for routing packets and bridging
frames varies based on the model of router. Also, the types of interfaces available change over
time because of new technology. For example, Packet over SONET and voice interfaces are
relatively recent additions to the product line. However, some confusion exists about what to
call the actual cards that house the physical interfaces. Table 2-5 summarizes the terminology
that might be referred to on the test.
02 CCNA Exam_Ch 02.fm Page 44 Thursday, March 7, 2002 11:44 AM

44 Chapter 2: Cisco IOS Software Fundamentals

Table 2-5 Samples of Router Interface Terminology

What Cisco IOS


Software Calls What the Product Catalog Calls the Cards with
Model Series Interfaces the Interfaces on Them

2500 Interface Modules and WAN interface cards

2600/3600 Interface Network modules and WAN interface cards

4500 Interface Network processor modules

7200 Interface Port adapters and service adapters

7500 Interface Interface processors and versatile interface processors


with port adapters

But there is hope! Cisco IOS Software always uses the term interfaces rather than any of the
other terms, so IOS commands familiar on one platform will be familiar on another. Some
nuances are involved in numbering the interfaces, however. In some smaller routers, the
interface number is a single number. However, with some other families of routers, the interface
is numbered first with the slot in which the card resides, followed by a slash and then the port
number on that card. For example, port 3 on the card in slot 2 would be interface 2/3.
Numbering starts with 0 for card slots and 0 for ports on any card. In some cases, the interface
is defined by three numbers: first the card slot, then the daughter card (typically called a port
adapter), and then a number for the physical interface on the port adapter. The 2600 and 3600
families also use a slot/port numbering scheme.
In this book, the single-digit interface numbers are used simply for consistency and readability.
If you want to dig deeper, you might want to read about processors and interfaces in the Cisco
Product Catalog (http://www.cisco.com/univercd/cc/td/doc/pcat/).

Managing Configuration Files


The CCNA exam requires that you be able to distinguish between the configuration file used at
startup and the active, running configuration file. The startup configuration file is in NVRAM;
the other file, which is in RAM, is the one that the router uses during operation. When the router
first comes up, the router copies the stored configuration file from NVRAM into RAM, so the
running and startup configuration files are identical at that point. Also, exterior to the router,
configuration files can be stored as ASCII text files anywhere using TFTP or FTP.
Example 2-3 demonstrates the basic interaction between the two files. In this example, the show
running-config and show startup-config commands are used. These commands display the
currently used, active, running configuration, and the stored, startup configuration used when
the router boots, respectively. The full command output is not shown; instead, you can see only
a brief excerpt including the host command, which will be changed several times. (Notes are
included inside the example that would not appear if doing these commands on a real router.)
02 CCNA Exam_Ch 02.fm Page 45 Thursday, March 7, 2002 11:44 AM

Configuring Cisco IOS Software 45

Example 2-3 Configuration Process Example


hannah#show running-config
… (lines omitted)
hostname hannah
… (rest of lines omitted)

hannah#show startup-config
… (lines omitted)
hostname hannah
… (rest of lines omitted)
hannah#configure terminal
hannah(config)#hostname jessie
jessie(config)#exit
jessie#show running-config
… (lines omitted)
hostname jessie
… (rest of lines omitted – notice that the running configuration reflects the
changed hostname)
jessie# show startup-config
… (lines omitted)
hostname hannah
… (rest of lines omitted – notice that the changed configuration is not shown
in the startup config)

If you reload the router now, the host name would revert back to hannah. However, if you want
to keep the changed host name of jessie, you would use the command copy running-config
startup-config, which overwrites the current startup-config file with what is currently in the
running configuration file.
The copy command can be used to copy files in a router, most typically a configuration file, or
a new version of the IOS Software. The most basic method for moving configuration files in
and out of a router is by using a TFTP server. The copy command is used to move configuration
files among RAM, NVRAM, and a TFTP server. The files can be copied between any pair, as
Figure 2-7 illustrates.

Figure 2-7 Locations for Copying and Results from Copy Operations

copy tftp running-config copy running-config startup-config

RAM NVRAM
TFTP
copy running-config tftp copy startup-config running-config

copy tftp startup-config

copy startup-config tftp


02 CCNA Exam_Ch 02.fm Page 46 Thursday, March 7, 2002 11:44 AM

46 Chapter 2: Cisco IOS Software Fundamentals

The commands can be summarized as follows:


copy {tftp | running-config | startup-config} {tftp | running-config | startup-config}

The first parameter is the “from” location; the next one is the “to” location. (Of course, choosing
the same option for both parameters is not allowed.)
The copy command does not always replace the existing file that it is copying. Any copy
command option moving a file into NVRAM or a TFTP server replaces the existing file—that’s
the easy, straightforward action. Effectively, any copy into RAM works just as if you typed the
commands in the “from” configuration file in the order listed in the config file.
So, who cares? Well, we do. If you change the running config and then decide that you want to
revert to what’s in the startup-config file, the only way to guarantee that is to issue the reload
command, which reloads, or reboots, the router.
Two key commands can be used to erase the contents of NVRAM. The write erase command
is the older command, and the erase startup-config command is the newer command. Both
simply erase the contents of the NVRAM configuration file. Of course, if the router is reloaded
at this point, there will be no initial configuration.

Viewing the Configuration and Old-Style Configuration Commands


Once upon a time, commands that were used to display and move configuration files among
RAM, NVRAM, and TFTP did not use easy-to-recall parameters such as startup-config
and running-config. In fact, most people could not remember the commands or got the
different ones confused. Figure 2-8 shows both the old and the new commands used to
view configurations.

Figure 2-8 Configuration show Commands

RAM show ru
rm nning-c
write te (active) onfig
show onfig
config tartup-c
show s
old NVRAM new

Initial Configuration (Setup Mode)


Setup mode leads a router administrator to a basic router configuration by using questions that
prompt the administrator for basic configuration parameters. Instead of using setup mode, a
Cisco router can be configured using the CLI in configuration mode. In fact, most networking
personnel do not use setup at all, but new users sometimes like to use setup mode, particularly
until they become more familiar with the CLI configuration mode.
02 CCNA Exam_Ch 02.fm Page 47 Thursday, March 7, 2002 11:44 AM

Configuring Cisco IOS Software 47

NOTE If you plan to work with Cisco routers much, you should become accustomed with the CLI
configuration mode discussed earlier. Setup mode allows only basic configuration. Both topics
are covered on the CCNA exam.

Figure 2-9 and Example 2-4 describe the process used by setup mode. Setup mode is most
frequently used when the router boots, and it has no configuration in NVRAM. Setup mode also
can be entered by using the setup command from privileged mode.

Figure 2-9 Getting into Setup Mode

Turn on router

Is NVRAM No Copy startup-config to


empty? running-config

Yes

Do you
want to No Complete IOS
enter setup initialization
mode?

Yes
Move new
Answer the questions configuration
in setup mode into NVRAM

Example 2-4 shows a screen capture of using setup mode after booting a router with no
configuration in NVRAM.
Example 2-4 Router Setup Configuration Mode
--- System Configuration Dialog ---

Would you like to enter the initial configuration dialog? [yes/no]: yes
At any point you may enter a question mark '?' for help.
Use ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets '[]'.Basic management setup configures
only enough connectivity

continues
02 CCNA Exam_Ch 02.fm Page 48 Thursday, March 7, 2002 11:44 AM

48 Chapter 2: Cisco IOS Software Fundamentals

Example 2-4 Router Setup Configuration Mode (Continued)


for management of the system, extended setup will ask you
to configure each interface on the system

Would you like to enter basic management setup? [yes/no]: no


First, would you like to see the current interface summary? [yes]:
Any interface listed with OK? value "NO" does not have a valid configuration

Interface IP-Address OK? Method Status Protocol


Ethernet0 unassigned NO unset up down
Serial0 unassigned NO unset down down
Serial1 unassigned NO unset down down

Configuring global parameters:

Enter host name [Router]: R1 The enable secret is a password used to protect
access to
privileged EXEC and configuration modes. This password, after
entered, becomes encrypted in the configuration.
Enter enable secret: cisco
The enable password is used when you do not specify an
enable secret password, with some older software versions, and
some boot images.
Enter enable password: fred
The virtual terminal password is used to protect
access to the router over a network interface.
Enter virtual terminal password: barney
Configure SNMP Network Management? [yes]: no
Configure bridging? [no]:
Configure DECnet? [no]:
Configure AppleTalk? [no]:
Configure IPX? [no]:
Configure IP? [yes]:
Configure IGRP routing? [yes]:
Your IGRP autonomous system number [1]:
Configuring interface parameters:
Do you want to configure Ethernet0 interface? [yes]:
Configure IP on this interface? [yes]:
IP address for this interface: 172.16.1.1
Subnet mask for this interface [255.255.0.0] : 255.255.255.0
Class B network is 172.16.0.0, 24 subnet bits; mask is /24
Do you want to configure Serial0 interface? [yes]:
Configure IP on this interface? [yes]:
Configure IP unnumbered on this interface? [no]:
IP address for this interface: 172.16.12.1
Subnet mask for this interface [255.255.0.0] : 255.255.255.0
Class B network is 172.16.0.0, 24 subnet bits; mask is /24
Do you want to configure Serial1 interface? [yes]:
Configure IP on this interface? [yes]:
Configure IP unnumbered on this interface? [no]:
IP address for this interface: 172.16.13.1
Subnet mask for this interface [255.255.0.0] : 255.255.255.0
Class B network is 172.16.0.0, 24 subnet bits; mask is /24
02 CCNA Exam_Ch 02.fm Page 49 Thursday, March 7, 2002 11:44 AM

Configuring Cisco IOS Software 49

Example 2-4 Router Setup Configuration Mode (Continued)


The following configuration command script was created:

hostname R1
enable secret 5 $1$VOLh$pkIe0Xjx2sgjgZ/Y6Gt1s.
enable password fred
line vty 0 4
password barney
no snmp-server
!
no bridge 1
no decnet routing
no appletalk routing
no ipx routing
ip routing
!
interface Ethernet0
ip address 172.16.1.1 255.255.255.0
no mop enabled
!
interface Serial0
ip address 172.16.12.1 255.255.255.0
no mop enabled
!
interface Serial1
ip address 172.16.13.1 255.255.255.0
no mop enabled
dialer-list 1 protocol ip permit
dialer-list 1 protocol ipx permit
!
router igrp 1
redistribute connected
network 172.16.0.0
!
end

[0] Go to the IOS command prompt without saving this config.


[1] Return back to the setup without saving this config.
[2] Save this configuration to nvram and exit.

Enter your selection [2]: 2


Building configuration...
[OK]Use the enabled mode 'configure' command to modify this configuration.
Press RETURN to get started!

Setup behaves like Example 2-2 illustrates, whether setup was reached by booting with an
empty NVRAM or whether the setup privileged exec command was used. First, the router asks
whether you want to enter the “initial configuration dialog.” Answering y or yes puts you in
setup mode.
02 CCNA Exam_Ch 02.fm Page 50 Thursday, March 7, 2002 11:44 AM

50 Chapter 2: Cisco IOS Software Fundamentals

When you are finished with setup, you select one of three options for what to do next. Option
2 tells the router to save the configuration to NVRAM and exit; this option is used in Example
2-4. The router places the config in both NVRAM and RAM. This is the only operation in the
IOS that changes both configuration files to include the same contents based on a single action
by the user. Options 0 and 1 tell the router to ignore the configuration that you just entered and
to either exit to the command prompt (option 1) or start over gain with setup (option 1).

Upgrading Cisco IOS Software and the Cisco IOS


Software Boot Process

50 List the commands to load Cisco IOS Software from: Flash memory, a TFTP
server, or ROM.

51 Prepare to back up, upgrade, and load a backup Cisco IOS Software
image.

Engineers need to know how to upgrade the IOS to move to a later release. Typically, a router
has one IOS image in Flash memory, and that is the IOS that is used. (The term IOS image
simply refers to a file containing the IOS.) The upgrade process might include steps such as
copying a newer IOS image into Flash memory, configuring the router to tell it which IOS
image to use, and deleting the old one when you are confident that the new release works well.
A router decides what IOS image to use when the router boots. Also, to upgrade to a new IOS
or back out to an older IOS, you must reload the router. So, it’s a convenient time to cover the
boot sequence and some of the related issues.
Finally, password recovery is covered in this section. Password recovery is less likely to be on
the CCNA exam than some other topics, but, guess what—it requires a reboot of the router, so
now is a good time to cover it.

Upgrading an IOS Image into Flash Memory


IOS files typically are stored in Flash memory. Flash memory is rewriteable, permanent storage,
which is ideal for storing files that need to be retained when the router loses power. Also,
because there are no moving parts, there is a smaller chance of failure as compared with disk
drives, which provides better availability. As you will read soon, IOS can be placed on an
external TFTP server, but using an external server typically is done for testing—in production,
practically every Cisco router loads an IOS stored in the only type of large, permanent memory,
and that is Flash memory.

You might also like