03-08-2025 09:15 PM - edited 03-10-2025 05:21 PM
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.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.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.2
Traffic Classes Models 12-8-4 Modeles
Image-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.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.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.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.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#
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: