Router Configuration
Basics
Overview
Router configuration controls the operation
of the routers:
Interface IP address and netmask
Routing information (static, dynamic or
default)
Boot and startup information
Security (passwords and authentication)
Where is the Configuration?
Router always has two configurations:
Running configuration
Startup confguration
Where is the Configuration?
Running configuration:
In RAM, determines how the router is
currently operating
Is modified using the configure command
To see it: show running-config
Startup confguration:
In NVRAM, determines how the router will
operate after next reload
Is modified using the copy command
To see it: show startup-config
Where is Startup Configuration?
Can also be stored in more permanent places:
External hosts, using TFTP (Trivial File Transfer
Protocol)
In flash memory in the router
Copy command is used to move it around:
copy run start
copy run tftp
copy start tftp
copy tftp start
copy flash start
copy start flash
Router Access Modes
User EXEC mode: Limited, show only
Router>
Privileged EXEC mode: Detailed--configuration of router, debugging, testing,
file manipulationetc.
Router#
Setup Mode available when router has no
startup-config file
ROM Monitor useful for password recovery
& new IOS upload session
Network Configuration Modes
User EXEC
Mode
Privileged
Mode
Global
Configuration
Mode
Specific
Configuration
Mode
Router>
Router#
Router(config)#
Router(config-xx)
Router Prompts How to tell where
you are on the router
You can tell in which area of the routers configuration
you are by looking at the router prompts:
Router> USER prompt mode
Router# PRIVILEGED EXEC prompt mode
Router(config) terminal configuration prompt
Router(config-if) interface configuration prompt
Router(config-subif) sub-interface configuration
prompt
Logging into the Router
Connect router to console port or telnet to
router.
router>
router>enable
password
router#
router#?
Configuring the router: To configure router
parameters need to load into RAM.
router# configure terminal
router(config)#
Logging into the Router
Configuring the router: To configure router
parameters need to load into RAM.
router# configure terminal
router(config)#
Check & Adjust Clock
RouterA#
RouterA#
RouterA#
RouterA#
RouterA#
RouterA#
RouterA#
RouterA#
show clock
clock ?
clock set?
clock set 13:03:10?
clock set 13:03:10 9?
clock set 13:03:10 9 Feb?
clock set 13:03:10 9 Feb 2016
show clock
Name Your Router
RouterA> ----- User Mode
RouterA>enable
RouterA# ----- Privileged Mode
To configure router parameters, need
to enter into RAM--
RouterA# Configure Terminal
RouterA(config)#
Personalized your Router Identity --
RouterA(config)# Hostname (Name)
Setting Banner
RouterA> ----- User Mode
RouterA>enable
RouterA# ----- Privileged Mode
Load configuration Parameters into
RAM--
RouterA# Configure Terminal
RouterA(config)#
RouterA(config)# banner motd # Message #
Setting Password
Number one priority to make sure you
have set this password on your router.
To set Global password do the following:
Enter into Global configuration Mode--
RouterA# Configure Terminal
RouterA(config)#
RouterA(config)# enable password
OR
RouterA(config)# enable secret
(your password)
(your password)
Setting Password
To set user mode password for the
console line, perform the following:
RouterA# Configure Terminal
RouterA(config)#
RouterA(config)# line console 0
RouterA(config-line)# Login
RouterA(config-line)# Password
password)
( your
Setting Password
To set this password for users accessing
the router remotely via telnet, perform
the following:
RouterA# Configure Terminal
RouterA(config)#
RouterA(config)# line vty 0 4
RouterA(config-line)# Login
RouterA(config-line)# Password
( your
password)
*line vty [first line number] [last line number] command. By default, Cisco IOS enables 5 virtual
terminal lines lines 0 through 4.
Review
Set Clock
Set Banner
Set Password
Configure Interfaces
Interface Configuration
Types of interfaces ---
GigabitEthernet interface
FastEthernet interface
Ethernet interfaces
Serial interfaces
Interface Configuration
Interfaces are named by type
slot/port; e.g.:
ethernet0, ethernet1,... Ethernet5/1
Serial0/0, serial1 ... Serial3
Can be abbreviated:
ethernet0 or eth0 or e0
Serial0/0 or ser0/0 or s0/0
FastEthernet0/0 or fe0/0
GigabitEthernet0/1 or ge0/1
Interface Configuration
By default interfaces are down.
Need to enable after configuration.
To disable any interface.
router(config-if)#no shutdown
router(config-if)#shutdown
Description
router(config-if)#description ethernet
link to admin building router
Interface Configuration
Configuring Ethernet interface:
RouterA# config terminal
RouterA(config)#interface ethernet 0/0
RouterA(config-if)# Description xxxxx
RouterA(config-if)# ip address n.n.n.n
m.m.m.m
RouterA(config-if)#no shutdown
RouterA(config-if)#exit
RouterA#
Interface Configuration
Configuring FastEthernet interface:
RouterA# config terminal
RouterA(config)#interface fastethernet 0/0
RouterA(config-if)# Description xxxxx
RouterA(config-if)# ip address n.n.n.n
m.m.m.m
RouterA(config-if)#no shutdown
RouterA(config-if)#exit
RouterA#
Interface Configuration
Configuring GigabitEthernet interface:
RouterA# config terminal
RouterA(config)#interface ge 0/0
RouterA(config-if)# Description xxxxx
RouterA(config-if)# ip address n.n.n.n
m.m.m.m
RouterA(config-if)#no shutdown
RouterA(config-if)#exit
RouterA#
Interface Configuration
Configuring Serial interface:
RouterA# config terminal
RouterA(config)#interface serial 0/0/0
RouterA(config-if)# Description xxxxx
RouterA(config-if)# ip address n.n.n.n
m.m.m.m
RouterA(config-if)#no shutdown
RouterA(config-if)#exit
RouterA#
Saving Configuration Parameters
All the changes are performed on
running configuration file ie. RAM.
Need to store those changes at
NVRAM/Flash for using in next reload.
RouterA#copy running-config startup-config
OR
RouterA# copy run start
Review
Set Clock
Set Banner
Set Password
Interface Configuration
Save Configuration
Backup Configuration
5 Frequent IOS Commands(1)
To know what interfaces are on your
router, important statistics about those
interfaces, and whether they are up or
down.
RouterA# show interfaces
5 Frequent IOS Commands(2)
Whatever configuration changes, need
to save those changes. This command
copies the configuration in RAM that you
have been modifying to the
configuration in flash
RouterA# copy running-config
startup-config
OR
RouterA# copy run start
OR
RouterA# wr (Write Memory)
5 Frequent IOS Commands(3)
Once you know that your interfaces are
up and you have saved your
configuration, you need to know --- are
your routing protocols working?
RouterA# show ip route
5 Frequent IOS Commands(4)
To get the the best summary of the
status and IP addresses of your
interfaces, use following --
RouterA# show ip interface brief
5 Frequent IOS Commands(5)
To see the entire routers configuration
ie. to see the IP addresses, interfaces,
passwords (that are in clear text),
routing protocols, and other settings..
RouterA# show running config
IOS Commands - show
There is one privileged mode command
that you will find yourself using
extensively for:
Viewing routers configuration
Verifying interfaces configuration
Viewing interfaces status
RouterA#
RouterA#
RouterA#
RouterA#
RouterA#
show
show
show
show
show
running configuration
clock
interfaces
ip interfaces brief
interfaces description
Configuring your Router
Set the enable (secret) password:
router(config)# enable secret your pswd
This MD5 encrypts the password
The old method was to use the enable password
command. But this is not secure (weak encryption) and
is ABSOLUTELY NOT RECOMMENDED. DO NOT USE!
Ensure that all passwords stored on router are
(weakly) encrypted rather than clear text:
router(config)# service password-encryption
The NO Command
Used to reverse or disable commands e.g
ip domain-lookup
no ip domain-lookup
ip address 1.1.1.1 255.255.255.0
no ip address
Getting Help
Getting Online Help
IOS has a built-in help facility;
? after the prompt lists all possible
commands:
use ? to get a list of possible configuration
statements
router#?
<partial command> ? lists all possible
subcommands, e.g.:
router#show ?
router#show ip ?
Getting Online Help
<partial command>? shows all possible command
completions
router#con?
configure
connect
Getting Online Help
This also works in configuration mode:
router(config)#ip a?
accounting-list accounting-threshold
accounting-transits address-pool
alias as-path
router(config)#int e0/0
router(config-if)#ip a?
access-group accounting
address
Getting Online Help
Can explore a command to figure out the syntax:
router(config-if)#ip addr ?
A.B.C.D IP address
router(config-if)#ip addr n.n.n.n ?
A.B.C.D IP subnet mask
router(config-if)#ip addr n.n.n.n m.m.m.m ?
secondary Make this IP address a secondary address
<cr>
router(config-if)#ip addr n.n.n.n m.m.m.m
router(config-if)#
Getting Lazy Online Help
TAB character will complete a partial word
hostel-rtr(config)#int<TAB>
hostel-rtr(config)#interface et<TAB>
hostel-rtr(config)#interface ethernet 0
hostel-rtr(config-if)#ip add<TAB>
hostel-rtr(config-if)#ip address n.n.n.n m.m.m.m
Not really necessary; partial commands can be
used:
router#conf t
router(config)#int e0/0
router(config-if)#ip addr n.n.n.n
Getting Lazy Online Help
Command history
IOS maintains short list of previously typed commands
up-arrow or ^p recalls previous command
down-arrow or ^n recalls next command
Line editing
left-arrow, right-arrow moves cursor inside command
^d or backspace will delete character in front of cursor
Ctrl-a takes you to start of line
Ctrl-e takes you to end of line
Backing Up Router Configuration
Running configuration can be backed
up into TFTP server or some other
locations.
RouterA# copy run tftp --- to copy the running
configuration into FTFT server.
Address or name of remote host []?
172.16.10.2 the ip address of TFTP
server
Destination filename [routername-confg]?
/Backup/Router01.cfg the folder path on the
server where the configuration file will be stored)
Restore Router Configuration
RouterA# show run --- to see the running
configuration
RouterA# copy tftp run --- to copy the
configuration file from TFTP server to the running
configuration of the router/RAM
Address or name of remote host []?172.16.10.2
TFTP server address
Source filename[]? /Backup/Router01.cfg
the configuration file to be copied to the router
[router name]#show run
[router name]#show interfaces
[router name]#copy run start
View Configuration
Use show running-configuration to see
the current configuration
Use show startup-configuration to see
the configuration in NVRAM, that will
be loaded the next time the router is
rebooted or reloaded
What Next?????
Deleting your Routers Configuration
To delete your routers configuration
Router#erase startup-config
OR
Router#write erase
Router#reload
Router will start up again, but in setup
mode, since startup-config file does not
exists
Cisco Router
Configuration Basics
Questions?