Name & ID:___Sumaira Khan___________ Date: _____11/09/23__
EE-424L Data Communication & Networking
Fall 2021
Habib University
Dhanani School of Science & Engineering
LAB 4: Switching Lab (VLAN & Trunks) on Packet Tracer
Lab #4 Marks distribution:
LR2=30 LR5=40 LR9=10 AR4=20
Task 1 10 15
In-Lab
Tasks Task 2 10 15 10 20
Post-Lab Task 1 10 10
Total 100
Marks
Lab #4 Marks Obtained:
LR2=30 LR5=40 LR9=10 AR4=20
In-Lab Task 1
Tasks Task 2
Post-Lab Task 1
Marks Obt.
1
The objective of this lab is to build a network to configure and verify VLANs on
objectives
Packet Tracer.
In-Lab Tasks:
Task 1: Implementation of VLAN on Packet Tracer (Topology 1)
Task 2: Implementation of VLAN on Packet Tracer (Topology 2)
Introduction
VLANs
Virtual LANs (VLANs) allow network administrators to subdivide a physical network into separate
logical broadcast domains. On a standard Layer 2 network, all hosts connected to a switch are members of
the same broadcast domain; and broadcast domains can only be physically separated across different
switches by routers.
A VLAN represents a broadcast domain. VLANs are identified by a VLAN ID (a number between 0 –
4095), with the default VLAN on any network being VLAN 1. Each port on a switch or router can be
assigned to be a member of a VLAN (i.e., to allow receiving and sending traffic on that VLAN). For
example: on a switch, traffic that is sent to a port that is a member of VLAN 100, may be forwarded to
any other VLAN 100 port on the switch, and it can also travel across a trunk port (connections between
switches) to another switch and forwarded to all VLAN 100 ports on that switch. Traffic won't, however,
be forwarded to ports that are on a different VLAN ID. This effectively allows a network administrator to
logically split up a switch, allowing multiple broadcast domains to coexist on the same hardware, but
maintaining the isolation, security, and performance benefits of using completely separate switches.
To understand VLAN more clearly let's take an example.
Our campus has three pods. All pods are connected with back links via switch. In each pod, there are
some Faculty, Staff and Students PCs available.
2
Campus has mainly three departments Faculty, Staff and Students
Faculty department has three computers.
Staff department has three computers.
Students department also has three computers.
Each pod has one PC from faculty and one from both staff and students department.
Faculty and Staff department have sensitive information and need to be separate from Students
department.
With default configuration, all computers share same broadcast domain. All departments can share the
resources. With VLAN we could create logical boundaries over the physical network. Assume that we
created three VLANs for our network and assigned them to the related computers.
VLAN Faculty for Faculty department
VLAN Staff for Staff department
VLAN Stud for Students department
Physically we changed nothing but logically we grouped devices according to their function. These
groups [VLANs] need router to communicate with each other. Logically our network look likes following
diagram.
With the help of VLAN, we have separated our single network in three small networks. These networks
do not share broadcast with each other improving network performance.
VLAN also enhances the security. Now faculty department cannot access the staff and students
department directly.
Task 1:
TOPOLOGY: Consider the below Topology where one switch is connected with three different
departments.
3
Step 1: Build this topology on Packet Tracer and write down your observation in terms of Ping,
Broadcast and Collision domain. You can choose any one network address and assign IPs from
that network to all PCs. Mention network address and IPs of all devices in Network topology.
After testing pings, I
observed that all PCS
were able to
communicate with each
other since they’re all on
the same VLAN and
share the same
broadcasting domain.
Step 2: Run show VLAN brief command in privilege mode and mention How many VLANs are there
and mention number assigned to them? Write down number of ports/interfaces assigned to each VLAN?
(I forgot to take a snippet of this task) I observed that there is one default VLAN (VLAN 1) and it
4
has 24 ports assigned to it
You can create VLAN 10 for faculty on switch 0 by using below commands. Similarly, Create
VLAN 20 & 30 on Switch for Staff and Students respectively.
Run show VLAN brief command again and write down your observation.
After enabling access ports and ports
of the switches to their respected
vlans and running the show vlan
command, we can see that VLANs
called faculty, staff and student have
been created.
Step 3: Enable the Access Ports & assign ports/interfaces of switch to respective VLAN.
Note: Make sure to note which port of switch is connected with PCs. After enter in interface fast
Ethernet 0/1, it is important to run “no shutdown” command to up the link.
5
Similarly, assign remaining ports of switch connected to VLAN 10, 20 and 30. Run show VLAN
brief and write down your findings and attach screenshot.
Ping any two PCs of VLAN 10 and write down your observation.
We can ping PC3 from PC2 because they’re both in vlan 10. (only devices within the same
vlan can ping each other.
6
Ping any PC of VLAN 10 to any PC of VLAN 20 and write down your observation.
We cannot ping a PC in vlan20 from a PC in vlan10 since they’re both in different vlans.
Task 2:
TOPOLOGY: Consider the following Lab Topology where two Switches are connected to each other
and have different department PC’s connected to them:
Step 1: Build this topology on Packet Tracer and write down your observation in terms of Ping,
Broadcast and Collision domain.
When we ping pc 3 from PC0
and PC 3 and PC0 from PC1
we can see that they can all
communicate with each other
without issue since they’re all
within the default vlan.
7
Step 2: Configure VLANs on SW1 and SW2
Attach screenshot of your Network Topology and fill the below table as per you
network requirements.
Topology: All labelled interfaces, IPs, VLANs should be shown in network
topology diagram.
Devic Switch port and which PC VLAN (to be
e connected to Switch assigned)
SW1 Sales 1 (fastEthernet 0/1) Vlan 10
8
SW1 Admin 1 (fastEthernet 0/2) Vlan 20
SW1
SW2 Sales 2 (fastEthernet 0/1) Vlan 10
SW2 Amin 2 (fastEthernet 0/2) Vlan 20
SW2
You can create VLAN 10 by using below commands. Similarly, Create VLANs on Switch 1 and
Switch 2.
Enable the Access Ports & assign VLANs accordingly on SW1 and SW2:
Similarly, assign remaining ports to other VLANs.
Run show Vlan Brief command on both switches. Write down your observation and
attach the screenshot below:
(first screenshot switch 0, second
screenshot switch 1)
After running the show vlan
command on both switches, we se
that the PCs connected to
fastEthernet 0/1 of each switch were
in VLAN 10, and the PCs connected
to fastEthernet 0/2 were in VLAN 20.
9
Verification of VLANs:
1. Ping PC1(SALES-1) to PC4(SALES-2)
2. Ping PC2(admin-1) to PC5(admin-2)
3. Ping PC1(SALES-1) to PC2(admin-1)
Comment on above verification.
1.
2.
3.
In all three cases there was no commination between them and all packets were lost.
Configure the Trunk Ports & Allow the VLANs through them:
10
Verification of VLANs:
1. Ping PC1(SALES-1) to PC4(SALES-2)
2. Ping PC2(admin-1) to PC5(admin-2)
3. Ping PC1(SALES-1) to PC2(admin-1)
Comment on above verification.
Pinging sales-1 to sales-2 resulted in successful communication.
Pinging admin-1 to admin-2 did not result in communication.
Pinging sales-1 to admin-1also did not result in communication.
Now allow VLAN 20 in trunk mode and note down your observation.
Since previously we only allowed vlan 10 through the trunk it allowed communication
between PCs in vlan 10 and pcs within vlan20 couldn’t communicate. But after
allowing vlan 20 in trunk mode, we were able to communicate between pcs in vlan 20
as well.
What do you understand by Access and Trunk port?
11
Access Ports:
Access ports serve the purpose of linking end devices (such as personal computers) to
a designated VLAN. They are exclusively associated with a single VLAN and do not
convey data related to multiple VLANs.
Trunk Ports:
Trunk ports are employed to facilitate the transmission of data for numerous VLANs.
They enable the exchange of VLAN details between switches or devices and are
commonly employed to interconnect switches within a network
Run show interface trunk command in privilege mode and discuss the results.
Executing the "show interface trunk" command yields data regarding trunk
ports, including the permitted VLANs, encapsulation type, and operational
status. This command assists in confirming the setup of trunk ports and ensuring
that the appropriate VLANs are authorized for transmission.
12
After checking the above tasks to RA. Remove the configured VLANs, Assign the interfaces back to
VLAN 1. Write down the commands below and attach screenshot too. Check this to RA.
(I made the whole network again for this task since the file I was working on couldn’t be saved so
the pcs numbers are different)
Reassigning the interface:
Post Lab:
Task 1: If I want to communicate between two VLANs, propose the changes in Task 2 topology and
how you ‘ll configure it. You have to provide Network topology, commands and attach screenshot of
successful ping in different VLANs.
13
To allow both vlan 10, vlan 20 to communicate with each other we need to configure inter-vlan
routing using trunk.
Lab Evaluation Assessment Rubric
EE-424 Lab 4
# Assessment Elements Level 1: Level 2: Developing Level 3: Good Level 4: Exemplary
Unsatisfactory Points 2 Points 3 Points 4
Points 0-1
LR2 Program/Code/ Program/code/ Program/code/ Program/code/ Program/code/
Simulation Model/ simulation simulation simulation simulation /network
Network Model model/network model/network model/network model is efficiently
model does not model has some model gives correct implemented and
implement the errors and does not output but not gives correct output.
required functionality produce completely efficiently Student has full
and has several accurate results. implemented or command on the
errors. The student is Student has limited implemented by basic tools of the
not able to utilize command on the computationally software.
even the basic tools basic tools of the complex routine.
of the software. software.
LR5 Results & Plots Figures/ graphs / Figures, graphs and All figures, graphs, Figures / graphs /
tables are not tables are drawn but tables are correctly tables are correctly
developed or are contain errors. Titles, drawn but contain drawn and
poorly constructed captions, units are minor errors or some appropriate
14
with erroneous not accurate. Data of the details are titles/captions and
results. Titles, presentation is not missing. proper units are
captions, units are too clear. mentioned. Data
not mentioned. Data presentation is
is presented in an systematic.
obscure manner.
LR9 Report All the in-lab tasks are Most of the tasks are Good summary of Detailed summary of
not included in included in report but most of the in-lab the in-lab tasks is
report. are not well tasks is included in provided. All tasks are
explained. All the report. The work is included and
necessary figures / supported by figures explained well. Data
plots are not and plots with is presented clearly
included. explanations. including all the
necessary figures,
plots and tables.
Marked attendance Present but very late *Present but late (15- Present and entered
and did not attend (31-60 minutes) or 30 minutes), or left the lab on time and
AR2 Attendance the lab or left very left early (31-60 early (30 minutes) left on time.
early. minutes) without without completing
completing the tasks. the tasks.
Late submission after Late submission after Late submission after Timely submission of
1 week and in 2 days and within a the lab timing and the report and in the
AR4 *Report Submission
between 2 weeks. week. within 2 days of the lab time.
due date.
*Report: Report will not be accepted after 1 week of due date
15