Computer Networks Lab
Lab. 6 Basic Router Device Configuration
Objectives
1. Configure Packet Tracer Terminal to establish a console session with a Cisco IOS Router.
2. Configure HyperTerminal to establish a console session with a Cisco IOS router.
3. Configure Cisco router global configuration settings.
4. Configure Cisco router password access.
5. Configure Cisco router interfaces.
6. Save & erase the router configuration file.
7. Configure physical lab topology and the logical LAN topology then verify LAN connectivity.
Procedure:
Part 1: Cisco Internet Operating System (IOS)
The following figure contains the different IOS command modes, their roles and the shape of the
command prompt that illustrates the mode. Make sure to study this figure carefully as it is essential for
proper working with Cisco routers and switches.
Page 1 of 11
Router Configuration States
User Exec Mode
The user EXEC mode is entered when the router is accessed via a serial connection or when accessing the
router via telnet.
The command prompt of the user EXEC mode is:
Page 2 of 11
Router1>
The user EXEC mode only offers a small set of commands, such as ping, telnet, and traceroute.
Configuration parameters cannot be read or modified in this mode
Logging the user off, type:
Router1> exit
Privileged EXEC Mode
To change or view configuration information of a router, user must enter system administrator mode
called Privileged EXEC Mode
The privileged EXEC mode is used to read configuration files, reboot the router, and set operating
parameters.
Entering the privileged EXEC mode requires to type a password, called the enable secret.
The privileged EXEC mode is entered by this command:
Router1>enable
If a password is set, then the system will require it at this stage. Typing the password displays the
following command prompt:
Router1#
For logging off, type:
Router1#disable
Global Configuration Mode
The global configuration mode is used to modify system wide configuration parameters, such as
routing algorithms and routing tables.
This is done by typing:
Router1#Configure terminal
The argument terminal tells the router that the configuration commands will be entered from a
terminal. The alternatives are to issue configuration commands from a configuration file or from a
remote machine via a file transfer
The command prompt in the global configuration mode is:
Router1(Config)#
Notes:
Typing a question mark (?) in a given command mode generates a list of all available commands in
the current command mode
Router1(config-if)#?
This command helps to determine if a command can be executed in the current mode
The question mark can also be used to determine the list of available options of a command.
Router1#configure ?
If a certain command enables a feature of a router than adding a “no” in front of that command
disables the same feature.
Sometimes it is the other way around, that is, the command to enable a feature uses the command to
disable the feature preceded by a “no”
Examples:
Enable IP forwarding : ip routing
Page 3 of 11
Disable IP forwarding : no ip routing
Add a routing table entry : ip route 10.0.2.0 255.255.255.0 10.0.3.1
Delete a routing table entry: no ip route 10.0.2.0 255.255.255.0 10.0.3.1
Disable a network interface: shutdown
Enable a network interface : no shutdown
Part 1.1: Configure Packet Tracer Terminal to Establish a Console Session with a Cisco IOS
Router/Switch.
PT Terminal is a simple emulation program for serial communication that can be used to connect to the
console port on Cisco IOS devices. A serial interface on a computer is connected to the Cisco device via a
console cable. Using PT Terminal is the most basic way to access a router for checking or changing its
configuration.
Steps:
1- Select a PC and a router from the Network Component Box.
2- Connect the console (rollover) cable to the console port on the router. Connect the other cable end to
the RS 232 port on the host computer.
3- If not already powered on, enable power to the computer and router.
4- From the Windows taskbar, start the PT Terminal program by clicking PC0>Desktop Tab> Terminal
5- Use the following settings of the Terminal Session. Bits per second 9600, Data bits 8, Parity None,
Stop bits 1, Flow control None
6- You should see a response from the router on the screen (press enter several times).
7- You will be asked "Continue with configuration dialog? [yes/no]: ", press no
8- Power cycle the router and watch the reaction on the terminal.
Note: this process is the same for a Switch.
Part 1.2: Establishing a Console Session with HyperTerminal
HyperTerminal is a simple Windows-based terminal emulation program for serial communication that
can be used to connect to the console port on Cisco IOS devices. A serial interface on a computer is
connected to the Cisco device via a rollover cable. Using HyperTerminal is the most basic way to access a
router for checking or changing its configuration.
Each bench will be provided with one router, one switch and one console cable. Each student should try
the following procedure on his/her own PC. Please use care and caution when connecting the cables and
operating the equipment.
Steps:
1- Connect the console (rollover) cable to the console port on the router. Connect the other cable end to
the host computer with a DB-9 adapter to the COM 1 port.
Page 4 of 11
2- From the Windows taskbar, start the HyperTerminal program by clicking Start > Programs
>Accessories > Communications > HyperTerminal.
3- At the Connection Description window, enter a session name in the Name field. Select an appropriate
icon, or leave the default. Click OK.
4- Enter the appropriate connection type, COM 1, in the Connect using field. Click OK.
5- Change port settings as in part1.When the HyperTerminal session window comes up, press the Enter
key. There should be a response from the router. This indicates that connection has been successfully
completed.
6- When finished, close the HyperTerminal session. Click File > Exit. When asked whether to save the
session, click Yes. Enter a name for the session.
7- To reconnect the HyperTerminal session; Reopen the HyperTerminal session as described above.
This time, when the Connection Description window opens click Cancel. Click File > Open. Select
the saved session and then click Open.
Note: this process is the same for a Switch.
Part 2: Basic Cisco Device Configuration
Common configuration tasks include setting the hostname, access passwords, and (Message of the
Day Banner) MOTD banner.
Interface configuration is extremely important. In addition to assigning a Layer 3 IP address, enter a
description that describes the destination connection speeds troubleshooting time.
Configuration changes are effective immediately.
Configuration changes must be saved in NVRAM to be persistent across reboot.
Configuration changes may also be saved off-line in a text file for auditing or device replacement.
Cisco IOS switch configuration is similar to Cisco IOS router configuration.
Part 2.1: Configure Cisco Router Global Configuration Settings.
Page 5 of 11
1- Physically connect devices.
Connect the console or rollover cable to the console port on the router. Connect the other end of
the cable to the host computer using a DB-9 or DB-25 adapter to the COM 1 port.
Connect the crossover cable between the host computer’s network interface card (NIC) and
Router interface G0/0. Ensure that power has been applied to the host computer and router.
2- Connect host computer to router through HyperTerminal.
Configure HyperTerminal with the proper settings as mentioned in previously in this experiment.
When the HyperTerminal session window comes up, press the Enter key until there is a response
from the router.
If the router terminal is in the configuration mode, exit by typing NO.
Would you like to enter the initial configuration dialog? [yes/no]:no
Press RETURN to get started!
Router>
When in privileged exec command mode, any misspelled or unrecognized commands will attempt
to be translated by the router as a domain name. Since there is no domain server configured, there
will be a delay while the request times out. This can take between several seconds to several
minutes. To terminate the wait, simultaneously hold down the <CTRL><SHIFT>6 keys then
release and press x:
Router>enabel
Translating "enabel"...domain server (255.255.255.255) %
Briefly hold down the keys <CTRL><SHIFT>6, release and press x
Name lookup aborted
Router>
From the user exec mode, enter privileged exec mode:
Router> enable
Router#
Verify a clean configuration file with the privileged exec command show running-config. If a
configuration file was previously saved, it will have to be removed.
3- Configure global configuration hostname setting.
From the global config mode, there are many different configuration modes that may be entered. Each
of these modes allows the configuration of a particular part or function of the IOS device. The list
below shows a few of them:
Page 6 of 11
Interface mode - to configure one of the network interfaces (G0, S0/0,..)
Line mode - to configure one of the lines (physical or virtual) (console, AUX, VTY,..)
Router mode - to configure the parameters for one of the routing protocols
From the privileged exec mode, enter global configuration mode:
Router# configure terminal
Router(config)#
Set the device hostname to Router1:
Router(config)# hostname Router1
Router1(config)#
4- Configure the MOTD banner.
In production networks, banner content may have a significant legal impact on the organization. For
example, a friendly “Welcome” message may be interpreted by a court that an attacker has been
granted permission to hack into the router. A banner should include information about authorization,
penalties for unauthorized access, connection logging, and applicable local laws. The corporate
security policy should provide policy on all banner messages.
Router1(config)# banner motd %
Enter TEXT message. End with the character '%'
***You are connected to an ABC network device. Access is granted to only current ABC
company system administrators with prior written approval.
*** *** Unauthorized access is prohibited, and will be prosecuted.
*** *** All connections are continuously logged. ***
%
Router1(config)#
Part 2.2: Configure Cisco router password access
Access passwords are set for the privileged exec mode and user entry point such as console, aux, and
virtual lines. The privileged exec mode password is the most critical password, since it controls access to
the configuration mode.
1- Configure the privileged exec password.
Cisco IOS supports two commands that set access to the privileged exec mode. One command,
enable password, contains weak cryptography and should never be used if the enable secret
command is available. The enable secret command uses a very secure MD5 cryptographic hash
algorithm. Cisco says “As far as anyone at Cisco knows, it is impossible to recover an enable
secret based on the contents of a configuration file (other than by obvious dictionary attacks).”
Password security relies on the password algorithm, and the password. . In production
environments, strong passwords should be used at all times. A strong password consists of at least
nine characters of upper and lower case letters, numbers, and symbols. In a lab environment, we
will use weak passwords. Set the privileged exec password to cisco.
Router1(config)# enable secret cisco
Router1(config)#
Page 7 of 11
2- Configure the console password
Set the console access password to class. The console password controls console access to the
router.
Router1(config)# line console 0
Router1(config-line)# password class
Router1(config-line)# login
3- Configure the virtual line password.
Set the virtual line access password to class. The virtual line password controls Telnet access to
the router. In early Cisco IOS versions, only five virtual lines could be set, 0 through 4. In newer
Cisco IOS versions, the number has been expanded. Unless a telnet password is set, access on that
virtual line is blocked.
Router1(config-line)# line vty 0 4
Router1(config-line)# password class
Router1(config-line)# login
Notes: There are 16 virtual lines that can be configured on a Cisco switch, 0 through 15.
Part 2.3: Configure Cisco Router Interfaces
All cabled interfaces should contain documentation about the connection. On newer Cisco IOS versions,
the maximum description is 240 characters. In the following use addresses from subnet 3 you have
defined in the pre-lab.
1- Configure the router fa0interface.
Router1(config)# interface G0/0
Router1(config-if)# description Connection to Host1 with crossover cable
Router1(config-if)# ip address [insert last host addr of subnet 3] [insert classless subnet mask]
Router1(config-if)# no shutdown
Router1(config-if)# end
Router1#
Look for the interface to become active:
*Mar 24 19:58:59.602: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0,
changed state to up.
Notes: Switch- interfaces are UP by default, no need for the (no shutdown) instruction.
2- Configure the host computer.
Configure the host computer for LAN connectivity. Recall that the LAN configuration window is
accessed through Start | Control Panel | Network Connections. Right-click on the LAN icon, and
select Properties. Highlight the Internet Protocol(TCP/IP) field, and select Properties. Fill in the
following fields:
IP Address: __________________________
Subnet Mask: ____________________________
Default Gateway: Router’s G0/0 IP Address _______________________
Click OK, and then Close.
Open a terminal window from start| programs|accessories|CommandPrompt, and verify network
settings with the ipconfig command.
Page 8 of 11
3- Verify network connectivity.
Use the ping command to verify network connectivity with the router.
From the router hyperterminal session issue the following command
Router1(config)# ping <enter the host PC IP address>.
And from the command prompt window on the host computer, issue the following command
C:\Documents and Settings\admin> ping <enter Router’s G0/0 IP Address >
If ping replies are not successful troubleshoot the connection:
Verify the Router`s interface status using the command
Router1# show ip interface brief
The up in the Status column shows that this interface is operational at Layer 1. The up in
the Protocol column indicates that the Layer 2 protocol is operational. If you find
administratively down in the Status column, then this interface was not enabled with the no
shutdown command.
Verify host computer configuration with the ipconfig command.
Verify the cable connection between the router Fast Ethernet interface and the host computer
Ethernet card is crossover cable.
Note: Turn-off the firewall
Part 2.4: Save the Router Configuration File.
Cisco IOS refers to RAM configuration storage as running-configuration, and NVRAM configuration
storage as startup-configuration. For configurations to survive rebooting or power restarts, the RAM
configuration must be copied into non-volatile RAM (NVRAM). This does not occur automatically,
NVRAM must be manually updated after any changes are made.
1- Compare router RAM and NVRAM configurations.
Use the Cisco IOS show command to view RAM and NVRAM configurations. The configuration
is displayed one screen at a time. A line containing “ -- more -- “ indicates that there is additional
information to display. The following list describes acceptable key responses:
Key Description
<SPACE> Display the next page.
<RETURN> Display the next line.
Q Quit
<CTRL> c Quit
Display the contents of NVRAM. If the output of NVRAM is missing, it is because there is no
saved configuration.:
Router1# show startup-config
startup-config is not present
Router1#
Display the contents of RAM.
Router1#show running-config
2- Save RAM configuration to NVRAM.
Page 9 of 11
For a configuration to be used the next time the router is powered on or reloaded, it must be
manually saved in NVRAM. Save the RAM configuration to NVRAM:
Router1# copy running-config startup-config
Destination filename [startup-config]? <ENTER>
Building configuration...
[OK]
Router1#
3- To erase the NVRAM configuration file:
Router1# erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
<ENTER>
[OK]
Erase of nvram: complete
Reload the router:
Router1# reload
Proceed with reload? [confirm] <ENTER>
Page 10 of 11
Appendix
Basic Show Commands
show clock shows the time set in the router
show controllers s0 Shows the DTE or DCE status of an interface
show flash Shows the files in flash memory
show history Shows you the last 10 commands entered by default
show hosts Shows the contents of the host table i.e. the cached list of host names and addresses
show int g0/0 Shows the statistics of g0/0
show interface s0 Shows the statistics of interface serial 0
show ip Shows the IP configuration of the switch
show ip interface Shows which interfaces have IP access lists applied
show ip protocols Shows the routing protocols and timers associated with each routing protocol
configured on a router
show ip route Displays the IP routing table
show mac-address-table Shows the filter table created dynamically by the switch
show protocols Shows the routed protocols and network addresses configured on each interface
show running-config Short for show running-config; shows the configuration currently running
on the router
show sessions Shows your connections via Telnet to remote devices
show startup-config Short for show startup-config; shows the backup configuration stored in
NVRAM
show terminal Shows you your configured history size
show version a show hardware command equivalent, which gives the IOS information of the
switch, as well as the uptime and base Ethernet address
Page 11 of 11