This How To Note describes the main features of QoS on switches running the
AlliedWare Plus OS. The main features include:
zPrioritisation and marking
Right at the point of ingress into the QoS process, packets classified to particular class
maps can have values written to one or more of their associated “markers”. The markers
can be externally visible fields (DSCP value, 802.
(bandwidth class and queue number). These markers are explained in "Packet markers" on
page 4.
Quality of Service Features on x900-12,
x900-24, and SwitchBlade x908 Switches
1
p value) and/or internally visible fields
zPolic i ng
Packets belonging to any given class map can be assigned a colour (bandwidth class) based
on whether they are inside or outside the bandwidth limits set for that class map. The
packets are marked with the colour that was applied to them, and at various points in the
QoS process, decisions on the packets' fate can be made on the basis of what colour they
have been marked with.
zRemarking
After policing, remarking can update packets’ QoS markers depending on how well the
flow conforms to its bandwidth limits. For example, if a flow exceeds its bandwidth
requirements, QoS can update the packets’ DSCP values.
zPer-port control over egress queue parameters
Queue lengths, scheduling process, relative weights, etc can be set on all queues on a perport basis.
zHighly configurable default class map
All the parameters that can be set on a normal class map can also be set on the default
class map (the catch-all class map that matches all traffic that does not explicitly match any
other class map).
C613-16120-00 REV A
www.alliedtelesis.com
zAbility to see the current state of egress queues
There are commands that enable you to see statistics relating to every egress queue on
every port.
Each of these features is discussed in much more detail later on in this document.
Mapping the queues in the switching instances to queues in the fabric ............................ 39
Scheduling the queues within the fabric ................................................................................... 40
Page 2 | AlliedWare Plus™ OS: Overview of QoS
Which products and software version does this
Note apply to?
zProducts: SwitchBlade x908, x900-12XT/S, and x900-24 series switches
zSoftware versions: AlliedWare Plus version 5.2.1-0.1 and above
The process flow and methodology of the QoS
system
Before discussing the details of the various processes that comprise the QoS system, it is
desirable to first get a picture of what the processes are, and the order in which they are
applied to the packets passing through the system.
Therefore, this section discusses what the QoS system is really trying to do to packets, and
how it keeps track of what it has decided about any given packet.
The QoS system does the following things:
zdecides which egress queue to send a packet to
zdecides whether to drop the packet or attempt to forward it
zupdates markers in the packet for downstream devices to use
zcontrols the relative priorities of the egress queues
In general, the main aim of all the processes in the QoS system is to work out which egress
queue a particular packet should be put into.
There are several factors that can affect this choice of egress queue, so packets need to be
put through several processes, so that each of the competing factors has its opportunity to
exert its influence on the final choice of egress queue.
In some cases, the system can decide to simply discard certain packets at some steps in the
process.
Additionally, the QoS system often has an obligation to update certain fields within a packet,
to indicate to downstream devices how they should deal with the packet when it gets to
them.
So, we have this multi-stage process, and the eventual fate of a packet will depend on the sum
total of the various decisions that were made about it at various stages in the process. In
order to keep track of the outcomes of those decisions, a packet needs to be marked so that
at any point in the process it is possible to know the net effect of the decisions that have been
made on it so far.
Page 3 | AlliedWare Plus™ OS: Overview of QoS
Packet markers
There are four items that are used to mark packets as they pass through the QoS system.
zTwo markers that are carried within fields of the packet itself:
z802.
1
p: The 802.1p or User Priority field in the VLAN tag of an Ethernet frame. This
is a 3-bit number, so it can have a value in the range 0-7.
zDSCP: The Differentiated Services Code Point within the TOS field of an IP packet
header. This is a 6-bit number, so it can have a value in the range 0-63.
zTwo items that are just used within the switch chip. These are not fields within the packets,
but are extra parameters that the packets carry with them as they pass through the QoS
system:
zBandwidth Class: This parameter can take on the values green, yellow, or red.
Essentially it is an indicator of whether the packet is deemed to have been within the
acceptable bandwidth limit set for any particular traffic flow, or whether the packet's
traffic flow had already overflowed its acceptable limit by the time this particular
packet arrived.
A value of green indicates that the flow was within the acceptable limit when the
packet arrived, a value of yellow indicates that the flow was slightly outside its
acceptable limit when the packet arrived, and a value of red means that the flow was
well outside the limit when the packet arrived.
zEgress Queue: This indicates the egress queue that the packet is currently slated to be
placed into, if and when it finally negotiates its way through all the steps in the QoS
process and lines up in one of the queues at its eventual egress port.
Page 4 | AlliedWare Plus™ OS: Overview of QoS
Outline of the QoS processing flow
QoS4.eps
Let's look at each QoS process in the order that they are applied to a packet. The following
figure gives a quick view of the QoS features we are about to discuss.
Packet
Ingress port
Tagged: priority mapped to queue
Ingress
Untagged: mapped to default queue
Classification using ACLs
Premarking
Policing
Remarking
Limiting (dropping non-conformant)
Egress
Queue shaping
Queue emptying and egress
Initial mapping to an egress queue, based on 802.1p
value
Immediately after ingress, a VLAN-tagged Ethernet frame can be assigned to the appropriate
egress queue on the basis of the value of its VLAN Tag User Priority. This means that
incoming frames that already carry meaningful priority information can be forwarded on the
basis of that information. The mapping of the User Priority value to an egress queue is
configurable, so the administrator can decide, for example, to send frames with a Priority
value of 7 to queue 3 and frames with a Priority of 2 to queue 7.
Untagged frames don't have a VLAN Tag User Priority, so these frames can be assigned to a
default queue of the administrator's choice.
The net effect of this process is to set a value on the Egress Queue marker that the packet is
carrying.
Page 5 | AlliedWare Plus™ OS: Overview of QoS
Classification
Classification is simply a method of dividing the incoming traffic into traffic flows so that
packets of one type can be treated differently to packets of another type. To do this, you
create class maps and if desired ACLs. Incoming packets are inspected and may be classified
on a very broad range of criteria.
The classification process does not update any of the four marker values on the packet, but
does dictate the path that the packet will subsequently take through the QoS system.
Premarking
The “pre” part of premarking means this process happens before any bandwidth policing
takes place. The “marking” part refers to attaching QoS information to packets.
One possible use for this is to apply a DSCP value to a traffic stream. For example, packets
coming from a database server could require assured forwarding treatment, and so could be
marked with DSCP=
Recall that packets can be marked in four ways:
zthe VLAN tag user priority
1
8 at ingress to the switch.
zthe Differentiated Services Code Point (DSCP)
zthe bandwidth class the packet is assigned to
zthe egress queue the packet is assigned to.
A packet can have new values assigned for each of these marking values by the premarking
process. There are two mutually exclusive methods available for premarking:
zsetting the new values explicitly for all packets that match a certain class map, or
zlooking up the mark-dscp map and applying the map’s values to the packets. The mark-dscp
map is a user-defined table that maps particular DSCP values to particular sets of 802.
1
p,
DSCP, bandwidth class, and egress queue values. See "Premarking" on page 13 for a table
that shows the mark-dscp map structure.
If premarking uses the mark-dscp map, there are two ways to choose the DSCP value to use
in looking up entries in the mark-dscp map:
zuse the existing DSCP value of the packet (different packets within the class map may well
have different DSCP values)
zspecify a single DSCP value that QoS will use for look-ups for all packets that match the
class map.
Whichever of these two criteria is used, the value is used to index the mark-dscp map.
Page 6 | AlliedWare Plus™ OS: Overview of QoS
Policing
Policing involves measuring the bandwidth used by a policer and comparing the measurement
to the bandwidth limits that have been set for the policer.
The policing process allocates a temporary bandwidth class value to packets. It is important
to note that the policing process does not overwrite the bandwidth class value that the
packet is already carrying around with it. Instead, an extra, temporary, bandwidth class
marker is attached to the packets.
When traffic first enters the switch, it is all marked with bandwidth class green, simply
because it has not been policed yet. Packets can be assigned a new bandwidth class at the
Premarking stage, but this is not done on the basis of actual measurement of bandwidth use.
At the policing stage, a policer's bandwidth usage is constantly monitored to see how well it
conforms to the limits set for it, and the individual packets within the flow are assigned to a
temporary bandwidth class depending on the policer's conformance to its limits at that time.
So, while a policer is still within its bandwidth limit, all the packets that have been classified to
that policer are marked with a temporary bandwidth class of green. If a policer starts to
exceed its limit, then the packets in that policer are given a temporary bandwidth class of
yellow. If it starts seriously exceeding its limits, then the packets’ temporary marking is
bandwidth class red.
The actual algorithms used to determine whether a policer is slightly exceeding its bandwidth
limit or seriously exceeding the limit are described later in this document.
Limiting or remarking (dropping non-conformant
packets)
Based on the temporary bandwidth class assigned to a packet at the policing stage, one of
two actions can be taken:
zthe packet can be dropped if it is was assigned to bandwidth class red by the policing
process, or
zthe packet can be remarked with new QoS property values.
The first of these two actions is straightforward; the user can choose to simply drop packets
if the policer exceeds the bandwidth limits set for it to the extent that packets are assigned
to bandwidth class red.
Remarking is a little more complex as it is not done solely on the basis of the bandwidth class
that the packet has been assigned to; the packet's current DSCP value, and its temporary
bandwidth class are used to determine the new values for all four QoS properties for the
packet (that is, new values for the DSCP, VLAN tag user priority, bandwidth class, and egress
queue can be specified). The new values are taken from the user-configurable policed-dscp
map.
Page 7 | AlliedWare Plus™ OS: Overview of QoS
Queue shaping
Each egress port has eight egress queues, which are numbered 0-7 with 7 being the highest
priority queue. Unfortunately, the queues are of a limited length, so packets cannot be added
to them indefinitely; if the switch is congested, the queues may fill up and no more packets
can be added. In this case, packets will inevitably be dropped from the end of the queues,
even if they are high-priority packets. Queue shaping is a general term to describe how the
egress queues can be managed to prevent the indiscriminate dropping of packets from the
tails of the egress queues.
Queue shaping can use Random Early Detection/Discard (RED). RED is a congestion
avoidance mechanism that allows some packets to be dropped before the average egress
queue exceeds the allocated maximum queue length. Lower priority packets are dropped
when severe congestion occurs, with progressively more and higher priority packets dropped
until congestion is eased. This is useful for TCP flows, because the sender will slow the rate
of transmission when it detects a packet loss. Note that using RED on UDP traffic flows is
not recommended because UDP does not reduce the rate of transmission and will simply
retransmit the dropped packets, which will add to the congestion.
The Random Early Discarding of packets from egress queues will typically be configured to
drop more packets with bandwidth class red than those with bandwidth class yellow, and to
drop even less of the packets with bandwidth class green.
RED curves are not the only queue shaping mechanism available. You can instead choose to
use a relatively simple tail-drop scheme. Using this method, you nominate a queue length at
which any further packets will be dropped. This is done for each of the three bandwidth
classes. Obviously, the queue-length threshold for bandwidth class red should be set at a
relatively low value, with the other bandwidth classes having progressively higher values.
Page 8 | AlliedWare Plus™ OS: Overview of QoS
Scheduling
In addition to managing the way in which packets can be dropped when the egress queues for
a given port start to fill up, you can also configure the method that is used to allocate
bandwidth to each of the queues to transmit packets onto the line.
There are two ways that the queues can be scheduled for transmission:
zStrict Priority Scheduling
Higher-priority queues are emptied before any packets are transmitted from lowerpriority queues. This means that queue 7 must be totally empty before any packets from
queue 6 are transmitted, and so on.
zWeighted Round-Robin Scheduling
The queues share bandwidth on the basis of user-defined weights. Using this method,
packets from a lower-priority queue can be transmitted even when packets are waiting in
a higher-priority queue. The weights can be configured to ensure that more packets per
second are sent from the higher-priority queues than from the lower-priority queues.
To allow for flexibility in scheduling, it is possible to use different scheduling methods for
different queues. For a given port, you can create up to three groups of egress queues, one
that uses Strict Priority Scheduling and two separate groups that each use Weighted RoundRobin Scheduling. For example, consider this case:
zqueues 7, 6 & 5 are configured to use Strict Priority Scheduling
zqueues 4, 3 & 2 are in Weighted Round-Robin group
zqueues
1
& 0 are in Weighted Round-Robin group 2
1
Queues 7, 6 & 5 will be emptied using Strict Priority, that is, queue 7 will be emptied before
any packets from queue 6 can be transmitted and queue 6 must be completely emptied
before any packets from queue 5 are transmitted.
When queues 7, 6 & 5 are all completely empty, queues 4, 3 & 2 will be emptied concurrently
based on their respective weights.
1
Queues
& 0 will be emptied only when there are no packets awaiting transmission in any of
the other queues.
Page 9 | AlliedWare Plus™ OS: Overview of QoS
Details of the component processes, and how to
qos-elements.eps
configure them
QoS elements: policy maps, class maps, policers,
matches
Some aspects of QoS are configured globally, such as default mapping of CoS to egress queue.
However, most aspects are configured on a per-port basis, mostly as part of the port’s policy map.
The policy map contains QoS settings for a port, and is made of class maps—one class map
for each type of traffic you want to control on the port. Class maps have match commands to
specify what traffic the class map applies to, and policers to set the bandwidth parameters for
that type of traffic. Class maps can also have other settings, such as whether to premark
traffic.
The following figure summarises these configuration elements.
Port
policy-map
class-map
matchpolicer
match
class-map
policer
match
class-map
matchmatch
The default class map
Packets that do not match any configured class map are matched by the default class map.
These packets can still be subjected to premarking, policing and remarking. To configure
these features for the default class map, simply go into policy map class map mode for the
default class map, by using the following commands:
awplus(config-cmap)#policy-map <name>
awplus(config-pmap)#class default
Page 10 | AlliedWare Plus™ OS: Overview of QoS
Diagram of the overall QoS process flow
trust dscp (& set dscp)
From L2 switch
class-map
premarking
Look up
mark-DSCP map
Markers updated:
CoS, DSCP,
Bw Class, queue
Tagged packets: set egress queue
based on 802.1p, using
mls qos map cos-queue
Marker updated:
Egress Queue
Policing
Marker updated:
Temporary Bw Class
Drop
red
packets
Routing
Red Curves
Egress Queuing
Untagged packets:
set egress queue based on
mls qos queue and CoS
based on mls qos cos
Markers updated:
Egress Queue, CoS
When using trust dscp alone,
packets must have a DSCP value
for QoS to use to look up the map.
When using trust dscp and set dscp
together, set dscp specifies
the look-up value.
Use user-specified
values
Markers updated:
CoS, DSCP,
Bw Class, queue
setting
set dscp, cos, etc
none
drop
policer
exceed-action
setting
policed-dscp-transmit
Look up
policed-DSCP map
Markers updated:
CoS, DSCP,
Bw Class, queue
green and yellow packets
QoS1.eps
The following figure summarises the QoS process flow and the commands to configure each
stage. The following sections describe the configuration in detail.
Page 11 | AlliedWare Plus™ OS: Overview of QoS
Enabling QoS globally
Before configuring QoS, you need to enable it by entering the following command in global
configuration mode:
awplus(config)#mls qos enable
Initial mapping to queue based on tag
When packets arrive at a port, they are assigned to an egress queue. This is done by the
switch associating an egress queue marker with the packet. For tagged packets, the switch
decides the initial queue setting by looking at the packet’s CoS value (802.
field). For untagged packets, there is a default queue setting, which you can change.
Of course, this is just an initial egress queue value—the QoS processing can change it at the
Premarking (page 13) or Remarking (page 22) stages.
1
p User Priority
Ta g g ed
packets
Untagged
packets
For tagged packets, the default mapping of packet CoS value to egress queue is:
CoS:0
Queue:2
1
234567
11
34567
To change this mapping for a CoS value, enter the following command in global configuration
mode:
awplus(config)#mls qos map cos-queue <cos> to <queue>
You need to enter this command for every CoS that you want to re-map.
To see the mapping, use the following command:
awplus#show mls qos maps cos-queue
For untagged packets, the switch determines the queue by looking at the value of the mls
qos queue command. This is an interface-mode command, so the queue is set on a per-port
basis. The default value is 2.
To change this, first enter interface mode for the desired port and then specify the desired
queue number. Use the following commands:
awplus(config)#interface <port-number>
awplus(config-if)#mls qos queue <0-7>
For example, to set the initial queue to 5 for untagged packets received on port1.0.1, use the
commands:
awplus(config)#interface port1.0.1
awplus(config-if)#mls qos queue 5
Untagged packets are also assigned a CoS value, 0 by default. To change this, first enter
interface mode for the desired port and then specify the desired CoS. Use the following
commands:
Page 12 | AlliedWare Plus™ OS: Overview of QoS
Loading...
+ 28 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.