Cisco Switch VLAN’s
Switches have one broadcast domain by default, therefore a copy of a broadcast sent out by a host plugged into this switch will be received by all of the other attached hosts. The diagram below shows four hosts plugged into a switch.
VLANs allow you to do the following:
- Group common network devices together and protect them by segregating them from other VLANs
- Segment devices into smaller LANs creating smaller broadcast domains
- Reduce the workload of Spanning Tree Protocol (STP) by limiting a VLAN to a single access switch
- To separate traffic sent from IP phones and PCs
Without VLANs a switch considers all of its interfaces to be in the same broadcast domain, by default all interfaces are assigned to VLAN 1 this can be seen by running the following command on the switch
Switch#show vlan brief
VLAN Name Status Ports
——————————————————————————–
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
As you can see from the output above all of the ports are in VLAN1 and the name for this VLAN is default.
To put switch ports into separate VLANS you need to begin by making the ports access ports by using the command below in interface configuration mode.
Switch(config-if)#switchport mode access
The next command puts the port into the VLAN that you want
Switch(config-if)#switchport access vlan 13
% Access VLAN does not exist. Creating vlan 13
Note that the message states that VLAN 13 did not exist and has now been created. For this scenario I went and added the corresponding ports to the correct VLANs using the commands above making sure I put ports 2 and 4 into VLAN 24 my switch is now set up as shown below.
Please note that now we have two separate VLANs hosts 1 & 3 cant communicate with hosts 2 & 4 and vice versa. They can only communicate through a layer 3 device such as a router or a layer 3 switch. There is also a technique called Router on a Stick which I have discussed in another post.
The packet tracer file for this secnario can be downloaded below.


