This could be considered somewhat of a niche topic but voice vlan/switchports are covered in the CCNA exam, and perhaps more importantly you will deal with this configuration in most Cisco friendly production environments.

Relevant CCNA Topics Covered: Interconnecting Cisco Networking Devices Part 1 (100-105) Section 2.4

Most Cisco IP phones have an embedded 3-port switch module which handles layer 1/2 connectivity to the LAN. One port will provide connectivity to the phone itself, one port will connect to the access switch, and the third port connects to a PC. Unless you’re working with a “flat” network, the phone and PC should be operating in different vlans. If that is the case, the switchport you’re connected to on the access switch must be able to switch packets from the PC into the “data” vlan, and packets from the phone into the “voice” vlan. For our example we will designate vlan 5 for data, and vlan 10 for voice. We will set our port in this example as an access port in vlan 5. Packets sent to the 10/100 PC port of the phone are passed to the access switch with no vlan tag present. Those packets are then switched within the operational vlan of the port. See the example interface running configuration output below to examine the voice configuration.

 

SW1-3850#sh run int Gi2/0/20
Building configuration...

Current configuration : 164 bytes
!
interface GigabitEthernet2/0/20
switchport access vlan 5
switchport mode access
switchport voice vlan 10
spanning-tree portfast
end

 

The command ‘switchport voice vlan 10’ in the example instructs the phone to add a 802.1q tag for vlan 10 to all voice packets passed to the switch. It’s worthy to note that this command also adds ‘spanning-tree portfast’ to the interface configuration if it isn’t already present. The phone retrieves the voice vlan information via Cisco Discovery Protocol (CDP) once the port is in an up/up state. This is an important detail to remember if a phone is not retrieving an IP from the dhcp pool for your voice vlan for some reason, and instead is pulling an IP from the data vlan. If the phone is not aware of the voice vlan then it will send voice packets untagged! So make sure CDP is enabled if you’re using a voice vlan. It’s also worth noting that the switchport on the access switch does not have to be explicitly configured as an access port for the voice vlan to function.

When troubleshooting voice issues on a LAN it’s useful to know that a PC connected to the phone’s PC port is able to capture phone traffic. If you are registering phones to CUCM (Cisco Call Manager) you will need to configure the phone to span to the pc port, however the functionality is possible in most phones. This prevents you from having to span a port in the switch and make an unnecessary trip to the IDF! There is additional information regarding QoS that is relevant to this topic, but is not appropriate for this post. I’ll keep it simple for now as we will discuss QoS a bit farther down the road.

Thank you for taking the time to read this post, feel free to leave a comment with any feedback or questions, and have a great day! If you find yourself in need of the ICND1 100-105 here’s may affiliate link to amazon where you can purchase: CCENT/CCNA ICND 100-105 Official Cert Guide by Wendell Odom (2016-05-17)

-Eric

Leave a comment

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