Logging into the Router 569
Screen output varies, depending on Cisco IOS Software level and router configuration.
Router Help Functions
Suppose that a user wants to set the router clock. If the necessary command is not
known, that user can use the help function to check the syntax for setting the clock.
The following exercise illustrates one of the many uses of the help function. The task is
to set the router clock. Assuming that the command is not known, proceed using the
following steps:
Step 1 Use ? to find the command for setting the clock. The help output shows
that the clock command is required.
Step 2 Check the syntax for changing the time.
Step 3 Enter the current time by using hours, minutes, and seconds, as shown.
The system indicates that additional information needs to be provided to
complete the command. The help output in Example 11-12 shows that
the set keyword is required.
debug Debugging functions (see also 'undebug')
delete Delete a file
dir List files on a filesystem
disable Turn off privileged commands
disconnect Disconnect an existing network connection
elog Event-logging control commands
enable Turn on privileged commands
erase Erase a filesystem
exit Exit from the EXEC
help Description of the interactive help system
More
Example 11-12 Clock set Keyword
Cisco# clok
Translating "clok" domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address
continues
Example 11-11 Privileged EXEC Mode Commands (Continued)
1102.book Page 569 Tuesday, May 20, 2003 2:53 PM
570 Chapter 11: Router Fundamentals
Step 4 Check the syntax for entering the time, and enter the current time using
hours, minutes, and seconds. As shown in Example 11-13, the system again
indicates that additional information is required to complete the command.
Cisco# cl?
clear clock
Cisco# clock
% Incomplete command.
Cisco# clock ?
set Set the time and date
Cisco# clock set
% Incomplete command.
Cisco# clock set ?
hh:mm:ss Current Time
Example 11-13 Clock Time and Date Set Format
Cisco# clock set 19:50:00
% Incomplete command.
Cisco# clock set 19:50:00 ?
<1-31> Day of the month
MONTH Month of the year
Cisco# clock set 19:50:00 14 7
^
% Invalid input detected at '^' marker.
Cisco# clock set 19:50:00 14 July
% Incomplete command.
Cisco# clock set 19:50:00 14 July ?
<1993-2035> Year
Example 11-12 Clock set Keyword (Continued)
1102.book Page 570 Tuesday, May 20, 2003 2:53 PM
Cisco IOS Software Editing Commands 571
Step 5 Press Ctrl + P or the up arrow to repeat the previous command entry
automatically. Then add a space and a question mark (?) to reveal the
additional arguments. Now the command entry can be completed.
Step 6 The caret symbol (^) and help response indicate that there is an error.
The placement of the caret symbol shows where the possible problem
is located. To input the correct syntax, re-enter the command up to the
point where the caret symbol is located, and then enter a question mark (?).
Step 7 Enter the year, using the correct syntax, and press Enter to execute the
command.
The user interface provides syntax checking by placing a ^ where the error occurred.
The ^ appears at the point in the command string where an incorrect command, key-
word, or argument was entered. The error location indicator and interactive help system
enable syntax errors to be found and easily corrected.
Cisco IOS Software Editing Commands
The user interface includes an enhanced editing mode that provides a set of editing
key functions with which the user can edit a command line as it is being typed. Use
the key sequences indicated in Table 11-2 to move the cursor at the command line for
corrections or changes. Although enhanced editing mode automatically is enabled with
the current software release, it can be disabled if written scripts do not interact well
while enhanced editing is enabled. To disable enhanced editing mode, type terminal no
editing at the privileged EXEC mode prompt.
Cisco# clock set 19:50:00 14 July 2003
Cisco#
Table 11-2 Editing Commands
Command Description
Ctrl + a Moves to the beginning of the command line
Ctrl + e Moves to the end of the command line
continues
Example 11-13 Clock Time and Date Set Format (Continued)
1102.book Page 571 Tuesday, May 20, 2003 2:53 PM
572 Chapter 11: Router Fundamentals
The editing command set provides a horizontal scrolling feature for commands that
extend beyond a single line on the screen. When the cursor reaches the right margin,
the command line shifts ten spaces to the left. The first ten characters of the line cannot
be seen, but a user can scroll back and check the syntax at the beginning of the com-
mand. To scroll back, press Ctrl+ b or the left arrow key repeatedly until the beginning
of the command entry is reached. Ctrl + a returns a user directly to the beginning of
the line.
In Example 11-14, the command entry extends beyond one line. When the cursor first
reaches the end of the line, the line is shifted ten spaces to the left and is redisplayed.
The dollar sign ($) indicates that the line has been scrolled to the left. Each time the
cursor reaches the end of the line, the line again is shifted ten spaces to the left.
Screen output varies, depending on the Cisco IOS Software level and router configuration.
The Ctrl + z command backs out of configuration mode. This command returns the
user to the privileged EXEC mode prompt.
Router Command History
The user interface provides a history, or record, of commands that have been entered.
This feature is particularly useful for recalling long or complex commands or entries.
With the command history feature, the following tasks can be completed:
■ Set the command history buffer size
■ Recall commands
■ Disable the command history feature
Esc + b Moves back one word
Ctrl + f Moves forward one character
Ctrl + b Moves back one character
Esc+ f Moves forward one word
Example 11-14 Extension of Command Entry
Cisco>$ value for our customers, employees, investors, and partners
Table 11-2 Editing Commands (Continued)
Command Description
1102.book Page 572 Tuesday, May 20, 2003 2:53 PM
Router Command History 573
By default, the command history is enabled and the system records ten command lines
in its history buffer. To change the number of command lines that the system records
during a terminal session, use the terminal history size or the history size commands.
The maximum number of commands is 256. Table 11-3 shows command history
commands.
To recall commands in the history buffer, beginning with the most recent command,
press Ctrl + p. Continue to press Ctrl + p or the up arrow key to recall successively
older commands. To return to more recent commands in the history buffer, after using
the Ctrl + p or the up arrow, press Ctrl + n or the down arrow key repeatedly to recall
successively more recent commands.
When typing commands, as a shortcut, you can enter the unique characters for a com-
mand. Press the Tab key, and the interface finishes the entry. When the typed letters
uniquely identify the command, the Tab key simply acknowledges visually that the
router has understood the specific command that was intended.
On most computers, additional select and copy functions are available. A previous
command string can be copied and then pasted or inserted as the current command
entry.
Table 11-3 Router Command History
Command Description
Ctrl + p This key sequence or the up arrow key
recalls the last (previous) command
Ctrl + n This key sequence or the down arrow key
recalls the most recent command
show history Displays the command buffer
terminal history [size numberof-lines] Sets the command buffer size
terminal no editing Disables advanced editing features
Router> terminal editing Re-enables advanced editing features
Tab Completes the entry
1102.book Page 573 Tuesday, May 20, 2003 2:53 PM
574 Chapter 11: Router Fundamentals
Cisco IOS Software Fundamentals
Like any computer, a router or switch cannot function without an operating system.
Cisco calls its operating system the Cisco Internetwork Operating System, or Cisco
IOS Software. It is the embedded software architecture in almost all of the Cisco routers
and Catalyst switches. Some Catalyst switches use a Cisco command-line interface
(CLI). A router does not become functional until it loads Cisco IOS Software. Without
an operating system, the hardware has no capability. Cisco IOS Software provides the
following network services:
■ Basic routing and switching functions
■ Reliable and secure access to networked resources
■ Network scalability
Operation of Cisco IOS Software
Cisco IOS Software devices have three distinct operating environments or modes:
■ ROM monitor
■ Boot ROM
■ Cisco IOS
The startup process of the router normally loads into RAM and performs in one of
these operating environments. The configuration register setting can be used by system
administrators to control which of these modes is used by the router to load.
The ROM monitor performs the bootstrap process and provides low-level functionality
and diagnostics. The ROM monitor is used to recover from system failures and to
recover a lost password. The ROM monitor cannot be accessed through any of the
network interfaces, but only through a console port session.
When the router is running in boot ROM mode, only a limited subset of the Cisco IOS
Software feature set is available. Boot ROM allows write operations to Flash memory
and is used primarily to replace the Cisco IOS Software image that is stored in Flash
Lab Activity Command Line Fundamentals
In this lab, you log into a router in both user and privilege modes. You use
several basic router commands to determine how the router is configured. You
also become familiar with the router help facility and use the command history
and editing features.
1102.book Page 574 Tuesday, May 20, 2003 2:53 PM
Cisco IOS Software Fundamentals 575
memory. The Cisco IOS Software image can be modified in boot ROM mode by using
the copy tftp flash command, which copies an IOS image stored on a TFTP server into
the Flash memory of the router.
The normal operation of a router requires the full Cisco IOS Software image from
Flash memory. In some devices, the IOS is performed directly from Flash. However,
most Cisco routers require a copy of the Cisco IOS Software image to be loaded into
RAM and also executed from RAM. Some Cisco IOS Software images are stored in
Flash in a compressed format and must be expanded when copied to RAM.
To see the Cisco IOS Software image and version that is running, use the show version
command, which also indicates the configuration register setting. The show flash com-
mand in Example 11-15 verifies that the system has sufficient memory to load a new
Cisco IOS Software image.
Cisco IOS Software Features
Cisco provides Cisco IOS Software images for devices spanning a wide range of net-
work product platforms. To optimize the Cisco IOS Software required by various
product platforms, Cisco is working to develop many different Cisco IOS Software
images. Each image represents a different feature set that serves the various device
platforms, available memory resources, and customers’ needs.
Numerous Cisco IOS Software images exist for different Cisco device models and
feature sets. However, the basic configuration command structure is the same. The
configuration and troubleshooting skills acquired on any one device apply across a
wide range of products.
The naming convention for the different Cisco IOS Software releases contains three parts:
■ The platform on which the image runs
■ The special capabilities supported in the image
■ Where the image runs and whether it has been zipped or compressed
Example 11-15 Verifying the Cisco IOS Software Image
Cisco> show flash
System flash directory:
File Length Name/status
1 8022152 /c2500-i-l.121-16.bin
[8022216 bytes used, 366392 available, 8388608 total]
8192K bytes of processor board System flash (Read ONLY)
1102.book Page 575 Tuesday, May 20, 2003 2:53 PM
576 Chapter 11: Router Fundamentals
This material is covered in more detail in Chapter 14, “Managing Cisco IOS Software.”
The Cisco IOS Software naming conventions, image content, and other details are
subject to change.
After choosing the options that meet the network requirements, select a Cisco IOS
Software release that is supported by the hardware. The software requirements of each
device are listed in the “Cisco Product Documentation” section of the Documentation
CD. The Cisco Software Advisor is an interactive tool that provides the most current
information.
One of the main considerations when selecting a new IOS image is that it is compatible
with the router flash and RAM memory. In general, the newer the release is and the
more features it provides, the more memory it requires. Use the show version com-
mand, as shown in Example 11-13, from the Cisco device to check the current image
and available Flash memory. The Cisco support site has tools available to help determine
the amount of Flash memory and RAM required for each image.
Before installing a new Cisco IOS Software image on the router, check to see if the
router meets the memory requirements for that image. To see the amount of RAM,
issue the show version command and look for the following output in Example 11-16.
The highlighted line shows how much main and shared memory is installed in the
router. Some platforms use a fraction of dynamic RAM (DRAM) as shared memory.
The memory requirements take this into account, so both numbers must be added to
determine the amount of DRAM installed on the router.
To determine the amount of free Flash memory, issue the show flash command, as
shown in Example 11-17.
Example 11-16 show version Command Output
Cisco> show version
Cisco Internetwork Operating System Software
output omitted
image file is "flash:/c2500-i-l.121-16.bin"
cisco 2600 (68030) processor (revision N) with 6144K/2048K bytes of memory.
chpt_11.fm Page 576 Wednesday, May 28, 2003 10:21 AM
Cisco IOS Software Fundamentals 577
The show version Command
The show version command displays information about the Cisco IOS Software version
that currently is running on the router. This includes the configuration register and the
boot field setting.
■ Cisco IOS Software version and descriptive information
■ Bootstrap ROM version
■ Boot ROM version
■ Router up time
■ Last restart method
■ System image file and location
■ Router platform
■ Configuration register setting
Router User Interface
Recall that the Cisco IOS Software uses a command-line interface (CLI) as its tradi-
tional console environment. Cisco IOS Software is a core technology that extends
across most of the Cisco product line. Its operation details vary, depending upon the
internetworking device using it.
This CLI environment is accessible through several methods:
■ Through a console session. A console uses a low-speed serial connection directly
from a computer or terminal to the console connection on the router. This method
does not require the configuration of network services on the router.
■ Through a dialup connection by using a modem or a null modem connected to
the router AUX port. This method does not require the configuration of network
services on the router, either.
Example 11-17 show flash Command Output
Cisco> show flash
System flash directory:
File Length Name/status
1 8022152 /c2500-i-l.121-16.bin
[8022216 bytes used, 366392 available, 8388608 total]
8192K bytes of processor board System flash (Read ONLY)
1102.book Page 577 Tuesday, May 20, 2003 2:53 PM
578 Chapter 11: Router Fundamentals
■ Through a Telnet connection to the router as a virtual terminal. To establish a
Telnet session to the router, at least one interface must be configured for IP. Virtual
terminal sessions also must be configured for login and passwords.
Router User Interface and Modes
The Cisco CLI uses a hierarchical structure. This structure requires entry into different
modes to accomplish particular tasks. For example, interface configuration mode must
be entered to configure a router interface. From interface configuration mode, all con-
figurations entered apply only to that particular interface. Each command mode is
indicated with a distinctive prompt and allows only commands that are appropriate
for that mode.
Cisco IOS Software provides a command interpreter service known as the command
executive (EXEC). After each command is entered, the EXEC validates and executes
the command.
As a security feature, Cisco IOS Software separates the EXEC sessions into two access
levels. These levels are user EXEC mode and privileged EXEC mode, which is also
known as enable mode.
User EXEC mode allows only a limited number of basic monitoring commands. This
often is referred to as a view-only mode. The user EXEC level does not allow any com-
mands that could change the configuration of the router. The user EXEC mode can be
identified by the > prompt.
Privileged EXEC mode provides access to all router commands. Privileged EXEC mode
can be protected by requiring a user ID and a password. This mode allows only autho-
rized users to access the router. Configuration and management commands require
that the network administrator be at the privileged EXEC level. Global configuration
mode and all other more specific configuration modes can be reached only from privi-
leged EXEC mode. Privileged EXEC mode can be identified on the CLI session by the
# prompt.
To access the privileged EXEC level from the user EXEC level, enter the enable com-
mand at the > prompt. If a password is configured, the router asks for a password at
this point. For security reasons, a Cisco network device will not show the password
that is entered. When the correct password is entered, the router prompt changes to #,
indicating that the user is now at the privileged EXEC level. Entering a question mark
(?) at the privileged EXEC level reveals many more command options than those avail-
able at the user EXEC level.
1102.book Page 578 Tuesday, May 20, 2003 2:53 PM