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

Lab 6 Handout

This document outlines a lab exercise for students at the University of Engineering & Technology focused on VLANs and Inter-VLAN routing. It includes objectives, required resources, a detailed introduction to VLAN technology, and step-by-step procedures for configuring VLANs and routers using Cisco Packet Tracer. The lab aims to enhance understanding of network segmentation and routing within a computer network.

Uploaded by

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

Lab 6 Handout

This document outlines a lab exercise for students at the University of Engineering & Technology focused on VLANs and Inter-VLAN routing. It includes objectives, required resources, a detailed introduction to VLAN technology, and step-by-step procedures for configuring VLANs and routers using Cisco Packet Tracer. The lab aims to enhance understanding of network segmentation and routing within a computer network.

Uploaded by

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

University of Engineering & Technology (UET)

Taxila
Computer Networks LAB

Instructor: Engr. Awais Khan


EXPERIMENT # 06: VLANs & Inter-VLAN Routing

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

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

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

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

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

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

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


Computer Networks Lab Page 1
VLANs & Inter-VLAN Routing
1. Objective
This lab exercise is designed for understanding VLAN creation and Inter-VLAN routing.

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.

A broadcast domain is a logical division of a computer network, in which all nodes can reach
each other by broadcast at the data link layer. A simple LAN is a single broadcast domain. To
reduce the numbers of devices in a broadcast domain, we have to divide broadcast domain.
VLAN serve for this purpose. The whole idea of VLAN technology is to divide LAN into
logical, instead of physical, segments. VLANs are created at the Data Link layer so switches
apply them to a network. Computers in different VLANs can’t communicate with each other so
Inter-VLAN routing is required for this purpose.

VLANs create broadcast domains.

4. Procedure
4.1 Configuring Static VLANs

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.

When managing a switch, the Management Domain is always VLAN 1. The Network
Administrator's workstation must have access to a port in the VLAN 1 Management Domain. All
ports are assigned to VLAN 1 by default.

Step 1 Configure the switch


Configure the hostname, access and command mode passwords, as well as the management LAN
settings. These values are shown in the chart. If problems occur while performing this
configuration, refer to the Basic Switch Configuration lab.

Step 2 Configure the hosts attached to the switch


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

Step 3 Verify connectivity


a. To verify that the host and switch are correctly configured, ping the switch from the host.
b. Was the ping successful? __________________________________________________
c. If the answer is no, troubleshoot the host and switch configurations.

Step 4 Show the IOS version


a. It is very important to know the version of the operating system. Differences between versions
may change how commands are entered. Type the show version command at the user EXEC or
privileged EXEC mode prompt as follows:

Switch_A#show version

b. What version of the switch IOS is displayed? ______________________________________

c. Does this switch have standard edition or Enterprise edition software? ___________________

d. What is the Firmware version of the switch? ______________________________________

Step 5 Display the VLAN interface information


a. On Switch_A, type the command show vlan at the privileged EXEC prompt as follows:

Switch_A#show vlan

b. Which ports belong to the default VLAN? ________________________________________

c. How many VLANs are set up by default on the switch? ______________________________

Computer Networks Lab Page 3


d. What does the VLAN 1003 represent? __________________________________________

e. How many ports are in the 1003 VLAN? _________________________________________

Step 6 Create and name two VLANs


Enter the following commands to create and name two VLANs:

Switch_A#vlan database
Switch_A(vlan)#vlan 2 name VLAN2
Switch_A(vlan)#vlan 3 name VLAN3
Switch_A(vlan)#exit

Another (newer) way of doing the same is by entering the following commands:
Switch_A(config)#vlan 2
Switch_A(config-vlan)#name VLAN2
Switch_A(config-vlan)#vlan 3
Switch_A(config-vlan)# name VLAN3

Step 7 Display the VLAN interface information


a. On Switch_A, type the command show vlan at the privileged EXEC prompt as follows:

Switch_A#show vlan

b. Are there new VLANs in the listing? ____________________________________________

c. Do they have any ports assigned to them yet? _____________________________________

Step 8 Assign ports to VLAN 2


Assigning ports to VLANs must be done from the interface mode. Enter the following
commands to add port 2 to VLAN 2:

Switch_A#configure terminal
Switch_A(config)#interface fastethernet 0/2
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 2
Switch_A(config-if)#end

Step 9 Display the VLAN interface information


a. On Switch_A, type the command show vlan at the privileged EXEC prompt as follows:

Switch_A#show vlan

b. Is port 2 assigned to VLAN 2? ________________________________________________

c. Is the port still listed in the default VLAN? ________________________________________

Computer Networks Lab Page 4


Step 10 Assign a port to VLAN 3
Assigning ports to VLANs must be done from the interface mode. Enter the following
commands to add port 3 to VLAN3

Switch_A#configure terminal
Switch_A(config)#interface fastethernet 0/3
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 3
Switch_A(config-if)#end

Step 11 Look at the VLAN interface information


a. On Switch_A, type the command show vlan at the privileged EXEC prompt as follows:

Switch_A#show vlan

b. Is port 3 assigned to VLAN 3? ________________________________________________

c. Is the port still listed in the default VLAN? ________________________________________

Step 12 Look at only VLAN2 information


a. Instead of displaying all of the VLANs type the show vlan id 2 command at the privileged
EXEC mode prompt as follows:

Switch_A#show vlan id 2

b. Does this command supply any more information than the show VLAN command?
__________

Step 13 Look at only VLAN2 information with a different command


a. Instead of displaying all of the VLANs type the show vlan name VLAN2 command at the
privileged EXEC mode prompt.

Switch_A#show vlan name VLAN2

b. Does this command supply any more information than the show VLAN command?
__________

