0% found this document useful (0 votes)
31 views8 pages

Lab # 4

nice

Uploaded by

elegekhan342
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)
31 views8 pages

Lab # 4

nice

Uploaded by

elegekhan342
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

Computer Networks

LAB

EXPERIMENT # 04: Basic Switch Configuration

Name of Student: …………………………………..

Roll No.: ……………………………………………

Date of Experiment: ………………………………..

Report submitted on: ………………………………..

Marks obtained: ……………………………………

Remarks: ……………………………………………

Instructor’s Signature: ……………………………...

Computer Networks Lab Page 1


Basic Switch Configuration
1. Objective
This lab exercise is designed for understanding and using basic configuration commands
on a Cisco Switch interacting through Cisco IOS.

2. Resources Required
• Computer
• Packet Tracer (version 5 or higher)

3. Introduction
This lab introduces Cisco IOS (Internetwork Operating System) which is the proprietary CLI
(command line interface) based software empowering nearly all the Cisco devices. IOS is a
package of routing, switching, internetworking and telecommunications functions tightly
integrated with a multitasking operating system.

The loading process is Cisco IOS is as follows:


a) Bootstrap is loaded from ROM which starts up POST (Power On Self Test).
b) Valid image file is searched from flash memory, if found is loaded into the RAM,
otherwise ROMMON is loaded from ROM.
c) Valid startup-config is searched from NV-RAM, if found is loaded into the RAM as
running-config, otherwise the device just starts without any previous configurations.

From this we conclude that Cisco devices have 4 types of memories present:
a) ROM b) Flash c) NV-RAM d) RAM

4. Procedure
1. Open Packet Tracer 5 and setup a network similar to the following network. Use
Cisco 2950T switch.

Computer Networks Lab Page 2


2. Double click the switch and goto CLI tab. Follow the steps below to complete the
lab. You can do the same using a PC if you use a console (one side is RS 232, other is RJ45—
blue colored in Packet Tracer) cable for connection between PC and Switch. Goto PC’s
desktop then Terminal (equivalent of HyperTerminal), accept the default settings and login to the
Switch.

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 privileged command set includes those commands contained in
user EXEC mode, as well as 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? ___________________

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

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 ALSwitch, 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

Computer Networks Lab Page 3


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.

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? _______________________________________

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 0 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
ALSwitch(config-line)#line vty 0 15
ALSwitch(config-line)#password cisco
ALSwitch(config-line)#login
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

b. Which password takes precedence, the enable password or enable secret password?
________________

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
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
Computer Networks Lab Page 4
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? ______________________________

c. What are the VLAN states: VLAN1 is __________, Line protocol is __________

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? ______________________________________

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]
ALSwitch#

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 Configure the hosts attached to the switch


Configure the hosts to use the same IP subnet for the address, mask, and default gateway as on
the switch.

Computer Networks Lab Page 5


Step 12 Verify connectivity
a. To verify that hosts and switch are correctly configured, ping the switch IP address from the
hosts.
b. Were the pings successful? __________________________________________________ c.
If the answer is no, troubleshoot the hosts and switch configurations.

Step 13 Record the MAC addresses of the host


a. Determine and record the layer 2 addresses of the PC network interface cards. Check by using
command ipconfig /all in command prompt of the Packet Tracer PC (in Desktop tab).

b. PC1: ___________________________________________________________________

c. PC4: ___________________________________________________________________

Step 14 Determine the MAC addresses that the switch has learned
a. To determine the what MAC addresses the switch has learned use the show mac-address-
table command as follows at the privileged EXEC mode prompt: ALSwitch#show mac-
address-table

b. How many dynamic addresses are there? ________________________________________

c. How many total MAC addresses are there? _______________________________________

d. How many addresses have been user defined? ___________________________________

e. Do the MAC addresses match the host MAC addresses? _____________________________

Step 15 Determine the show MAC table options


a. To determine the options the show mac-address-table command has use the ? option as
follows:

ALSwitch#show mac-address-table ?

b. How many options are available for the show mac-address-table command? __________

c. Show only the mac-address-tables that were learned dynamically.

d. How many are there? _______________________________________________________

Step 16 Clear the MAC address table


To remove the existing MAC addresses use the clear mac-address-table command from the
privileged EXEC mode prompt as follows:
ALSwitch#clear mac-address-table dynamic

Computer Networks Lab Page 6


Step 17 Verify the results
a. Verify that the mac-address-table was cleared as follows:

ALSwitch#show mac-address-table

b. How many total MAC addresses are there now? ___________________________________

c. Why are there so many? ____________________________________________________

d. How many dynamic addresses are there? ________________________________________

Step 18 Determine the clear MAC table options


a. To determine the options available use the command clear mac-address-table ? at the
privileged EXEC mode prompt as follows:

ALSwitch#clear mac-address-table ?

b. How many options are there? _________________________________________________

c. In what circumstances would these options be used? _______________________________

Step 19 Examine the MAC table again


a. Look at the MAC address table again using the show mac-address-table command at the
privileged EXEC mode prompt as follows:

ALSwitch#show mac-address-table

b. How many dynamic addresses are there? ________________________________________

c. Why did this change from the last display? _______________________________________

d. The table has not changed yet, ping the switch IP address from the hosts two times each and
repeat Step 19.

Step 20 Exit the switch


Leave the switch welcome screen by typing exit as follows:

ALSwitch#exit

Computer Networks Lab Page 7


Computer Networks Lab

LAB WORKSHEET (Lab # 4)


Q.1 What is Cisco IOS and what are its functions?
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Q.2 Identify the differences between line and interface of a Cisco device.
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Q.3 If switch doesn’t know the destination address, what will it do? If it does then
what action is taken?
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Q.4 What are the differences between running-config and startup-config?


________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Computer Networks Lab Page 8

You might also like