Quality of Service is a very important part of operating a VoIP platform on a campus network. The ability to prioritize different traffic on the same link makes voice over IP a reality on a shared Ethernet fabric. There are three main drivers for applying QoS: jitter, packet loss, and delay.
QoS Strategies
Implimented on inbound interfaces:
Classification
Distinguishes one type of traffic from another by ACLs, ingress interfaces, and NBAR. After it is classified, other QoS functions can be applied.
Marking
(layer 2) Within a frame, placing an 802.1p CoS value within the 802.1Q trunk tag.
(layer 3) IP Precedence or Differentiated Services Code Point (DSCP) values in a packet’s IP header.
Policing
Decides whether a specific type of traffic is within predefined bandwidth levels. If not it is usually dropped (CAR and class-based routing are examples).
Implemented on outbound interfaces:
Traffic Shaping
Defines an artificial maximum throughput for the interface, providing a steady stream that is throttled while congestion occurs by buffering traffic.
Queuing
After traffic has been classified and marked, it can be placed into one of many queues to be sent at different rates and order. Examples include First In First Out (FIFO), priority queuing, weighted fair queuing, and custom queuing. Note: the default queue method is FIFO.
Dropping
By default, interface queues accept all traffic until they are full and drop everything after that. Prioritized dropping can be configured to drop low-priority, re-transmittable packets first (ex. Weighted Random Early Detection [WRED]).
DSCP
Differentiated services provides a mechanism to change levels of service based on the value of specific bits in the IP header or the 802.1Q tag. Each hop along the way must be configured to treat the marked traffic the way you want, also known as per-hop behavior (PHB).
As mentioned, there are two ways to mark the DSCP values depending on what layer you are marking it at. The first method (layer 2) uses the three 802.1p bits within the 802.1Q tag to set the CoS value. Voice is commonly set to 5 and video 4.
For layer 3, the 8 bit ToS field within the IP header is used. There are again two options here. IP Precedence can be set using the top 3 bits or DSCP can be set using the top 6 bits. The bottom 2 bits are used for congestion notification. When setting DSCP values, 0 is the defaults, indicating best-effort delivery.
The six bit DSCP code consists of two parts, the first 3 bits define the DiffServ Assured Forwarding (AF) class and the next two bits define the drop probability. The sixth bit is unused. The DSCP Assured Forwarding Values table is below for each of the four defined AF classes.
Note: Voice bearer traffic uses an Expedited Forwarding value of DSCP 46 to give it high priority.
[table id=7 /]
Trust Boundaries
The place where decisions about priority marking on incoming frames/packets is done is called the trust boundary. When IP traffic comes into an interface and is already marked, the switch has the following options:
- Trust the DSCP value
- Trust the IP Precedence value
- Trust the CoS value in the frame
- Classify the traffic based on an IP ACL or MAC ACL
Cisco recommends marking the traffic as close to the source as possible. IP phones can mark their own traffic and other clients can be marked at the access switch. If that is not an option mark at the distribution layer, but never at the core. Marking slows traffic down, so it has no place being in the core. All devices within the network path should be configured to trust the marking and provide service based on that.
Configuring QoS for VoIP
Before rolling out VoIP in your environment, think through the following planning steps:
1. PoE- Ensure there is enough power for all the phones and has a UPS backup
2. Voice VLAN- Think through the number of VLANs/subnets required, add DHCP scoped for the phones, add voice networks to routing protocols
3. QoS – Decide on which marking and queues you plan on using. Cisco recommends implementing AutoQoS and then tuning as needed.
4. Fast Convergence – tune routing and HSRP/VRRP/GLBP timers
5. Test Plan- Test the implementation before rolling it out to real users. Some things to look for include making sure the phone and PC have the correct IP addresses, the phone registers itself, and calls can be made.
Auto QoS
Auto QoS, when enabled, configures the switch interfaces using common best-practices including:
• Auto discovery and classification of network applications
• Creates QoS policies for those apps
• Configures the switch to support IP phones
• Sets up SNMP traps for network reporting
• Provides a consistent QoS configuration across the environment
Note: Auto QoS uses CDP to function properly with IP phone, so make sure it is not disabled.
Configuring Auto QoS
Configures the interface to trust CoS on incoming traffic
Switch(config-if)# auto qos voip trust
Configures the interface to trust CoS only if Cisco phone is connected (requires CDP)
Switch(config-if)# auto qos voip cisco-phone
Displays the Auto QoS configuration
Switch# show auto qos
Manual QoS Configuration
Switch(config-if)# switchport voice vlan vlan-ID
Associates a voice VLAN with a switch port
Switch(config-if)# mls qos trust {dscp | cos}
Trust markings on traffic entering an interface. Effectively moves the trust boundary to the attached device (often an IP phone or server).
Switch(config-if)# mls qos trust device cisco-phone
Trust markings only if a Cisco phone is connected
Switch(config-if)# switchport priority extend cos cos-value
Instructs the IP phone to set/overwrite CoS value for data coming from a PC attached the phone. The phone would then be the new trust boundary because it is now doing the marking on the data traffic. Also important to note that the cos-vlaue assigned at the end of the statement is a number between 0 and 7.. 7 being the highest priority and 0 being the default value.
Switch(config-if)# switchport priority extend trust
Instructs the phone to trust the priority of the data coming from the attached PC.
Switch# show interfaces interface-id switchport
Verify interface parameters
Switch# show mls qos interface interface-id
Verify QoS parameters on an interface
Final VoIP QoS Considerations
• If a voice VLAN is configured, untagged traffic is a sent according to the default CoS priority of the port
• CDP is required to allow for voice VLANs
• Portfast must be enabled on a switch interface configured as a voice VLAN
• Several mechanisms can be used in combination to improve VoIP quality including queuing, classification and marking close to the source, and congestion prevention protocols like WRED
QoS for Video
Video traffic can change dramatically depending on what kind of compression is used and how static the picture is. Video that is constantly changing will use much more bandwidth and be more bursty that fairly still-image video. Voice traffic is much more steady.
Video should be placed in it’s own queue, especially if the organization is doing interactive video. Consider creating separate queues for interactive and streaming video if the business uses it. Less than 200 ms of latency is considered acceptable by most standards.





