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

LAB#03_333

This lab handout from Mehran University outlines the objectives and outcomes for a networking lab focused on making console and telnet connections with network devices using terminal emulator software. It provides detailed instructions on configuring a Cisco switch, including setting hostnames, passwords, and banners, as well as managing MAC address tables and interface settings. The document also includes rubrics for assessing student performance and the necessary equipment for the lab activities.

Uploaded by

narmeen039
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

LAB#03_333

This lab handout from Mehran University outlines the objectives and outcomes for a networking lab focused on making console and telnet connections with network devices using terminal emulator software. It provides detailed instructions on configuring a Cisco switch, including setting hostnames, passwords, and banners, as well as managing MAC address tables and interface settings. The document also includes rubrics for assessing student performance and the necessary equipment for the lab activities.

Uploaded by

narmeen039
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

DEPARTMENT OF SOFTWARE ENGINEERING

MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO


COMPUTER COMMUNICATION & NETWORKING
(4TH Semester, 2ND Year) LAB HANDOUT # 03
________________________________________________________________________

Name: _____________________________________________ Roll No: _____________

Score: ____________Signature of the Lab Tutor: _______________ Date: ___________


________________________________________________________________________

OBJECTIVES
#. Of
# Topic CLO Taxonomy level
Lectures
To make console and telnet connections with
4 network devices (e.g., switch and router) using open- 3 2 P5
source terminal emulator software.

OUTCOME(S)
a. An ability to apply knowledge of math, science, and PLO1: Engineering Knowledge:
engineering
k. an ability to use the techniques, skills, and modern PLO5: Modern Tool Usage
engineering tools necessary for engineering practice.

RUBRICS:
Performance Exceeds Meets expectations Does not meet
Score
Metric expectation (4-5) (2-3) expectations (0-1)
Applies the
Applies the relevant knowledge
appropriate and concept to the
knowledge and Fails to apply
problem, possibly
concepts to the relevant knowledge
problem with in a roundabout
Knowledge and and concepts to the
accuracy and way; understands
application problem;
proficiency; the major points of
[PLO1] misunderstands or
shows precise the knowledge,
understanding of fails to recall
with possible
these knowledge critical points.
misunderstanding
and concepts. or failure to recall
minor points;
Modern Tool Computer and Computer and Computer and
Usage [PLO5] software are software are software are
extensively used somewhat utilized, not utilized, no
in the course attempt was made
effort was put into
learning new at learning new
software software
DEPARTMENT OF SOFTWARE ENGINEERING
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
COMPUTER COMMUNICATION & NETWORKING
(4TH Semester, 2ND Year) LAB HANDOUT # 03
________________________________________________________________________

Total Score

EQUIPMENT

• Catalyst 2950 /1920 Switch


• 2 PC’s with NIC installed
• 2 Straight through UTP cables
• RJ-45 TO DB-9 adapter
• RJ-45 TO RJ 45 rollover cable

DISCUSSION & CONFIGRATION:


Navigation between different switch command modes
Cisco switches run on proprietary OS known as Cisco IOS. IOS is a group of commands
used for monitoring, configuring and maintaining cisco devices. For security and easy
administration, IOS commands are divided in the set of different command modes. Each
command mode has its own set of commands. Which commands are available to use, depend
upon the mode we are in.
Navigation between Cisco IOS modes

Mode Purpose Prompt Command to enter Command to exit

User EXEC Allow you to connect with Router > Default mode after booting. Use exit command
remote devices, perform Login with password, if
basic tests, temporary configured.
change terminal setting and
list system information

Privileged Allow you to set operating Router # Use enable command from user Use exit command
EXEC parameters. It also includes exec mode
high level testing and list
commands like show, copy
and debug.

Global Contain commands those Router(config)# Use configure terminal Use exit command
Configuration affect the entire system command from
privileged exec mode

Interface Contain commands those Router(configif) Use interface type Use exit command
Configuration modify the operation of an # number command from global to return in global
DEPARTMENT OF SOFTWARE ENGINEERING
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
COMPUTER COMMUNICATION & NETWORKING
(4TH Semester, 2ND Year) LAB HANDOUT # 03
________________________________________________________________________

