How to Configure VLAN on Cisco Switch in Cisco Packet Tracer? – VLAN configuration on the Cisco Switch is used to separate physical network topologies into logical network topologies. When configured VLANs on a Cisco Switch, provides all the functions having in a physical environment.
How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

In a physical network environment, we can logically separate users in a specific location with VLANs. For example, they usually position accounting staff in the same location. Accounting staff only do computer work. By creating the Accounting VLAN on the Cisco Switch, we can aggregate users into this group.

In the real scenario, when we do this, users will not be enabled for this change. We can only restrict access to another VLAN group by creating VLAN-based constraints. VLAN (Virtual LAN) configuration has multiple solutions.

Those people who want to improve themselves or to work for Cisco exams can use network simulator programs to test these processes on their own computers.

In the previous articles, we discussed how to configure SSH in Cisco Packet Tracer, how to configure telnet in Cisco Packet Tracer and how to configure DHCP in Cisco Packet Tracer.

In this article, we will look at how to configure VLAN on Cisco Switch in Cisco Packet Tracer, Cisco Switch VLAN configuration, Cisco Switch VLAN identification, and Packet Tracer Cisco Switch configuration.

Our Recommendation; You can purchase the Cisco SG200-26 Gigabit Ethernet Smart Switch with 24 10/100/1000 Ports (SLM2024T-NA) to configure VLANs for the Cisco exams.

How to Create VLAN on Cisco Switch in Packet Tracer?

We can now pass how to configure VLAN on Cisco Switch in Cisco Packet Tracer.

   Step 1

For the Cisco Packet Tracer VLAN configuration and Cisco Switch VLAN creation, first, create the network topology as shown below.

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

   Step 2

Click once on the Cisco switch and then on the CLI tab.

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

   Step 3

You can view the following image for the Cisco Switch VLAN creation commands in the Cisco Packet Tracer. To create a Cisco Switch VLAN, apply the following commands, respectively.

Switch# conf t
Switch(config)# hostname SWITCH
SWITCH(config)# vlan 10
SWITCH(config-vlan)# name VLAN10
SWITCH(config-vlan)# exit
SWITCH(config)# vlan 20
SWITCH(config-vlan)# name VLAN20
SWITCH(config-vlan)# exit
SWITCH(config)# vlan 30
SWITCH(config-vlan)# name VLAN30
SWITCH(config-vlan)# exit

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

We have completed the steps to create a VLAN on Cisco Switch in Packet Tracer. Now, according to our topology, we will assign the Cisco Switch interfaces, such as Fa0/1 you see in the image above, to the VLANs we created.

How to Assign Ports to VLAN in Cisco Switch?

After assigning ports to VLAN on Cisco Switch, we will logically separate the client computers.

   Step 1

On the Cisco Switch, switch from privileged configuration mode to global configuration mode (config mode). Based on the network topology, let’s make the client computers connected to the Switch interfaces VLANs.

To assign clients in the red zone to VLAN 10, execute the following commands, respectively.

SWITCH# conf t
SWITCH(config)# interface fastethernet 0/1
SWITCH(config-if)# switchport mode access
SWITCH(config-if)# switchport access vlan 10
SWITCH(config-if)# exit
SWITCH(config)# interface fastethernet 0/2
SWITCH(config-if)# switchport mode access
SWITCH(config-if)# switchport access vlan 10
SWITCH(config-if)# exit
SWITCH(config)# end

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

   Step 2

To assign clients in the blue zone to VLAN20, execute the following commands, respectively.

SWITCH# conf t
SWITCH(config)# interface fastethernet 0/3
SWITCH(config-if)# switchport mode access
SWITCH(config-if)# switchport access vlan 20
SWITCH(config-if)# exit
SWITCH(config)# interface fastethernet 0/4
SWITCH(config-if)# switchport mode access
SWITCH(config-if)# switchport access vlan 20
SWITCH(config-if)# exit
SWITCH(config)# end

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

   Step 3

To assign clients in the green zone to VLAN20, execute the following commands, respectively.

SWITCH# conf t
SWITCH(config)# interface fastethernet 0/5
SWITCH(config-if)# switchport mode access
SWITCH(config-if)# switchport access vlan 30
SWITCH(config-if)# exit
SWITCH(config)# interface fastethernet 0/6
SWITCH(config-if)# switchport mode access
SWITCH(config-if)# switchport access vlan 30
SWITCH(config-if)# exit
SWITCH(config)# end

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

In the steps to configure VLAN on Cisco Switch in Cisco Packet Tracer, we have completed the Cisco Switch VLAN creation and assignment ports to VLAN on Cisco Switch.

   Step 4

In privileged configuration mode on the Cisco Switch, you can view the VLAN assignment by applying the show vlan  command.

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

   Step 5

PC0 and PC1 clients are assigned to VLAN10. If you ping from PC0 to PC1, you can see that the process is successful.

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

   Step 6

When PC0 pinged to PC2 that is a member of VLAN20, the ping operation will fail.

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

   Step 7

Ping will also fail when pinging PC0 from PC0 to VLAN30 members.

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

Pinging process between VLANs has failed. Inter-VLAN Routing is required to establish InterVLAN communication.

How to create a basic network in Packet Tracer? You can find the answer to the question in “How to Configure a Network in Cisco Packet Tracer?“.

How to Assign the Ip Address to VLAN in Cisco Packet Tracer?

The process to assign the Ip address to VLAN in Cisco Packet Tracer means that created VLANs are given a management IP address from different Ip blocks. The management IP address can be given for each VLAN created.

According to our network topology, let’s create management Ip addresses for VLAN 10, VLAN 20, and VLAN 30 that we have created.

   Step 1

