You are on page 1of 4

Lab 2: Exploring a Cisco’s Command-line Interface

Lab Objectives
1. To identify the physical parts of a router/ switch and state their role
2. To connect a router/switch for initial configuration
3. To perform basic router/switch configurations

Part 1: Examine Router / Switch


• Examine your router or switch and list down all features that you can see
• What is the role of each identified part?

Part 2: Connect Router/Switch for Initial Configuration


Step 1: Connecting to the Console Port
Option 1: Using the serial console cable
• Using a rollover (console) cable, connect your PC to the router as shown below, so that you have a “console”
connection into the router. Your PC will be acting as a “terminal” in order to configure the router.

Option 2: Using the USB console cable


• NB: For this connection to work, ensure that there are Cisco USB drivers for the console installed on the terminal (computer)

Step 2: Accessing the Terminal Window


• In addition to a serial connection to the router, each workstation will need terminal emulation software in order
to communicate with the router. Windows 95/98 and XP comes with a terminal emulation program called
HyperTerminal. Windows 7, 8 and 10 and other higher versions do not have HyperTerminal, but the applet
can be downloaded from the internet and installed.
• To access HyperTerminal you can either double click on the shortcut on the desktop or wherever it can be found.
• NB: For earlier versions of windows: You could also go to the Start Menu, select Programs, select Accessories,
select Communications, and select HyperTerminal. A window should open; double-click on the HyperTerminal
icon. You also have to enter specific settings in the terminal window for the emulator to open the command line
interface of the router or switch
• Other terminal emulators include: PUTTY and Tera term. Always install a version compatible with your
operating system

Step 3: Power on the router or switch


• Now boot the router or switch. What do you observe?
Page 1 of 4
Step 4: Bypassing the Setup Mode
After several lines of information on the screen you should eventually see:

Would you like to enter the initial configuration dialog? [yes/no]: n

If you see such a message, the router is ready to enter Setup Mode. For now, if you are being prompted to answer a
question, answer “n” and press ENTER.

If you accidentally press “y” and enter Setup Mode, press and hold down the control key and press C (CTRL-C). Wait a
few seconds, and then press Enter.

On some routers you may see the following message.

Would you like to terminate autoinstall? [yes/no]: y

Type “y” or yes to terminal autoinstall.

You should eventually see the router prompt:

Router>

Step 5: Entering Setup Mode

Just like in Step 4, after several lines of information on the screen you should eventually see:

Would you like to enter the initial configuration dialog? [yes/no]:

The reason the router went into Setup Mode is because there was no startup-config; either it was erased or the router is
new. If there was a startup-config it would have been copied into the running-config and you would not have seen the
above question. Instead you would have been taken to the router prompt:
Router>

At any time, you can enter Setup Mode, but most administrators do not configure the router this way as it is limiting in
what it can do.
You can enter Setup Mode by giving the following command:
Router# setup

Notice that you must be in privilege mode. Now press control-C to exit setup mode.

PART 3: Now Let’s Explore the Following Commands

1. The Show Command


To display information we use ‘show’ command.
The show command only works in the user exec mode (Router>), (Switch>) or privileged mode (Router#), (Switch#)

At the prompt ‘router>’ enter the commands below and press the return key:

Router>Show version
Router>Show flash
Router>Show ?

What can you deduce from the output?


NB: The last command is used to access help.
Page 2 of 4
Now type the ‘enable’ command to enable privileged mode of access and press the return key i.e.

Router>enable
Router#

Repeat the show commands displayed above.


In addition to the already used show commands also try these ones:

Router# show interfaces // this command displays all interface settings


Router# show ip route // this command displays the routing table
Router# show mac-address-table // this command displays the mac address-table
Router# show running-config // this command displays the running configurations
Router# show ip interface brief // this command displays a summary of the interface
settings

NB: There are more ‘show’ commands

2. Commands for Navigating the Access Modes


The exit command allows you to go back one level e.g.
Router# exit
Router>exit

Press RETURN to get started

The end or ctrl + Z takes you back to levels at a go.


NB: It can only be used when you have the prompt: Router (config-xxxxx e.g.

Router(config-if)# end
Router#

3. Commands for Basic Router Configuration


Global configurations:
To perform any global configurations we must navigate to the global configuration mode:

Router>enable
Router# configure terminal
Router(config)# // -----this is the prompt for the global configuration mode

Now let’s configure a router name, passwords, and banners


Router(config)# hostname SU
SU(config)# enable password cisco // -----this is a password for privileged mode access
SU(config)# enable secret class // -----this is an encrypted password for privileged
SU(config)# banner motd # Authorized access only!! #

Or

SU(config)# banner motd “Authorized access only!!”

SU(config)#

Now test whether your configurations work:


Exit global configuration mode and both privileged executive mode and user executive mode and press the return key.
Page 3 of 4
SU(config#exit
SU#exit
SU>exit

What do you observe?

Now navigate downwards:

SU>enable
Password: // -----provide passwords
Password:

SU#

Now let’s view the configuration file in RAM

SU#show running-config

What do you observe?

Now let’s save our configurations in non-volatile ram (NVRAM)

SU#copy running-config startup-config


Destination filename [startup-config]? //press enter to accept

Now let’s view what we have just saved

SU#show startup-config

What do you observe?

Page 4 of 4

You might also like