Another QoS mechanism that is useful for slower link speeds is LFI which will fragment larger payload to specified fragment sizes and then interleave the smaller payloads in among the fragments, reducing then the serialization delay.
There are three primary LFI mechanisms supported by Cisco are as follows:
- Multitlink PPP (MLP) : used on PPP links
- FRF.12 : used on Voice over IP over Frame-Relay (VoIPovFR) links
- FRF.11 Annex C : used on voice ov Frame-Relay (VoFR) links
In MLP mode , then you define the maximum serialisation delay that you wnat on your link and under FRF.12, you define the maximum size of the fragment that you want on your link.
To make more efficient the use of your bandwidth on slow-speed links, we can use 2 types of compression.
- Payload compression : Reduces the payload size, using approaches such as STAC, predictor or MPPC
- Header compression : Reduces the size of the TCP and RTP headers
The goal of compressions technologies is to increase the throughput over a WAN link while we are reducing the delay.
However , especially with payload compression approaches , the time that is required by lower-end routers to run the compression algorithm can increase the overall delay so in order to avoid this , you still can equip your router with a compression module like the CAIM.
With header compression , a header typically is reduced from approximately 40 bytes to 3 up to 5 bytes for TCP header compression or 2 up to 4 bytes for RTP header compression.
However, the routers technically are not doing real compression. Rather, these routers cache information that does not change during a conversation, such as source and destination IP address and TCP/UDP port numbers. The compressed header then carries such information as UDP checksums and a session context ID (CID) which identifies which flow the packet is a part of.
In a Frame-Relay network, we can ask to routers during congestion in the network cloud to reduce the CIR to a lower value. So when a Service Provider becomes congested and needs to discard frames, it first discards frames with their Discard Eligible (DE) bit set to 1. The Service Provider also can request that the sending router slows its transmission rate by marking the Backward Explicit Congestion Notification (BECN) bit to 1, in a frame going back to the sender.
When this occurs , if the router is configured to respond to BECNs, the router reduces its CIR by 25 percent. If the router receives another BECN in the next time interval, it decreases its transmission rate by 25 percetnof the current rate and this can happen until the rate drops to the router’s configured minimum CIR.
Please also take in mind that sometimes , you can encounter the situation where the sender doesn’t receive anything or insufficient traffic back. In such a situation , the Service Provider can’t mark the BECN bit in a frame going back to the sender. To remedy this situation, the Service Provider can mark then the Forward Explicit Congestion Notification (FECN) bit to 1 in a frame which is destined for the receiver. Then if the receiver is configured to respond to FECN, it generates a Q.922 test frame which will be sent back to the sender and will then offer the opportunity to the Service Provider to mark the frame with the BECN bit and so will ask then to the sender to slow the traffic.
As a general rule , if a sender has slowed its transmission rate because of BECNs, 16 timing intervals must elapse before the sender begins to increase its transmission rate again.
QoS mechanisms that limit bandwidth are called traffic conditioners and we have already given a quick definition of the two existing types:
Policing typically limits bandwidth by discarding traffic that exceeds a specified rate. However policing also can remark this traffic which is exceeding the specified rate and send the traffic anyway.
Recall also that Policing can be applied on an inbound or outbound direction of an interface.
Shaping as seen before is delaying traffic as it buffers it . The only backdraw is that Shaping can be applied only in the outbound direction of an interface.
So with Policing and Shaping , you can send traffic at an “average” rate which is less that clock rate of your interface. The average bandwidth is called the Commited Information Rate (CIR).
Please note also the following difference between the Shaping and the Policing regarding the Burst.
- The number of bits that is sent during a toming interval is called the Commited Burst ( Bc) => SHAPING
- The number of bytes that is sent during a toming interval is called the Commited Burst ( Bc) => POLICING
The timing interval is written as Tc . So you have the following formulas.
CIR = Bc / Tc
Tc = Bc / CIR
If you don’t use your Bc bits or bytes, then you can re-use them for the next timing interval and it is considered as Excess Burst (Be). So Be bits or bytes are the excess packets of Bc that we can send.
Now going more in depth in Cisco technology , we will use the “metaphor” of token bucket for the Bc and Be traffic.
So with policing , traffic that requires no more than the Bc number of bits or bytes to be transmitted is called “conforming traffic” . Traffic that requires more than the Bc numbers of bits or bytes is said to be “exceeding traffic”.
Let’s see the policing approach with a single token bucket approach.
Suppose 500 bytes currently in the token bucket . A packet comes through requiring 300 bytes. The bytes are removed from the bucket and the packet is sent. Then before the bucket has been replenished with more tokens, another 300 bytes packet comes along. Because only 200 bytes remain in the bucket, the packet can’t be sent and is discarded.
Now let’s continue with an enhancement to the single token bucket approach.
Instead to have one bucket , now a second bucket exists. The first bucket has a depth of Bc and the second bucket has a depth of Be.
If a packet can be forwarded using bytes in the Bc bucket, it is said to be “conforming”. If the packet can’t be forwarded using the bytes in the Bc bucket, but it can be forwarded using the bytes in the Be bucket , it is said to be “exceeding”. If the packet can’t be forwarded using either of the bucket individually , it is said to be “violating”.
Let’s see the Cisco dual token bucket approach as Cisco also supports dual-rate policing . With dual-rate policing, you still have 2 token buckets. The first bucket is the CIR bucket, and the second bucket is the Peak Information Rate (PIR).
These bucket are replenished with tokens at different rates, with PIR bucket being filled at a faster rate.
When a packet arrives, the dual-rate policer checks to see whether the PIR bucket has enough tokens (that is bytes) to send the packet. If there are not sufficient tokens, the packet is said to be “violating” and it is discarded. Otherwise, the policer checks to see whether the CIR bucket has enough tokens to forward the packet. If the packet can be sent using the CIR bucket’s tokens, the packet is “conforming”. If the CIR bucket’s tokens are not sufficient, but the PIR bucket’s tokens are sufficient then the packet is said to be “exceeding” and an exceed action is applied.
So , you can specify the following various actions to perform based on whether a packet is “conforming”, “exceeding” or “violating”.
One of two approaches can be used when configuring Class-Based Shaping.
- Shaping to Average
- Shaping to Peak
When you configure to shape to an average, you only want to send traffic at the CIR. However, if you configure shaping to peak, you are attempting then to send above the CIR if the bandwidth is available. Specifically, when you shape to peak, instead of just adding Bc bits to the token bucket during each timing interval, you are adding Bc+Be bits to the token bucket. The peak rate is then fiven by the following formula
Peak Rate = CIR * [ 1 + (Be / Bc)]
Recall also that althought shaping to peak can squeeze out some extra bandwidth from a WAN connection, it also can lead to multiple packets drops. !
Whereas queuing provides congestion management, mechanisms such as WRED provide congestion avoidance.WRED’s purpose is to prevent an output queue from ever filling to capacity,which would result in packet loss for incoming packets.
To understand what it is WRED ,let’s explain first RED goals, basics
The purposes of RED is to prevent TCP synchronization (all TCP streams in slow start phase) by randomly discarding packets as an interface’s output queue begins to fill.
The agressivity of discarding packets depends on the queue depth and is influenced by the minimum , the maximum threshold and the Mark Probability Denominator(MPD).
So random dropping will happen when you reaches the minimum threshold and it is full when you reach the maximum threshold .
Another definition for the MPD is the maximum drop percentage at the maximum threshold.
RED is not supported on Cisco IOS but Cisco has chosen to support CB-WRED which gives you the opportunity to define several RED mechanisms for different DSCP threshold.
Some Cisco Catalystswitches also support a kind of Weighted Round Robin Queuing as the 2950 switch, with 4 queues in where you can configure to place frames with specific CoS marking . You can also assign a specific weight on these queues which will be handled by the round-robin fashion cycle.
On this switch , queue 4 is designated as an “expedite” queue which give priority treatment to frames in that queue.
Please note that if you want to configure this queue as an expedite queue , you must put its weight to 0.