Chapter 12 : QOS Marking and Classification
Resources used:
IP Telephony Self-Study - Cisco QoS Exam Certification Guide, Second Edition
CCIE Routing and Switching Exam Certification Guide 3rd Edition
Different kinds of traffic require different kinds of performance characteristics.
QOS works by manipulating the following:
• Bandwidth
• Delay
• Jitter (delay variation)
• Packet loss
improving one QoS characteristic might degrade another
Classification:
Classification involves differentiating one packet from another. This is normally done by examming different fields within headers.
Most commonly used fields are ip precedence and DSCP fields.
Expedited forwarding doesn’t have a drop precedence. EF should be used with LLQ to minimise delay and time spend in ques and therefore the need to tail drop on that que.
If a router that matches on DSCP gets a marking marked with ip precedence it matches on the CS1, CS2 etc.
packets marked as EF should be given queuingpreference so that they experience minimal latency, but the packets should be policed to preventthem from taking over a link
EF binary value is 101110 so really it is AF 53
Drop precedence starts from the 5th least significant bit not the 6th ie AF41 is 100010
IP precendence values
routine 0
priority 1
immediate 2
flash 3
flash-override 4
critic/critical 5
internet 6
network 7
Classification should be done as close to the source as possible
General rules
classification, ingress only, and only if the interface supports that particular header
marking, egress only, and only if the interface supports that particular header field
ACL’s and NBAR are used for classification and marking, Classification can be based on ACL’s and fields within headers.
The above allows the Marking of the following fields:
IP precendence
DSCP
COS
ISL priority
ATM CLP
Frame relay DE
MPLS experimental
QoS qroup
Policing tools
Congestion avoidance
Queuing tools
THE MQC (modular QOS CLI)
It has 3 parts, class map ( matches traffic) policy map ( uses class map and applies qos policies to them, marking queuing etc) and the service map which applies it to an interface.
If the IOS wants to treat two packets differently it must perform some form of classification.
Class map, is used to match traffic, can use NBAR, frame relay DLCI, DCSP , COS, IP precedence, source interface, source ip, dest ip etc
Class-default matches all traffic that isn’t matched ( comes at the end of a policy map)
Match not allows you to match all packets that don’t meet the matching ie match not protocol DNS, would match all traffic that isn’t DNS.
Class maps have a match all or match any tag , class-map blah [match all] [match any]
Match all is the default setting.
With DCSP, ip precedence and COS match statements more then one value can be specified. In a match-all class map these statement is treated as a match any.
Match class, this allows you to match a class within another class, eg
Class-map match-all blah1
Match DSCP AF41
Match protocol DNS
Class-map match-any blah2
Match class blah1
Match DSCP AF31
ClASs MaPs and PoLiCy MaPs are CASE sensitive
Policy mapsoptions:
Set set a header field etc
Bandwidthreserve bandwidth for CBWFQ
Priorityreserve bandwidth for a LLQ
Shapeshape traffic with bandwidth and burst sizes
Policypolicy traffic with bandwidth and burst sizes
Compressperform TCP and RTP header compression
Service policies can be applied in an inwards and outwards direction
Two service policies are allowed per interface ( in + out)
QOS policy Manager (QPM)
Automatically configures some or all network devices with QoS features, based on the QoS
policy described to QPM. The features that QPM enables include marking, queuing, shaping,policing, and Link Fragmentation and Interleaving (LFI) tools.
Loads the correct configurations automatically.
Enables you to monitor the device configurations to make sure no one has made changes tothem. If the configurations have been changed, you can use QPM to restore the originalconfiguration.
QPM is a application that runs on windows 200 sp4 or above.
Uses cisco works
AUTO QOS
Actuall is autoQos VOIP and is used to give voice traffic priority in the network.
Class based Marking
Class based marking is classifying packets in to service classes.
Class of service (CoS) ( also known as Priority bits) marks on a Ethernet layer 2 header only when ISL or 802.1Q is being used.
In ISL CoS uses the 3 least significant bits within the User field
In .1Q uses the 3 most significant bits in the user-priority field.
Frame relay, Uses DE (discard eligibility) for marking, when marked it indicates that this packet should be dropped before packets that aren’t marked.
ATMUses CLP(cell loss priority) for marking, when marked it indicates that this packet should be dropped before packets that aren’t marked.
MPLS Experimental bitscomprise a 3-bit field that you can use to map IP precedence into an MPLS label
Classification and marking should not be performed before the frame/packet reaches a trusteddevice. This location in the network is called the trust boundary
Consider the trust boundary in the network, making sure to mark or re-mark traffic after itreaches a trusted device in the network.
Recommended Markings
Type of Traffic CoS Precedence DSCP
Voice payload 5 5 EF
Video payload 4 4 AF41
Voice/Video signaling 3 3 CS3
Mission Critical Data 3 3 AF31 AF32 AF33
Transactional Data 2 2 AF21 AF22 AF23
Bulk Data 1 1 AF11 AF12 AF13
Best Effort 0 0 BE
Scavenger (Less than best
effort) 0 0 2 4 6
Cisco recommends not to use more than 4 or 5 different service classes for data traffic. By using more classes,the difference in behavior between the various classes tends to blur.
NBAR
Cef must be enabled to use NBAR
ip nbar protocol-discovery enables NBAR for traffic entering and exiting theinterface.
ip nbar port-map protocol-name [tcp | udp] port-number
Global; tells NBAR to search for a protocol using a different port
number than the well-known port. Also defines ports to be used by
custom packet description language modules (PDLMs).
ip nbar pdlm pdlm-name; extends the list of protocols recognized by NBAR byadding additional PDLMs.
snmp-server enable traps cnpd; enables the sending of NBAR traps.
NBAR can match on URL , hostname or mime type for HTTP requests.
MARKING AND VPNS
Cisco IOS will Automatically copy the TOS field from a ip header into the ESP/AH/GRE/etc header. Th TOS field contains the IP precendec/ DSCP bits.
QoS Pre-classificationis a feature that allows a IOS router to keep a copy of the pre encrypted IP header to make QOS decisions as it hits the Egress port. Is enabled with Qos Pre-classify command on the crypto map.
Policy Based Routing can also be used for marking but should only be used of Class based marking (class-maps) are not available or if both PBR routing and Marking needs to be done on the same interface.
Intserv
Intserv uses resource reservation Protocol (RSVP) for signalling to routers and switches for reserved bandwidth. Uses admission control to decide wether to request reserved bandwidth from the routers. Ie it might be setup to only allow reservation of 3 64k voip channels at any one time.
Intserv scales poorly