Cisco QOS

(Taken from the excellent Pluralsight website: https://www.pluralsight.com/blog/it-ops/qos-quality-of-service-configuration )

 

When it comes to configuring Quality of Service (QoS) on Cisco equipment there are a couple of main concepts which must be understood.

Cisco QoS is typically configured on modern equipment using the Modular QoS Command-line interface (MQC). With MQC, traffic is classified using the class-map and match commands, traffic policy is defined using the policy-map, class and set commands and policies are assigned using the service-policy command.

Another method which can be used is through the use of AutoQoS. AutoQoS takes much of the manual configuration out of the process and creates class and policy maps which are typical of most traffic (as defined by which version of AutoQoS you are using) and sets up policies on the interfaces you specify in a guided setup.

Let’s take a look at what the configuration looks like for both MQC and AutoQoS.

MQC Configuration

Here are a few of the MQC commands mentioned above; keep in mind that there are more match and set commands available, below is just a sampling.

class-map

router(config)#class-map class-map-name

This command is used to create a specific class-map. The class-map-name parameter is used to specify the name of the class-map and can be up to 40 alphanumeric characters.

match protocol

router(config-cmap)#match protocol protocol-name

This command is used to match a specific protocol. The protocol-nameparameter is used to specify the protocol name to be matched, there are several which can be used including dhcp, eigrp, h323, http and irc.

match cos

router(config-cmap)#match cos cos-value [cos-value]

This command is used to match a specific Class of Service (CoS) value. The cos-value parameter is used to specify the CoS value carried in the frame to be matched; multiple cos-value‘s can be specified in one command.

match dscp

router(config-cmap)#match dscp dscp-value [dscp-value]

This command is used to match a specific Differentiated Services Code Point (DSCP) value. The dscp-value is used to specify the DSCP value carried in the packet to be matched; multiple dscp-value‘s can be specified in one command.

policy-map

router(config)#policy-map policy-map-name

This command is used to create a specific policy map. The policy-map-name parameter is used to specify the name of the policy-map and can be up to 40 alphanumeric characters.

class

router(router-pmap)#class {class-name | class-default}

This command is used to link a policy to a specific class-map. The class-name is used to match the class-map-name configured in the class-mapcommand. The class-default parameter is used to specify the default class-map.

set cos

router(config-pmap-c)#set cos cos-value

This command is used to set a specific CoS value. The cos-valueparameter is used to specify the Class of Service value which will be set in the frame.

set dscp

router(config-pmap-c)#set dscp dscp-value

This command is used to set a specific DSCP value. The dscp-value is used to specify the DSCP value which will be set in the packet.

service-policy

router(config-if)#service-policy {input | output} policy-map-name

This command is used to link a policy map to an interface The input andoutput parameters are used to specify in which direction the policy is to be evaluated. The policy-map-name parameter is used to specify the matching policy-map name.

MQC Example

To wrap this up together a bit, the following is a sample configuration which matches all H.323 traffic and gives it a DSCP value of EF (Expedited Forwarding). The configuration will then be configured to be evaluated on traffic coming into an interface.

router(config)#class-map h323router(config-cmap)#match protocol h323

router(config)#policy-map h323-policy

router(config-pmap)#class h323

router(config-pmap-c)#set dscp EF

router(config-if)#service-policy input h323-policy

AutoQoS Configuration

There are actually two different types of AutoQos: AutoQoS for VoIP (which was the first iteration) and AutoQoS in the Enterprise (which detects the traffic types and builds policy based on this data).

auto qos voip

router(config-if)#auto qos voip

This command is used to install the AutoQoS configuration onto a specific interface.

auto discovery qos

router(config-if)#auto discovery qos

This command is used to start the traffic discovery portion of AutoQoS in the Enterprise. This command should be run for an amount of time to properly detect traffic types before using the next command.

auto qos

router(config-if)#auto qos

This command is used to install AutoQoS in the Enterprise configuration onto a specific interface.

QoS Resources

To learn more about Qos Configuration take a look at this QoS Whitepaper from Cisco and if you’re interested in going as far as the Cisco QOS (642-642) Exam then I’d definitely recommend the Cisco QOS Exam Certification Guide.

************************************************************************

Another example, prioritising VOIP traffic

class-map match-all voip-traffic
match access-group name voip-traffic
!
!
policy-map voip
class voip-traffic
priority 512
set dscp ef
class class-default
fair-queue
policy-map parent
class class-default
shape average 512000 5120 0
service-policy voip

Leave a comment