interface configuration mode configuration mode

Sub-Interface Configure or modify the Router(config Use interface type sub Use exit to return
Configuration virtual interface created subif) interface number command in previous mode.
from physical interface from global configuration mode Use end command
or interface configure mode to return in
privileged exec
mode.

ROMMON If router automatically enter ROMMON> Enter reload command from Use exit command in
this mode, then it privileged exec mode. indicates that it fails to Press CTRL + C key locate a
valid IOS image. combination during the first 60 Manual entrance in this seconds of booting
process mode Allow you to perform low-level diagnostics.

How to get help on Cisco Switch command mode


Switch provides two types of context sensitive help, word help and command syntax help.
Word help
Word help is used to get a list of available commands that begin with a specific letter. For
example, if we know that our command begins with letter e, we can hit enter key after
typing e? at command prompt. It will list all possible commands that begin with letter e.

We can list all available commands, if we don't know the initials of our command. For
example, to list all available commands at User exec mode, just type? at command prompt
and hit enter key.
DEPARTMENT OF SOFTWARE ENGINEERING
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
COMPUTER COMMUNICATION & NETWORKING
(4TH Semester, 2ND Year) LAB HANDOUT # 03
________________________________________________________________________

Command syntax help


Command syntax help can be used to get the list of keyword, commands, or parameters
that are available starting with the keywords that we had already entered. Enter?
(Question mark) after hitting Space key and prompt will return with the list of available
command options. For example, to know the parameters required by show ip command
type show ip? and prompt will return with all associate parameters. If prompt returns with
<CR> only as an option, that means switch does not need any additional parameters to
complete the command. You can execute the command in current condition.

Lab equipment requirements

To perform this lab, you need 1 Cisco Catalyst 2950 Switch and at least 1 PC. However,
most of the commands will work on other switch models as well. We are going to use two
different PCs but they can be one and the same physical PC. You will need to connect
them as depicted in the following the network diagram:
DEPARTMENT OF SOFTWARE ENGINEERING
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
COMPUTER COMMUNICATION & NETWORKING
(4TH Semester, 2ND Year) LAB HANDOUT # 03
________________________________________________________________________

Fig: Network Diagrm

Connect the console cable to the to the console port on the switch and the
other end to the serial port of PC1. Connect PC2 to first Fast Ethernet port
(i.e. FA0/1) using an UTP/STP cable. PC1 must have a terminal client (i.e.
Windows HyperTerminal) installed, and PC2 must be able to setup a telnet
connection.

Configuring the Switch

Before you start with the configuration of the switch, clear the switch configuration by
using the erase startup-config command or the erase nvram: command in Privileged
EXEC mode, and then use the reload command to reboot the switch. After the switch
rebooted, the following message will be displayed:

% Please answer 'yes' or 'no'.


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

Type no and press ENTER.

Press ENTER when the message Press RETURN to get started appears.

Type enable at the Switch> command prompt.

Switch>enable
a. What prompt does enable command display and what does it mean?
DEPARTMENT OF SOFTWARE ENGINEERING
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
COMPUTER COMMUNICATION & NETWORKING
(4TH Semester, 2ND Year) LAB HANDOUT # 03
________________________________________________________________________

_____________________________________________________________________

STEP 1: Change the switch's host name to SWR-2024

Enter configuration mode using the following command:


Switch#configure terminal

a. Enter configure terminal at the privilege mode prompt.


Switch#configure terminal
b. Which prompt switch will display after typing above command?
____________________________________________
c. What does this prompt mean?
_______________________________________________________________________

Change the host name of the switch to "SWR-2024" using the following command:
Switch(config)#hostname SWR-2024

a. Which prompt this Switch will display? _____________________


b. What does this prompt mean?
_______________________________________________________________________
c. Why this change in the prompt is required?
_______________________________________________________________________

STEP 2: Configure passwords

First set the enable password to cisco using the following command: SWR-
2024(config)#enable password cisco

Next, set the enable secret to cisco123 using the following command: SWR-
2024(config)#enable secret cisco123

Next, set the password for all telnet lines to 'cisco456' using the following commands:
SWR-2024 (config)#line vty 0 15
SWR-2024 (config-line)#password cisco456
SWR-2024 (config-line)#login
Although the enable secret is encrypted, other passwords stored in the switch's
configuration are still in clear text like enable password. You can see this by returning to
Privileged EXEC mode and running the show running config:
DEPARTMENT OF SOFTWARE ENGINEERING
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
COMPUTER COMMUNICATION & NETWORKING
(4TH Semester, 2ND Year) LAB HANDOUT # 03
________________________________________________________________________

SWR-2024 (config)#end (or press CTRL-Z)

SWR-2024#show running-config

Notice the enable secret is replaced by a hashed version, for example:


enable secret 5 $1$iUjJ$cDZ03KKGh7mHfX2RSbDq

When you log on with the enable secret, the switch calculates the hash value again and
compares it with the hash value stored in the configuration. If they match, you typed in
the correct secret and will enter Privileged EXEC mode. You can configure a password
by using the enable password command instead, but in contrary to the enable secret, the
enable password is not encrypted by default. If an enable password and an enable secret
are configured, you will need to enter the enable secret to logon. In other words, there’s
no need to configure an enable password if you configured an enable secret.

Near the end of the configuration, you will notice the vty password you just configured,
and that it is stored in plain text format. To ensure this password, as well as others such as
the console password are also encrypted, use the service password-encryption command
in Global configuration mode:

SWR-2024#configure terminal
SWR-2024(config)#service password-encryption

If you would run the show running-config command in Privileged EXEC mode again, you
will notice the vty password is now also encrypted. For example: 1511021F07257F717E

You can also set a password on the aux or console connection, for example to set the password to
cisco789:

SWR-2024 (config)#line con 0


SWR-2024 (config-line) #password cisco789
SWR-2024 (config-line) #login

a. At Privileged EXEC mode type ‘show running-config’ and follow the details.

b. Is there an encrypted password?


Mention______________________________________________
c. Are there any other passwords?
Mention_______________________________________________
d. Are any of the other passwords encrypted?
Mention_______________________________________
DEPARTMENT OF SOFTWARE ENGINEERING
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
COMPUTER COMMUNICATION & NETWORKING
(4TH Semester, 2ND Year) LAB HANDOUT # 03
________________________________________________________________________

STEP 3: Configure Banner on switch

The banner or MOTD (message of the day) is to display a temporary notice to users, such
as issues with system availability. However, because the message displays when a user
connects to the device prior to login, most network administrators are now using it to
display legal notices regarding access to the switch, such as unauthorized access to this
device is prohibited and violators will be prosecuted to the full extent of the law and other
such cheery endearments.

Use the following commands to set the banner or motd on switch which alerts unauthorized users not
to access the switch.

SWR-2024(config)#banner motd #this device is for authorized person only if you


Haven’t been provided with the permission to access this device
Exit at once#

Notice that each of the banner lines ends with a # symbol; this is a delimiter to identify the
end of the message. You can specify any character you want, but the character you choose
is the one you will use to end the banner message. Here is what these messages look like
when you connect to the switch:

STEP 4: show mac-address-table

Switch stores MAC address of devices those are attached with its interfaces
in CAM table. We can use show mac-address-table command to list all
learned devices.

a. How switches use this table to forward data?


Mention______________________________________________
DEPARTMENT OF SOFTWARE ENGINEERING
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
COMPUTER COMMUNICATION & NETWORKING
(4TH Semester, 2ND Year) LAB HANDOUT # 03
________________________________________________________________________

b. In mac table under type column what does dynamic refers to?
Mention______________________________________________
How to clear mac address table
Switch stores MAC addresses in MAC address table. Gradually it could be full. Once it
full, switch automatically starts removing old entries. You can also clear these tables
manually from privileged exec mode. To delete all entries use following command
switch#clear mac address-table

To delete only dynamic entries use


switch#clear mac address-table dynamic
How to add static MAC address in CAM table
For security purp ose sometime we have to add mac address in CAM table manually. To add
static MAC address in CAM table use following command
Switch(config)#mac address-table static aaaa.aaaa.aaaa vlan 1 interface
fastethernet 0/1

