Home » QoS » QoS: Quality of Service Part-I

QoS: Quality of Service Part-I

QoS is implemented to make sure that packets which are delay sensitive are not unnecessarily delayed or lost along a network path. For this reason identification has to be made to determine which network traffic is delay sensitive and which one is not ,then treat these different traffic types in a different manner giving them priorities when traversing the network.

QoS implementation just does not mean configuring QoS on the routers and switches, its an end to end implementation and every device that handles the packet along the network path has to implement QoS, these devices could be routers, switches, IP phones and servers. Along a network path, if there is even one device which is not honoring the defined packet priorities, then the entire QoS implementation will suffer with bad results.

In networks where all packets are treated equally, QoS is not required. The problem with these networks is that even the undesirable and unwanted traffic will have the same preference and it will use the network resources for which other critical applications are contending for.

The goal of QoS is to give a controlled advantage to higher priority traffic like real time voice and video, so these packets traverse the network quickly without any delay. The less delay sensitive traffic (data) is given a lesser preference but will never get to a point where its bandwidth starved.

QoS Implementation can be measured by the amount of Packet loss , Delay and Jitter over the network path.

Make sure the network path is highly available with redundant links and there is no packet loss due to network congestion.

Delay or latency: Is the amount of time it takes for a packet to reach from the source to the destination. Also called as end-to-end network delay, this can be broken down into two components
1. Fixed Network Delay
2. Variable Network Delay

Variable network delay is normally due to the congestion caused within the network.

In the data networks which carry real time voice the fixed network delay can be broken down into three categories

1. Packetization Delay: Is the time required to encode the voice and/or video signal into packets.
2. Serialization Delay: Is the time required to transmit bits onto the wire, based on the interface clock rate.
3. Propagation Delay: Is the time required for the electrical or optical pulses to traverse the media to reach the destination.

End-to-End QoS Network Design: Quality of Service for Rich-Media & Cloud Networks (2nd Edition) (Networking Technology)

Jitter:
Also called as inter-packet delay, is the difference in the end-to-end delay between sequential voice packets. For example if packet-A required 10 ms to traverse the network from source to destination, and the following packet – packet-B required 15 ms to make the same trip then the delay variation (jitter) is calculated as 5 ms.

Each end station on VoIP or Video has a jitter buffer used to smooth out the variation.

A jitter buffer underrun occurs when the packets are arriving slowly and the jitter buffer is empty and contains no packets to be processed.

A jitter buffer overrun occurs when packets arrive faster than what the jitter buffer can accommodate, and when this happens the packets are dropped.

End-to-End QoS Network Design: Quality of Service for Rich-Media & Cloud Networks (2nd Edition) (Networking Technology)

QoS Models and Evolution

Integrated Services Vs Differentiated Services:

Integrated Services
is one of the first QoS mechanism to be implemented.
Brought in the concept of RSVP, which was used to guarantee the bandwidth for a particular application. If from source to destination say there were about 10 routers then RSVP would make sure that at all the 10 routers in the path reserve the bandwidth for this application and thus the particular application gets the guaranteed bandwidth. It worked well initially, but later on a lot of applications came out that needed guaranteed bandwidth. This when the concept of Differentiated services was launched for implementing QoS.

Diff-Serv tackles the problem of guaranteed bandwidth a little different from Integrated Services. Diff Serv brings in the concept of Per Hop Behavoiur (PHBs) where every router (hop) will re-queue and re-prioritize based on markings.

Tools For implementing QoS:

1. Classification and Marking Tools
2. Policing and Shaping Tools
3. Congestion Avoidance Tools
4. Congestion Management Tools

Classification: When the packets or frames enter a network device, these packets / frames have to be analyzed to determine what treatment is to be given to them. This analysis of packets and frames is called as Classification and is the first QoS function to occur for any QoS policy. Classification can also occur repeatedly at various stages of policy enforcement. It is generally recommended to classify traffic as close to their source as possible and their packets be marked accordingly.

Once the packets are classified, they need to be marked as well, marking establishes a distinct trust boundary that tells where the packet markings are set and if detailed classification is needed or not.

