This article discusses considerations in regard to VoIP optimization on customer networks and provides examples of configuration for various hardware vendors
What is Quality of Service
Quality of Service (QoS) is a concept typically framed in regard to performance of the network - the important applications and activities are being addressed quickly and nothing falls over the wayside. Everyone wants everything, but the reality is resource - in the case of Quality of Service, bandwidth or volume over time (Gbps or gigabits per second is an example) - has scarcity.
The question of how to achieve or maintain Quality of Service is already a concern at the overall network level, but what about VoIP? How do we ensure Quality of Service for a user service that requires low latency and reliable transport and delivery of voice data?
Essentially it boils down to traffic prioritization and addressed with two broad questions:
- What traffic needs to be forwarded first?
- What traffic can be put off and to what extent?
Without framing QoS in terms of priority, all traffic would otherwise be forwarded on a best-effort basis. That is, all traffic is treated the same regardless of whether it’s voice data that will exhibit noticeable degradation of quality or a mundane ping check to check in on another host elsewhere on the network.
While an end to end concern for network performance, organizations have only finite control over QoS - typically limited to their own networks at the switch and router level and varying levels of QoS implementation in hops between end to end propagation (out of company’s ISP(s), X network hops, other end’s ISP(s), other end network). With different scopes of QoS come different varieties of approaches and standards, such as CoS and DSCP (also referred to as DiffServ) that attempt to achieve QoS in different applications.
Since VoIP operates over the internet, we will necessarily focus on DSCP when analyzing QoS. In its basic definition, DSCP (DiffServ) is a protocol for managing bandwidth allocation for internet media connections occupying 6 bit services codes specifying different behaviors for applicable traffic. The DSCP (differentiated services code point) is in the IP header for packet classification.
As a base rule of thumb given the myriad options for prioritization through DSCP, NocTel recommends that SIP be set to the CS3 class and RTP set to EF. We can generally safely set SIP to CS3 as it isn’t as sensitive to latency as RTP is while maintaining some tolerance for packet loss with re-transmission. EF, or Expedited Forwarding, designates traffic as being high priority and very undesirable for packet loss. In RTP’s case, since the communication is effectively streaming re-transmission of data isn’t possible as it operates off UDP hence we set it to EF.
In the following sections QoS configuration examples are provided.
Cisco QoS Configuration Example
Juniper QoS Configuration Example
The above would be applied to an interface like this:
Juniper Typical Switch QoS Configuration Example
If you find a syntax error in any of the above examples, let us know! Also feel free to contribute your own examples to grow the knowledgebase!
While building solid QoS configurations internally can help optimize VoIP service, it is not a panacea that ensures every call is perfect as an ISP could be operating with congested ports, which is unfortunately generally outside of locus of control. Though this article outlines QoS primarily in the vein of VoIP, it can be applied to the rest of your network. However, do this sparingly and do not try to micromanage traffic priority through DSCP as it will likely cause contrasting results from attempting to involve too many service levels. Keep things simple: determine what needs to be delivered consistently and with minimal loss and determine what is not a priority. Everything else will fall into the "best effort" bucket of priority.