Network Fundamentals
(NWF-311)
BASIC ROUTER CONFIGURATION
PREPARED BY: TAMARA MUMBA CHITAWO
DEPARTMENT: CIT
EMAIL: tmumba@mubas.ac.mw PHONE: 0 994
579 495
Contents
Parts of a router
Router interfaces
Configuration Modes of a Router
Show commands of a Router
Router
A router is a special type of computer. It has the
same basic components as a standard desktop PC.
However, routers are designed to perform some very
specific functions.
Just like computers routers need an OS which is in
form of Internetwork Operating System software
(IOS).
IOS File System Overview
Initial Startup of Cisco
Routers
A router initializes by loading the bootstrap, the operating system, and a configuration
file.
If the router cannot find a configuration file, it enters setup mode.
Upon completion of the setup mode a backup copy of the configuration file may be
saved to nonvolatile RAM (NVRAM).
The goal of the startup routines for Cisco IOS software is to start the router operations.
To do this, the startup routines must accomplish the following:
• Make sure that the router hardware is tested and functional.
• Find and load the Cisco IOS software.
• Find and apply the startup configuration file or enter the setup mode.
When a Cisco router powers up, it performs a power-on self test (POST). During this
self test, the router executes diagnostics from ROM on all hardware modules.
Setup Mode
In the setup mode, default answers appear in square brackets [ ] following
the question. Press the Enter key to use these defaults.
During the setup process, Ctrl-C can be pressed at any time to terminate
the process. When setup is terminated using Ctrl-C, all interfaces will be
administratively shutdown.
When the configuration process is completed in setup mode, the following
options will be displayed:
[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]:
Parts of a Router
Random Access Memory
(RAM)
RAM has the following characteristics and functions:
•Stores routing tables
•Provides temporary memory for the running configuration file
of the router while the router is powered on
•Loses content when router is powered down or restarted
Non-Volatile RAM (NVRAM)
NVRAM has the following characteristics and functions:
•Provides storage for the startup configuration file such as
IP addresses (routing protocol, hostname of a router).
•Retains content when router is powered down or restarted
Flash Memory
Flash memory has the following characteristics and functions:
•Holds the operating system image (IOS)
•Retains content when router is powered down or restarted
•Can store multiple versions of IOS software
•Isa type of electronically erasable, programmable ROM
(EEPROM)
Read-Only Memory (ROM)
ROM has the following characteristics and functions:
•Maintains instructions for power-on self test (POST)
diagnostics
•Storesbootstrap program and basic operating system
software
•Requires replacing pluggable chips on the motherboard
for software upgrades
Interfaces
Interfaces have the following characteristics and
functions:
•Connect router to network for frame entry and exit
•Can be on the motherboard or on a separate module
Types of interfaces:
• Ethernet
• Fast Ethernet
• Gigabit Ethernet
• Serial
• Management interfaces such as Auxiliary port, Console port and USB port
Note: Management interfaces for example the Console port just like in a
switch is used for router configuration using a PC. While the interfaces
like Ethernet, Fast Ethernet and Gigabit Ethernet are used for data
transmission
Router
LED
Indicato
Just like a switch a router also has
rs LEDs indicating the status of the
router.
Router Command Line
Interface
The Cisco command-line
interface (CLI) uses a
hierarchical structure. This
structure requires entry into
different modes to accomplish
tasks.
Each configuration mode is
indicated with a distinctive
prompt and allows only
commands that are appropriate
for that mode.
Router User Interface
Modes
As a security feature the Cisco IOS software separates
sessions into two access levels, user EXEC mode and
privileged EXEC mode. The privileged EXEC mode is also
known as enable mode.
Overview of Router Modes
Router Modes
Specific Configuration
Modes
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.
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
Router#configure terminal (or config t)
Router(config)#
When specific configuration modes are entered, the router prompt changes to indicate the current
configuration mode.
Typing exit from one of these specific configuration modes will return the router to global configuration
mode. Pressing Ctrl-Z returns the router to all the way back privileged EXEC mode.
Configuring a Router’s
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 Zathu
Zathu(config)#
Assoon as the Enter key is pressed, the prompt changes from the default
host name (Router) to the newly configured host name (which is Zathu in
the example above).
Message Of The Day
(MOTD)
A message-of-the-day (MOTD) banner can be displayed
on all connected terminals.
Enter
global configuration mode by using the command
config t
Enter the command
banner motd # The message of the day goes
here #.
Save changes by issuing the command copy run start
Configuring a Console
Password
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
Configuring a Modem
Password
Ifconfiguring a router via a modem you are most likely
connected to the aux port.
The method for configuring the aux port is very similar to
configuring the console port.
Router(config)#line aux 0
Router(config-line)#password <password>
Router(config-line)#login
Configuring a Telnet
Password
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.
The following commands are used to set the same password on all
of the VTY lines:
Router(config)#line vty 0 4
Router(config-line)#password <password>
Router(config-line)#login
Configuring Interfaces
An interface needs an IP Address and a Subnet Mask to
be configured.
All interfaces are “shutdown” by default.
The DCE end of a serial interface needs a clock rate.
Configuring Interfaces…
Router#config t
Router(config)#interface serial 0/1
Router(config-if)#ip address 200.100.50.75 255.255.255.240
Router(config-if)#clock rate 56000 (required for serial DCE only)
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#int f0/0
Router(config-if)#ip address 150.100.50.25 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#exit
Router#
On older routers, Serial 0/1 would be just Serial 1 and f0/0 would be e0.
s = serial e = Ethernet f = fast Ethernet
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.
show int s0/1 – Displays statistics for interface 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 Commands…
show history – Displays a history of commands that have been entered
show flash – Displays info about flash memory and what IOS files are stored there
show version – Displays info about the router and the IOS that is running in RAM
show ARP – Displays the ARP table of the router
show start – Displays the saved configuration located in NVRAM
show run – Displays the configuration currently running in RAM
show protocol – Displays the global and interface specific status of any
configured Layer 3 protocols
END