QoS means, to give certain types of traffic in a network priority above other types of traffic or to garanty certain functionallity. And this could be done on many different kind of architectures.
But dependend on the type of traffic QoS can only be used, when certain demands are satisfied. That means, there has to be at least one field in the header of a packet.
Here is a list of Marking Fields
Field Location Length
IP Precedence (IPP) IP header 3 bits
IP DSCP IP header 6 bits
DS field IP header 1 byte
ToS byte IP header 1 byte
Cos ISL and 802.1Q header 3 bits
Discard Eligible (DE) Frame Relay header 1 bit
Cell Loss Priority (CLP) ATM cell header 1 bit
MPLS Experimental MPLS header 3 bits
Cisco has decided to give a more general approach to QoS with the Modular QoS CLI (MQC). This client defines a common set of configuration commands for the definition of for QoS features on a router or switch.
Cisco is in favor of configuring with MQC.
There are three steps that have to be configured within a MQC based setup.
- class-map for matching packets into service classes, the match command can include QoS fields, ACL’s and MAC addresses, the match name is case sensitiv, the match any command matches any packet
- policy-map PHB actions configured under policy-map
- service-policy enabled on an interface
Here is an example:
class-map match-all SMTP-FROM-SERVER1
match access-group name
SMTP-FROM-SERVER1policy-map CBWFQ
class SMTP-FROM-SERVER1
bandwidth 256interface s0/0
bandwidth 512
service-policy output CBWFQip access-list extended SMTP-FROM-SERVER1
permit tcp host 150.1.1.100 eq smtp any
Here the SMTP protocol is serviced with CBWFQ at interface serial0/0.
The class-map command is one of the new MQC based tools for classifying packets.
It possible to match many different kind of options. Including QoS fileds, ACL’s and MAC addresses. Be carefule the map names are case sensitiv.
Multiple match commands can be used in a class-map. The following points need to be considered.
- Four CoS and IPP or eight DSCP values can be listed on a single match cos, match precedence, or match dscp command.
- if a class map matches with multiple match commands, the match-any or match-all parameter on the class-map command defines whether a logical OR or a logical AND is used between the match commands. match-all means AND logic between the parameters, for example: class-map match-all name, match cos 3 4, means to match 3 and 4. With match-any only one match parameter has to be true for the rule to match. So 3 or 4 would suffice.
- The match class name command is nesting the name of another class map logicaly.
Here is a nesting example:
class-map match-all nesting
match access-group 101
match precedence 10class-map match-any morenesting
match class nesting
match cos 10
Source:
http://www.cisco.com/univercd/cc/td/doc/cisintwk/ito_doc/qos.htm
http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124cg/hqos_c/qchintro.htm