cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4993
Views
0
Helpful
4
Comments
siskum
Spotlight
Spotlight

QoS (Quality of Service) Configuration and Implementation on Router - Moduler QoS Command (MQC) Architecture


Why it is important? This simple article created for learners who are having enthusiasm to configure, implement and test QoS on their Routers. QoS will improve the quality of the network, safety and reliability. This article uses some references (images) which belongs to books and articles were published by Cisco. The Book and Technical publication names mentioned in the below:

Currently there are many different types of applications are used by the end-user-devices which are connected to LAN/WAN network. So now network traffic mix with those devices- characteristics. Video and voice devices, bank and business application devices and gaming devices as well as their relevant applications.

Video and voice traffic are consuming more bandwidth of the network and slowing down network traffic. Video conferencing, video live streaming and passive video are good example for that. On the other hand, high demand of usage of wireless network communication is getting increases and widen it day-by-day in enterprise businesses, defense, logistic, transport, healthcare, weather forecast and many other sectors.

Network speed always depends on its quality of service and influence with three main factors such latency, bandwidth and throughput. Latency is playing crucial role of the quality and speed of the network. Lower latency network performs faster, uninterruptable and highly responsive data trafficking capabilities but on the other hand higher latency influence with slower, congestions, interference, higher number of hops and medium of data transmission (copper & wireless).

Image-1: Summary of characteristic of the major-category of traffic-Ref.1 - Fig.1Image-1: Summary of characteristic of the major-category of traffic-Ref.1 - Fig.1

In this regard Cisco QoS is one of entity which is playing important role in the quality of network trafficking to Manage traffic and its security (avoid any propagation of worm attack). Bandwidth, delay, jitter and packet drops are four major characteristics of traffic class of QoS. QoS Tools falls into different categories: Classification and marking tools; Policing, shaping and markdown tools; Congestion Management or scheduling tools; Link-specific tools.

Image-2: The Cisco QoS Toolset – Ref.2 - Fig.1Image-2: The Cisco QoS Toolset – Ref.2 - Fig.1

 

The architecture framework of QoS is having seven steps: Classification-matches packet traffic-class; Marking-writes the value in the packet header; Policing-when and where to drop packet and re-marking; Shaping-slowing down traffic according to the bandwidth; Queuing-buffering packets when lacking the bandwidth of the output (egress) resource; Bandwidth allocation-reserves bandwidth for specific traffic; Admission control-decision makes either packet admitted or rejected.

Image-3: QoS Toolset -Ref.1 - Fig.2Image-3: QoS Toolset -Ref.1 - Fig.2

 

Traffic Classes Models 12-8-4 Modeles

Image-4: 4-8-12 Class traffic model -Ref.1 - Fig.3Image-4: 4-8-12 Class traffic model -Ref.1 - Fig.3

4-8-Clsses Model and 11-Baseline Class Model 

Image-5: Strategy of expanding the no. of classes of services overtime -Ref.2 - Fig.2Image-5: Strategy of expanding the no. of classes of services overtime -Ref.2 - Fig.2

Allocating Bandwidth by Percentage for the LLQ and CBWFQ

Image-6: Compatible 4 & 11 class queuing models following Realtime, best-effort, critical data and scavenger queuing rules -Ref.2 - Fig.3Image-6: Compatible 4 & 11 class queuing models following Realtime, best-effort, critical data and scavenger queuing rules -Ref.2 - Fig.3

 

Modular QoS Command (MQC) Line interface structure high overview

Step 1;
Description: Classification packets by type of traffic-class name

CLI command:
class-map match-any given-class-name_1
match dscp traffic-class L3-PHB-code_1  This L3-PHB-code can find in RFC table
match dscp traffic-class L3-PHB-code_2
match dscp traffic-class L3-PHB-code_3
class-map match-any given-class-name_2
match dscp traffic-class L3-PHB-code_4
match dscp traffic-class L3-PHB-code_5
match dscp traffic-class L3-PHB-code_6

RFC Table - Traffic Classes L3 Classification  and L2 Marking

Image-7: RFC Guideline for traffic classes -Ref.1 - Fig.4Image-7: RFC Guideline for traffic classes -Ref.1 - Fig.4

Step 2;
Description: Policies will be going to apply to the created traffic-classes using policy-map

CLI command:
policy-map  given-policy-name_X
class given-class-name_1
policy-type_1  Policy types can populate under class command using “?”
policy-type_2
class given-class-name_2
policy-type_3
policy-type_4

