Module
Overview
14.1 Configure a
Router
14.1.1 CLI command
modes
14.1.2 Configuring
a router name
14.1.3 Configuring
router passwords
14.1.4 Examining
the show commands
14.1.5 Configuring
a serial interface
14.1.6 Making
configuration changes
14.1.7 Configuring
an Ethernet interface
14.2 Finishing the
Configuration
14.2.1 Importance
of configuration standards
14.2.2 Interface
descriptions
14.2.3 Configuring
an interface description
14.2.4 Login
banners
14.2.5 Configuring
message-of-the-day (MOTD)
14.2.6 Host name
resolution
14.2.7 Configuring
host tables
14.2.8
Configuration backup and documentation
14.2.9 Backing up
configuration files
Module: Summary
Overview
The initial steps
that are used to configure a router are not very difficult. If students become
familiar with these steps and learn how to move between the router user modes,
it will be easier to perform complex router configurations. 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 many tools that an administrator
can use to add information to the configuration file for documentation
purposes. A network administrator should provide as much information as
possible in case another person becomes responsible for the network.
This module
covers some of the objectives for the CCNA 640-801, INTRO 640-821, and ICND
640-811 exams. -
Students who
complete this module should be able to perform the following tasks:
- 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
14.1
Configure a Router
14.1.1
CLI command modes
This page will
discuss some features that are available from global configuration mode.
All CLI
configuration changes to a Cisco router are made from global configuration
mode, which is sometimes called global config. Global config is the primary
configuration mode. Specific modes are used for various configuration changes,
but these 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)#
The prompt will
change to indicate that the router is in global configuration mode. Here are 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.
Type exit from
one of the specific modes to return a router to global configuration mode.
Pressing Ctrl-Z leaves the configuration modes completely and returns the
router to privileged EXEC mode.
The next page
will teach students how to configure a router name in global configuration
mode.
14.1
Configure a Router
14.1.2
Configuring a router name
This page will
explain how a router name is configured.
A router should
be given a unique name as one of the first configuration tasks. This task is
accomplished in global configuration mode with the following command:
Router(config)#hostname
Tokyo
Tokyo(config)#
When the Enter
key is pressed, the prompt will change from the default host name, which is
Router, to the newly configured host name, which is Tokyo.
The Lab Activity
will help students identify and access two basic router command modes.
The next page
will show students how to configure router passwords.
14.1
Configure a Router
14.1.3
Configuring router passwords
This page will
explain how router passwords are configured and why they are important.
Passwords
restrict access to routers. Passwords should always be configured for virtual
terminal (vty) 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)#login
Router(config-line)#password
<password >
A password must
be set on one or more of the vty lines for users to gain remote access to a
router through Telnet. Most Cisco routers support five vty lines numbered 0
through 4. Other hardware platforms support different numbers of vty
connections. The same password is generally used for all vty lines. However, a
unique password can be set for one line to provide a fall-back entry to the
router if the other four connections are in use. The following commands are
used to set a password on vty lines:
Router(config)#line
vty 0 4
Router(config-line)#login
Router(config-line)#password
<password >
The enable
password and enable secret commands are used to restrict access to the
privileged EXEC mode. The enable password is only used if the enable secret has
not been set. The enable secret command should be used because the enable
secret command is encrypted. The enable password command is not encrypted. The
following commands are used to set the 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.
The Lab
Activities on this page will help students configure passwords and enter CLI
command modes.
The next page
will examine show commands.
14.1 Configure a Router
14.1.4 Examining the show commands
This page will
introduce some show commands. Many of these commands 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.
Students should
learn the functions of the following commands:
show interfaces –
Displays statistics for all interfaces on a router. To view the statistics for
a specific interface, enter the show interfaces command followed by the
specific interface slot/port number. This is shown in the following example:
Router#show
interfaces serial 0/1
show controllers
serial - Displays information that is specific to the interface hardware. This
command must also include the port or slot/port number of the serial interface.
For example:
Router#show
controllers serial 0/1
- 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
- show flash
- Displays information about flash memory and what IOS files are stored
there
- show version
- Displays information about the currently loaded software version along
with hardware and device information.
- show arp
- Displays the ARP table of the router
- show protocols
- Displays the global and interface-specific status of any configured
Layer 3 protocols
- show startup-config
- Displays the saved configuration located in NVRAM
- show running-config
- Displays the contents of the currently running configuration file or the
configuration for a specific interface, or map class information.
The Lab
Activities on this page will teach students how to view router configurations
with the show commands.
The next page
will explain how a serial interface is configured.
14.1
Configure a Router
14.1.5
Configuring a serial interface
This page will
explain how a serial interface can be configured from the console or through a
virtual terminal line. To configure a serial interface follow these steps:
- Enter global configuration
mode.
- Enter interface mode.
- Specify the interface address
and subnet mask.
- Set clock rate if a DCE cable
is connected. Skip this step if a DTE cable is connected.
- Turn on the interface.
Each connected
serial interface must have an IP address and subnet mask to route IP packets.
Configure the IP address with the following commands:
Router(config)#interface
serial 0/0
Router(config-if)#ip
address <ip address > <netmask >
Serial interfaces
require a clock signal to control the timing of the communications. In most
environments, a DCE device such as a CSU/DSU will provide the clock. By
default, Cisco routers are DTE devices but they can be configured as DCE
devices.
On serial links
that are directly interconnected, as in a lab environment, one side must be
considered a DCE and provide a clocking signal. The clock is enabled and speed
is specified with the clock rate command. The available clock rates in bits per
second are 1200, 2400, 9600, 19200, 38400, 56000, 64000, 72000, 125000, 148000,
500000, 800000, 1000000, 1300000, 2000000, or 4000000. Some bit rates might not
be available on certain serial interfaces. This depends on the capacity of each
interface.
By default,
interfaces are turned off, or disabled. To turn on or enable an interface, the
command no shutdown is entered. If an interface needs to be administratively
disabled for maintenance or troubleshooting, the shutdown command used to turn
off the interface.
In the lab
environment, the clockrate setting that will be used is 56000. The commands
that are used to set a clock rate and enable a serial interface are as follows:
Router(config)#interface
serial 0/0
Router(config-if)#clock
rate 56000
Router(config-if)#no
shutdown
Students can use
the Lab Activities on this page to configure serial interfaces.
The next page
will teach students how to change configurations.
14.1
Configure a Router
14.1.6
Making configuration changes
This page will
explain how configuration variables can be changed in different modes.
If a
configuration requires modification, go to the appropriate mode and enter the
proper command. For example, if an interface must be enabled, enter global
configuration mode, enter interface mode, and issue the command no shutdown.
To verify
changes, use the show running-config command. This command will display the
current configuration. If the variables displayed are not correct, the environment
can be changed in the following ways:
- Issue the no form of a
configuration command.
- Reload the system to return to
the original configuration file from NVRAM.
- Copy an archived configuration
file from a TFTP server.
- Remove the startup
configuration file with the erase startup-config, then restart the router
and enter setup mode.
To save the
configuration variables to the startup configuration file in NVRAM, enter the
following command at the privileged EXEC prompt:
Router#copy
running-config startup-config
Students can use
the Lab Activity to practice some basic configuration changes.
The next page
will teach students how to configure an Ethernet interface.
14.1
Configure a Router
14.1.7
Configuring an Ethernet interface
This page will
explain how an Ethernet interface can be configured from the console or a
virtual terminal line.
Each Ethernet
interface must have an IP address and subnet mask to route IP packets.
To configure an
Ethernet interface follow these steps:
- Enter global configuration
mode.
- Enter interface configuration
mode.
- Specify the interface address
and subnet mask.
- Enable the interface.
By default,
interfaces are turned off, or disabled. To turn on or enable an interface, the
command no shutdown is entered. If an interface needs to be disabled for
maintenance or troubleshooting, use the shutdown command to turn off the
interface.
The Lab
Activities will allow students to configure Ethernet interfaces on a router.
This page
concludes this lesson. The next lesson will explain how a configuration is
finalized. The first page covers the importance of configuration standards.
14.2
Finishing the Configuration
14.2.1
Importance of configuration standards
This page
explains why it is important to develop standards for configuration files
within an organization.
Configuration
standards can be used to control of the number of configuration files that must
be maintained, how the files are stored, and where the files are stored.
A standard is a
set of rules or procedures that are either widely used or officially specified.
If an organization does not have standards, the network will be in chaos if a
service interruption occurs.
Network
management requires a centralized support standard. Configuration, security,
performance, and other issues must be addressed for the network to function
properly. The creation of standards for network consistency helps reduce
network complexity, unplanned downtime, and events that may affect network
performance.
The next page
will discuss interface descriptions.
14.2
Finishing the Configuration
14.2.2
Interface descriptions
This page will
explain what interface descriptions are and why they are used.
An interface
description should identify important information such as a router, a circuit
number, or a specific network segment. A description of an interface can help a
network user remember specific information about the interface, such as what
network the interface services.
The description
will appear in the configuration files that exist in the router memory.
However, it will not affect the operation of a router. A description only
provides information about an interface. Descriptions are created by following
a standard format that applies to each interface. The description may include
the purpose and location of the interface, other devices or locations connected
to the interface, and circuit identifiers. Descriptions allow support personnel
to better understand the scope of problems related to an interface and allow
for faster resolution of problems.
The next page
will describe how interface descriptions are configured.
14.2
Finishing the Configuration
14.2.3
Configuring an interface description
This page will
teach students how to configure an interface description.
To configure an
interface description, enter global configuration mode. From global
configuration mode, enter interface configuration mode. Use the command
description followed by the information.
The steps to
configure an interface description are as follows:
- Use the configure terminal
command to enter global configuration mode.
- Enter a specific interface mode
such as interface ethernet 0.
- Enter the command description
followed by the information that is to be displayed, such as XYZ Network,
Building 18.
- Use Ctrl-Z to exit interface
mode and return to privileged EXEC mode.
- Use the copy running-config
startup-config command to save the configuration changes to NVRAM.
Here are two
examples of interface descriptions:
interface
ethernet 0
description LAN
Engineering, Bldg.2
interface serial
0
description ABC
network 1, Circuit 1
The Lab Activity
on this page will allow students to choose and configure interface
descriptions.
The next page
will describe login banners.
14.2
Finishing the Configuration
14.2.4
Login banners
This page will
explain what login banners are and why they are used.
A login banner is
a message that is displayed at login. Login banners can be used to convey
messages that affect all network users, such as scheduled system shutdowns.
Login banners can
be seen by anyone. Therefore, a banner message should be worded carefully.
“Welcome” is an invitation for anyone to enter a router and is probably not an
appropriate message.
A login banner
should warn users not to attempt login unless they are authorized. A message
such as “This is a secure system, authorized access only!” informs unwanted
visitors that any further intrusion is illegal.
The next page
will explain how message-of-the-day banners are configured.
14.2
Finishing the Configuration
14.2.5
Configuring message-of-the-day (MOTD)
This page will
explain how a message-of-the-day (MOTD) banner can be configured and displayed
on all connected terminals.
Enter global
configuration mode to configure an MOTD banner. Use the banner motd command,
followed by a space and a delimiting character, such as the pound sign (#). Add
an MOTD followed by a space and the delimiting character again.
Follow these
steps to create and display a message-of-the-day:
- Use the configure terminal
command to enter global configuration mode.
- Enter the command banner motd #
<message of the day > # .
- Issue the copy running-config
startup-config command to save the changes.
Students can use
the Lab Activities to configure basic router settings such as the MOTD.
The next page
will discuss host name resolution.
14.2
Finishing the Configuration
14.2.6
Host name resolution
This page will
explain how Cisco IOS performs host name resolution.
Host name
resolution is the process that a computer system uses to associate a host name
with an IP address.
In order to use
host names to communicate with other IP devices, network devices such as
routers must be able to associate the host names with IP addresses. A list of
host names and their associated IP addresses is called a host table.
A host table
might include all devices in a network organization. Each unique IP address can
have a host name associated with it. The Cisco IOS software maintains a cache
of host name-to-address mappings for use by EXEC commands. This cache speeds up
the process of converting names to addresses.
Host names,
unlike DNS names, are significant only on the router on which they are
configured. The host table will allow the network administrator to type either
the host name such as Auckland or the IP address to Telnet to a remote host.
The next page
will explain how host tables are configured.
14.2
Finishing the Configuration
14.2.7
Configuring host tables
This page will
teach students how to configure a host table.
To assign host
names to addresses, first enter global configuration mode. Issue the command ip
host followed by the name of the destination and all IP addresses where the
device can be reached. This maps the host name to each of its interface IP
addresses. To test connectivity to the host, use a telnet or ping command with
the name of the router or an IP address that is associated with the router
name.
The procedure to
configure a host table is as follows:
- Enter global configuration
mode.
- Enter the ip host command
followed by the name of the router and all IP addresses associated with
the router interfaces.
- Repeat Step 2 until all routers
in the network are entered.
- Save the configuration to
NVRAM.
In the Lab Activities, students will configure host tables
that identify routers and interfaces.
The next page
explains how configuration files should be managed.
14.2
Finishing the Configuration
14.2.8
Configuration backup and documentation
This page will
discuss the backup and documentation of configuration files.
The configuration
of network devices determines how the network will behave. Management of device
configuration includes the following tasks:
- List and compare configuration
files on running devices.
- Store configuration files on
network servers.
- Perform software installations
and upgrades.
Configuration
files should be stored as backup files in the event of a problem. Configuration
files can be stored on a network server, on a TFTP server, or on a disk stored
in a safe place. Include documentation
with the offline information.
The next page
will explain how configuration files can be copied and implemented.
14.2
Finishing the Configuration
14.2.9
Backing up configuration files
This page will
teach students how to backup and restore configuration files using tftp.
A current copy of
the configuration can be stored on a TFTP server. The copy running-config tftp
command can be used to store the current configuration on a network TFTP
server, as shown in Figure . To do so, complete the following tasks:
- Enter the copy running-config
tftp command.
- Enter the IP address of the
host where the configuration file will be stored.
- Enter the name to assign to the
configuration file.
- Answer yes to confirm each
choice.
A configuration
file stored on one of the network servers can be used to configure a router. To
do so, complete the following tasks:
- Use the copy tftp
running-config command to enter configuration mode, as shown in Figure .
- Select a host or network
configuration file at the system prompt. 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 IP address of the
remote host where the TFTP server is located. In this example, the router
is configured from the TFTP server at IP address 131.108.2.155.
- 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,
filenames are limited to eight characters plus a three-character
extension, such as router.cfg. Confirm the configuration filename and the
tftp server address that the system supplies. Notice in Figure that the router prompt changes to tokyo
immediately. This is evidence that the reconfiguration happens as soon as
the new file is downloaded.
To save a router
configuration to a disk or hard drive, capture text in the router and save it.
If the file needs to be copied back to the router, use the standard edit
features of a terminal emulator program to paste the command file into the
router.
The Lab Activity
on this page will allow students to capture the running configuration of a
router.
This page
concludes the lesson about router configurations. The next page will summarize
the main points from this module.
Summary
This page
summarizes the topics discussed in this module.
A router has
several modes that are used to accomplish specific tasks. The user EXEC mode is
used primarily to check the status of a router. The privileged EXEC mode allows
administrators to set usernames and passwords for access to router commands.
Global configuration mode is used to apply configuration statements that affect
a whole system.
One of the first
configuration tasks is to give a unique name to a router. For security
purposes, passwords and user IDs for authorized users should be set. The show
command is used to examine the contents of files and for troubleshooting.
Serial interfaces
require a clock signal to control the timing of the communications. An
interface must have an IP address and subnet mask to route IP packets. By
default, interfaces are turned off or disabled. Use the no shutdown command to
turn on an interface. Use the show running-config command to display the
current running configuration to verify any modifications.
Configuration
standards are developed for consistency, to reduce network complexity, to
reduce downtime, and to maximize network performance. Some standards for
configuration files include the number of files to maintain, how they are
stored, and where they are stored. Interface descriptions, login banners, and
MOTDs can be standardized to inform users about events such as downtime and to
warn unauthorized users.
Host name
resolution translates names to IP addresses. The Cisco IOS software maintains a
cache of host name-to-address mappings for use by EXEC commands. The cache
speeds up the conversion process. Unlike DNS, host names are only significant
to the router on which they are configured. Host names are entered in global
configuration mode.
Configuration
backup can be stored on a TFTP server, on a network server, or on a disk. A
specific backup plan will ensure that the files are available if a problem
occurs.
No comments:
Post a Comment