Home / Network Design, SIP Configuration / VoIP QoS Settings – part 1


VoIP QoS Settings – part 1

by Smartvox on June 17, 2011

Ads by Google:

The QoS settings on VoIP phones and related equipment can be perplexing. Here, I will attempt to explain what parameters like CoS, ToS, DiffServ and DSCP really mean and offer practical suggestions for the values that should be assigned to them.

Part 1 of this article starts with a broad overview and then focuses on Layer 2 network QoS settings; i.e. the settings associated with the VLAN tag in 802.1 Ethernet protocols. If you are looking for information about Layer 3 settings such as DSCP, ToS and IP Precedence, then you may prefer to skip straight to part 2.

What is QoS?

QoS (Quality of Service) is a somewhat all-encompassing term and means different things to different people, even within the context of Voice over IP. The broader issues of audio quality on VoIP calls, echo cancellation and the mechanisms within end-points designed to compensate for packet loss and jitter are discussed in a different article here. The QoS settings that this article seeks to explain are all directly related to frame and packet tagging for prioritisation of network traffic. Even restricting ourselves to this specific area, there is enough material to fill at least one decent sized book. In order to keep it to a manageable scale for this article I’m going to have to brush over some of the details very quickly. I apologise in advance if some experts out there find my condensed descriptions over-simplistic or inaccurate.

The structure of Network Traffic

Traffic on a network is passed around as a series of discrete chunks of data called “frames”, “packets” or “messages” depending which level they exist at. The structure of frames and packets generally conforms to a common pattern in so far as they all could be described as an envelope containing (a) information about the packet itself and (b) the “payload”. The term “payload” is used to describe the core data that needs to be sent from A to B. Information about the packet or frame typically includes the source and destination address, but may also include other parameters such as a description of the packet’s importance or priority. It is these priority fields that I will be discussing here.

The actual structure of a frame or packet will conform to certain industry standards (without this, you would not be able to interconnect equipment from different manufacturers). For example, the IEEE 802 standards define what Ethernet frames look like. Internet Protocols such as IPv4 and IPv6 are also governed by standards. The original standards may or may not have included a field that could be used to define the priority of the data, but more on that later.

To understand the QoS parameters used for VoIP, it is vital to first understand the different network layers within which these frames and packets are operating. Some parameters are relevant within Layer 2 and others are relevant within Layer 3. The following diagram summarises it:

VoIP QoS in the context of OSI Layers

Layer 2 QoS settings

The early standards for Ethernet defined a relatively simple structure for each frame that did not include a field for priority. An optional additional field, 4 bytes long, was introduced by the IEEE 802.1 working group (see 802.1D, 802.1Q and 802.1p). This optional field may sometimes be loosely referred to as the “VLAN tag”. Two bytes of the VLAN tag are assigned for Tag Control Information comprising a 3-bit Priority Code Point, a 1-bit CFI flag and a 12-bit VLAN ID. The field that we are interested in is the Priority Code Point (PCP) because it is used for VoIP QoS tagging in layer 2.

Priority values that may be assigned to the PCP field are defined in the 802.1p standard. Values can be between 0 and 7, but remember this value is used for traffic classification and thus represents more than a simple linear scale. The audio stream, or RTP, for a VoIP call requires low latency and should be assigned a priority value of 5. The signalling traffic, or SIP, can tolerate higher latency so it is usually assigned a priority value of 3. Sometimes the layer 2 priority value is referred to as a CoS value (Class of Service) although this terminology has the potential to be ambiguous.

Cautionary note:

Layer 2 802.1p QoS settings are stored in the VLAN tag which is not always present by default. Please take care when enabling or setting a VLAN ID on your VoIP equipment as it may result in a complete loss of remote connectivity. You should be able to recover from such problems by disabling VLAN options using the phone’s built-in menus and LCD display, but in the worst case you may have to return it to default settings using a factory reset. If unsure, a VLAN ID of zero should (in theory) be recognised by non-VLAN enabled network equipment.

Aastra settings

On the Aastra IP phones, the layer 2 settings are shown on the web GUI within the Network Settings page under the heading VLAN. It will only allow you to modify the values if you tick the “VLAN Enable” box, which makes sense as the priority value is stored in the VLAN tag. You can set a different priority for the SIP messages, the RTP stream and the RTCP messages, but the default values already shown (3 for SIP, 5 for RTP and RTCP) will not normally need to be changed.

Linksys settings

On Cisco and Linksys phones, the layer 2 settings are shown on the Line tab under the heading Network Settings. Look for the fields labelled SIP CoS Value and RTP CoS value.

Snom settings

On my  Snom 360 phone, some settings are available in the QoS/Security tab of the Advanced settings page. It allows you to specify a Priority to be associated with each VLAN ID. There are also settings for VLAN ID and Priority for the Net Port and the PC Port, but you cannot set different priorities for SIP, RTP and RTCP.

Grandstream settings

Taking two different Grandstream phones, I found the QoS settings under the “Advanced Settings” tab on the older GXP phone and under “Maintenance” on the newer GXV phone. On the latter they are shown in the “Network Settings” sub-page. Identification is simple because Grandstream call them  “Layer 2 QoS 802.1Q/VLAN Tag” and “Layer 2 QoS 802.1p Priority Value”. Nice unambiguous labelling.

Asterisk settings

In recent versions of Asterisk, you can set the value for the layer 2 PCP field by editing the sip.conf file. The values are set using the following parameters (here shown with their default values):

cos_sip=3
cos_audio=5
cos_video=4
cos_text=3

Further reading

In part 2, I look at QoS settings for prioritising network traffic using the Layer 3 IP protocol.

If QoS is to make a difference, it requires a good deal more than just setting the DSCP, ToS or CoS values on the IP telephony device or PBX. If QoS is an important requirement in your VoIP projects, I strongly recommend that you read my follow-up article about QoS in practice. Just click this link to go to the article.

Feedback on this article

Please take a moment to use the coloured voting buttons below to provide some feedback to the author. If you liked the article, great. If it fell a little short of your expectations, please leave a brief comment or send me an email (info (at) smartvox.co.uk) so I know what needs changing. Thanks.

  What did you think of this article? Please vote by clicking a coloured button
(35%) (53%) (5%) (8%)

{ 1 comment… read it below or add one }

Austin Werth January 25, 2012 at 5:06 pm

Definitly QoS is the most important thing for a VoIP Phone Service Provider. In addition, I would like to add some tools available to test and solve qos issues below:

– Asterisk Solution powered by AQuA
– Bandwidth administration tools available to download for managing traffic on your internet connection.
– Dynamic QoS (DQoS) automatically manages bandwidth for voip traffic and realtime apps.
– A plug-n-play device, NetEqualizer, that re-rerouts traffice if congestion detected.
– Open source packet sniffer, VoIPmonitor, for analyzing sip and rtp.
– VoIP Spear is a web service that monitors VoIP quality 24×7 all year long.

{ 2 trackbacks }

Previous post:

Next post: