You are on page 1of 4

Configuration of VLANs on the Router

Assignment Number - X
Date:
Subject : Networking Lab (Lab 202)
MCA SEM II

Written By : ___________________________________________________________

Checked By : _____________

0
Configuration of VLANs on the Router

Objective: In this assignment you will


: become familiar with how to create Complex VLAN.

Introduction: The switch runs the IEEE 802.1 encapsulation method. To


configure trunking on a fast Ethernet port, use the interface command switch
port mode trunk. Switch port mode access puts the interface into permanent
nontrunking mode and negotiates to convert the link into a nontrunk link.
Switch port mode trunk puts the interface into permanent trunking mode and
negotiates to convert the neighboring link into a trunk link. The interfaces
become a trunk interface even if the neighboring interface isn’t a trunk
interface.

Pre-Lab:
You should know about how to use packet tracer tool for designing a topology.
And switch configuration.

Lab Work:
Question:
Design the following topology and configure the devices for the Complex
VLAN.

Networking Lab MCA SEM II 1


Configuration of VLANs on the Router

Devices Required: Router, Switch and PCs


Initialization of the Devices:
Turn the switch on. Switch with no existing configuration and same for
router
Configurations of the Devices:
Design above topology using given ip addresses
Steps for Question
I. Create valn database on switch using CLI mode of the switch
II. Use following table while creating vlan database
IP address of PC Default VLAN Number VLAN Name
Gateway
192.168.5.10 192.168.5.1 10 A
192.168.5.20 192.168.5.1 10 A
192.168.6.10 192.168.6.1 20 B
192.168.6.20 192.168.6.1 20 B

III. Use following command for creating vlan


IV. Click on switch and open CLI for the same
Switch>enable
Switch#vlan database
Switch(vlan)#vlan 10 name A
Switch(vlan)#vlan 20 name B
Switch(vlan)#exit
Switch(config)#interface f0/1
Switch(config-if)#switchport access vlan 10
Repeat step g to h for all used interfaces and apply vlan
database as shown in table.

V. Click on switch and from config tab select the interface which is
connected to the router. i. e . fa0/1 for above topology
VI. Modify the settings as shown in following image. Select trunk
mode for switch to router interface or use command on
interface of switch i.e. switchport mode trunk

Networking Lab MCA SEM II 2


Configuration of VLANs on the Router

VII. Now click on router, open CLI for the same.


VIII. To support 802.1Q routing on a fastethernet interface, the
routers interface is divided into logical interfaces-one for each
vlan. These are called subinterfaces. Now set interface to trunk
with the encapsulation command

Router(config)#interface FastEthernet0/0
Router(config-if)#interface FastEthernet0/0.1
Router(config-subif)#encapsulation ?
dot1Q IEEE 802.1Q Virtual LAN
Router(config-subif)#encapsulation dot1q 1
Router(config-subif)#ip address 192.168.1.1 255.255.255.0
Router(config-subif)#encaplsulation dot1q 10
Router(config-subif)#ip address 192.168.5.1 255.255.255.0
Router(config-subif)#encaplsulation dot1q 20
Router(config-subif)#ip address 192.168.6.1 255.255.255.0
Generated CLI Code:
(Write here generated CLI code for above task)
Snapshot of Topology:
(Take a print of topology for above task)
Verification, Testing and Result:
(Check designed VLANs using simulation mode)

Networking Lab MCA SEM II 3

You might also like