Voice switching command explanation

Unanswered Question
Feb 12th, 2009


I'm trying to troubleshoot a connectivity problem and I believe it's leading to our switch. We're using a Catalyst 3560 (IOS 12.2(35)). We are running voice and data and have two vlans setup for them: vlan 10 for data, vlan 172 for voice.

I'm a bit confused about some of the statements. Here are a couple of examples:

switchport trunk encapsulation dot1q

switchport trunk native vlan 10

switchport mode trunk

switchport voice vlan 172


switchport access vlan 172

switchport trunk encapsulation dot1q

switchport trunk native vlan 10

switchport mode trunk

We have used both sets of statements for workstation/phone connectivity. I've reviewed the command reference and that has helped a bit, but I guess my biggest question is the difference between these....

switchport voice vlan 172 AND switchport access vlan 172

Any thoughts would be greatly appreciated!


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
branfarm1 Thu, 02/12/2009 - 14:49

Chris --

The command 'switchport access vlan 172' applies to traffic that is destined for the computer attached to the IP phone. That means, you are setting the computer and the phone to be in the same vlan. The difference between that and

'switchport trunk native vlan 10' is that setting the native vlan will make the trunk carry vlan 10 traffic untagged. I don't believe this will work when you have a computer attached through the phone -- the phone will work, but the computer most likely won't unless you have all of your ports configured with vlan 10 as the native vlan.

The command 'switchport voice vlan 172' specifies the auxiliary vlan to be used for Voice traffic. When you connect your IP phone to the switch, the voice traffic is carried to the phone in vlan 172 and data traffic (vlan 10) passes through the phone to the attached computer.

In my setup, I use vlan 100 (data) and vlan 200 (voice) and my ports are set as follows:

switchport trunk encapsulation dot1q

switchport access vlan 100

switchport mode trunk

switchport voice vlan 200

Hope that helps!


christopher_hal... Fri, 02/13/2009 - 06:22


Thanks for the info. I'll have to double check, but I believe on our switches we have used both 'switchport access vlan 172' and 'switchport voice vlan 172'. When we use the prior statement, we use the 'native vlan 10' statement. All/most of our PCs are connected to phones, phones to switches and it seems to work. That said, I'll try your config...hope this will solve some of the intermittent issues we've been having.

Along those lines, if our config is working, could it be possible that if this is not the correct way to config, would it create issues with intermittent connectivity and/or slow printing/file transfer?


christopher_hal... Fri, 02/13/2009 - 08:02


I'll take a look at the link. Another question: since we're dishing out IPs for phones and PCs, would the port configuration for that device be different? This is what we have now:

description connection to Server

switchport access vlan 10

switchport mode access

spanning-tree portfast

Also, are basic configuration includes:

mls qos trust dscp

spanning-tree portfast

See attached for the full config.

branfarm1 Fri, 02/13/2009 - 09:32

Hi Chris,

Thanks for sending that over. I don't see anything necessarily wrong, but I am curious why the two ports are configured with 'switchport access vlan 172'. It seems that all of your devices are on vlan 10, and all of your phones are on vlan 172. Is fa0/3 a call manager server of some type? If not, why does it need to be on the same vlan as the phones? Ideally, you would seperate all phone and data traffic. Is fa0/4 the port attached to the server that is having the problems? What exactly are you seeing?

Also, you can use the 'show int trunk' command to see exactly which vlans are active on the trunk links.

christopher_hal... Fri, 02/13/2009 - 09:44

Hi Brandon,

Not sure what's connected to fa0/3 or /4. I've seen on several switches between this one location and another an inconsistency on how ports are configured, so I think at this point, I'm going to start with the switch config I've sent to your and re-config (a port at a time) based how you've setup your config.

The issues we've seen at this location and a couple others are a variety of slow file transfers, slow/problematic printing, and dropping network connections at times. As mentioned previously, most of the devices connected to our switches, with PCs connected to phones. Of course, we have servers and printers as well. I've scheduled a trip to the location for next week and will see what is plugged into which port.


christopher_hal... Fri, 02/13/2009 - 12:06

Switchport access--


I've got some command questions that I'd like you to confirm for me....The command

reference states....If the switchport mode is set to access, the port operates as

a member of the specified vlan. In our case, considering the statement...

switchport access vlan 172

And considering our vlan ids...

Data == 10; Voice == 172

If we have a workstation connected to the phone, would it still be able to

'access' the data vlan? It seems not.

Can you explain switchport access vs. switchport trunk modes? From what I've read,

access mode sends/receives non-tagged frames and trunk mode sends/receives tagged

frames. What's the pros/cons of these two modes? (I'll hunt some cisco press

stuff...but quick examples would make this a lot clearer).

Thanks a bunch,



This Discussion