cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
551
Views
5
Helpful
1
Replies

When to use a specific voice vlan command?

granttes
Level 1
Level 1

I've been reading about voice vlan and have been trying to understand when to use any of the 4 different commands when setting up a switch port to hold a VOIP phone that has a PC connected to it. The 4 commands are:

 

switchport voice vlan vlanid

switchport voice vlan dot1p

switchport voice vlan untagged

switchport voice vlan none

 

From what I understand, all the configuration is done right on the switch for the port that the phone will go on. I've learned that traditionally, there was only 1 data drop per cubicle in an office and that was meant for the computer's data. Once phones started to roll out that would work over IP, the choice was to either run an extra new drop to each cubicle to support the phone or to install a switch embedded within the phone (which is what happened). But the former situation required that the switch take up 2 ports. One for the phone and one for the PC and each port would have set up a certain VLAN. But now that the phone has a switch, the data from the PC can go through the phone, UNTAGGED as it always does, while the phone will send its traffic tagged. 

 

So I understand that if we set up the switch port with a vlan for data and a specific voice vlan, the switch port will be able to distinguish the data packets from the voice packets since the voice packets are tagged inside the 802.1q CoS bits, while the data isn't. 

 

So then what is the difference in the commands listed up above? The one I'm truly curious about is "switchport voice vlan dot1p". I understand that it will use VLAN 0 so that it can inject an 802.1q header in the frame just so it can use the Priority Code Point bits for Class of Service to prioritize the voice packets (then again the other commands do the same, except for the last command). But why use that command over the "switchport voice vlan vlanid" command? I keep finding information that says: "The VLAN ID 0 is used when a device needs to send priority-tagged frames but does not know in which particular VLAN it resides". But how could a device not know which VLAN it resides on? I don't believe the phone ever gets configured to know which VLAN it's on. Although I have read that if a trunk is created, both sides are negotiated. So maybe the phone will receive the information of the Native VLAN from the switch port. 

 

Any help understanding this would be appreciated!

1 Reply 1

Mike_Brezicky
Cisco Employee
Cisco Employee
802.1p is when you have no real vlan segmentation but still want to apply QoS for voice traffic. The only case I would ever bring it up is for whatever reason you were running a legacy / flat network with no layer 3 router, VLAN capability, etc.
In almost all cases, switchport voice vlan <vlanid> should be used for proper segmentation and QoS marking.