Configuring expedited forwarding for VoIP traffic

Voice over IP (VoIP) traffic is delay and jitter sensitive. Therefore, for optimum transmission of VoIP traffic, dwell time in network devices must be kept to a minimum, and all network devices in the datapath must have identical per-hop behaviors. To configure a dedicated queue on the switch to handle VoIP traffic with priority service before all other queues, follow these steps.

Prerequisites
This scenario assumes that VoIP packets are uniquely identified using Differs code point 46, Expedited Forwarding (EF).
Procedure
  1. Map DSCP EF packets exclusively to local priority 5. The default DSCP map has eight code points (40 through 47), that are mapped to local priority 5. To reserve local priority 5 for VoIP traffic, the other code points must be reassigned. In this scenario, local priority 6 is used for all reassignments, including for code point 40, Call Signaling protocol (CS5).
    switch# config
    switch(config)# qos dscp-map 40 local-priority 6 name CS5
    switch(config)# qos dscp-map 41 local-priority 6
    switch(config)# qos dscp-map 42 local-priority 6 
    switch(config)# qos dscp-map 43 local-priority 6 
    switch(config)# qos dscp-map 44 local-priority 6 
    switch(config)# qos dscp-map 45 local-priority 6 
    switch(config)# qos dscp-map 47 local-priority 6 
  2. Queue 7 is the highest priority queue, so for best throughput, create a queue profile that maps local priority 5 to queue 7.
    switch(config)# qos queue-profile ef_priority
    switch(config-queue)# name queue 7 Voice_Priority_Queue
    switch(config-queue)# map queue 7 local-priority 5
    switch(config-queue)# map queue 6 local-priority 7
    switch(config-queue)# map queue 5 local-priority 6
    switch(config-queue)# map queue 4 local-priority 4
    switch(config-queue)# map queue 3 local-priority 3
    switch(config-queue)# map queue 2 local-priority 2
    switch(config-queue)# map queue 1 local-priority 1
    switch(config-queue)# map queue 0 local-priority 0
    switch(config-queue)# exit
    switch(config)#
  3. Create a schedule profile that services queue 7 using strict priority (SP), and the remaining queues with WFQ. This scenario gives all WFQ queues equal weight.
    switch(config)# qos schedule-profile voip
    switch(config-schedule)# strict queue 7
    switch(config-schedule)# wfq queue 6 weight 1
    switch(config-schedule)# wfq queue 5 weight 1
    switch(config-schedule)# wfq queue 4 weight 1
    switch(config-schedule)# wfq queue 3 weight 1
    switch(config-schedule)# wfq queue 2 weight 1
    switch(config-schedule)# wfq queue 1 weight 1
    switch(config-schedule)# wfq queue 0 weight 1
    switch(config-schedule)# exit
    switch(config)#
  4. Apply the profiles to all interfaces.
    switch(config)# apply qos queue-profile ef_priority schedule-profile voip
  5. Configure DSCP trust mode to all ports
    switch(config)# qos trust dscp