You are on page 1of 9

Computer Networks Lab

Lab No. 7

VLAN

Mannahel Iftikhar (170860)

BACHELOR OF ELECTRICAL ENGINEERING


(Spring 2021)

Submitted To:
Engr. Sharoze Sohail
Lab Engineer

DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING


FACULTY OF ENGINEERING
AIR UNIVERSITY,ISLAMABAD
Lab#07
INTRODUCTION TO VLAN

OBJECTIVE:
This lab has the following objectives:

1. Understanding the concept of VLAN in networking.

2. Establish two or more VLANs in a switch.

3. Create three or more VLANs between two or more switches

DISCUSSION:
Following are the resources required for this experiment

1. Computer
2. Packet Tracer

Introduction:
A VLAN (virtual LAN) is a subnetwork which can group together collections of devices on
separate physical local area networks (LANs). A LAN is a group of computers and devices that
share a communications line or wireless link to a server within the same geographical area.

Procedure For Simulations Of Lab Tasks


1. Pick 6 PCs and two switches from the menu.

2. Attach three PCs with Switch-1 and Switch-2, respectively with Copper straight
through cable.

3. Join both the switches using Cross-over cable.

4. Assign IP address to the six PCs following as:

• PC-1: 192.168.10.5
• PC-2: 192.168.10.6
• PC-3: 192.168.10.7
• PC-4: 192.168.10.8
• PC-4: 192.168.10.9
• PC-4: 192.168.10.10

5. Connect Console cable between one of PCs and Switch-1. Do this for Switch-2 also.

6. Go to the terminal tab of Switch-1 and tap OK, a Command Line Interface window
will appear.

7. Enter in privileged mode, typing a command enable.

8. Type a command show vlan to view the existing/default VLAN.

9. Make three VLANs using the following commands:

• Switch# vlan database


• Switch# vlan 2 name VLAN2
• Switch# vlan 3 name VLAN3
• Switch# vlan 4 name VLAN4
10. Add Fa0/1, Fa0/2 and Fa0/3 in vlan 2, vlan 3, vlan4 respectively, using the following
commands:
• Switch# interface fastethernet0/1
• Switch# switchport mode access
• Switch# switchport access vlan 2
• Switch# interface fastethernet0/2
• Switch# switchport access vlan 3
• Switch# interface fastethernet0/3
• Switch# switchport access vlan 4
11. In order to move the message from one switch to the other switch use the following
commands:
o Switch# configure terminal
o Switch(config)# interface fastethernet0/4
o Switch (config-if) # switchport access trunk
o Switch (config-if) # switchport trunk allowed vlan 2, 3, 4.
▪ Switch# vlan database
▪ Switch# vlan 2 name VLAN2
▪ Switch# vlan 3 name VLAN3
▪ Switch# vlan 4 name VLAN4
12. Add Fa0/1, Fa0/2 and Fa0/3 in vlan 2, vlan 3, vlan4 respectively, using the following
commands:
• Switch# interface fastethernet0/1
• Switch# switchport mode access
• Switch# switchport access vlan 2
• Switch# interface fastethernet0/2
• Switch# switchport access vlan 3
• Switch# interface fastethernet0/3
• Switch# switchport access vlan 4
13. In order to move the message from one switch to the other switch use the following
commands:
• Switch# configure terminal
• Switch(config)# interface fastethernet0/4
• Switch (config-if) # switchport access trunk
• Switch (config-if) # switchport trunk allowed vlan 2, 3, 4.
14. Send a message from one PC to the other in same VLAN.
LAB TASKS
Task#01 Simulate VLAN

Task#02 Send a message from one PC to another using Hub to see if the
network that we established was successful or not.
1. Connection to PC0 to PC5 through a Hub

2. Assigned IP addresses of the three PC’s


• PC-1: 192.168.10.5
• PC-2: 192.168.10.6
• PC-3: 192.168.10.7
• PC-4: 192.168.10.8
• PC-4: 192.168.10.9
• PC-4: 192.168.10.10
3. Commands:
4. Sucessful transmission and recption of message.
Learning Outcomes

The lab achieved the following learning outcomes:

1. We understood the concept of VLANs in networking. Created VLANs in a single switch


and between two or more switches.

You might also like