Step 3;
Description: Implementation of the policy-map to specified interface through Service-policy command.

CLI command:
Interface GigabitEthernet 0/0
service-policy output given-policy-name_X

LLQ-Low Latency Queuing & CBWFQ-Class-Base Weighted Fair Queuing

Image-8: LLQ/CBWFQ Operation -Ref.2 - Fig.4Image-8: LLQ/CBWFQ Operation -Ref.2 - Fig.4

 

References:
Ref.1 : End-to-End QoS Network Design - Quality of Service for Rich-Media & Cloud Networks 2nd Edition
Image-1: Chapter 1. Figure 1-1 Summary of characteristic of the major-category of traffic - page 5
Image-3: Chapter 1. Figure 1-2 QoS Toolset - page 8
Image-4: Chapter 1. Figure 1-5 4-8-12 Class traffic model - page 11
Image-7: Chapter 1. Figure 1-4 RFC Guideline for traffic classes - page 10
Ref.2 : Enterprise QoS Solution Reference Network Design Guide Version 3.3 November 2005
Image-2: Chapter 1. Figure 1-1 The Cisco QoS Toolset - page 1-3
Image-5: Chapter 1. Figure 1-5 Strategy of expanding the no. of classes of services overtime - page 1-12
Image-6: Chapter 1. Figure 1-8 Compatible 4 & 11 class queuing models following Realtime, best-effort, critical data and scavenger queuing rules - page 1-26
Image-8: Chapter 1. Figure 1-3 LLQ/CBWFQ Operation - page 1-6

----------------------------------------------------------------------------------------------

Router Configurations of QoS:

RT-2800>en
Password:
RT-2800#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RT-2800(config)#
RT-2800(config)#class-map match-any QoS_REALTIME
RT-2800(config-cmap)#description: match packets of Realtime-traffic-class
RT-2800(config-cmap)#match dscp ef ! match packets belongs to VoIP bearer traffic
RT-2800(config-cmap)#match dscp cs5 ! match packets belongs to Broadcast Video traffic
RT-2800(config-cmap)#match dscp cs4 ! match packets belongs to Realtime-interactive traffic
RT-2800(config-cmap)#exit
RT-2800(config)#class-map match-any QoS_CONTROL
RT-2800(config-cmap)#description: match packets of Control-traffic-class
RT-2800(config-cmap)#match dscp cs6 ! match packets belongs to Network-control traffic
RT-2800(config-cmap)#match dscp cs3 ! match packets belongs to Voice-Video Signaling traffic
RT-2800(config-cmap)#match dscp cs2 ! match packets belongs to VoIP bearer traffic
RT-2800(config-cmap)#exit
RT-2800(config)#class-map match-any QoS_CRITICALDATA
RT-2800(config-cmap)#description: match packets of CriticalData-traffic-class
RT-2800(config-cmap)#match dscp af41 af42 af43 ! match packets belongs to Multimedia-Conferance on AF4
RT-2800(config-cmap)#match dscp af31 af32 af33 ! match packets belongs to Multimedia-Streaming on AF3
RT-2800(config-cmap)#match dscp af21 af22 af23 ! match packets belongs to Transactional-Data on AF2
RT-2800(config-cmap)#match dscp af11 af12 af13 ! match packets belongs to Bulk-data on AF1
RT-2800(config-cmap)#exit
RT-2800(config)#class-map match-any class-default ! not neccessary to creat this Class-Default
% class-default is a well-known class and is not configurable under class-map
RT-2800(config)# !
RT-2800(config)# !
RT-2800(config)#policy-map QoS_DRCC
RT-2800(config-pmap)#Description: attachad Default-Realtime-Control-CriticalData traffic-classes
RT-2800(config-pmap)#class class-default 
RT-2800(config-pmap-c)#bandwidth percent 25  ! 25% Class-Base Weighted Fair Queuing (CBWFQ)
RT-2800(config-pmap-c)#fair-queue
RT-2800(config-pmap-c)#random-detect dscp-based
RT-2800(config-pmap-c)#exit
RT-2800(config-pmap)#class QoS_REALTIME
RT-2800(config-pmap-c)#priority percent 33  ! 33% Low Latency Queuing (LLQ)- In the same policy-map cannot use SET command while using PRIORITY command
RT-2800(config-pmap-c)#exit
RT-2800(config-pmap)#class QoS_CONTROL
RT-2800(config-pmap-c)#bandwidth percent 7  ! 7% Class-Base Weighted Fair Queuing (CBWFQ)
RT-2800(config-pmap-c)#exit
RT-2800(config-pmap)#class QoS_CRITICALDATA
RT-2800(config-pmap-c)#bandwidth percent 35  ! 35% Class-Base Weighted Fair Queuing (CBWFQ)
RT-2800(config-pmap-c)#fair-queue
RT-2800(config-pmap-c)#random-detect dscp-based
RT-2800(config-pmap-c)#exit
RT-2800(config-pmap)#!
RT-2800(config-pmap)#exit
RT-2800(config)#!

