Practical 4 Security VLAN InterVLAN - 2
Practical 4 Security VLAN InterVLAN - 2
Lab Session 4
(Security VLAN)
Definition
A Virtual LAN (VLAN) is simply a logical LAN. VLANs have similar characteristics with those of physical LANs,
only that with VLANs, you can logically group hosts even if they are physically located on separate LAN segments.
Working Principle
Each VLAN is treated as a separate subnet or broadcast domain. For this reason, to move packets from one VLAN to
another, we have to use a router or a layer 3 switch.
VLANs are configured on switches by placing some interfaces into one broadcast domain and some interfaces into
another. For this tutorial, we’ll configure 3 VLANs on a switch. We’ll then proceed and configure a router to enable
communication between the three VLANs.
Topology
All VLANS will be configured on only 1 switch (Switch0). To use VTP, the main switch will act as SERVER and the other
switches will act as CLIENTS. After all configurations are done, the VLANS created on Switch0 will be distributed on all
switches that act as CLIENTS.
The interfaces Gig1/0/1 and Gig 1/0/2 are connected to other switches (Switch1 and Switch2)
Change the configuration of both interfaces from ACCESS to TRUNK.
Both switches have their interfaces Gig1/0/1 connected to switch Switch0. Change the configurations of both interfaces
from ACCESS to TRUNK.
Result
Both switches : Switch1 and Switch2, now have the VLANS that were configured on Switch0.
Working Principle
The router is configured so that it will enable communication between the three VLANs via a single physical interface. The
single physical interface on the router is divided into logical interfaces (sub interfaces). Each sub-interface will then serve
as a default gateway for each of the VLANs. This scenario is called Router on a Stick (R.O.A.S) and will allow the VLANs to
communicate through the single physical interface.
IMPORTANT: No IP address is assigned to the router’s physical interface that we have subdivided into logical sub-
interfaces. We’ll instead assign IP addresses to the sub interfaces.
Section A : Configuration
The router will route traffic from/to all VLANS. Therefore, the connection between the router and the switch must be in
TRUNK mode.
802.1Q
It is an open standard protocol developed by IEEE.
It inserts 4 byte tag in original Ethernet frame.
Over the time 802.1Q becomes more popular trunking protocols
Router(config-if)#int Gig0/0/0.100
Router(config-subif)# encapsulation dot1q 100
Router(config-subif)# ip add 192.168.1.1 255.255.255.0
Router(config-if)#int Gig0/0/0.200
Router(config-subif)# encapsulation dot1q 200
Router(config-subif)# ip add 192.168.2.1 255.255.255.0
VLAN 100 :
Default Gateway : 192.168.1.1
VLAN 200 :
Default Gateway : 192.168.2.1
VLAN 300 :
Default Gateway : 192.168.3.1
Result
End devices from all VLANs shoule be able to connect to each other.