How to Configure Voice VLAN in Cisco Switch in Packet Tracer

Normally, in a LAN, only one cable is used to connect a host to a switch. This cable carries data traffic from the host device to the switch, which forwards the traffic to the destination. However, in today’s office settings, there is typically an IP phone in each office. The IP phone needs to transmit voice traffic instead of data traffic, presenting the challenge of using a single cable for accessing different services (data services for the PC and voice services for the IP phone).

network topology for voice vlan configuration

One solution to this problem is to create a VLAN for data traffic and another VLAN for voice traffic and then give the switch interface access to the two VLANs. This will enable the switch interface to be able to forward traffic for the two VLANs to the IP phone.

Modern IP phones come equipped with two ports. One port is used to connect to the switch, and the other to connect to the PC. In this scenario, the interface connecting the IP phone to the switch functions as a trunk link, carrying traffic for both the voice VLAN and the data VLAN.

The IP phone, acting as a switch, can forward any data traffic coming from the trunk interface to the PC and process any voice traffic coming from the trunk interface.

In this post, I will demonstrate how to configure the switch interface to carry both voice and data traffic to the IP phone, which subsequently forwards data traffic to the PC.

Network Topology

The network topology we will be making use of in this post is shown below. As you can see, it consists of an IP phone, a switch, and then a PC. One interface of the IP phone is connecting to the switch, and the other is connecting to the PC. In this demonstration, we will configure voice VLAN and data VLAN on the switch and then give the fao/1 of the switch access to both VLAN.

network topology for configuring voice vlan

How to Configure Voice VLAN in Cisco Switch(steps)

Here are the steps to configure Voice VLAN on a Cisco switch using the network topology shown above.

Step 1: Create the Voice and Data VLANs

Configure VLAN 10 for the PC and VLAN 20 for the Phone

Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SW0
SW0(config)#vlan 10
SW0(config-vlan)#name PC
SW0(config-vlan)#vlan 20
SW0(config-vlan)#name phone
SW0(config-vlan)#exit

SW0(config)#do show vlan
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
Gig0/1, Gig0/2
10 PC active
20 phone active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active    

Step 2: Configure the Access ports

Firstly, configure the fao/1 port of SW as access and put it inside VLAN10

SW0(config)#interface fa0/1
SW0(config-if)#switchport mode access
SW0(config-if)#switchport access vlan 10
SW0(config-if)#no shut
SW0(config-if)#exit

Then, Configure the fa0/1 interface of SW0 as Voice VLAN for the VOIPVLAN

SW0(config)#interface fa0/1
SW0(config-if)#switchport voice vlan 20
SW0(config-if)#exit

Step 3: Verify the configuration

SW0(config)#do show interfaces fa0/1 switchport
Name: Fa0/1
Switchport: Enabled
Administrative Mode: static access
Operational Mode: down
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: 10 (PC)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: 20
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: All
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none

Leave a Comment

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

Scroll to Top