In the Cisco Switch VLAN Ip addressing step, apply the following commands, respectively, in order to configure the VLANs.

SWITCH#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SWITCH(config)#interface vlan 10
SWITCH(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
SWITCH(config-if)#ip address 192.168.10.100 255.255.255.0
SWITCH(config-if)#no shutdown
SWITCH(config-if)#exit
SWITCH(config)#
SWITCH(config)#interface vlan 20
SWITCH(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up
SWITCH(config-if)#ip address 192.168.20.100 255.255.255.0
SWITCH(config-if)#no shutdown
SWITCH(config-if)#exit
SWITCH(config)#
SWITCH(config)#interface vlan 30
SWITCH(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up
SWITCH(config-if)#ip address 192.168.30.100 255.255.255.0
SWITCH(config-if)#no shutdown
SWITCH(config-if)#end
SWITCH#

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

   Step 2

After giving the Cisco Switch IP address, apply the show ip  interface brief command to see the VLAN interface and IP addresses on the Cisco Switch.

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

   Step 3

The operation is successful when we ping from the PC0 to the VLAN 10 management IP address (192.168.10.100).

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

   Step 4

If we ping from the PC0 to VLAN 20 and VLAN 30 management IP addresses (192.168.20.100 and 192.168.30.100), the operation is unsuccessful.

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

   Step 5

If we ping the VLAN 20 management IP address (192.168.20.100) from PC2, the operation will be successful. However, if we ping the VLAN 30 management IP address (192.168.30.100), the operation will fail.

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer?

How to make a console connection on the Cisco Packet Tracer? For the answer to the question, you can read the article called “How to Connect to Cisco Router Console in Cisco Packet Tracer?“.

Show Commands Related to How to Configure VLAN on Cisco Switch in Cisco Packet Tracer

SWITCH#show vlanSWITCH#show vlan briefSWITCH#show running-config SWITCH#show ip interface brief

SWITCH#show vlan

VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active 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, Gig0/1, Gig0/2
10 VLAN10 active Fa0/1, Fa0/2
20 VLAN20 active Fa0/3, Fa0/4
30 VLAN30 active Fa0/5, Fa0/6
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
—- —– ———- —– —— —— ——– —- ——– —— ——
1 enet 100001 1500 – – – – – 0 0
10 enet 100010 1500 – – – – – 0 0
20 enet 100020 1500 – – – – – 0 0
30 enet 100030 1500 – – – – – 0 0
1002 fddi 101002 1500 – – – – – 0 0
1003 tr 101003 1500 – – – – – 0 0
1004 fdnet 101004 1500 – – – ieee – 0 0
1005 trnet 101005 1500 – – – ibm – 0 0

Remote SPAN VLANs
——————————————————————————

Primary Secondary Type Ports
——- ——— —————– ——————————————
SWITCH#

SWITCH#show vlan brief

VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active 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, Gig0/1, Gig0/2
10 VLAN10 active Fa0/1, Fa0/2
20 VLAN20 active Fa0/3, Fa0/4
30 VLAN30 active Fa0/5, Fa0/6
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
SWITCH#

SWITCH#show running-config
Building configuration…

Current configuration : 1351 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SWITCH
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/2
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/4
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/5
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/6
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
!
end
SWITCH#

SWITCH#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/1 unassigned YES manual up up
FastEthernet0/2 unassigned YES manual up up
FastEthernet0/3 unassigned YES manual up up
FastEthernet0/4 unassigned YES manual up up
FastEthernet0/5 unassigned YES manual up up
FastEthernet0/6 unassigned YES manual up up
FastEthernet0/7 unassigned YES manual down down
FastEthernet0/8 unassigned YES manual down down
FastEthernet0/9 unassigned YES manual down down
FastEthernet0/10 unassigned YES manual down down
FastEthernet0/11 unassigned YES manual down down
FastEthernet0/12 unassigned YES manual down down
FastEthernet0/13 unassigned YES manual down down
FastEthernet0/14 unassigned YES manual down down
FastEthernet0/15 unassigned YES manual down down
FastEthernet0/16 unassigned YES manual down down
FastEthernet0/17 unassigned YES manual down down
FastEthernet0/18 unassigned YES manual down down
FastEthernet0/19 unassigned YES manual down down
FastEthernet0/20 unassigned YES manual down down
FastEthernet0/21 unassigned YES manual down down
FastEthernet0/22 unassigned YES manual down down
FastEthernet0/23 unassigned YES manual down down
FastEthernet0/24 unassigned YES manual down down
GigabitEthernet0/1 unassigned YES manual up up
GigabitEthernet0/2 unassigned YES manual down down
Vlan1 unassigned YES manual administratively down down
Vlan10 192.168.10.100 YES manual up up
Vlan20 192.168.20.100 YES manual up up
Vlan30 192.168.30.100 YES manual up up

Configure VLAN on Cisco Switch in Cisco Packet Tracer ⇒ Video

You can watch how to configure VLAN on Cisco Switch in Cisco Packet Tracer and also subscribe to our YouTube channel…

  Final Word

How to Configure VLAN on Cisco Switch in Cisco Packet Tracer? – In the Cisco Packet Tracer, we have created VLANs on the Cisco Switch and assigned IP addresses to the management VLANs. Next time, we will handle the communication between VLANs.

If this article is helpful, send me feedback by commenting! Thanks in advance, take care of yourself!

Also, you can add to the browser bookmarks by pressing the Ctrl+D to read this article later!

Articles Related to How to Configure VLAN on Cisco Switch in Cisco Packet Tracer;


Products Related to How to Configure VLAN on Cisco Switch in Cisco Packet Tracer;

Leave a Reply

Your email address will not be published. Required fields are marked *

eight − one =