You are on page 1of 8

LabExercise – 3

Question:
ConfigureVLANfor:
1. Topologywith1 Switch.
2. Topologywith2Switches.
3. Topologywith1 Switchand1 Router.

Solutions:
1. Topologywith1Switch:
Steps:
i. CreateaTopologywith
1Router,1Switchand4endPCsinCiscoPacketTracer.
ConfigureeachPC accordingtothe2VLAN’sasshownbelow:

ii. OpenCLITabofSwitchandenterthefollowingcommandsforconfi
guringeachVLAN:
en :Enableconsole
conft :Configureterminal
vlan2 : Enter VLAN Config modefor VLAN Number 2(Number
can be anything except 1 andintherange1002-1005)
nameHR :NametheVLAN
exit :ExitVLANConfig
int rangefa0/1-2 : Specify interfaces in the range 1-
2to beconfigured
switchportmodeaccess : Change interface port mode
toaccess
switchportaccess VLAN2 : set VLAN Number for
theselectedinterfaces
Follow the same for VLAN 3(ACCOUNTS) for interface range 3-
4asshownbelow:
iii. Check Status for Simple PDU’s across different PCs to verify
theprocess.

2. Topology with 2
Switches:Steps:
i. Create a Topology with 2 Switches and 4 end PCs in Cisco
PacketTracer.
ConfigureeachPCaccordingtothe2VLAN’sundereachSwitchassho
wnbelow:

ii. Open CLI Tab of Switch0 and enter the following commands
forconfiguringeachVLAN:
en :Enableconsole
conft :Configureterminal
vlan2 : Enter VLAN Config modefor VLAN Number 2(Number
can be anything except 1 andintherange1002-1005)
nameHR :NametheVLAN
exit :ExitVLANConfig
int fa0/1 :Specify interface1tobeconfigured
switchportmodeaccess : Change interface port mode
toaccess
switchportaccess VLAN2 : set VLAN Number for
theselectedinterfaces
Follow the same for VLAN 3(ACCOUNTS) for interface 2
asshownbelow:
Follow the same steps for configuring 2 VLANs under Switch1
intheCLITabof Switch1.
iii. Open CLI Tab of any 1 Switch and enter the following
commandsforconfiguringSwitch-to-Switch connection:
int fa0/3 : Specify the interface 3
tobeconfigured.
switchportmodetrunk : Change interface port
modetotrunk
switchport trunk allowedVLAN 2,3: Allow only the
setVLANNumbers 2,3 throughtheselectedinterface
exit :ExitinterfaceConfig.

iv. Check Status for Simple PDU’s across different PCs to verify
theprocess.

3. Topology with 1 Switch and 1


Router:Steps:
i. Create a Topology with 1 Router, 1 Switch and 4 end PCs in
CiscoPacketTracer.
Configure 2 PC’s each in 2 different subnets(along with the
firstaddress in the subnet as their Default Gateway) according to
the 2VLAN’sasshownbelow:
ii. Open CLI Tab of Switch and enter the following commands
forconfiguringeachVLAN:
en :Enableconsole
conft :Configureterminal
vlan2 : Enter VLAN Config modefor VLAN Number 2(Number
can be anything except 1 andintherange1002-1005)
nameHR :NametheVLAN
exit :ExitVLANConfig
int rangefa0/1-2 : Specify interfaces in the range 1-
2to beconfigured
switchportmodeaccess : Change interface port mode
toaccess
switchportaccess VLAN2 : set VLAN Number for
theselectedinterfaces
Follow the same for VLAN 3(ACCOUNTS) for interface range 3-
4asshownbelow:
iii. Open CLI Tab of Switch and enter the following commands
forconfiguringSwitch-to-Routerconnection:
int fa0/5 : Specify the interface 5
tobeconfigured.
switchportmodetrunk : Change interface port
modetotrunk
switchport trunk allowedVLAN 2,3: Allow only
thesetVLANNumbers 2,3through theselectedinterface
exit :ExitinterfaceConfig.
iv. Turn on the interface of the Router connected to the switch in
theConfigTab.
v. Open CLI Tab of Router and enter the following commands
forfacilitating2-wayconnectionbetween RouterandSwitch:
int fa0/0.2 : Specify the interface
0/0andVLAN2tobeconfigured.
encapsulationdot1Q2 : Set encapsulation
tofacilitatecommunicationbetweendifferentVLANs.
ipaddress192.168.2.1 255.255.255.0: Set IPAddress
forportfa0/0.2asthedefaultgatewayofVLAN2.
FollowthesameforVLAN3forinterfacefa0/0.3asshownbelow:

vi. Check Status for Simple PDU’s across different PCs and
Routerstoverifytheprocess.

You might also like