Introduction to QoS (Quality of Service)

Hi Laz,

1)As per BW characteristics we are dividing queue like first queue is 50% BW and 2nd queue is 20% and remaining to the 3rd queue so my query here is how packets will get processed during the congestion like first queue is for Voice traffic, 2nd one is data traffic, 3rd one is for any other traffic so when congestion occur router will put voice packets in queue 1 and data traffic is in queue 2 and so on, but here we also prioritize queue 1 so first of all queue 1 traffic will be transmitted and when all queue 1 traffic transmitted then it comes to queue 2 but suppose voice packets continuously coming and router putting them in to queue 1 then this way queue 2 packets will never get processed.

2)if suppose whole BW of queue 1 used by only two voice packets then in that case what about the other packets those are waiting to transmitted and in this case also how queue 2 will get itā€™s chance to transmit the data packets?

Hello Pradyumna

What you describe assumes that the second queue will only be processed if the first queue is empty, and the third queue will be processed only if the first two are empty, and so on. But this is not the case.

If the first queue is set to 50% bandwidth for example, then 50% of the bandwidth of the interface will be used to guarantee traffic at that rate. If more than 50% of the bandwidth tries to use that queue in a specific period of time, it wonā€™t be allowed to do so, and packets will have to wait in the queue until the other queues are served as well, each one with the percentage or bandwidth that it has been configured with.

Think of it as a percentage of usage over time. In one second, the first queue, if it is set to 50% of the bandwidth, will be able to guarantee transmission at a priority for 0.5 seconds. Anything else that comes into that queue beyond this within the 1 second period will have to wait for the other queues to be served.

I hope this has been helpful!

Laz

1 Like

Hi Laz,

  1. I Still not understood Marking, suppose as per topology switch done both Classification and Marking packet and further reaches to the router then why router will do marking and classification (if want to do) which is already done.

2)and by classification switch will know this is IP traffic, this is VoIP traffic then what marking mean, actually i want to know what information router will through marked packets like classification differentiate the traffic flowing through router.
3) Suppose we have a internetwork then at what router classification marking is
needed?
4) Does the scheduler (Round robin or CBWFQ) is already configured or we
have to configure that?
5) How the packet send out per queue on the basis of scheduler, How router will
know that 2 packet send out from queue 1 then 3 from queue 2 and so on
scheduler basis.
6) If suppose any segment lost in that case window size reduced by Half, is that
mean if 2 segment reduced simultaneously against 4 segments send by
sender then in that window size reduced to zero segments, am i right?
how and when receiver will get these lost segment?, are these lost segments
will be included in next group of segments? suppose window size limit
shrunk to 2 segment in that case next update will have only the have lost 2
segments else one segment in case of window size is 1 segment and
remaining one segment in next update with twice window size if
acknowledgement received.

Hello Pradyumna

Classification refers to the process by which we determine what the traffic is. (voice, telnet, video, web, email, routing protocolā€¦ all kinds of traffic.) Based on this classification, you can then mark traffic, or have QoS features applied directly to the traffic.

Marking refers to the process by which you modify parameters in the IP header (DSCP) and the Ethernet Header (CoS) to identify particular frames and packets. Routers and switches can then be configured to act upon these markings in a particular way.

Acting upon classification and/or markings is what QoS does, and this can be applied at any router or switch whether on your internal network, or on an ISP network.

For information concerning scheduling, configuration, and their defaults, take a look at this Cisco Documentation.

I hope this has been helpful!

Laz

1 Like

Hello,

We have an ASR9001 running IOS XR. We got heavy traffic on it , over 8Gbit out and 4Gbit in.
Last week we reach the physical limit of the 10Gbit port and so service stop working well.

Does it possible to setup some kind of QOS to prioritize at least TPC ACK, VOIP , SSH, BGP services ? Iā€™ve tried to apply policy-map but Iā€™m unable to get it working. ASR refuse to apply policy to the interface.

Iā€™ve got following error: ā€œPriority 4 or above is not supported on this line cardā€

class-map match-any BGP
 match access-group ipv4 ACL-BGP
 end-class-map
!
policy-map CLASSIFY
 class BGP
  priority level 7
  set dscp cs7
 !
 class class-default
 !
 end-policy-map
!

Regards

Hello Sebastien

This error has to do with what the specific line card supports. You are assigning an egress priority level of 7 in this class map, however, according to this Cisco documentation about Modular QoS for the ASR series routers running IOS XR, any release prior to 5.3.2 supports Priority levels P1, P2, and P3 only. Itā€™s a matter of IOS version and platform.

Take a look at the documentation and attempt to adjust your configuration accordingly. Let us know how it works out for youā€¦

I hope this has been helpful!

Laz

1 Like

Hello,

We are running IOS XR 6.2.3 ā€¦
P3 might be sufficient ?

Regards

Hello Sabastien

Thatā€™s strange, according to the documentation you should be OK with P7, but I believe that you should be OK with P3. Try it out and see if it accepts it and let us know!

I hope this has been helpful!

Laz

Hello,

Working with 2960-s series switch platform.

it mentions it does not support ingress scheduling, but it does have 4 queues for each egress port.