when packets enter a network device, three generic marking possibilities exist on the packets
1. packets are not marked
2. packets are marked and the marking on packets is not trusted
3. packets are marked and the marking on the packets is trusted

If packets are not marked or the marking is not trusted then the packets have to be marked again.

After Marking is complete there is another classification process based on the markings. packets are then subject to congestion management. Finally these packets are scheduled for transmission on the egress link.

Some QoS tools (marking and policing) can be applied in both ingress and egress directions of the traffic flow and some tools such as queuing can be applied only in the egress direction.

All these QoS tools are effective against protecting one type of critical traffic (real time voice) from other not very critical traffic (data). But these tools are not effective when protecting one critical traffic (real time voice) from other critical traffic (again another real time voice). This protection can only be achieved through Call Admission Control – CAC mechanisms, which make a decision of whether to allow or disallow a new packet stream on the network depending on resources available.

Cisco MQC Introduction:

Cisco QoS Toolset is also called as MQC or Modular QoS Command Line Interface.
There are three main components of MQC

1. Class-Maps: (Identify Traffic)

Are used to identify traffic types for giving controlled preferential treatment to the different traffic types. Cisco MQC supports unto 256 different traffic classes.
Traffic can be identified by using
a. IPP
b. DSCP
c. Layer-2 parameters
d. ACLs
e.NBAR – Network Based Application Recognition
f. Or any combination of all of these.

2. Policy-Maps: (Set Preference levels / define how to treat identified traffic)

These define how each traffic type as identified by class-maps should be serviced. Basically defines what controlled preference should be assigned to each traffic type. The options are
1. Marking/Re-marking
2. Policing
3. Shaping
4. Low-Latency
5.Class-based weighted fair queuing (CBWFQ)
6. Selective Dropping.

3. Service-Policy:
Service Policy is a statement that binds the policy to an interface and also specified direction.
Understanding IP Precedence and DSCP.

IP Precedence:

To understand IPP, you will have to look at the ToS field in the IPv4 header.

IP Header

The IP Packet contains a field known as ToS = ‘ Type of Service’ which is 1 byte (8 bits) in length.

IP Precedence refers to the 3 most significant bits of the ToS field. Most Significant Bits are the left most bits in the byte, which is something like [XXX]XXXX Where X can hold a value of either zero or one.

So in short ToS is the entire 8 bit field and IPP is the 3 most significant bits in the ToS field.

The IPP portion of the ToS field defines the priority of the field.

The rest of the IPv4 Header Fields are Verion,  TTl, Source and Destination IP address, Options Checksum, etc but for the purpose of QoS we will just be looking into the ToS Field for now.

About the ToS Field:

Bits:            Explaination:

|0|1|2|        These Bits in ToS Field represent the IP Precedence (IPP).

|3|                Bit 3 in ToS Field signifies Delay parameter.
If Value =0: signifies Normal Delay
    If Value =1: signifies High Delay
|4|                 Bit 4 Signifies Throughput where 0=Normal and 1 = High Throughput
|5|                 Bit 5 Signifies Reliability where 0=Normal and 1 = High Reliability
|6|7|            Both these are reserved for a future use and have value =00.

Understanding the IPP Bits – 0,1,2

The 3 bits of IPP can hold the possible values as below.

000        Signifies Routine (Decimal Value is 0)
001        Signifies Priority (Decimal Value is 1)
010        Signifies Immediate (Decimal Value is 2)
011         Signifies Flash (Decimal Value is 3)
100        Signifies Flash Override (Decimal Value is 4)
101         Signifies Critical (Decimal Value is 5)
110         Signifies Internetwork Control (Decimal Value is 6)
111         Signifies Network Control    (Decimal Value is 7)

DSCP – Differentiated Services architechture

The Differntiated Services architecture redefines the standard IPv4 ToS Field and the IPv6 Traffic Class field. The ToS field is now renamed as the DiffServ Field which is again 8 bits (1byte) in length same as the ToS field. But in the DiffServ field the six most significant bits are now used for defining the QoS as compared to the 3 bits used in the previous ToS field (IPP).
DSCP stands for Differentiated Services Code Point where a particular value of the DiffServ field represents DSCP and the DiffServ node services the packets according to this code point.

