0% found this document useful (0 votes)
78 views10 pages

Lab 8 CCN

This document provides instructions for configuring a Cisco switch through its command line interface, including setting passwords, IP addresses, and MAC address tables. It outlines steps such as entering privileged mode, assigning the switch a hostname, configuring interface VLAN 1, and verifying connectivity between hosts and the switch. The goal is to understand basic switch configuration using Cisco IOS commands.

Uploaded by

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

Lab 8 CCN

This document provides instructions for configuring a Cisco switch through its command line interface, including setting passwords, IP addresses, and MAC address tables. It outlines steps such as entering privileged mode, assigning the switch a hostname, configuring interface VLAN 1, and verifying connectivity between hosts and the switch. The goal is to understand basic switch configuration using Cisco IOS commands.

Uploaded by

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

University of Engineering & Technology (UET)

Taxila
Computer Communication Networks LAB

EXPERIMENT # 08: Basic Switch Configuration on CLI

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

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

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

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

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

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

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

Computer Communication Networks 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.

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.

2. Double click the switch and goto CLI tab.

Computer Communication Networks Page 2


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

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

Computer Communication Networks Page 3


eStep 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 Communication Networks 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 Communication Networks 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:

Computer Communication Networks Page 6


ALSwitch#clear mac-address-table dynamic

Computer Communication Networks Page 7


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 20 Exit the switch


Leave the switch welcome screen by typing exit as follows:

ALSwitch#exit

Computer Communication Networks Page 8


University of Engineering & Technology (UET), Taxila
Computer Communication Networks Lab
LAB WORKSHEET (Lab # 8)

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


________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Q.2 Summarize the command lines used in configuration mode?


________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Q.3 What is difference between console and VTY?


________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

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


________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Computer Communication Networks Page 9


Computer Communication Networks Page 10

You might also like