NET 222: Introduction to Routers and Routing
Chapter 4: Introduction to the Cisco IOS
This chapter begins the discussion of using router commands. The objectives
important to this chapter are:
- Configuring IP addresses, subnet masks, and gateway addresses on
routers and hosts
- Configuring a router for additional administrative functionality
- Implement a LAN
- Perform an initial configuration on a router
- Perform an initial configuration on a switch
Concepts: Part 1
It should be observed that you can practice the router commands in the
chapter by using the virtual labs in the Sybex CCNA Gold software on the
second CD that comes with this textbook. Once installed, you will have
a desktop icon that looks like this:
- Start the program, and click Go To Network Visualizer.
- To go through a lab in the text, first find a device that has
the features the lab requires. For example, lab 4.1 requires a router
that has ports E0 and S0. An image from the simulator
Three of the four router images above would work for this problem. Only
the one on the left does not have the desired feature set.
- Click the device you choose, and you enter the router console
simulator. From there, you can enter the various commands discussed
in the labs.
In the classroom, you will use the hyperterminal program to connect to
the routers we have. Review the material in chapter 1 about making this
kind of connection.
The text tells us that the Cisco IOS is the Cisco Internetwork
Operating System. It runs on most Cisco routers, and about half of
the Cisco switches you may encounter.
The chapter discusses several methods of connecting a PC to a Cisco router,
depending on the model of the router. A model 2501 router will
typically have two RJ-45 ports that may be used with a rollover
cable: the console port and the auxiliary (AUX) port. They
are equivalent ports, so you may use either one, but the auxiliary port
may also be used with a modem, which would allow you to make a telephone
connection to a remote router that is not accessible from the network.
If a router is not available on the network, it is "out-of-band"
or "out-of-the-network". If it is available on the network,
it is "in-band". The illustration in the text shows that a 2501
router may also have two serial interfaces and an AUI (Attachment
Unit Interface) for connecting to an Ethernet network.
The illustration of a 2600 router shows the same RJ-45 ports,
plus another called Ethernet 0/0. The serial ports are not
When a router is powered up, like most computer equipment, it performs
a POST: Power On Self Test. The router will then look for a copy
of an operating system to load, first in flash memory, then
in nonvolatile RAM (NVRAM). The 2600 router loads the IOS
into RAM and runs it there. The 2501 router runs the IOS
from flash memory.
Once the IOS is running, the router will look for a configuration file
in NVRAM and load it if it is present. System documentation may refer
to this configuration set as the backup configuration. If there is no
configuration file, the router goes into setup mode. You can also
mode from the privileged mode command line (described later in
the chapter). You can exit setup mode by pressing ctrl-Z.
There are actually two setup modes: Basic Management and Extended
- As setup mode begins, you asked if you want to enter the initial
configuration dialog. If you enter Y (for Yes) you are asked
- The next question asks whether you want to enter basic management
setup. If you enter Y, that's what happens, but if you enter
N, you enter extended setup.
In addition to using the two setup modes to configure the router, you
can enter a series of commands from two command lines modes.
- The basic user mode will present a prompt like Router>.
This mode is used for checking status of the router.
- The privileged command mode will present a prompt like Router#.
This mode is used for configuring and changing the router. As part
of the Setup sequence you are asked to establish two passwords:
the enable secret password and the enable password. The
enable password is only used for legacy servers. The enable
secret password is the one you will use to protect access to privileged command mode.
- To change from the user mode to privileged mode, use the command
- To change from privileged mode to user mode, use the command disable.
- To set the enable secret password, use the command enable
secret password. Note that this is three
words on the command line, the
third one being the new password.
- To begin configuration from the command line, change to privileged
mode, then enter the command config. To leave configuration,
Each command prompt provides different possible commands.
You may want to browse the available commands at each prompt.
- To see available commands that start with a particular letter,
enter that letter, followed by a question mark.
- To see required syntax and options for a specific command,
enter that command followed by a space and a question mark.
- Some commands require a series of parameters.
- Enter the command followed by a question mark, to
see the first parameter.
- Enter the command and the first parameter, followed
by a question mark, to see the next parameter.
- Continue this pattern until you see <cr> as the offered
final parameter. This means you may enter the offered command series
and press the enter key.
- Like commands on a UNIX system, you do not have to enter
all letters of a command, only enough letters to identify
the command from all other commands that start with the same letters.
- Once a command has been entered on a command line, you can use the
arrow keys to scroll up and down through your command history.
The text offers some useful commands:
- show history - shows the last ten commands entered
- show version - shows the IOS version, how long the router has been
running, the ROM source of the boot files, the source of the IOS files,
and information about the RAM and processor of the router
The text also describes what it calls administrative functions that can
be configured on the router:
- hostnames - The router can be given a name. The text recommends
a name that describes its location or function.
From within the configuration command mode enter the command hostname
followed by a name for the router. This will change subsequent
prompts to show the router name.
- banners - The text describes four banners you can set. A banner
is a message displayed on the terminal of a user when a specific event
happens. The banners/events are:
- Exec - shows when a user begins an exec session
(a connection to the router)
- Incoming - show when a reverse telnet session (started
by the router, going to a terminal) begins
- Login - shows when a user has logged in, after the
- Message of the Day (MOTD) - a message that appears
to any user connecting to the router, before login
- password - The text has already described two passwords. This
section "explains" that those are the two enable
passwords, and that there are three more kinds.
- enable password - for legacy routers
- enable secret - password for the privileged mode on current
- auxiliary password - password for the auxiliary port
- console password - password for the console port. This
port is numbered 0. To set a password for the console port use
this command sequence:
In this sequence, the login command MAY appear after the password command.
- telnet password - password for telnet sessions. To set
a password for all telnet lines (VTY lines 0-4)
use this command sequence:
line vty 0 4
- interface descriptions - while in configuration mode, you can
set descriptions for any of the interfaces. Example: Enter configuration
mode with the command config t. While in configuration mode,
enter int E0, to access the Ethernet 0 interface. Give it a name
by entering description Interface Name.
Changes to the router configuration made from the command line are immediately
in effect. They become part of the running-config. Changes made
to the startup (startup-config) configuration need to be stored
in NVRAM. You can see each of these configurations with the show
- Display the running configuration: show run
- Display the startup configuration: show start
- Erase the startup configuration: erase startup-config
- Save the running configuration as the startup configuration: copy
run start (You must be in config mode to issue this command.)
- Reset the running configuration with the startup configuration: reload
Router interfaces can be shut down, assigned IP addresses, and brought
- Show the status of the Ethernet0 interface: sh int ethernet0
- Enter configuration mode: config t
- Configure Ethernet0 interface: int ethernet0
- Shut down the interface: shutdown
- Assign an IP address and a subnet mask to an interface: ip address
- While configuring the interface, you can assign a second IP
address to the interface using the format of the command above, followed
by the word secondary.
- Bring up the interface: no shutdown
The chapter continues with a discussion of the ping and telnet
commands. We are told that both commands can be used with multiple protocols.
Going back to interfaces, the text tells us that you can examine/verify
the configuration of interfaces with the show command.
- List all interfaces on the router: show interface ?
- Display the configuration and status of an interface: show interface
If the data from the show interface command shows that the interface
or its line protocol are down, this indicates problems.
- Both are up: good
- Line protocol is down: indicates a Data-Link
layer problem, like bad frames.
- Both are down: indicates a Physical layer problem,
like a bad cable or port.
- Interface is administratively down: can be brought
up with the no shutdown command.
Data from the show ip interface command provides data about Network
layer problems. The text recommends using show ip interface brief.
This version of the command shows a table of data, including an OK?
column, and a status column. The values you hope to see in those columns
are YES and up, respectively.
The show protocols command will provide a list of the protocols
in use, the interfaces using them, and the up/down state
of each interface and its line protocol.
The show controllers command can be used to show whether an interface
is attached to a DTE or DCE cable. One reason to know this
is that an interface connected to a DCE cable must provide clocking.
Data Terminal Equipment (DTE) generally means computers or terminals.
DCE can stand for Data Channel Equipment, or Data Circuit-termination
Equipment. It generally means devices that provide access to communication
channels, like modems.