RT-2800(config)#!
RT-2800(config)#interface gigabitethernet0/1
RT-2800(config-if)#description : attachad Default-Realtime-Control-CriticalData traffic-classes
RT-2800(config-if)#service-policy output QoS_DRCC
RT-2800(config-if)#exit
RT-2800(config)#exit
RT-2800#
RT-2800#
----------------------------------------------------------------------------------------
RT-2800#show class-map
Class Map match-any class-default (id 0)
Match any

Class Map match-any QoS_CRITICALDATA (id 3)
Description: match packets of CriticalData-traffic-class
Match dscp af41 (34) af42 (36) af43 (38)
Match dscp af31 (26) af32 (28) af33 (30)
Match dscp af21 (18) af22 (20) af23 (22)
Match dscp af11 (10) af12 (12) af13 (14)

Class Map match-any QoS_REALTIME (id 1)
Description: match packets of Reatime-traffic-class
Match dscp ef (46)
Match dscp cs5 (40)
Match dscp cs4 (32)

Class Map match-any QoS_CONTROL (id 2)
Description: match packets of Control-traffic-class
Match dscp cs6 (48)
Match dscp cs3 (24)
Match dscp cs2 (16)
-----------------------------------------------------------------------------------------
RT-2800#show policy-map
Policy Map QoS_DRCC
Description: attachad Default-Realtime-Control-CriticalData traffic-classes
Class QoS_REALTIME
priority 33 (%)
Class QoS_CONTROL
bandwidth 7 (%)
Class QoS_CRITICALDATA
bandwidth 35 (%)
fair-queue
packet-based wred, exponential weight 9

dscp min-threshold max-threshold mark-probablity
----------------------------------------------------------
default (0) - - 1/10
Class class-default
bandwidth 25 (%)
fair-queue
packet-based wred, exponential weight 9

dscp min-threshold max-threshold mark-probablity
----------------------------------------------------------
default (0) - - 1/10

RT-2800#
RT-2800#
----------------------------------------------------------


RT-2800#show run
!
class-map match-any QoS_CRITICALDATA
description : match packets of CriticalData-traffic-class
match dscp af41 af42 af43
match dscp af31 af32 af33
match dscp af21 af22 af23
match dscp af11 af12 af13
class-map match-any QoS_REALTIME
description : match packets of Reatime-traffic-class
match dscp ef
match dscp cs5
match dscp cs4
class-map match-any QoS_CONTROL
description : match packets of Control-traffic-class
match dscp cs6
match dscp cs3
match dscp cs2
!
!
policy-map QoS_DRCC
description : attachad Default-Realtime-Control-CriticalData traffic-classes
class QoS_REALTIME
priority percent 33
class QoS_CONTROL
bandwidth percent 7
class QoS_CRITICALDATA
bandwidth percent 35
fair-queue
random-detect dscp-based
class class-default
bandwidth percent 25
fair-queue
random-detect dscp-based
!
!
interface GigabitEthernet0/1
description : assigned policy-map QoS_DRCC to G0/1 interface using Service-policy
ip address dhcp
ip nat outside
ip virtual-reassembly in
duplex auto
speed auto
service-policy output QoS_DRCC
!
!
interface GigabitEthernet0/0
ip address 172.168.0.1 255.255.255.248
ip nat inside
ip virtual-reassembly in
duplex auto
speed auto
!
RT-2800#

 

Comments
siskum
Spotlight
Spotlight
Joseph W. Doherty
Hall of Fame
Hall of Fame

Not a critique of @siskum , but in my experience these QoS models leave much to be desired in providing effective QoS for all kinds of traffic.  They also tend to leave many QoS configuration questions unaddressed, totally ignored, or imply "cookbook recipes" that totally ignore specific local traffic QoS needs.

