QoS is a very broad area. In this series of articles, I am trying to summarize the basic theory along with Cisco IOS commands. The last part will be devoted to practical configuration examples. I have learned most of the Cisco-related things through self-study, but for QoS, I attended training at AlefNula, which I can highly recommend to anyone who wants to learn more about QoS.
What is QoS
Quality of Service, hereinafter referred to as QoS, is a set of technologies that address several problems around traffic management (or traffic engineering). The goal of QoS is to enable the setting of a certain quality of transmission for data transmitted over the network. Furthermore, QoS can distinguish between different transmissions and set a different quality for each type. In simple terms, we can say that QoS ensures that important traffic is delivered properly and on time.
QoS is a considerably broad and not exactly simple topic (from a theoretical standpoint, the actual configuration may not be complex). It consists of a whole range of areas, in practice we often only need to use a certain part. On the other hand, some commands in Cisco IOS configure multiple areas at once. Only one part of QoS is the use of the IEEE 802.1p (or 802.1q) standard.
Note: In this article, I focus on what Cisco currently uses on its devices (and I mainly deal with Ethernet). I try to minimize the theory, so some things will be missing here.
QoS is currently very popular due to the transmission of voice (VoIP) or video over the IP protocol, where it is necessary to ensure certain characteristics/parameters of the traffic. Primarily, we can say that we need to prioritize certain traffic (prioritize some traffic over others to prevent delays). However, QoS also offers other useful and used functions. These include bandwidth limiting (setting the maximum bandwidth that can be used) and bandwidth reservation (setting the minimum bandwidth that will always be available for a given traffic).
Note: In general, QoS is not addressed too much on switches (LAN), as there are high speeds. The main deployment is for routers and slow links up to 768 kbps, for certain purposes even links up to 2 Mbps. Of course, some basic settings are also made in the case of, for example, IPT on the LAN.
Basic Problems in Data Transmission
Here is a list of the main issues that can occur during packet transmission. These areas are what QoS tries to address.
- Delay - data arrives at the destination too late, consisting of propagation (how fast the signal propagates through the medium), serialization (how fast we can insert data onto the link, they must be in sequence), processing (routers on the path), queuing delays, dejitter buffer, and more
- Jitter - Delay variation - packets reach different delays, mainly depending on the queues along the way
- Packet Loss - a packet is lost on the way (error) or discarded (due to throughput, dropped packet), if lost, it must be retransmitted, and the order changes
- Out-of-Order Delivery - packets can travel different paths or be retransmitted
- Bandwidth - is used in bursts and inefficiently (downloading a large file can take bandwidth from telephony), we can compress packet headers (which can be larger than the data content)
VoIP Requirements
Here are the recommended values that should be achieved in practice for optimal deployment of IP telephony.
- Latency - end-to-end delay (time between packet transmission and delivery) < 150 ms
- Jitter - delay variation (difference in intervals between received packets) < 30 ms
- Packet Loss - ratio of packets received and transmitted over time < 1%
- Bandwidth - related to throughput - 12 - 106 kbit/s depending on sampling, codec, and L2 overhead
QoS Mechanisms - QoS Implementation
- Best-effort service - means no QoS, classic TCP/IP traffic, bitrate and delivery time is variable and unspecified and changes depending on network load
- Integrated services - IntServ - a little-used technology for guaranteed QoS, needs support in the application and all routers on the path, the path is first negotiated and reserved, then the data is sent, uses the Resource ReSerVation Protocol (RSVP) for path reservations, is significantly resource-intensive
- Differentiated services - DiffServ - the main method today, handled per-router, packets are divided into classes by type upon arrival at the router, this classification can be recorded in the packet header, classes are handled according to configured parameters
Note: All further descriptions relate to the DiffServ implementation of QoS.
DiffServ - Differentiated Services
- classification is performed at the network edge and sets the Differentiated Services Code Point (DSCP)
- everything happens on active elements and not in the application (although that is also possible)
- because it is handled on each hop (router), it can pass through a router that does not support QoS, but it is not then a comprehensive QoS solution
- several queues are used and serviced according to a specific algorithm
The Basic Points of Applying DiffServ Are
- traffic identification
- division into classes
- defining policies for individual classes
Basic Areas/Actions
- Classification and Marking - distinguishing and marking traffic
- Traffic Rate Management - Shaping and Policing - traffic flow management, limiting and reserving
- Congestion Management - Queuing - congestion management using queues
- Congestion Avoidance - preventing congestion using controlled discarding
- Signaling - negotiation of end-to-end connections, IntServ RSVP
- Link Efficiency Management - management of efficient use of (slow) links, compression, fragmentation
Note: I will not address the last two areas here.
Certain actions are applied at the input and certain at the output. Details depend on the device (number of queues, algorithms, actions). The following image shows possible actions on a Cisco switch.

More detailed view (from the cisco.com website)

The general principle is that the data flow (packet) is first differentiated (classified). Then it is marked for further movement in the network. It is ensured that it corresponds to the configured resource utilization (policies and selection) and the defined behavior (queues and scheduling). The output profile is also ensured to match the defined profile (shaping).
Input port actions (ingress action)
- Classifying - distinguishes the type of traffic based on ACL or configuration and assigns a QoS label to it.
- Policing - determines whether the packet falls within the policer profile, which limits the bandwidth for the traffic and passes the result to the marker
- Marking - evaluates the data from the policer and decides based on the profile. It is then either discarded, the priority is reduced, or it is sent further
- Queuing - evaluates the QoS label (and corresponding CoS or DSCP) of the packet and determines which of the two input queues (one is priority) it will be placed in. It is extended with the WTD (weighted tail-drop) algorithm, which prevents congestion. If the threshold is exceeded, the packet is dropped.
- Scheduling - services the queues using the configured weight - Shaped Round Robin (SRR)
Output port actions (egress action)
- Queuing - evaluates the QoS label (and corresponding CoS or DSCP) of the packet and determines which of the 4 output queues it will be placed in. Because congestion can occur when multiple input ports send data to the same output port, WTD is used to differentiate the packet class. If the threshold is exceeded, the packet is dropped.
- Scheduling - services the queues using weight - SRR or shaped weights. One queue can be set as an express queue and it is serviced until empty, then the others are serviced.
Co k tomu? Akurat dakujeme :) pekny clanok obsazny a naucny
Fakt dobrej web, jen tak dál ;-) Do školy jsem potřeboval něco o QoS, tak jsem si pěkně početl :-) Díky