Day-34: Voice VLAN.

By | June 12, 2022

A voice VLAN is a VLAN ( virtual local area network) that is specifically allocated for the user’s voice data as we all know the VoIP traffic is very sensitive and VOIP traffic can deal with the delay, Bandwidth congestion, etc. The reason we need Voice VLAN is to prioritize that traffic after separating them. Once you will separate the voice traffic in your network then you can prioritize your voice traffic and It ensures the quality of voice traffic by improving its transmission priority of it when transmitted with other traffic. That is to say, when other services (data, video, etc.) are transmitted simultaneously, voice service will be prioritized and transmitted with a higher forwarding priority.

How Does Voice VLAN Work?

To prioritize the voice traffic, we need to identify them.

Voice VLAN can identify voice data streams in two ways. One is by identifying the source MAC addresses of the received packets (MAC address-based mode), and the other is by identifying the VLAN tags of the received packets (VLAN-based mode).

There are 2 ways we can install our VOIP phones in our network.

  1. We can connect our Phones to a switch port and from phone to PC.
  2. We can connect our phone and PC to two different ports of a switch.

The second is one is not recommended because we have to use an additional port in the switch .as we have 3 ports available in the phone we can connect our PC to the phone directly.

Our Diagram.

Let’s say according to the above diagram our phone and PC are connected.

Behind the scenes, we have a trunk between our switch and IP phone. The port on the IP phone that connects to the computer is an access port. The IP phone will forward all traffic from the computer to the switch untagged, traffic from the IP phone itself will be tagged. The only two VLANs that are allowed though, are the access and voice VLANs.

Voice VLAN Configuration.

Let’s configure a switch port where we use VLAN 50 for the DATA and VLAN 25 for our IP phone.

First, we have to create the two VLANs:

SW1(config)#vlan 50
SW1(config-vlan)#name DATA
SW1(config-vlan)#exit

SW1(config)#vlan 25
SW1(config-vlan)#name VOIP
SW1(config-vlan)#exit


Now, let’s configure the port with respective Data and Voice Vlans.

SW1(config)#interface fa0/1
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 50
SW1(config-if)#switchport voice vlan 25
SW1(config-if)#exit

Now let’s Verify the configuration by using switchport command .

SW1#show interfaces fa 0/1 switchport
Name: fa0/1
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: 50 (DATA)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: 25 (VOIP)
Administrative private-vlan host-association: none 
Administrative private-vlan mapping: none 
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: 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

Another thing is very important to understand that, When we configure the voice vLAN on switch port it will show us as non-trunking but in reality its a trunk .Now lets verify.

SW1#show interfaces fa0/1 trunk

Port        Mode             Encapsulation  Status        Native vlan
Fa0/1      off              negotiate      not-trunking  1

Port        Vlans allowed on trunk
Fa0/1       25-50

Port        Vlans allowed and active in management domain
Fa0/1      25-50

Port        Vlans in spanning tree forwarding state and not pruned
Fa0/1      25-50

Above we see that VLAN 25 and 50 are allowed on this interface. Although it shows up as non-trunking . in reality, it is a trunk.

Leave a Reply

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