As a couple of examples, such QoS models often show class bandwidth allocations percentages.  So, are those percentages cast in stone and should be used regardless of any further considerations?  If so, how was it determined they are the ideal?  If not, how should they be determined?

Or, when WRED is suggested, ditto for all its parameters, let alone whether it should be used at all based on a specific usage case.

That's not to say these models are totally worthless, as they often do provide some real-time traffic, like VoIP and VidConf, adequate resources; also scavenger is somewhat treated correctly too.

But, all the other traffic between real-time and scavenger classes, in the real world, often don't seem to benefit much, if any, or sometimes perform worse!

Well, we can always add bandwidth.  Ah, but how much?  "Surprisingly", even adding bandwidth doesn't always provide the improvement we hoped for.

Do understand, doing QoS well, can be as difficult as doing other aspects of networking well.  Fortunately though, not all cases of networking, whether QoS or something else, require ideal implementations to provide "good enough" results.

siskum
Spotlight
Spotlight

Implementation of QoS of MQC Architecture Framework and Syntax 

 

I would like to publish set of facts and arguments to support QoS instead of critique. QoS is a type of tool introduced by CISCO which may have pros and cons. Even vendor document Cisco Enterprise QoS Solution Reference Network Design Guide Version 3.3 November 2005 or same experienced authors published book End-to-End QoS Network Design - Quality of Service for Rich-Media & Cloud Networks 2nd Edition about QoS could not address all kind of real-world complexity of the specific enterprise network traffic environment problems. It is a responsible of network engineer to do proper network traffic analysis and priority mapping of the network, before implementation of the QoS. 

 

Even here it has been uploaded summarized a handful of information about QoS tool models which will not represent whole contents of the above references. Most of the reference books describes general model of QoS tool as below.

 

  • Classification and marking 
  • Queuing and scheduling 
  • Policing and shaping 
  • Congestion avoidance or buffering 

 

The author Wendel Odom of the Official Cert Guide CCNA 200-301 Volume 2 (page 232) highly recommended and remarked on above referenced books are excellent reference for Cisco QoS. 

 

Bandwidth percentage cannot just assume by guessing and allocate. It is a one of data traffic engineering process by doing analysis using special packet inspection tool and finding out what the types of packets, volume and cruciality. As an example, If the enterprise network required bandwidth for interactive voice is 2 percent or less and allocating higher bandwidth than required is unnecessary and utter waste of the resource. The other example is most of the companies uses VoIP call centers, for these VoIP traffic needs higher priority than other traffic so then it can be given priority and higher bandwidth. 

 

WRED (Weighted Random Early Detection) is very clearly address in the Official Cert Guide – CCNA 200-301 Volume 2 page 243-252. Shaping queues volume, shaping time interval and congestion avoidance using queue depth behavior, capacity, min- and max- threshold and probability. 

 

Middel-classes traffic queues in between the Real-time high priority queue and low-priority Scavenger or DSCP cs1 queue, do not get much benefit of QoS and it will result latency(delay), retransmissions and unpredictability of packet transmission. To avoid these circumstances can do correct policy mapping such that separation of differentiation traffic into different traffic classification. Avoiding unnecessary policing and extreme shaping, stop creating too many classes limited to 4 or 5 classes, uses fair-queuing and default class-based bandwidth. 

 

Finally, it is true that allocating bandwidth cannot full fill all the requirements of quality of the network or expect much better performance. Everything depends on two WAN edge router points source and destination data transmission and its behavior such that latency(delay), jitter(variation of delay), loss, queuing and efficiency of application protocol. 

Joseph W. Doherty
Hall of Fame
Hall of Fame

I would like to publish set of facts and arguments to support QoS . . .

I would like that too.  Personally, I'm a big booster of using QoS.

. . . instead of critique.

You're against "critique"?  Possibly did you intend to mean you're against "criticism"?  If the latter, I agree.

QoS is a type of tool introduced by CISCO. . .

I wasn't aware of that.

The Wiki article on QoS, doesn't appear to emphasize that.  Possibly someone can edit that article, and emphasize that.  I strongly support giving credit where it's due.

The author Wendel Odom of the Official Cert Guide CCNA 200-301 Volume 2 (page 232) highly recommended and remarked on above referenced books are excellent reference for Cisco QoS. 

Wendell's recommendation references are great for passing Cisco's CCNA QoS set of questions.  Probably pretty great too for passing CCNP or CCIE certification QoS questions too.

To be clear, I believe you well summarized the Cisco QoS materials, like you referenced.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: