0% found this document useful (0 votes)
2 views

Laboratory 3 - Basic commands

The document outlines Laboratory 3 for BN202 Internetworking Technologies, focusing on basic router commands and Cisco IOS. Students are required to perform specific tasks, take screenshots, and submit their work on Moodle, with participation and lab attendance being crucial for marks. The document also provides detailed information on various commands and configurations necessary for managing Cisco routers.

Uploaded by

Irosha Sharon
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Laboratory 3 - Basic commands

The document outlines Laboratory 3 for BN202 Internetworking Technologies, focusing on basic router commands and Cisco IOS. Students are required to perform specific tasks, take screenshots, and submit their work on Moodle, with participation and lab attendance being crucial for marks. The document also provides detailed information on various commands and configurations necessary for managing Cisco routers.

Uploaded by

Irosha Sharon
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

BN202 Internetworking Technologies

Laboratory 3: Basic router commands

Submission Due: End of laboratory class, submit the file on Moodle at


least 10 minutes before the end of laboratory class. All students should
perform the following steps, copy each step as a print screen on word
document. At the end of each lab, students should show their work to lab
instructor, then submit on Moodle.

Total Marks=10

Lab Marks = 5 marks

Marks will be given only to students who attend and participate, during 2 hours laboratory class each
week.
Submission on Moodle is mandatory as an evidence of participation.

Participation Marks = 5 marks


1. On discussion forum LECTURER will post some questions on the
discussion form
2. Students to respond to post – and take screenshots of their
responses to add to the reports.
3. Students can post their own questions too and add that to the
report as well.
4. If the report shows more than 5 screenshots of the response to the
LECTURER’s posts or their own, they can receive full marks (5
marks) – if they post 2 screenshots (meaningful, 2 marks out of 5).

Description of the laboratory exercise:


Students should be able to understand cisco basic commands.
Basic commands are used to display information about the status or
configuration of a Cisco device. You will learn to configure Router with
the appropriate settings and to copy the running configuration to the
startup configuration.

Exercises:

1. Choose a router.
2. List commands for each IOS mode.
3. List interface ports.
4. Write commands that you have used for each step, past screen
shots wherever needed.

Command Summary Command Description

Compiled by: Dr Rajan Kadel Nov 2017


BN202 Laboratory 3: Basic router commands Page 2 of 14

clock set hh:mm:ss day sets the system software clock


month year
configure terminal enters global configuration mode from
privileged EXEC mode
enable enters privileged EXEC mode
end ends and exits configuration mode
history size number-of-lines sets the number of previously issued
commands that are stored in the history
buffer
hostname host-name sets the device name
line console 0 accesses console line configuration mode
show clock displays the system clock
show flash displays the boot flash or PC card
information
show history displays the commands entered in the
current EXEC session
show interfaces [type displays statistics for all interfaces
number] configured on the router
show ip interface brief displays a brief summary of interface
status and configuration
show protocols displays Layer 3 protocols enabled for a
device
show running-config displays the active configuration file
show terminal displays the current terminal settings
show version displays hardware platform and software
versions

Task 1: Learn the Basic Show Commands

1. On Router1, configure a host name of Router1.

2. Issue the show ? command to use Router1’s help function to view a


list of the show commands that can be issued on Router1. At the ––
MORE–– prompt, press the Spacebar key to view the next page of
information.

3. Display the active configuration in memory. At the ––MORE––


prompt, press the Spacebar to view the next page of information.

4. Display the contents of flash memory.

5. Display the commands that you have issued that are still stored in
router memory.

Compiled by: Dr Rajan Kadel Nov 2017


BN202 Laboratory 3: Basic router commands Page 3 of 14

6. Display the number of commands that can be stored in the history


buffer on the terminal.

7. How many commands can currently be stored in the history buffer?


________________________

8. Configure the history buffer to store 100 commands.

9. Verify the number of commands can be stored in the history buffer.

10. Press the Ctrl+P key combination or the Up Arrow key to


retrieve one of the previous commands you typed. You can use the
Up Arrow key or the Down Arrow key or you can press Ctrl+N or
Ctrl+P to navigate through the list of previously typed commands
stored in the history buffer. Commands stored in the history buffer
are deleted each time you log off the device.

Compiled by: Dr Rajan Kadel Nov 2017


BN202 Laboratory 3: Basic router commands Page 4 of 14

Command Summary

Task 2: Learn the Copy Command


Perform the following tasks on Router1.

1. Configure a host name of Router1 for the router.

2. Display the active configuration.

3. Display the backup configuration file stored in NVRAM.

4. Copy the current active configuration to NVRAM. The current active

configuration is in random access memory (RAM); it should be saved so

Compiled by: Dr Rajan Kadel Nov 2017


BN202 Laboratory 3: Basic router commands Page 5 of 14

that the router will still boot up with the saved configuration in the event

of a power outage.

5. Display the configuration stored in NVRAM.

6. If you decide that you would like to start configuring the router from

scratch, you can erase the startup configuration and reload the router.

This will enable you to completely delete all configurations on the router.

Issue the erase startup-config command to delete the configuration file

in NVRAM. When prompted, confirm that you want to erase the NVRAM

file system by pressing the Y key.

7. Reload the router, and press the Enter key when prompted to confirm

the reload. When prompted to enter the initial configuration dialog, type

no. The initial configuration dialog prompt is displayed because a startup

configuration was not found.

8. After the router reboots, look at the startup configuration file again.

What configuration is displayed?

9. Configure the host name of the router as Router1.

10. Save the router configuration.

11. Change the host name to Boson.

12. Reload the router. Press Enter when prompted to confirm the reload.

13. After the router reloads, what host name is displayed in the prompt?

_______________________

14. View the configuration used when the router restarted after you

issued the reload command.

Compiled by: Dr Rajan Kadel Nov 2017


BN202 Laboratory 3: Basic router commands Page 6 of 14

Detailed Information
Ref: http://study-ccna.com/cisco-ios-overview/

Cisco IOS overview

IOS (Internetwork Operating System) is a multitasking operating system


used on most Cisco routers and switches. IOS has a command-line
interface with the predetermined number of multiple-word commands.
This operating system is used to configure routing, switching,
internetworking and other features supported by a Cisco device.

Previous versions of Cisco switches ran CatOS, a discounted version of a


CLI-based operating system. Below you can see how IOS looks like when
a Cisco device is started for the first time:

Accessing the IOS


There are three most common ways to access the IOS:

1. Console access – this type of access is usually used to configure


newly acquired devices. These devices usually don’t have an IP address
configured, and therefore can not be accessed through a network. Most
of the Cisco devices have a physical console port. This port can be
connected to a computer using a rollover cable, a special type of cable
with pins on one end reversed on the other end of the cable. The rollover

Compiled by: Dr Rajan Kadel Nov 2017


BN202 Laboratory 3: Basic router commands Page 7 of 14

cable is a serial cable, which means that you can’t just plug it in an
Ethernet port on your computer. You will need an adapter that converts
an interface on your computer (usually a 9-pin serial interface) into RJ-
45.

2. Telnet access – this type of access used to be a common way to


access network devices. Telnet is an terminal emulation program that
enables you to access IOS through the network and configure the device
remotely. The device that is being configured needs to have an Telnet
server installed and an IP address configured.

Telnet uses a well known TCP port 23. One of the biggest disadvantages
of this protocol is that is sends all data as clear-text, which includes the
passwords! This is the reason why this type of access is usually not used
anymore. Instead, SSH is usually used.

3. SSH access – like Telnet, this access type enables you to configure
devices remotely, but it adds an extra layer of security by encrypting all
communications using public-key cryptography. SSH uses well known
TCP port 22.
Types of memory on a Cisco device
Cisco devices usually have four types of memory that are being used for
different purposes. These four types are:
• ROM (Read-only memory) – stores a bootstrap program that is
used to initialize a boot process. This is a read-only type of memory, so it
can’t be altered.
• RAM (Random Access Memory) – the running configuration of a
device is stored here. This type of memory loses its content when a
device is restarted.
• Flash memory – used to store IOS software images. Can also be
used to store other files, for example backup configuration files. Retains
its content even after a device is restarted.
• NVRAM (Nonvolatile RAM) – usually used to store a startup
configuration file. This type of memory retains its content even after a
device is powered down or restarted.

Running & startup configuration


CIsco devices store commands in a configuration file. Immediately after
you type a command in the global configuration mode it is stored in the
running configuration. A running configuration resides in a device’s
RAM, so if a device loses power, all configured commands will be lost.

To avoid that scenario, you need to copy your current configuration into a
startup configuration. A startup configuration is stored in the nonvolatile
memory of a device, which means that all configuration changes are
saved even if the device loses power.

Compiled by: Dr Rajan Kadel Nov 2017


BN202 Laboratory 3: Basic router commands Page 8 of 14

To copy your running configuration into the startup configuration you


need to type the command copy running-configuration startup-
configuration.

IOS basic commands


Hostname command
The hostname command is used to configure a device hostname. Because
this command changes a device configuration, the command must be
entered in the global configuration mode. After typing the command the
prompt changes and displays the new hostname.
Here is an example that shows you how to change a hostname of a
device.
First, enter the global configuration mode by typing the enable command
in the user EXEC mode and the configuration terminal command in the
privileged EXEC mode. Once inside the global configuration mode, type
the command hostname Cisco. Notice how the prompt was changed to
reflect the configured value.

No shutdown command
By default, all interfaces on a Cisco router are turned off. To enable an
interface, the no shutdown command is used. You first need to enter the
submode of the interface that you want to configure. You can do that by
using the global configuration mode command interface
INTERFACE_TYPE/ INTERFACE_NUMBER. You can get a list of available
interfaces by typing the ‘?’ character after the interface command.
You may notice that the promt has changed to reflect the mode you are
currently in. For the interface mode the HOSTNAME#(config-if) prompt
is shown.
Once inside the interface mode, you can enable an interface by typing
the no shutdown command.

Compiled by: Dr Rajan Kadel Nov 2017


BN202 Laboratory 3: Basic router commands Page 9 of 14

IP address command
The ip address interface mode command is used to assign an IP address
to an interface. The syntax of this command is: ip address IP_ADDRESS
SUBNET_MASK. For example, if we want to assign an IP address of
10.0.0.1 with the subnet mask 255.0.0.0 to a interface, the following
command is used: ip address 10.0.0.1 255.0.0.0

What if you had made a mistake and written the ip address 10.0.0.2
255.0.0.0command instead of the command above? Well, you can remove
the wrong IP address by typing the same command, but this time with
the no keyword, in this case no ip address. You can remove any command
from your IOS configuration by using the no keyword in front of the
command.

Setting up passwords
Each Cisco IOS device has the built-in authentication features. There are
three basic ways to configure authentication on a device:
Configure a password for the console access – by default, a console
access doesn’t requires a password. You can configure a password for
the console access by using the following commands:
HOSTNAME(config) line console 0
HOSTNAME(config-line) password PASSWORD
HOSTNAME(config-line) login
This will force a user to type the password when trying to access the
device through the console port.

Configure a password for the telnet access – by default, a telnet


access is disabled. You need to enable it. This is done using the following
sequence of commands:
HOSTNAME(config) line vty FIRST_VTY LAST_VTY
HOSTNAME(config-line) password PASSWORD
HOSTNAME(config-line) login
The first command defines a range of virtual terminal sessions that you
would like to configure. A virtual session can be a telnet or SSH session.
Cisco devices usually supports 16 concurrent VTY sessions. So, this
command usually looks like this: line vty 0 15.

Compiled by: Dr Rajan Kadel Nov 2017