The DiffServ architecture defines three code point pools for the DIffServ field, out of which 2 pools are reserved for experimental use (which means 32 out of 64 possible code point values are reserved). The existing DiffServ specifications provide recommendations for 21 code points values which are available for the 3rd pool. The new DSCP values are backward compatible with the ToS field.

So the first 6 Bits of the previous ToS byte are now called as DSCP and the remaning 2 bits are used for flow control.

The Six Most Significant Bits used in the DiffServ field are as follows

DSCP Value        Pool

[xxxxx0]        Standard
[xxxx11]        Experimental use
[xxxx01]        Again Experimental or future use.

based on the current standard available these are the possible values which the DiffServ filed can have

A value of ‘0’ in bit-3 and bit-4 indicate that the first 3 bits are class selectors.
A non-zero value in bit-3 and bit-4 indicate that its a DSCP Class such as AF or EF PHB.

Bits         Binary        Explanation
DSCP     Value
111000    56            Known as Class Selector 7
110000    48            Known as Class Selector 6
101000    40            Known as Class Selector 5
100000    32            Known as Class Selector 4
011000    24            Known as Class Selector 3
010000    16            Known as Class Selector 2
001000    08            Known as Class Selector 1
000000    00            Known as Class Selector 0

If a node is implementing DiffServ and the packet has an unrecognized code point value then the packet is treated as its marked for default behavior.

Once the traffic has been identified for their respective classes, the traffic is subjected to specific forwarding treatments, also called as Per Hop Behaviour (PHB).

QoS Baseline:

QoS baseline defines upto 11 classes of traffic that are used in all Cisco design guides. These defined 11 classes are to be used as  guidelines and recommendations and not necessarily implementing the exact way as defined, can be tweaked as per the traffic needs.

* PHB = Per Hop Behavior which the Packets with set DSCP value will get at each hop.
* DSCP = Differentiated Services Code Point , Is basically the value assigned to the DiffServ field.
* DiffServ Field = Is the header field in IP Packets where the DiffServ markings are carried.
* AF = Assured Forwarding
* EF = Express Forwarding

PHB DSCP DSCP Decimal Value DSCP Binary Value Target Prorocols Configuration
EF EF 46 101110 Real time Voice Queuing = Priority
Admission Control = RSVP
AF1 AF11
AF12
AF13
10
12
14
001010
001100
001110
Bulk Data Transfer
http and other data services
Queuing = rate based
Active Queue Mgmt = DSCP-Based WRED
AF2 AF21
AF22
AF23
18
20
22
010010
010100
010110
Datbase Access
Preferred Data Service
Interactive Traffic
Queuing = rate based
Active Queue Mgmt = DSCP-Based WRED
AF3 AF31
AF32
AF33
26
28
30
011010
011100
011110
Locally Defined
Mision Critical applications
Queuing = rate based
Active Queue Mgmt = DSCP-Based WRED
AF4 AF41
AF42
AF43
34
36
38
100010
100100
100110
Realtime Video and
associated voice
Queuing = rate based
Active Queue Mgmt = DSCP-Based WRED
Admission Control = RSVP
IP Routing Class Selector 6 48 110000 Routing Protocols – BGP, OSPF, EIGRP etc Queuing = rate based
Small guaranteed minimum rate
Active queue management = WRED
Streaming Video Class Selector 4 32 1000000 Mostly Proprietory Admission control = RSVP
Queuing = rate based
Active queue management = WRED
Telephony Signalling Class Selector 3 24 011000 SIP, H.23, etc Queuing = rate based
Small guaranteed minimum rate
Active queue management = WRED
Network Management Class Selector 2 16 010000 SNMP Queuing = rate based
Small guaranteed minimum rate
Active queue management = WRED
Scavenger Class Slector 1 8 001000 User Traffic (http, etc) Queuing = rate based
No bandwidth guarantee
Active queue management = WRED
Other Default Class or Class Selector 0 0 000000 UnSpecified Traffic Queuing = rate based
Minimal bandwidth guarantee
Active queue management or
Per-flow fair queuing
Active queue management = WRED

End-to-End QoS Network Design: Quality of Service for Rich-Media & Cloud Networks (2nd Edition) (Networking Technology)


 

Incoming search terms for the article:

Leave a Reply