Professional Documents
Culture Documents
How To Configure VLAN On A Cisco Switch
How To Configure VLAN On A Cisco Switch
VLAN stands for virtual LAN and technically we can say, a VLAN is a broadcast domain created by switch. When
managing a switch, the management domain is always VLAN 1, the default VLAN. All ports of switch are
assigned to VLAN 1 by default. VLAN increase the performance of a network because it divide a network
logically in different parts and limit the broadcasts.
Any member of VLAN 2 can not talk with any member of VLAN 3 without router but all the members of VLAN 2
and VLAN 3 can talk with other members within their VLANs.
This Lab will also help how VLANs can be used to separate traffic and reduce broadcast domains.
To create a VLAN, first enter global configuration mode to run the following commands.
Now assigning the ports 2 and 3 to VLAN 2, it must be done from the interface mode. Enter the following
commands to add port 2 and 3 to VLAN 2.
Now assigning the ports 4 and 5 to VLAN 3, enter the following commands to add port 4 and 5 to VLAN 3.
To show the VLAN interface information, run the command show vlan.
VTP (VLAN Trunking Protocol) is the protocol that propagates the information about which VLANs exist from one
switch to another switch. If VTP did not provide this information, VLANs would have to be created on all switches
individually in the network.
VTP is a Cisco proprietary protocol. The default mode of a switch is configured as VTP server. In any case, the
server services are turned off, use the following command to turn it back on as VTP server.
SwitchA#vlan database
SwitchA(vlan)#vtp server
SwitchA(vlan)#exit
First create multiple VLANs with name, assign multiple ports to them then create 802.1q trunk link between the
two switches to allow communication between VLANs.
To create a VLAN, first enter global configuration mode to run the following commands.
Now assigning the ports 2 and 3 to VLAN 2, it must be done from the interface mode. Enter the following
commands to add port 2 and 3 to VLAN 2.
Now assigning the ports 4 and 5 to VLAN 3, enter the following commands to add port 4 and 5 to VLAN 3.
SwitchB#vlan database
SwitchB(vlan)#vtp client
Now create 802.1q trunk link between the two switches to allow communication between VLANs.
On both switches, SwitchA and SwitchB type the following command with 802.1q at the fastethernet 0/1
interface.
To verify that fastethernet 0/1 has been established as trunk port, type the show interface fastethernet
0/1 switchport at the privileged EXEC mode.
Although the VLAN definitions have migrated to the switch B using VTP, but it is necessary to assign
ports to these VLANs on switch B.
Now assigning the ports 2 and 3 to VLAN 2, it must be done from the interface mode. Enter the
following commands to add port 2 and 3 to VLAN 2.
Now assigning the ports 4 and 5 to VLAN 3, enter the following commands to add port 4 and 5 to VLAN 3.
SwitchB(config)#configure terminal (enter in global configuration mode)
Trunk link is used to carry the different VLANs traffic on a single link. There are two different protocols are used
for Ethernet trunking, 802. 1q and ISL. Trunking change the formatting of the packets. The ports need to be in
agreement as to which format is being use to transmit data on the trunk, if there is different trunking
encapsulation on the two ends of the link they will not able to communicate. Similar situation will occur if one of
your ports is configured in trunking mode and other one as in access mode.
First create multiple VLANs with name, assign multiple ports to them then create 802.1q trunk link between the
two switches to allow communication between VLANs.
To create a VLAN, first enter global configuration mode to run the following commands.
Now assigning the ports 2 and 3 to VLAN 2, it must be done from the interface mode. Enter the following
commands to add port 2 and 3 to VLAN 2.
Now assigning the ports 4 and 5 to VLAN 3, enter the following commands to add port 4 and 5 to VLAN 3.
Now assigning the ports 2 and 3 to VLAN 2, it must be done from the interface mode. Enter the following
commands to add port 2 and 3 to VLAN 2.
Now assigning the ports 4 and 5 to VLAN 3, enter the following commands to add port 4 and 5 to VLAN 3.
Now create 802.1q trunk link between the two switches to allow communication between VLANs.
On both switches, SwitchA and SwitchB type the following command with 802.1q at the fastethernet 0/1
interface.
To verify that fastethernet 0/1 has been established as trunk port, type the show interface fastethernet 0/1
switchport at the privileged EXEC mode.
Trunking is a technique to carry different VLAN traffic using point to point link between two devices. ISL
(InterSwitch Link) is a cisco proprietary protocol can work with Ethernet token ring and Fddi also. Trunking
changes the formatting of the packets. The ports need to be in agreement as to which format is being use to
transmit data on the trunk, if there is different trunking encapsulation on the two ends of the link they will not able
to communicate. Similar situation will occur if one of your ports is configured in trunking mode and other one as in
access mode.
First create multiple VLANs with name, assign multiple ports to them then create ISL trunk link between the two
switches to allow communication between VLANs.
To create a VLAN, first enter global configuration mode to run the following commands.
Now assigning the ports 2 and 3 to VLAN 2, it must be done from the interface mode. Enter the following
commands to add port 2 and 3 to VLAN 2.
Now assigning the ports 4 and 5 to VLAN 3, enter the following commands to add port 4 and 5 to VLAN 3.
Now assigning the ports 2 and 3 to VLAN 2, it must be done from the interface mode. Enter the following
commands to add port 2 and 3 to VLAN 2.
Now assigning the ports 4 and 5 to VLAN 3, enter the following commands to add port 4 and 5 to VLAN 3.
Now create ISL trunk link between the two switches to allow communication between VLANs.
On both switches, SwitchA and SwitchB type the following command with ISL at the fastethernet 0/1 interface.
To verify that fastethernet 0/1 has been established as trunk port, type the show interface fastethernet 0/1
switchport at the privileged EXEC mode.