Quality of Service Configuration Basics for Cisco Professionals
Oct 13, 2010 • 3 Minute Read
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-name parameter 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-map command. 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-value parameter 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 and output 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.
Ready to test your skills for CCNA exam? See how they stack up with this assessment from Smarterer. Start this CCNA test now