Note:
This configuration is much secure as VLANs can’t communicate with each other but if it is a
requirement, we can enable Inter-VLAN routing which is discussed in next section.

Computer Networks Lab Page 5


4.2 Configuring Inter-VLAN Routing

1. Open Packet Tracer 5 and setup a network similar to the following network. Use
Cisco 2950T switch & Cisco 2621XM router.

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.

This part also involves a router (Layer 3 device) but no major configurations are being done on
it. It also uses trunk link whose main purpose is multiplexing.

Step 1 Configure the switch


Configure the hostname, access, and command mode passwords, as well as the management
LAN settings. These values are shown in the chart. If problems occur while performing this
configuration, refer to the Basic Switch Configuration lab.

Step 2 Configure the hosts attached to the switch


Configure the hosts using the following information.

a. For the host in port 0/5:


IP address 192.168.5.2
Subnet mask 255.255.255.0
Default gateway 192.168.5.1

Computer Networks Lab Page 6


b. For the host in port 0/9:
IP address 192.168.7.2
Subnet mask 255.255.255.0
Default gateway 192.168.7.1

Step 3 Verify connectivity


a. To verify that the host and switch are correctly configured, ping the switch from the hosts.

b. Ping the switch IP address from the hosts.

c. Were the pings successful? __________________________________________________

d. Why or why not? __________________________________________________

Step 4 Create and name two VLANs


Enter the following commands to create and name two VLANs:

Switch_A#vlan database
Switch_A(vlan)#vlan 10 name Sales
Switch_A(vlan)#vlan 20 name Support
Switch_A(vlan)#exit

Another (newer) way of doing the same is by entering the following commands:
Switch_A(config)#vlan 10
Switch_A(config-vlan)#name Sales
Switch_A(config-vlan)#vlan 20
Switch_A(config-vlan)# name Support

Step 5 Configure VTP protocol


Assigning ports to VLANs must be done from the interface mode. Enter the following
commands to add ports 0/5 to 0/8 to VLAN 10:

Switch_A#configure terminal
Switch_A(config)#interface fastethernet 0/5
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 10
Switch_A(config-if)#interface fastethernet 0/6
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 10
Switch_A(config-if)#interface fastethernet 0/7
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 10
Switch_A(config-if)#interface fastethernet 0/8
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 10
Switch_A(config-if)#end
Computer Networks Lab Page 7
Step 6 Assign ports to VLAN 20
Enter the following commands to add ports 0/9 to 0/12 to VLAN 20:

Switch_A#configure terminal
Switch_A(config)#interface fastethernet 0/9
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 20
Switch_A(config-if)#interface fastethernet 0/10
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 20
Switch_A(config-if)#interface fastethernet 0/11
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 20
Switch_A(config-if)#interface fastethernet0/12
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 20
Switch_A(config-if)#end

Step 7 Display the VLAN interface information


a. On Switch_A, type the command show vlan at the privileged EXEC prompt as follows:

Switch_A#show vlan

b. Are ports assigned correctly? _________________________________________________

Step 8 Create the trunk


On Switch_A, type the following commands at the Fast Ethernet 0/1 interface command prompt.

Switch_A(config)#interface fastethernet0/1
Switch_A(config-if)#switchport mode trunk
Switch_A(config-if)#end

Step 9 Configure the router


a. Configure the router with the following data. Note that, in order to support trunking and inter-
VLAN routing, the router must have a Fast Ethernet interface.

Hostname is Router_A

Console, VTY, and enable passwords are cisco.

Enable secret password is class.

Computer Networks Lab Page 8


b. Then configure the Fast Ethernet interface using the following commands:

Router_A(config)#interface fastethernet 0/0


Router_A(config-if)#no shutdown
Router_A(config-if)#interface fastethernet 0/0.1
Router_A(config-subif)#encapsulation dot1q 1
Router_A(config-subif)#ip address 192.168.1.1 255.255.255.0
Router_A(config-if)#interface fastethernet 0/0.2
Router_A(config-subif)#encapsulation dot1q 10
Router_A(config-subif)#ip address 192.168.5.1 255.255.255.0
Router_A(config-if)#interface fastethernet 0/0.3
Router_A(config-subif)#encapsulation dot1q 20
Router_A(config-subif)#ip address 192.168.7.1 255.255.255.0
Router_A(config-subif)#end

Step 10 Display the router routing table


a. Type show ip route at the privileged EXEC mode prompt.

b. Are there entries in the routing table? ___________________________________________

c. What interface are they all pointing to? __________________________________________

d. Why is there not a need to run a routing protocol? __________________________________

Step 11 Test the VLANS and the trunk


Ping from the host in Switch_A port 0/9 to the host in port 0/5.

a. Was the ping successful? ___________________________________________________


b. Why? __________________________________________________________________

Ping from the host in Switch_A port 0/5 to the switch IP 192.168.1.2.

c. Was the ping successful? ___________________________________________________

Step 12 Move the hosts


a. Move the hosts to other VLANs and try pinging the management VLAN 1.
b. Note the results of the pinging.
______________________________________________________________________
______________________________________________________________________

Step 13 Exit the switch


Type exit, as follows, to leave the switch welcome screen:
Switch#exit
Once the steps are completed, logoff by typing exit, and turn all the devices off. Then remove
and store the cables and adapter.

Computer Networks Lab Page 9


University of Engineering & Technology (UET), Taxila
Computer Networks Lab
LAB WORKSHEET (Lab # 6)
Q.1 What is VLAN and what is its purpose?
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Q.2 Identify the advantages VLAN has over physical LAN.


________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Q.3 What is broadcast domain?


________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Q.4 Identify the difference between access and trunk link.


________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Computer Networks Lab Page 10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy