Worksheet VLAN
Worksheet VLAN
CSL7510
5th September, 2021
Introduction
The worksheet is designed as different activities for creating and configuring virtual local area
networks on VMware ESXi and Cisco Packet Tracer. The term virtual local area network (VLAN) is
a logical concept of dividing broadcast addresses. As we know, a switch is a physical device that
consists of ports where each port connected to a host is assigned the same network i.e. every
broadcast message is transmitted to every other host connected to the same switch ports. To
eliminate this vulnerability of flooding, other switches can be deployed with different network
addresses but will lead to a high number of switches causing a lot of expenditure. To overcome
these challenges, logical connections can be used on single or multiple switches by using VLAN.
To understand the implementation of VLAN various activities are defined as follows:
All the activities will be covering the basics of configuring VLAN on Virtual Switch using VMware
ESXi as well as the Cisco Packet Tracer network simulator. The worksheet is sketched to first
guide you in implementing the concept of virtual switches with VLAN and then moves deeper
into the network simulation part for realizing a logical picture of VLAN at the network level.
If you are unable to download the setup, create your account and manually download the
60-days trial setup for experimental work -
https://console.cloud.vmware.com/csp/gateway/portal/#/self-onboarding/create-user
1
Since nested virtualization of AMD and Intel processors (AMD-V and Intel-V) both are supported
in VMware workstations unlike Oracle VM VirtualBox which is inefficient in nesting Intel-V on
some machines, we will be using VMware as the host hypervisor.
For installing the VMware ESXi, you need to create the account on the above-given link from
where you can download the setup with 60 days trial license key and the required hash values
https://customerconnect.vmware.com/web/vmware/evalcenter?p=free-esxi6. After downloading
the .iso file you can either install it on a VMware workstation or can directly burn it to Flash drive
for installation on the host system using Hyper-V.
1. Click on create a new virtual machine and browse to the downloaded .iso image directory
where you need to declare user credentials, RAM, and Disk size the way we did in Oracle
VM Virtual machine creation. The minimum requirement for installing ESXi is 4GB of RAM
and at least 48GB of hard disk space. Once the details are specified the machine will
start.
2
Fig 1. Installing ESXi
3
Fig 3. End-User License Agreement
4. Select the US default as keyboard layout and create a password for root. These
credentials will be used to access the host server.
5. On completion of the installation, press Enter to reboot the system which will prompt you
with the host IP address. You need to enter this IP address into the host operating system
web browser.
4
Fig 7. Installation Complete
6. After rebooting the virtual machine, enter your credentials and open the web browser of
the host system. Now, open a new tab and enter the displayed IP address which is
https://192.168.152.128/ in this worksheet demonstration.
Note: On installation of ESXi on your system, you will get an IP Address which you need
for accessing the server.
5
Fig 9. Authentication
Datastore Creation
Login into the ESXi host and create a datastore point from Storage ⟶Devices⟶Select the
required disk⟶ Click on New Datastore. We will require this datastore for creating VM’s.
Note: The selected disk should be a single disk space without partitions for creating a new
datastore. In case the disk space is low and already partitioned, you can add extra virtual hard
disk space to the host ESXi.
The worksheet will be illustrating the use of Local VMware, Disk (mpx.vmhba0:C0:T1:L0) with
100GB disk space where both virtual machines will be stored.
6
Fig 11. Datastore
On successful creation of a data store, you can check the datastore point under Storage.
7
VM Creation on ESXi Host
Once the datastore is created
move on to Virtual
Machines⟶Create/Register VM
which will prompt a new window
asking you to create the VM or
register an existing VM. Since
there is no instance we will be
creating a new VM type of Linux
and Windows.
For changing the settings after the VM is created, go to Actions and then edit settings.
8
The below-given screenshot shows two virtual machines VM1 running with Ubuntu 64-bit
operating system and VM2 running with Windows 7 64-bit operating system.
Both these VM’s will be used for accessing the VLAN ports of the virtual switch which will be
discussed in the subsequent sections.
Virtual Switch
A virtual switch is a logical representation of physical switches which sends frames from one
virtual machine to another on the same network or local area network. To create a virtual switch
go to Networking⟶ Virtual Switches⟶Add Standard Virtual Switch where you need to provide a
name for the switch and click add.
9
Fig 17. Create Virtual Switch
To view the topology and details of the created virtual switch, click on it.
Since a virtual switch is similar to a physical switch, we need to create ports on it which will be
then divided into different port groups based on your VLAN configuration requirements.
VLAN Configuration
In this work, we have created two virtual LANs
(vlan10 and vlan20) running on the same virtual
switch (vSwitch0). To add port groups click on
Port groups⟶ Add port group⟶ Assign a name
to it and select the VLAN ID between 2 to 2000.
You can also check the security features and
then proceed with adding the port group. Fig 18. Add port group
10
Fig 20. Port Groups
VLAN Trunking
The concept of trunking is introduced when VLANs are configured on multiple switches i.e. to
forward traffic of different VLANs on a single switch requires a specific VLANs identification
header for port forwarding but in the case of multiple switches, we need VLAN tagging which
adds another header to the ethernet frame on the link between switches.
11
Open the virtual switch tab from Networking and check the defined topology. As you can see
from the snapshot that vlano, vlan10, and vlan20 are created within a virtual switch where you
need to configure the ports for forwarding the traffic as well as you need to set a default VLAN. In
case, the forwarded frame does not contain any VLAN tag (header used for identifying the VLAN)
it is considered as part of the default VLAN.
Note: Connect the physical network adapter of virtual machine vmnic1 with the port which is
defined as the trunk.
Further, in this worksheet, we will be using Cisco Packet Tracer Network Simulator.
12
Cisco Packet Tracer
It is a network simulator that can be used to experiment with different network configurations. It
comprises various network components such as end devices, network devices, wired/wireless
connections, and so on for simulating scenarios with visualization and assessment capabilities.
To install packet tracer, download the setup according to your operating system from -
https://www.computernetworkingnotes.com/ccna-study-guide/download-packet-tracer-for-windo
ws-and-linux.html and create an account on https://id.cisco.com/.
For installing Packet Tracer on Ubuntu, click the link below - explaining all the required steps
https://www.computernetworkingnotes.com/ccna-study-guide/how-to-install-and-start-packet-trac
er-in-ubuntu.html
Packet Tracer enables you to configure the end devices running with varied applications or
servers which simulates the real-world practices of configuring network devices with virtual LAN,
access control lists, routing tables, etc. In this work, we will be focusing on logical network
scenarios, not physical ones.
13
Fig 24. Packet Tracer Simulation Board
At the bottom left corner, you can find all the network components which are required to build the
networking scenario logically - network devices (routers, switches, hubs, wireless devices, wan
emulation, security), end devices (PC, laptop, server, printer, IP phone, VoIP devices, phone, tv,
wireless tablet, smart devices, generic wireless, generic wired, sniffer), components (MCU boards,
sbc boards, things), connections (automatic, console, copper, cross-over, phone, coaxial, serial
dce, serial dte, octal, IoT custom, USB connections), miscellaneous comprising other devices and
multiuser.
14
VLAN Configuration using Cisco Packet Tracer
To create a network scenario go to Files → New and then select the devices. For explaining the
concept of VLAN, the worksheet demonstrates a simple network simulation consisting of two
virtual LAN as discussed in the earlier activities of this sheet.
Scenario 1: Create two VLANs on a single switch having two access ports in both the VLANs.
Verify the VLAN configurations by pinging -
15
Steps to design the network scenarios are as follows:
1) Add four PC’s from end devices and assign them IP addresses.
2) For editing IP configurations of these added PC’s, click on the PC icon → Desktop → IP
Configurations.
3) Connect PC0 and PC1 to the same LAN i.e. VLAN100 with IP addresses in the range of
192.168.100.x where x can be any number from 1 - 254.
Gateway : 192.168.100.1
PC0 : 192.168.100.10
PC1 : 192.168.100.20
Note: Gateway address can be considered as a door to another network i.e. it is the address of
the interface which is connected locally to PC0 and PC1.
4) Leave the DNS configurations as it is and repeat the above step for PC1.
5) Now, configure the IP address of PC2 and PC3 with gateway address 192.168.200.1
16
Where PC2 - 192.168.200.10
PC3 - 192.168.200.20
6) Add a switch from network devices and connect all PCs with copper straight wire. While
connecting PCs with a switch, you will be asked to choose the interface type such as Fast
Ethernet or GigaEthernet.
PC0 - fa0/1
PC1 - fa0/2
PC2 - fa0/3
PC3 - fa0/4,
17
100 VLAN100 active
200 VLAN200 active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
100 enet 100100 1500 - - - - - 0 0
200 enet 100200 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
18
The command “switchport access vlan <vlan_number>” creates an access port between host and
switch which can communicate only within LAN (local area network).
8) To verify the VLAN connections, open the command prompt of PC0 and ping <ip> of PC1
and PC2.
- If the vlan (VLAN100) is successfully created then you will get a reply from PC1
otherwise no packet will be received. Similarly, verify VLAN200.
- If the vlan (VLAN100) is successfully created then you will not get a reply from PC2
as it is a part of another logical broadcast domain or vlan i.e. VLAN200. Similarly,
verify VLAN200.
19
Fig 29. Ping from PC3 of VLAN200
After understanding the concept of VLAN creation and configuration on a single switch, we will
now create a trunk to access VLANs from different switches.
20
Scenario 2: Create two vlans on two switches where both the switches will be divided into
VLAN100 and VLAN200 port groups i.e.
- Switch 1 : VLAN100 with one access port (PC4) and VLAN200 with one access port (PC5).
- Switch 2 : VLAN100 with one access port (PC6) and VLAN200 with one access port (PC7).
1) Add four PC’s from end devices and assign them IP addresses.
2) For editing ip configurations of these added PC’s, click on PC icon → Desktop → IP
Configurations.
21
Fig 31. PC4 Desktop tab.
22
9) Connect PC4 and PC6 to the same LAN i.e. VLAN100 with IP addresses in the range of
192.168.100.x where x can be any number from 1 - 254.
Gateway: 192.168.100.1
PC4: 192.168.100.10
PC6: 192.168.100.20
10) Leave the DNS configurations as it is and repeat the above step for other PC’s.
11) Now, configure the IP address of PC5 and PC7 with gateway address 192.168.200.1
PC7 - 192.168.200.20
12) Add two switches from network devices and connect PC’s with copper straight wire.
While connecting PC’s with switch, you will be asked to choose the interface type such as
Fast Ethernet or GigaEthernet.
13) Now, add a crossover wire between both the switches for communication with the fa0/3
interface.
Switch>en
Switch#confi
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
23
Switch(config)#vlan 100
Switch(config-vlan)#name VLAN100
Switch(config-vlan)#exit
Switch(config)#vlan 200
Switch(config-vlan)#name VLAN200
Switch(config-vlan)#exit
Switch(config)#interface fa0/1
Switch(config-if)#switchport access vlan 100
Switch(config-if)#exit
Switch(config)#interface fa0/2
Switch(config-if)#switchport access vlan 200
Switch(config-if)#exit
Switch(config)#exit
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#show vlan
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
100 enet 100100 1500 - - - - - 0 0
200 enet 100200 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
24
Remote SPAN VLANs
------------------------------------------------------------------------------
25
15) Similarly, configure the second switch and verify the connections by pinging <ip> of PC7
from PC5
- If you get a reply from PC7 connected to the same vlan of second switch then the
trunking is successfully created.
- If you are unable to ping PC4 connected to the same switch but is on a different
vlan then the trunking is successfully created. Similarly, verify the other
connections.
26
Fig 34. Pinging PC5 and PC6 from PC7
In this way, VLAN trunking can be implemented using the cisco packet tracer.
The objective of this worksheet is to illustrate how virtual local area networks can be created on
virtual machines as well as how we can use a network simulator to simulate the network
scenarios.
` `````````````
27