BN202 Laboratory 3: Basic router commands Page 10 of 14

The login command allows a remote access to a device. It is required for


telnet to work.

Configure a password for the privileged EXEC mode – from the


privileged EXEC mode you can enter the global configuration mode and
change the configuration of a device. Therefore it is important to
somehow prevent an unauthorized user from entering the global
configuration mode. You can do that by setting up a password to enter
the privileged EXEC mode. This can be done in two ways:

• HOSTNAME(config) enable password PASSWORD


• HOSTNAME(config) enable secret PASSWORD
Both of the commands above accomplish the same thing, but with one
major difference. The enable secret PASSWORD commands encrypts the
password, while the enable password PASSWORD command doesn’t,
which means that an unauthorized user could just read a password from
the device configuration.

Service password-encryption command


By default, passwords configured using the enable password command
and passwords for the console or telnet access are stored in clear text in
the configuration file. This presents a security risk because an attacker
could easily find out passwords. The global configuration service
password-encryption command encrypts all passwords configured.

It is important to note that this type of password encryption is not


consider especially secure, since the algorithm used can be easily
cracked. Cisco recommends using this command only with additional
security measures.

Compiled by: Dr Rajan Kadel Nov 2017


BN202 Laboratory 3: Basic router commands Page 11 of 14

Configuring banners
You can display a banner on a Cisco device. A banner is usually shown
before the login prompt. It is usually some text that appears on the
screen when a user connect to the device (e.g. some legal information).
The most commonly used banner is the Message Of The Day (MOTD)
banner. This banner, if configured, is shown before the login prompt to
every user that is trying to establish a session with the device. The
following global configuration command is used to configure a MOTD
banner:
hostname(config) banner motd DELIMITING_CHARACTER TEXT
DELIMITING_CHARACTER

A delimiting character is a character of your choice. Its purpose is to


signify the start and end of a text that will appear in the banner. For
example, the commandbanner motd # Unauthorized access forbidden!
# will show the following text:Unauthorized access forbidden!.

Show version command


The show version command is used to display information about a Cisco
device. The command can be entered in both the user EXEC and
privileged EXEC mode. By using this command you can find out many
useful information about your Cisco device, such as:
Software Version – IOS software version
 System up-time – time since last reboot
 Software image name – IOS filename stored in flash
 Hardware Interfaces – interfaces available on device
 Configuration Register value – bootup specifications, console speed
setting, etc.
 Amount of RAM memory – amount of RAM memory
 Amount of NVRAM memory
 Amount of Flash memory
The following example shows the output of the command.

Compiled by: Dr Rajan Kadel Nov 2017


BN202 Laboratory 3: Basic router commands Page 12 of 14

Show history command

An IOS device stores, by default, 10 last commands you have entered in


your current EXEC session. You can use the show history command from
the user EXEC or privileged EXEC mode to display them.

You can set a number of command saved in the buffer for the current
terminal session by using the terminal history size NUMBER command
from the user EXEC or privileged EXEC mode.

TIP – another way to recall your command from the history buffer is by
using the Up Arrow key on your keyboard. Most recent command is
recalled first.

Compiled by: Dr Rajan Kadel Nov 2017


BN202 Laboratory 3: Basic router commands Page 13 of 14

Show running-configuration & show startup-configuration


commands
After you have changed the configuration of your device you can verify its
configuration. To dispay the current configuration, type show running-
configuration from the privileged EXEC mode. This show the
configuration that is stored in a device’s RAM.

After you have saved your running configuration into the startup
configuration, you can view the saved configuration using the show
startup-config command from the privileged EXEC mode. This command
shows the configuration that is currenty stored in the device’s NVRAM.
This configuration will be loaded next time the device is restarted.

Compiled by: Dr Rajan Kadel Nov 2017


BN202 Laboratory 3: Basic router commands Page 14 of 14

Compiled by: Dr Rajan Kadel Nov 2017

You might also like