Quality of Service(QOS) Fundamentals

QOS is a technique to prioritize important traffic over less important traffic based on the class and characteristics of the traffic. For an example a VoIP traffic adheres to low latency and guaranteed delivery with a low amount of bandwidth unlike a FTP traffic adheres more BW. By default a network device treat all kind of traffic in a same manner and use best effort in terms of delivering the packets to the destination. A network device place the traffic in a FIFO(First in First Out) Queue of the Output Buffer to accomplish it. But when there is a Congestion(Queue is full), the packets are likely to be dropped. In this situation the QOS comes into picture to handle the congestion and condition the packet depending on their characteristics.


Path Characteristics

A packed is originated from a source and to be delivered to a destination, travels many hops and links. This path from a source to a destination has some characteristics which the QOS must deal with. The characteristics are BW, Delay, Jitter and Loss.

  • BW(kbps) – The physical speed of the interface or the actual throughput a physical interface can handle is called Bandwidth(BW). A batch application need more BW compared to a interactive application.
  • Delay(ms) – Delay is the actual time a packet take to reach the destination. Its called One way delay. The time to reach the destination and come back to source is called RTT(Round Trip Time). A path delay is also called latency. The Delay can be of other types too. Like time takes to process forwarding decision is called processing delay. The time a queue hold a packed before sending is called queuing delay. The time a ASIC needs to send all bits of a frame in a physical link is called serialization delay. The time a packed needs to pass one optical or copper line is called propagation delay. An interactive application is very sensitive to delay.
  • Jitter(ms) – The variation of one way delay in a stream of packets is called jitter. For an example packet one takes 10ms to reach destination, packet two takes 20ms to reach the destination. The jitter is 10ms (10ms ~ 20ms = 10ms). VoIP Applications are very sensitive to jitter.
  • Packet Loss(%) – It is the percentage of the packed that are dropped or lost during propagation or forwarding. An application which are using UDP is very sensitive to packet loss.

Traffic Types

In today’s world, most of the traffic are generated from the Application layer and the type of the traffic depends on what kind of application that is feeding the payload down to the protocol stack(TCP-IP Protocol Stack). Mainly there are two kind of application, Batch Application and Interactive Application.

  • Batch Application – It is a kind of Application which use Batch Processing and Transfer of data which need a good amount of BW but less sensitive to delay and jitter. The batch application mostly use one way transfer apart from the necessary application layer headers. A HTTP Download/Upload(XHR), FTP are some example of batch application.
  • Interactive Application – Is is a kind of application which use two way transfer of application data traffic which need not require a good amount of BW but very sensitive to delay, jitter and packet loss. SSH, Telnet, VoIP are some good example of interactive application.

QOS Functions

When it comes to QOS, it is always necessary to determine which type of traffic it deals with, how to handle congestion and condition the traffic in a way to avoid packet loss, delay. Classification of Traffic, Marking of Packet and PHP(Per Hop Behavior) are the three building blocks of QoS. Queuing, Scheduling, Random Early Detection, Shaping and Policing are some techniques that come under PHB. This PHP is very specific to the hardware we are using and it is different in each hop as per the Diff-Serv model.

QoS Building Blocks
QoS FunctionTools / Techniques
Traffic ClassificationACL, NBAR(Network Besed Application Recognition)
Traffic MarkingIP Precedence, IP DSCP, MPLS EXP Bits, 802.1Q TOS
Congestion ManagementLLQ, CBWFQ
Congestion AvoidanceWRED
Traffic ConditioningShaping and Policing
QoS Operations Flowchart

Traffic Classification and Marking

Classification – It can be done in several ways like using ACL with IP Address or port number. But using ACL, Application Inspection is not possible. We can enable NBAR(Network Based Application Recognition) to do Application Payload Inspection. NBAR does deep packet inspection(mostly Application Layer Headers, Mime types, Request Methods etc.) and compare with signatures and attributes in PDLM(Packet Description Language Module) to determine the type of payload. In Cisco IOS we can use both ACL and NBAR. In MQC Model, we can call the ACLs in Class-Map.

Marking – It can be done using Precedence, DSCP, TOS and MPLS-Exp Bits in Packet or Frame and . IPv4 packet has a TOS field(1 Octate – 8 bits). We can add specific values to TOS according to their class and QoS models(DSCP or Precedence). In a Ethernet Frame(802.1q) we can use PCP(Priority Code Point) and DEI(Drop Eligibility Identifier) to enable marking on L2 Frames. In MPLS, the CS(Class Selector) values from the DSCP or Precedence values of IP Packed can be copied to the Label Stack according to the MPLS-QoS Model(unifor, pipe or short-pipe).

Above is the illustration of Classification and Marking of Traffic.

PHB(Per-Hop Behavior)

There are different tools and technique available to define PHB. The tools to be used according to the purpose we are trying to achieve. As long as there is no congestion the packets are likely to be delivered to the destination. Otherwise Congestion Management, Congestion Avoidance and Traffic Conditioning will play a big role to handle overloaded output/input buffer. For example, we need to use LLQ(Low Latency Queue/Scheduler) and CBWFQ (Class Based Waited Fair Queue/Scheduler) for Congestion Management. We will use WRED(Waited Random Early Detection) for Congestion Avoidance. We can use Policing and Shaping for Traffic Conditioning and Remarking. Below is an illustration of PHB Modules. Each of the topics will be discussed in seperate tutorials.

OperationToolsDescription
Congestion ManagementLLQ, CBWFQDefine separate queue for different classes of traffic. Serve the Queues using weighted round robin method or in priority basis.
Congestion AvoidanceWREDDropping random TCP segment once the load is exceeding a threshold value hoping that the TCP Window will be adjusted by the source so that global synchronization will be avoided.
Traffic ConditioningShaping and PolicingRate limiting of incoming or outgoing traffic to adhere to a Traffic Contract with the Customer and to guarantee CIR(comitted information rate).

Applied QoS – MQC (Modular QoS CLI)

In Cisco IOS, it follow the MQC model in terms of configuration of a device. Its a hierarchical model which use Access-List, Class-Map, Policy-Map and PHB, Service attachment modules. Below is a nice illustration how it works. An access-list is to create a profile of different types of traffics, eg. FTP, SIP, RTP etc. Now a Class is to be defined to classify the traffic and the individual profile to be inserted into the classes. Now we will create a Policy Object and map the classes against it. And lastly we need to enable the Object under a interface.

MQC Model

  Previous

Comment ( 1 )

  1. Replykrishnendu Das
    This is really good. Great Job !

Leave a Reply