Content Overview Configuring a router
to perform complex internetworking tasks can be challenging.
However, the beginning procedures for configuring a router are
not difficult at all. If these procedures and the steps for
moving between the various modes of the router are practiced,
the more complex configurations will be much less daunting.
This module introduces the basic configuration modes of the
router and provides opportunities to practice simple
configurations. A clear, easy to understand router
configuration that is backed up regularly should be a goal of
all network administrators. The Cisco IOS provides the
administrator several tools to add information to the
configuration file for documentation purposes. Just as a
competent programmer provides documentation for each
programming step, a network administrator must provide as much
information as possible in the event that another person must
assume responsibility for the network. Students completing this
module should be able to: - Name a router
- Set
passwords
- Examine show commands
- Configure a
serial interface
- Configure an Ethernet interface
- Execute changes to a router
- Save changes to
a router
- Configure an interface description
- Configure a message-of-the-day banner
- Configure
host tables
- Understand the importance of backups and
documentation
Content 3.1
Configuring a Router 3.1.1 CLI command
modes All command-line interface (CLI) configuration
changes to a Cisco router are made from the global
configuration mode. Other more specific modes are entered
depending upon the configuration change that is required, but
these specific modes are all subsets of the global
configuration mode. Global configuration mode commands are used
in a router to apply configuration statements that affect the
system as a whole. The following command moves the router into
global configuration mode and allows entry of commands from the
terminal: Note: The prompt changes to indicate that the
router is now in global configuration mode. Router#configure
terminal
Router(config)# Global configuration mode,
often shortened to global config, is the primary configuration
mode. These are just a few of the modes that can be entered
from global configuration mode: - Interface mode
- Line mode
- Router mode
- Subinterface mode
- Controller mode
When these specific modes
are entered, the router prompt changes to indicate the current
configuration mode. Any configuration changes that are made
will apply only to the interfaces or processes covered by the
particular mode. Typing exit from one of these specific
configuration modes will return the router to global
configuration mode. Pressing Ctrl-Z leaves the
configuration modes completely and returns the router to
privileged EXEC mode. Web Links Cisco IOS Interface
Command Reference, Release 12.1 http://www.cisco.com/en/US/
products/sw/ iosswrel/ ps1831/ products_command_reference_
book09186a00800880d1.html
Content 3.1
Configuring a Router 3.1.2 Configuring a router
name A router should be given a unique name as one of the
first configuration tasks. This task is accomplished in global
configuration mode using the following commands:
Router(config)#hostname Tokyo
Tokyo(config)# As soon
as the Enter key is pressed, the prompt changes from the
default host name (Router) to the newly configured host name,
which is Tokyo in the example. Lab Activity Lab
Exercise: Command Modes and Router Identification This lab is
to identify basic router modes of user EXEC and privileged EXEC
and to use commands to enter specific modes. Web Links
Basic System Management Commands
http://www.cisco.com/en/US/products/sw/
iosswrel/ps1835/products_command_reference_
chapter09186a00800ca748.html#1018259
Content
3.1 Configuring a Router 3.1.3
Configuring router passwords Passwords restrict access
to routers. Passwords should always be configured for virtual
terminal lines and the console line. Passwords are also used to
control access to privileged EXEC mode so that only authorized
users may make changes to the configuration file.The following
commands are used to set an optional but recommended password
on the console line: Router(config)#line console 0
Router(config-line)#password
<password>
Router(config-line)#login A password must be set on one
or more of the virtual terminal (VTY) lines for users to gain
remote access to the router using Telnet. Typically Cisco
routers support five VTY lines numbered 0 through 4, although
different hardware platforms support different numbers on VTY
connections. Often the same password is used for all lines but
sometimes one line is set uniquely to provide a fall-back entry
to the router if the other four connections are in use. The
following commands are used to set the password on the VTY
lines: Router(config)#line vty 0 4
Router(config-line)#password
<password>
Router(config-line)#login The enable password and the
enable secret are used to restrict access to the privileged
EXEC mode. The enable password is only used if the enable
secret has not been set. It is recommended that the enable
secret always be set and used because it is encrypted while the
enable password is not encrypted. These are the commands that
are used to set the enable passwords: Router(config)#enable
password <password>
Router(config)#enable secret
<password> Sometimes it is undesirable
for passwords to be shown in clear text in the output from the
show running-config or show startup-config
commands. This command is used to encrypt passwords in
configuration output: Router(config)#service
password-encryption The service password-encryption
command applies a weak encryption to all unencrypted passwords.
The enable secret <password> command uses a strong
MD5 algorithm for encryption. Lab Activity Lab
Exercise: Configuring Router Passwords This lab is to configure
a password for console login to user mode and configure a
password for virtual terminal (Telnet) sessions. Lab
Activity e-Lab Activity: Configuring Router Passwords In
this lab, the student will configure passwords for the console,
virtual terminals, and a secret password. Lab Activity
e-Lab Activity: Command-line Interface Command Modes In this
lab, the students will learn to enter some of the most common
modes the router supports. Web Links Passwords and
Privileges Commands http://www.cisco.com/en/US/products/sw/
iosswrel/ps1835/products_command_reference_
chapter09186a00800ca7cd.html#1017603
Content
3.1 Configuring a Router 3.1.4
Examining the show commands There are many show
commands that can be used to examine the contents of files in
the router and for troubleshooting. In both privileged EXEC and
user EXEC modes, the command show ? provides a list of
available show commands. The list is considerably longer
in privileged EXEC mode than it is in user EXEC mode.
- show interfaces – Displays all the statistics for
all the interfaces on the router. To view the statistics for a
specific interface, enter the show interfaces command
followed by the specific interface and port number. For
example:
Router#show interfaces serial 0/1
- show controllers serial – Displays
information-specific to the interface hardware
- show clock – Shows the time set in the router
- show hosts – Displays a cached list of host names
and addresses
- show users – Displays all users
who are connected to the router
- show history –
Displays a history of commands that have been entered