Configuring Cisco Routers
Configuring Cisco Routers
Cisco routers
configuration
Router basic
• Cisco routers run the Internetwork Operating
System (IOS)
• IOS support everything anyone would ever want
to do with router
• command like interface, much like shell
– complete on-line help
– full line editing, including history
Router components
ROM Flash NVRAM RAM
User
password enable
Privileged
config term
Configuration
Sessions
• Sessions can be initiated from direct line
(console, aux) or virtual line (vty)
• each line can be password protected (with
separate passwords)
• it is possible to use user based
authentication
Router modes (cont.)
User mode
• user can examine router status and operation.
• configuration cannot be viewed or altered from user
mode
• prompt router>
Privileged mode (“root”)
• complete control over the router (anything can be set or
reset)
• configuration cannot be altered
• prompt router#
User modes (cont.)
Configuration mode
• used only for change of configuration
• not password protected from privileged mode
• privileged mode commands don’t have meaning in
configuration mode
• most statements can be removed from the
configuration with the prefix no (ex. no
shutdown)
• prompt router(config)#
Router configurations
Two configurations:
• the active configuration (show running-
config)
• the startup configuration (show startup-
config)
Terminal
RAM
NVRAM Active
config
Flash
Network
On line help
• IOS have built-in help
• at any point user may type ? and receive a list
of what the executive expect to see next
• when used after character, help displays all
command with the same prefix
• at the beginning of command line ? will give a
list of all commands available in the current
mode
Command line editing
• all commands and strings can be abbreviated to
their shortest unique prefix (ex. sh run)
• arrow keys will move the cursor to the left and
right on the command line
• command history is accessed via up and down
arrows
• previous commands can be edited and re-entered
Network interfaces
• each network interface is identified by type and number
• types can be abbreviated, numbers start at 0
– ethernet0 e0
– serial2 s2
– tokenring1 to1
• virtual interfaces for various purposes
– loopback
– tunnel
– vlan
Example
router> enable
router# conf t
router(config)# int e0
router(config-if)# ip addr
10.0.0.10 255.255.255.0
router(config-if)# no shut
router(config-if)# ^z
router# sho ip int e0
Useful commands
• set the console password
– router(config)# line con 0
– router(config-line)# password mysecret
• set the vty passwords
– router(config-line)# line vty 0 4
– router(config-line)# password mysecret
– router(config-line)# exit
• set the enable password
– router(config)# enable password mysecret
– router(config)# service password-encryption
– router(config)# ^Z
Useful commands (cont.)
• list all interfaces in a router
– router# show interface
• display running configuration
– router# show running-configuration
• save the configuration
– router# copy running-config startup-config
• display IOS information
– router# show version
• display contents of flash
– router# show flash
• display running network protocols
– router# show protocols
Useful commands (cont.)
• non-console session can receive messages
– terminal monitor
• disable console logging
– no logging console (config)
• configure router to use syslog
– logging on (config)
– logging <ip-address>
• store in buffer
– logging buffered (config)
• display current configuration of message logging
– show logging
Useful commands
• configuring an interface
– ip address <address> <mask> (config)
• static routing (config)
– ip route <network> <mask> <address> [distance]
• default route (config)
– ip route 0.0.0.0 0.0.0.0 <address>
– ip default-network <network>
– in the second case router determines next hop
• netmask format (decimal,hexadecimal,bit-count)
– terminal ip netmask-format <format>
– ip netmask-format <format>
session break sequence
– CTRL-SHIFT-6 x
If you want to know more
• Cisco courses (ICRC,ACRC)
• Cisco documentation (www.cisco.com)
• Cisco mailing list
– [email protected]
– search engine
– http://www.nexial.com/cgi-bin/ciscobody
• Books:
– Managing IP Networks with Cisco Routers, Scott Bellew,
O’Reilly and Associates
– TCP/IP Illustrated, Volume 1: The protocols, W. Richard
Stevens, Addison-Wesley