Lab 2 VLAN_Configuration_Lab
Lab 2 VLAN_Configuration_Lab
Packet Tracer
Introduction
In this lab, students will learn how to configure VLANs (Virtual Local Area Networks) using
Cisco Packet Tracer. VLANs allow network administrators to segment networks logically,
separating different types of traffic for security and performance reasons. By the end of this
lab, students should understand how to create and configure VLANs, assign ports to VLANs,
and verify VLAN configurations.
A LAN is a group of computers or other devices in the same place -- e.g., the same building
or campus -- that share the same physical network. A LAN is usually associated with an
Ethernet (Layer 2) broadcast domain, which is the set of network devices an Ethernet
broadcast packet can reach.
Computers on the LAN connect to the same network switch, either directly or through
wireless access points (APs) connected to the same switch. Computers can also connect to
one of a set of interconnected switches, such as access switches that connect to a backbone
switch. Once traffic crosses a router and engages Layer 3 (IP-related) functions, it is not
considered to be on the same LAN, even if everything stays in the same building or floor. As
a result, a location could have many interconnected LANs.
Like the LAN it sits atop, a VLAN operates at Layer 2 of the network, the Ethernet level.
VLANs partition a single switched network into a set of overlaid virtual networks that can
meet different functional and security requirements. This partitioning avoids having
multiple, distinct physical networks for different use cases.
Objectives
1. Understand the concept of VLANs and their use in network segmentation.
2. Create VLANs on a Cisco switch using Cisco Packet Tracer.
3. Assign switch ports to VLANs.
4. Verify the VLAN configuration using show commands.
Equipment Required
1. Cisco Packet Tracer software.
2. Three PCs.
3. One Cisco 2960 switch.
4. Ethernet cables for connecting devices.
Network Topology
In this lab, we will create a simple network consisting of three PCs and a switch. Two VLANs
will be created to segregate the PCs into different virtual networks. PC1 and PC2 will be in
VLAN 10, while PC3 will be in VLAN 20.
Lab Instructions
```
Switch> enable
Switch# configure terminal
Switch(config)# vlan 10
Switch(config-vlan)# name VLAN10
Switch(config-vlan)# exit
Switch(config)# vlan 20
Switch(config-vlan)# name VLAN20
Switch(config-vlan)# exit
```
```
Switch(config)# interface range fastethernet 0/1-2
Switch(config-if-range)# switchport mode access
Switch(config-if-range)# switchport access vlan 10
Switch(config-if-range)# exit
```
2. Assign the port connecting to PC3 to VLAN 20:
```
Switch(config)# interface fastethernet 0/3
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 20
Switch(config-if)# exit
```
```
Switch# show vlan brief
```
This command will display a table listing all VLANs and the ports assigned to each VLAN.
PC1: 192.168.10.1/24
PC2: 192.168.10.2/24
PC3: 192.168.20.1/24
Post-Lab Questions:
2. How do you create and assign a VLAN to an interface on a Cisco router or switch?
Required Devices:
1 Router
1 Switch
4 PCs
Ethernet cables
Steps:
2. Add Devices:
o Drag and drop 1 router, 1 switch, and 4 PCs onto the workspace.
3. Connect Devices:
o Create VLANs:
o Switch> enable
o Switch(config)# vlan 10
o Switch(config-vlan)# vlan 20
o Switch(config-vlan)# exit
o Switch(config-if-range)# exit
o Switch(config-if-range)# exit
o Router(config-subif)# exit
o Router(config-subif)# exit
8. Test Connectivity:
o Ping between PCs in the same VLAN to ensure they can communicate.