In above command we entered an entry for static MAC address aaaa.aaaa.aaaa assigned
to FastEnternet 0/1 with default VLAN1.
STEP 5: How to set duplex mode

Switch automatically adjust duplex mode depending upon remote device. We


could change this mode with any of other supported mode. For example, to
force switch to use full duplex mode use
Switch(config)# #interface fastethernet 0/1
Switch(config-if)#duplex full

To use half duplex use


Switch(config)# #interface fastethernet 0/1
Switch(config-if)#duplex half
STEP 5: Display interface status
show interface command displays information about interfaces. Without argument it
would list all interfaces. To get information about specific interface we need to pass its
interface number as an argument. For example, to view details about FastEthernet 0/1, use
show interface fastethernet 0/1. First line from output below provides information about
the status of interface. FastEthernet0/1 is up, line protocol is up (connected), The first up
indicates the status of the physical layer, and the second up indicates to the status of the
data link layer.
DEPARTMENT OF SOFTWARE ENGINEERING
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
COMPUTER COMMUNICATION & NETWORKING
(4TH Semester, 2ND Year) LAB HANDOUT # 03
________________________________________________________________________

a. What will be status of line protocol if at data link layer we use two different protocols?
Mention______________________________________________

Possible interface status


▪ up and up :- Interface is operational.
▪ up and down :- Its data link layer problem.
▪ down and down :- Its physical layer problem.
▪ Administratively down Interface is disabled with shutdown command.
Possible values for physical layer status
▪ Up :- Switch is sensing physical layer signal.
▪ Down :- Switch is not sensing physical layer signal. Possible reasons could be cable is not
connected, wrong cable type is used and remote end device is turned off.
▪ Administratively down :- Interface is disabled by using shutdown command.
Possible values for data link layer status
▪ Up :- The data link layer is operational.
▪ Down :- The data link layer is not operational. Possible reasons could be a disabled physical
layer, missed keep alives on a serial link, no clocking or an incorrect encapsulation type.
DEPARTMENT OF SOFTWARE ENGINEERING
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
COMPUTER COMMUNICATION & NETWORKING
(4TH Semester, 2ND Year) LAB HANDOUT # 03
________________________________________________________________________

show ip interface brief is a extremely useful command to get quick overview of all interfaces on
switch. It lists their status including IP address and protocol.

STEP 5: Saving the configuration

Saving the configuration on a modern Cisco Catalyst switch running IOS software works
the same as on Cisco routers. This means you have to copy the running configuration (in
RAM) to the startup configuration (in NVRAM) by using the following command in
Privileged EXEC mode:

SWR-2024#copy running-config startup-config

If you run the show startup-config command, you should get the same output as the show
running-config command. The dir nvram: command should show the startup-config file
with a size greater than zero. The configuration is also stored in the config.text file in
flash, which content you can see by using the show flash command.STEP 6: Display
switch hardware and firmware information

The show version command allows you to display information about the switch’s
hardware and IOS. The first half shows information about the IOS in flash, the boot
loader on ROM, the uptime, what caused the switched to reboot, and the IOS edition it
runs. The second half shows information about the hardware, including the interfaces, the
memory and serial numbers.
SWR-2024#show version
DEPARTMENT OF SOFTWARE ENGINEERING
MEHRAN UNIVERSITY OF ENGINEERING & TECHNOLOGY, JAMSHORO
COMPUTER COMMUNICATION & NETWORKING
(4TH Semester, 2ND Year) LAB HANDOUT # 03
________________________________________________________________________

a. Enter the show version command. The Switch will return information about the IOS that is
running in RAM.
b. Write the name of the IOS version? ____________________________
c. What is the name of the system image (IOS) file?
______________________________________________________________________
d. Where was the switch IOS image booted from?
____________________________________________
e.How many Ethernet interfaces does this switch have?
_________________________

Lab Exercise:
1. Submit a lab with performing a simple task connect a pc with switch using console
connection and configure telnet connection. Using Telnet configure switch with all basic
configuration we learnt in this Lab.
FINAL CHECK LIST
1. Return all equipment and materials to their proper storage area.
2. Submit your answers to question, before the next laboratory.

You might also like