0% found this document useful (0 votes)
49 views4 pages

CCN Lab 8

The document describes creating a virtual local area network (VLAN) with two VLANs - Green and Blue - using a single switch in Packet Tracer. Key steps include: 1. Connecting two PCs to different ports on a switch and assigning them IPs in different networks 192.168.1.0/24 and 192.168.0.0/24. 2. Configuring the switch ports connected to each PC as access ports in different VLANs (Green and Blue). 3. Connecting a router to the switch and configuring the router interface and subinterfaces to provide routing between the VLANs, assigning them IPs on each VLAN network. 4. Verifying connectivity by ping

Uploaded by

Hamna Younis
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)
49 views4 pages

CCN Lab 8

The document describes creating a virtual local area network (VLAN) with two VLANs - Green and Blue - using a single switch in Packet Tracer. Key steps include: 1. Connecting two PCs to different ports on a switch and assigning them IPs in different networks 192.168.1.0/24 and 192.168.0.0/24. 2. Configuring the switch ports connected to each PC as access ports in different VLANs (Green and Blue). 3. Connecting a router to the switch and configuring the router interface and subinterfaces to provide routing between the VLANs, assigning them IPs on each VLAN network. 4. Verifying connectivity by ping

Uploaded by

Hamna Younis
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/ 4

Lab 8

Vritual Local Area Network

Objectives of the Lab:


In this lab we will cover the following
• Creating different networks using same switch in Packet Tracer Software.
• Connection of Router and Switch along with implementation of inter VLAN Routing.
• Ping the nodes of different networks to check their connectivity.

Fig. 1 Virtual Local Area Network

As shown in fig.1, the above network with 2 VLANs (named Green and blue) is to be established. Its
procedure is given below
Introduction to Virtual LAN:
“A Virtual or VLAN is a Logical Grouping of Network Users and Resources connected to administratively
defined ports on a switch.” To create a computer network, normally all the PCs are connected to a central
switch and a star topology is created. The central Switch is a layer 2 device that maintains a
Filter/MAC/Forwarding table. In that star topology, Switch receives the frame from a PC and according to
its Table, it decides to forward, flood or drop the packet.
However, its functionality is not limited to that only. If we have a Switch and we want to group our PC’s
connected to it into multiple logical segments, or in other words, create different networks using same
switch, we create virtual LANs. For example, if 6 PCs are connected to a SWITCH, 3 VLANS can be
created. Each VLAN will have 2 PCs, thus divided into three logical segments (3 different IP Networks).
Physically all the PCs appear to be in a single LOCAL AREA NETWORK but virtually they are 3 in
number.
A VLAN allows you to segment a network without needing separate hardware. So, you can have a single
physical switch, but multiple different networks connected. Some of the advantages of VLANs are,
• help with network efficiency by reducing extraneous traffic.
• enhance security by creating a virtual boundary around different virtual groups.
• improve bandwidth performance by limiting node-to-node and broadcast traffic.

All the VLANs can be different Networks or different Subnets. So, by having 3 VLANs, there will
be 3 broadcast domains (1 for each network) and each VLAN can communicate with nodes of its own
group only. Inter VLAN communication is not possible without a router. To have inter VLAN
communication, a router is required to be connected with the switch. All the Switch ports that are
configured in a VLAN are called access ports and others that are connected to routers for carrying the
switch data are called trunk ports.

Procedure:
• Open packet tracer environment and create topology as shown in the figure 1.
• In this scenario, we are creating 2 VLANs, so connect two PC’s to a 24 port (2960) switch.
• Set IP addresses PC1: 192.168.1.2
PC2: 192.168.0.2
(Note that they are 2 different networks now)
• Next step is to connect a router (1841) to Fast Ethernet port of Switch. Fa0/0 of router is connected
to switch.
• Now to configure the switch enter into its CLI mode.
• When its IOS gets loaded, get in the interface mode of the switch by using the following
commands.

SWITCH CONFIGURATION:
▪ Switch>enable
▪ Switch#configure terminal
We are creating 2 VLANs named green and blue, remember to start VLAN creation from
VLAN 2 because VLAN 1 is a default VLAN and its name can’t be changed.
▪ Switch(config)# vlan 2
▪ Switch(config)#name green
▪ Switch(config)#vlan 3
▪ Switch(config)#name blue
▪ Now getting to the interface to which PC0 is connected, we have to put Fast Ethernet0/0
port in access mode and in VLAN 2
▪ Switch(config)#int fa0/0
(PC1 is connected to interface fa0/0 of switch)
▪ Switch(config-if)#switchport mode access
▪ Switch(config-if)#switchport access vlan 2
▪ Switch(config-if)#no shut
▪ Switch(config-if)#exit
▪ Repeat the above procedure by getting to the interface to which PC1 is connected, put Fast
Ethernet0/1 port in access mode and in VLAN 3
▪ Now configure Fa0/3 of Switch in trunk mode which is connected to router.
▪ Switch(config)#int fa0/3
▪ Switch(config-if)#Switchport mode trunk
▪ Press CTRL^Z to get out of the privilege mode

ROUTER CONFIGURATION:
▪ Now it’s time to configure the router so get into CLI mode of router.
▪ Router > enable
▪ Router # configure terminal
▪ Router(config) #
▪ Router(config) # int Fa0/0
▪ Router(config-if) # no shut
▪ Router(config-if) # Int f0/0.1
▪ Router(config-subif) # encapsulation dot1q 2
▪ Router(config-subif) # Ip address 192.168.1.1 255.255.255.0
(I have attached this sub interface in VLAN 2 and now I am assigning it an IP (192.168.1.1)
so this will act as gateway for PC1)
▪ Router(config-if)#int f0/0.2
▪ Router(config-subif) # encapsulation dot1q 3
(I have attached this sub interface in VLAN 3 and now I am assigning it an IP (192.168.0.1)
so this will act as gateway for PC0)
▪ Router(config-subif) # ip address 192.168.0.1 255.255.255.0
▪ Router(config-subif) # exit
▪ Press CTRL^Z to get out of privileged mode.
▪ Now you can see a green light on router interface which means it has been configured.
▪ Again, select CLI of switch and in privileged mode (mode activated by enable), type
Show vlan And Show int trunk
From this you can verify VLAN and TRUNK ports.
▪ Now ping the gateway and both PCs, if successful then you have successfully created 2
VLANs.
Your Task is to create this topology and create 3 VLANs, first by 3 different networks and
then by 3 subnets of same network. Configure Inter VLAN Routing.

You might also like