Does this mean each egress interface (port) on the switch contains 4 egress queues?

Hello Miguel

According to Cisco documentation:

Each port supports four egress queues, one of which (queue 1) can be the egress expedite queue. These queues are configured by a queue-set. All traffic leaving an egress port flows through one of these four queues and is subjected to a threshold based on the QoS label assigned to the packet.

So it seems that yes, each egress interface does contain four egress queues. You can find out more details about this and how they function at the following link from where the above quote was taken.

I hope this has been helpful!

Laz

Hello,
In the shaping section and in the diagram where Rene says:

Above you can see we have 20 moments where we send for 10 ms. 20 x 10 = 200 ms in total. We have 20 pauses of 40 ms, 20x 40 = 800 ms in total.

CIR is 200Mbps and because of VoIP we want to minimize the one-way delay by using a Tc of 10ms. To achieve this Tc value using the formula we need a Bc = Tc * CIR = 10*200.000=2.000.000 bits.
If i have understood correclty the IOS automatically will calculate that in these 20 moments where we send for 10 ms each time we need to send 10 million bits to get *20 times = 200Mbits?
Thank you in advance.

Hello Marios

The whole reason shapers work in this way is because an interface is capable of either transmitting at 100% of its capacity or 0% of its capacity. There is no in-between. In order to employ shaping, over time, interfaces are made to transmit for only a certain percentage of the time, thus resulting in a perceived limitation of throughput over long periods. If an interface only transmits for 50% of the time, then it will on average, transmit at 50% of its rated throughput.

In this case, we want a 1 Gbps interface to transmit at 200 Mbps. Thatā€™s 20% of the rated speed, so we make the interface transmit 20% of the time.

However, in our case, we want the interval of transmission to be 10ms, in order to accommodate VoIP services. So yes, you do use the Bc = Tc * CIR formula. In this case CIR = 200 Mbps or 200 million bits per second. Now the shaper knows that it must send a maximum of 200 million bits every second. So every time interval of 10ms, the shaper must send how many bits?

Well, the IOS calculates this. Since transmission time is 10ms, and weā€™re sending traffic for only 20% of the time, that means weā€™re not sending traffic for 80% of the time. If 10 ms is 20% of the time, then another 40ms is the other 80% of the time.

Now over a time period of 1 second, you will have 20 such time periods of 10ms sending 40ms not sending. So thatā€™s 20 * (10+40) = 1000 ms or 1 second. How many bits will you be sending in those 10 ms? Well, itā€™s the speed of the interface multiplied by the time period, so that is 1 Gbps * 0.01s = 10 million bits or 10 Mb.

Since the IOS has the time interval, the interface speed, and the CIR, it calculates the rest.

I hope this has been helpful!

Laz

Remember, an interface can either send at 100% of its capacity or zero.

Now because of VoIP we want the Tc to be 10 ms.
*

Since the CIR is 200 Mbps, or 200 million bits per second,

Whats the difference between hardware Queue and Software Queue ?

Is QOS by default enabled in routers and switches ?

Can we modify the queue size of input and output queue ?

What is transmit ring ?

i could not understand the time which we wait in shaping in rene exampleā€¦

whats the way to modify the queue size on an interface ??..

Is there a true difference between bandwidth statement and bandwidth when using it within a QoS policy? Below I posted two examples from another site because itā€™s a good explanation of the two. However, with bandwidth remaining, you have to calculate the max-reserved bandwidth and at first, it seems like it gets less bandwidth allocated during times of congestion but then it goes on to say that it can use unused bandwidth from other classes. However, isnā€™t this the same behavior as bandwidht percent?

Bandwidth percent example
The mission-critical class gets a 200 Kbps bandwidth reservation since it is given a fixed sum guarantee of 20 percent. 20 percent of 1000k would be 200 kbps, so the voice priority class gets a maximum 200 kbps, mission critical receives 200 kpbs, the class interactive receives 100 kpbs and finally the class-default receives 250kpbs.

policy-map egress
classvoip
priority percent 20 
class mission-critical
bandwidth percent 20
class interactive
bandwidth percent 10
class class-default
bandwidth percent 25
!
int s0/0
bandwidth 1000
service-policy output egress

Bandwidth Remaining example
See how bandwidth will be calculated when assigning the bandwidth always based upon a remaining value. Letā€™s consider the same example from above but change it from bandwidth percent to remaining bandwidth percent:

policy-map egress
classvoip
priority percent 20
class mission-critical
bandwidth remaining percent 20
class interactive
bandwidth remaining percent 10
class class-default
bandwidth remaining percent 70
!
int s0/0
bandwidth 1000
service-policy output egress

Notice that the voice class still has a fixed sum guarantee of 20 percent of the interface configured bandwidth - .20 * 1000kpbs which is 200kpbs. But now we have to calculate the max reserve bandwidth since this must deducted first before determining the bandwidth remaining. As a reminder, the maximum reserved is how much you can ever reserve using the bandwidth or bandwidth percent statements. Cisco defines this formula as

Bandwidth available = Bandwidth fixed sum
guarantees ā€“ Max Reserve (75% of bandwidth by default)
Applying the formula to our example, we have 750Kpbs ā€“ 200 kpbs = 550kpbs. Now the 550 kpbs will be divided out based upon the pre-defined percentages fore each class. Therefore, the Mission Critical class would receive (.20)(550 kpbs) = 110 kpbs, the class interactive will be 55 kpbs, and the class-default would receive 385 kpbs. Also, if any class doesnā€™t use its full bandwidth allocation, the leftover will automatically be distributed to the other classes proportionally, based upon the configured percentages.

Hello Vjnetwork

The fundamental difference between the two options is this:

  • The priority percent command will reserve bandwidth based on the absolute total value of bandwidth available.
  • The priority remaining percentcommand will reserve bandwidth based on the relative available bandwidth.

Whatā€™s the difference? The priority percent command will always calculate its value based on the absolute value of the bandwidth, that is, the interface bandwidth. The priority remaining percent command will calculate its value based on the remaining bandwidth. The remaining bandwidth is a dynamic value, and this is at the very center of the difference between the two methods. That remaining value can have a maximum of 75% of the absolute bandwidth available but may change dynamically because the remaining bandwidth also includes whatever ā€œfreeā€ or unused bandwidth there is from other classes.

For more information on the command, with further explanations of the differences, take a look at this Cisco documentation:
https://www.cisco.com/c/en/us/td/docs/ios/qos/command/reference/qos_book/qos_a1.html#wp1038764

I hope this has been helpful!

Laz

I believe the 75% rule has been deprecated.

Hello Vjnetwork

Yes, you are correct, according to the following documentation, the max-reserved-bandwidth command is being phased out.

https://www.cisco.com/c/en/us/td/docs/ios/qos/command/reference/qos_book/qos_m1.html#wp1054626
The following documentation indicates replacement commands that will achieve a similar result:

https://www.cisco.com/c/en/us/td/docs/ios/ios_xe/qos/configuration/guide/convert/qos_mqc_xe/legacy_qos_cli_deprecation_xe.html#wp1099284

Now although the specific command has been depreciated, the concept of maintaining a minimum priority bandwidth for control plane data is still very much valid. As stated in the above documentation:

Effective with Cisco IOS XE Release 3.2S, the max-reserved bandwidth command is replaced by a modular QoS CLI (MQC) command (or sequence of MQC commands).

I hope this has been helpful!

Laz

Hello Narad

A software queue is a queue on which you can configure queueing mechanisms. Anything you configure for QoS in a Cisco device uses software queues. These dynamically use areas of RAM to create constructs that will function as configured. All of these functions use the main CPU and RAM to operate.

The hardware queues use dedicated hardware to perform queuing, scheduling, and packet memory management. These queues are generally ā€œhard-wiredā€ and are not configurable. Their arrangement is also platform-specific. Lower-end devices will have a single hardware queue per port. More advanced devices will have multiple hardware queues in different arrangements such as 2q3t or 8Q3T or 1P1Q3T or 2P6Q3T. These are different models of queuing. Some more advanced platforms will let you choose and configure which of the available arrangements you want to apply. These QoS arrangements are called QoS Scheduling. The following document describes QoS scheduling in much detail.

QoS is not enabled by default.

It depends upon the feature being implemented. For example, in QoS LLQ the default queue limit is 64 packets, but this can be modified. Hardware queue sizes cannot be modified.

Transmit ring is a control structure used by Cisco devices to control which buffers are used to receive and transmit packets to the media. More info about these can be found here:

An interface can only transmit traffic at its rated speed. A 1Gbps interface can transmit either 0 traffic or 1Gbps traffic. It canā€™t transmit at 200 Mbps. However, to achieve a shaping limit of 200Mbps, it will operate for 20% of the time. So over one second, it will transmit for 200 ms, and stop transmitting for 800ms. If it transmits at 1Gbps for 200ms and stops for 800ms, then on average over one second, the interface has transmitted at 200Mbps, achieving the shaping limitationā€¦

I hope this has been helpful!

Laz

seems to me that good traffic management could be done by holding/delaying TCP acks. This would only work for tcp, but I think it would work good. TCP is self clocking based on speed of acks. you slow the acks, the clock runs slower (and stream is slower). is there any qos that is done this way? here some reference on tcp self clocking.

Hello Rod

Remember that a TCP connection takes place between hosts. The hosts are responsible for sending ACKs, and any delay that they may introduce in order to limit the traffic of a TCP session can only be controlled by the hosts themselves. Network devices cannot selectively introduce a delay to TCP ACK messages in order to manage traffic.

However, TCP can indirectly affect TCP session traffic by selectively and randomly dropping some TCP segments. This will result in missing segments, and the receiver of that TCP session will inform the sender with an ACK number that corresponds to the last successfully received byte. This will introduce a delay, but will also cause the TCP session to slow down because missing segments will make the window size smaller.

In summary, by introducing an intentional and controlled traffic loss, TCP sessions will adjust their transmission rates, allowing network devices to perform traffic management on a particular link.

More about how this can be implemented can be found at the following lesson:

I hope this has been helpful!

Laz