Switch – VLAN Tags and QoS

layer2layer3qosswitchvlan

I have a bunch of phones that are tagged as VLANID 20 with priority 7. I have the router setup with VLAN Tagging as well to mark VLANID 20.

My question in terms of switches. Do the switches need to be layer-3 for QoS and VLAN to work or can they also be layer-2?

Am I correct that even if the switches pass VLAN ID tags and QoS, unless they are layer-3 and read the VLAN tags that tagging with QoS is pointless because the switches won't be trying to do QoS?

Basically, my goal is to try and separate 50 VoIP phones from 70 computers to improve quality of voice.

Best Answer

Most business-grade, layer-2 switches support VLANs. You configure trunks to carry the multiple VLANs between switches and routers. How to do this, specifically, will depend on the switch model(s). VLAN tags are only used on trunks; frames on access ports are not tagged.

VLAN tagging really has nothing to do with IP QoS. Layer-2 frames have a COS, and layer-3 packets have a TOS, or DSCP. Different frames or packets with the same VLAN tag can have different QoS markings. As Daniel points out in the comment, the COS is only applied on frames with VLAN tags, but tagged frames only exist on trunks, not on access ports. Your switch(es) may support the minimal layer-2 QoS, and you would need to set the switch(es) up to apply COS markings and and queues on the switch(es), but this assumes your switches support layer-2 QoS, which is not normally very robust. Where you will really make a difference is with the layer-3 marking and router queuing based on those markings.

VoIP data traffic is typically set to EF (Expedited Forwarding), but you aren't doing that. Also, VoIP control traffic, on the same VLAN, is usually marked differently. A VoIP phone will, by default, mark its packets correctly, and you only need to trust on the VoIP VLAN. Marking VoIP the same as network control information, 7, is not usually a good thing.

One thing to really understand is that your QoS markings and policies are only good on your network. Unless you have an agreement in place with your ISP ($$$), your ISP will not honor your QoS markings and policies. Also, any other carriers through which your packets travel will not honor your QoS markings or policies, and will likely mark them all to BE (Best Effort). If your VoIP problems are on the Internet, you can try to fix what is on you network, but you will have no control of the packet treatment on the Internet.

Related Topic