Workshop 9 - Cisco Router Configuration
Workshop 9 - Cisco Router Configuration
Workshop 9 - Cisco Router Configuration
Computer Networking
Lab 9: Cisco IOS Command Line Interface (CLI) (Sheet for Week 10 & 11)
The aim of this lab session is to understand how to configure a Cisco router and to learn the Ciscos Internetworking
Operating System (IOS) commands.
Equipments:
A PC with Cisco Packet Tracer installed. Logbook.
Objectives
Exercise
Part 1: Using Packet Tracer to create a logical connection diagram for this workshop.
The bottom left-hand corner of the Packet Tracer screen displays eight icons that represent device categories or
groups, such as Routers, Switches, or End Devices.
Moving the cursor over the device categories will show the name of the category in the box. To select a device, first
select the device category. Once the device category is selected, the options within that category appear in the box
next to the category listings. Select the device option that is required.
(a) Select End Devices from the options in the bottom left-hand corner. Drag and drop one generic PC onto the
design area. Click on the PC, from the window, select the Config tab and rename them to PC0 (if it is not).
(b) Select routers from the options in the bottom left-hand corner. Add one generic router onto the design area.
Rename it to testRouter.
(c) Select Connections from the bottom left-hand corner. Choose a Console cable type to connect PC0 (RS232)
and testRouter (Console port)
The creating testing system should like the following figure 1.
Dr. Z Zhao
Faculty of ESBE
Computer Networking
Part 2: Configure HyperTerminal so that the computer can communicate with the router and Routers Boot up
process
Although by clicking on the testRouter Router in the Packet tracer environment, you can monitor how the Cisco IOS
works. In the practical work, the first step to boot up and set up a router is through the PC which connects to the
router by console cable.
(a) Click on the PC0, a window like the following figure 2 will pop up. Click on the Desktop tab, several
simulation software are is available. Click terminal icon, a simulation HyperTerminal will be running for
you to remotely configure a network device like router. You must first configure the terminal emulation
parameters as follows:
9600 baud
8 data bits
no parity
1 stop bit
no flow control and no parity
By clicking on OK you will be able to move to the HyperTerminal window displayed in Figure 3
Dr. Z Zhao
Faculty of ESBE
Computer Networking
Dr. Z Zhao
Faculty of ESBE
Computer Networking
image type of the Cisco IOS software that the router is using. Can you find these example startup messages
in the following figure?
(c) The figure shows that there is 114 MB of memory installed on this router, and the Cisco IOS image type is
C1841-ADVSECURITYK9-M. Startup messages are generated by the operating system of the router. The
messages vary depending on the software installed on the router. These messages scroll by quickly and take
a few minutes to stop.
When the router is finished starting up, the following system messages appear in the terminal emulation
window:
--- System Configuration Dialog --Would you like to enter the initial configuration dialog? [yes/no]: no
Would you like to terminate autoinstall? [yes]:
Press RETURN to get started!
(d) After pressing Return (Enter) to get started, several system messages regarding the interface and line status
appear. If the router is in its default configuration, the user mode prompt Router> is displayed.
Note: It may be necessary to press Enter after the interface status messages are displayed.
Dr. Z Zhao
Faculty of ESBE
Computer Networking
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname testRouter
testRouter(config)#end
testRouter#
%SYS-5-CONFIG_I: Configured from console by console
testRouter#
c. What is the router prompt now? testRouter#
d. From the router privileged mode prompt, issue the show running-config command again. How does the
output differ from the first time you issued this command?
When the router is booted up, the startup-config file is loaded into router RAM and becomes the runningconfig file. Changes made to the running-config take effect immediately, but do not affect the startup-config.
To make running-config changes permanent, they must be copied to the startup-config using the copy
running-config startup-config command.
Dr. Z Zhao
Faculty of ESBE
Computer Networking
From the router privileged mode prompt, issue the copy running-config startup-config command
to make the changes permanent. When prompted for the destination filename, press Enter to accept the
default name of startup-config.
testRouter#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
testRouter#
1
From the router privileged mode prompt, issue the show startup-config command again. Is the
output from this command the same as that from the show running-config command issued in Step 1d?
2
3
SI
4
5
To restart the router, from the router privileged mode prompt, issue the reload command. This
performs a software restart and loads the startup-config file from NVRAM. What is the router prompt now?
Step 4: Display the router system information using the show version command.
The show version command displays useful information about the router internal components, including
the amount of RAM, Cisco IOS software version, the number and type of interfaces installed, and the
configuration register, which controls how the router boots up. By default, the config register is set to
hexadecimal 2102 (0x2102), which causes the router to load the operating system (Cisco IOS) from flash
memory.
The information displayed by the show version command is displayed as part of router bootup. Your output
may vary, depending on the router model, Cisco IOS software version, and internal components installed.
1
From the router privileged mode prompt, issue the show version command and answer the
following questions:
2
3
4
Dr. Z Zhao
Faculty of ESBE
Computer Networking
5
3. What is the name of the system image file? "flash:c1841-advipservicesk9-mz.124-15.T1.bin"
6
4. How many and what types of interfaces does this router have? 2 FastEthernet/IEEE 802.3 interface(s)
7
5. How many bytes of NVRAM does the router have? 191K bytes of NVRAM
8
6. How many bytes of flash (RAM) memory does the router have? 63488K bytes of ATA CompactFlash
(Read/Write)
9
7. What is the configuration register setting? Configuration register is 0x2102
Part 4: Router Connection and Exploration of the IOS Command Line Interface (CLI)
(a) As you have known from the previous operations, access to the IOS command line interface is generally
referred to as an EXEC session. As a security feature, Cisco IOS separates EXEC session into two different
access levels user EXEC level which will have a right arrow (>) in the prompt and privileged EXEC level
which has a sharp key (#) in the prompt. Privileged EXEC level allows a person to access all router
commands and can be password protected. You can use enable and disable commands to switch
between these two levels.
(b) Switch between the two levels and use ? to show all the commands in these two levels. Copies these
commands to your logbook and compare what are missing in the user EXEC level. Figure 4 shows the IOS
CLI hierarchy.
Dr. Z Zhao
Faculty of ESBE
Computer Networking
Dr. Z Zhao
Faculty of ESBE
Computer Networking
Router> enable
Router# configure terminal
Router(config)# enable secret cisco
Router(config)# ip route 0.0.0.0 0.0.0.0 20.2.2.3
Router(config)# interface FastEthernet0/0
Router(config-if)# ip address 10.10.x.1
255.255.0255.0
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# interface VLan1
Router(config-if)# ip address 10.10.10.1
255.255.255.0
Router(config-if)# no shutdown
Router(config-if)# description Cisco DHCP
Router(config-if)# ip dhcp pool cisco
Router((dhcp-config)# network 10.10.10.0
255.255.255.0
Router(dhcp-config)#dns-server 192.168.1.10
Router(config-if)# default-router 10.10.10.1
Router(dhcp-config)#exit
Router(config-if)# exit
Router(config)# router rip
Router(config-router)# network 10.0.0.0
Router(config-router)# network 20.0.0.0
Router(config-router)# exit
Router(config)# exit
Route(config)# line console 0
Router(config)# password [password]
Router(config)# login
Route(config)# line vty 0 4
- DHCP setup
Router(config)# login
Router# copy running-config startup-config
Router# disable
Router>
Dr. Z Zhao
Faculty of ESBE
Router>
Computer Networking
- prompt indicates user is back to user EXEC level
Router Management
(g) IOS supports many different types of show commands. To display the running-configuration, type the
following command in privileged EXEC mode:
Router#show running-config
To display the startup-configuration that is stored in NVRAM, type the following command in privileged
EXEC mode:
Router#show startup-config
Writing down the output of these two configuration informations.
(h) To display the version, type the following command in privileged EXEC mode:
Router# show version
(i) To view information about a particular interface, use the show interface command. The show interface
command provides the following list of important information:
Interface State (e.g. UP, DOWN, LOOPED)
Protocol addresses
Bandwidth
Reliability and Load
Encapsulation type
Packet Rates
Error Rates
Signaling Status (i.e. DCD,DSR,DTR,RTS,CTS)
(j) For example, to check the interface you connect to the router, type the following command in privileged
EXEC mode:
Router# show interface FastEthernet2
Dr. Z Zhao
10