Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

QoS is a set of features that allow traffic to be prioritized. Traffic is separated into different classes of traffic, based either on a priority marked in their DSCP or PCP fields, or on other header properties such as addresses, ports etc. Each class of traffic is then directed to a separate queue, and a scheduler decides how many packets to transmit from each queue based on its configuration. In this way, higher priority traffic like voice or video can be prioritized over file transfers, email or other lower priority traffic, and bandwidth can be split across the different classes according to Service Level Agreements our users form with their customers. The effects of QoS are usually only apparent when there is more traffic to be transmitted than the interface supports or than is allowed for a particular class of traffic. Otherwise, all packets are transmitted as usual, although some actions such as DSCP remarking may still occur.

...

The Differentiated Services Code Point is a 6-bit field in the IP header which can be used to indicate the relative priority of a packet. At its simplest, higher values indicate higher priority, but there are RFCs which give significance to certain values. The default DSCP value is 0, the lowest priority which indicates the standard best-effort approach to transmitting traffic through the internet.

...

The traffic classes are processed in strict priority order, from 0 to 3. If a bandwidth is configured in a traffic-class it acts like a maxrate and will limit the bandwidth available to the traffic-class to the configured value. Any traffic-class which does not have a bandwidth configured will have a maxrate set to the parent shaper rate and will be able to utilize all of it unless a higher priority traffic class has consumed some of the available bandwidth. If a traffic-class does have a reduced bandwidth, it will always be limited to this upper limit, even if a higher priority traffic class has not used all of the bandwidth available to it.

...

The underlying algorithm for the subport and profile shapers is known as a Token Bucket. This can be visualized as a large bucket which water is being added and removed from. At regular intervals, a certain amount of water is added to the bucket and can then be removed as needed. If the bucket is full, no extra water is added, and this limits the amount of water that can be removed from the bucket at one time.  

In our case, the size of the bucket is the burst parameter and is measured in bytes. The interval is defined by the period parameter in ms, and the amount number of credits (i.e. the water) added each period is derived from the bandwidth parameter. For example, with a bandwidth of 10kbps and a period of 10ms, then every period 100 credits will be added to the total available. If we have already accumulated as many credits as the burst parameter, then the extra credits are discarded.

...

The frame overhead parameter is used to increase how large the QoS scheduler thinks packets are. If packets are 1000 bytes long, then setting set the frame overhead to 500 makes the scheduler treat them as if they were 1500 bytes long.

...