Lab 3 Computer Networks

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Computer Networks Lab Manual CE-231L

Lab 3: Introduction to Hub, Switch & Router (Switch Administrative


Function)

Lab Objective:
a) Configure a switch with a name and an IP address.
b) Configure passwords to ensure that access to the CLI is secured.
c) Configure switch port speed and duplex properties for an interface.
d) Save the active configuration.
e) View the switch browser interface

Background/Preparation
Cable a network similar to the one in the diagram. The configuration output used in this lab is
produced from a 2950 series switch. Any other switch used may produce different output. The
following steps are to be executed on each switch unless specifically instructed otherwise.

Note: Go to the erase and reload instructions at the end of this lab. Perform those steps on all
switches in this lab assignment before continuing.

1 Air University Islamabad, Islamabad Campus


Computer Networks Lab Manual CE-231L

Step 1 Enter privileged mode


a. Privileged mode gives access to all the switch commands. Many of the privileged commands
configure operating parameters. Therefore, privileged access should be password-protected
to prevent unauthorized use. The configure command through which access to the remaining
command modes is gained.

Switch>enable
Switch#

b. Notice the prompt changed in the configuration to reflect privileged EXEC mode.

Step 2 Examine the current switch configuration

a. Examine the following current running configuration file:


Switch#show running-config

b. How many Ethernet or Fast Ethernet interfaces does the switch have?
24

c. What is the range of values shown for the VTY lines?


0-15 16 in total

d. Examine the current contents of NVRAM as follows:


Switch#show startup-config
%% Non-volatile configuration memory is not present

e. Why does the switch give this response?

Step 3 Assign a name to the switch


a. Enter enable and then the configuration mode. The configuration mode allows the
management of the switch. Enter AL Switch, the name this switch will be referred to in
the following:

Switch#configure terminal
Enter the configuration commands, one for each line. End by pressing Ctrl-Z.
Switch(config)#hostname ALSwitch
ALSwitch(config)#exit

b. Notice the prompt changed in the configuration to reflect its new name. Type exit or press
Ctrl-Z to go back into privileged mode.

2 Air University Islamabad, Islamabad Campus


Computer Networks Lab Manual CE-231L

Step 4 Examine the current running configuration


a. Examine the current configuration that follows to verify that there is no configuration
except for the hostname:
ALSwitch#show running-config

b. Are there any passwords set on the lines?


No

c. What does the configuration show as the hostname of this switch?

Step 5 Set the access passwords


Enter config-line mode for the console. Set the password on this line as cisco for login.
Configure the vty lines 5 to 15 with the password cisco as follows:

ALSwitch#configure terminal
Enter the configuration commands, one for each line. End by pressing Ctrl-Z.
ALSwitch(config)#line con 0
ALSwitch(config-line)#password cisco
ALSwitch(config-line)#login
(Optional)
ALSwitch(config-line)#line vty 0 15
ALSwitch(config-line)#password cisco
ALSwitch(config-line)#login
(Optional)
ALSwitch(config-line)#exit

Step 6 Set the command mode passwords


a. Set the enable password to cisco and the enable secret password to class as follows:
ALSwitch(config)#enable password cisco
ALSwitch(config)#enable secret class

Step 7 Configure the layer 3 access to the switch


a. Set the IP address of the switch to 192.168.1.2 with a subnet mask of 255.255.255.0 as
follows:
Note: This is done on the internal virtual interface VLAN 1.
ALSwitch(config)#interface VLAN 1
ALSwitch(config-if)#ip address 192.168.1.2 255.255.255.0
ALSwitch(config-if)#exit

3 Air University Islamabad, Islamabad Campus


Computer Networks Lab Manual CE-231L

b. Set the default gateway for the switch and the default management VLAN to
192.168.1.1 as follows:
ALSwitch(config)#ip default-gateway 192.168.1.1
ALSwitch(config)#exit

Step 8 Verify the management LANs settings


a. Verify the interface settings on VLAN 1 as follows:
ALSwitch#show interface VLAN 1
b. What is the bandwidth on this interface? 100,000 Kbits
c. What are the VLAN states: VLAN1 is administratively down , Line
protocol is down
d.Enable the virtual interface using the no shutdown command
ALSwitch(config)#interface VLAN 1
ALSwitch(config-if)#no shutdown
ALSwitch(config-if)#exit
e. What is the queuing strategy? FIFO

Step 9 Save the configuration


a. The basic configuration of the switch has just been completed. Back up the running
configuration file to NVRAM as follows:
Note: This will ensure that the changes made will not be lost if the system is rebooted or
loses power.
ALSwitch#copy running-config startup-config
Destination filename [startup-config]?[Enter]
Building configuration...
[OK]
ALSwitc
h#
c. Configuration upload is successfully completed.

Step 10 Examine the startup configuration file


a. To see the configuration that is stored in NVRAM, type show startup-config from the
privileged EXEC (enable mode)
ALSwitch#show startup-config
b. What is displayed?

c. Are all the changes that were entered recorded in the file?

Step 11 Exit the switch


Leave the switch welcome screen by typing exit as follows:

ALSwitch#exit

4 Air University Islamabad, Islamabad Campus


Computer Networks Lab Manual CE-231L

Lab Tasks
Lab Task 1:

 What is the difference between Hub and Switch?


 Briefly explain the difference between Layer-2 and Layer-3 device means.

Lab Task 2:

Connect 4 Computers with switch 2950 series on Fast Ethernet interface 2, 4, 6 and 8. Now apply the
following configuration on switch:

 Change name of switch


 Set enable and secret password
 Secure VTY lines
 Create VLAN interface
 Enable VLAN interface
 Save running configuration as startup configuration

Note: Attach screenshots for each step. Ping the PCs as well.

Conclusion:

5 Air University Islamabad, Islamabad Campus

You might also like