Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The command manages the “Quality of Service” (QoS) parameters.

General description:

QoS manager is a convenient and flexible mechanism to manipulate data streams going through the device. The user can create up to 200 logical channels characterized by different properties (such as priority levels and data transfer rates), and then assign data streams to these logical channels according to special rules of assignment. Packets going through different channels are thus modifying their own properties as well as properties of their respective data flows.

Syntax:

option {[-]rtp [-]dot1p [-]tos [-]tcpack [-]icmp [no]strict} [no]tunnel

 

classN {[max=N] [ceil=N] [ceilprio=N] [parent=N]} | {clear}

 

chN [max=N[%]|0] [ceil=N[%]|0] [ceilprio=N|0] [latency=N|0]

    [[add]pri=[N] | setpri=[N]] [[no]strict]] [pps=N|0] [to=ADDR]

    [vlan=[N|-1]] [dot1p=[N|-1]] [dscp=[N|-1]] [classN] [info="STRING"]

    clear

 

stat [full] [clear]

del  RULE_NUMBER

dump RULE_NUMBER

mov  RULE_A RULE_B

rearrange [STEP]

add[out] [NUM] [IFNAME] chN rules...

 

rules: [{setpri|addpri}=[N]] [pass]

   [vlan={N|any|$ACL}] [dot1p=N] [swg=N] [ether={X|any}] [dscp=N|tos=N] [prf]

   -f "pcap filter expression"

   |

   PROTO from [not] ADDR [PORTs] to [not] ADDR [PORTs]

 

   PROTO: [all] | tcp | udp | icmp | arp | proto NUMBER

   ADDR: IP | $LOCAL | $ROUTE | $ACL | mac x:x:x:x:x:x }

   PORTS: NUM[:NUM] [NUM]

  • "N,L,X,P,R,S,T" are integers
  • "addr" is an IP-address
  • "rule" is a packet filtering rule with the same syntax as in the "ipfw" command.

CAUTION

Parameter values shall be put after their keywords (if any) without blanks, as shown above; no blank may be put before or after "=" sign.

qm classL max=N

This command creates a service class #L. It is used for dynamic bandwidth allocation between different channels. The “max = N” option defines the total bandwidth of the class that will be limited to a given value (thousands bps).

To delete the class:

qm classL clear

You can create a hierarchy of service classes where a "parent" class is used for the dynamic allocation of its bandwidth between its subsidiary classes. To do this "[ceil=N] [ceilprio=N] [parent=N]" parameters are used. The use of "[ceil=N] [ceilprio=N]" parameters is the same as in "qm chN" command. "[parent=N]" parameter defines "parent" class for the current class, where N – is a value of a "parent" class.

qm chN [max=N[%]|0] [[ceil=N[%]|0] [ceilprio=N|0] [latency=N|0] [pri=P] [[no]strict]] [pps=N|0] [to=addr] [vlan=N|-1] [dscp=N|-1] [dot1p=N|-1] [classL] [info="STRING"]/ clear

This command defines a logical channel #N (N=1…200) with properties specified by one or more command options as follows:

  • "max=N[%]" - sets maximum data rate for the channel in Kbit/s. Value range: from 10 to 100000. It is also possible to set it in per cent (max=N%) of the parent class’ total bandwidth. If set to 0, cancels any speed limitation for the channel
  • "classL" - assigns service class #L to the channel. This additional parameter relates to the above defined data rate limitation, making it flexible: when the total bandwidth of this service class is not fully used, the extra bandwidth may be granted to such channel, thus exceeding its predefined data rate limit, up to full load of the class. When, there are several such channels competing for extra bandwidth, it is equally divided between them. (See examples below).

CAUTION

Exception: on the H02 platform, if there are several channels competing for extra bandwidth of their parent class, the bandwidth is divided between them proportionally to their respective predefined data rate limits.

  • "ceil=N[%]" - determines how much of the total bandwidth of the parent class L can be used by the channel when the class’  bandwidth is not used entirely. Measured either in kilobits per second or per cent (ceil=N%) of the parents class’ total bandwidth. To disable the parameter set its value to 0
  • "ceilprio=N" - sets priority for the channel that is used when interface bandwidth can be used by several channels. There are 17 priorities from 0 (the highest) to 16 (the lowest). Default value is 0 therefore when setting another value it is possible only to lower the priority
  • "latency=N" - determines the maximum time for the packets to stay in the channel. If a packet is waiting in a queue of the channel more than this time then it is discarded. Measured in milliseconds. To disable set the parameter to 0
  • "pri=P" - sets priority level of the specified channel (0…16). Smaller values correspond to greater priority levels. Two special values are available: “-1” – sets the lowest priority, “-2” - deletes the prioritization from the logical channel
  • "[no]strict" - please see the “strict” option description in the “Qm option” section below
  • "pps=N" - sets the limit for the packets per second for the specified channel. To disable set the parameter to 0
  • "to=addr" - redirects the whole stream to the specified IP-address irrespectively of the present routing conditions. The specified address shall be directly attainable through one of the router interfaces (without additional routing). This may be useful when the router serves as a network access unit, and two or more different clients want to access different providers through one unit
  • "vlan=N, dot1p=N, dscp=N" - manipulates DSCP and/or 802.1p labels. Value “-1” deletes the parameter:
    • DSCP (valid values are 0-63) sets to 0 (zero).
    • 802.1p priority (valid values are 0-7) sets to 0 (zero) and, if VLAN ID isn’t introduced, is deleted with VLAN header.
    • VLAN ID (valid values are 0-4095) is deleted with VLAN header regardless of 802.1p priority.
  • "[info="STRING"]" - allows user to set up a string description for the QoS channel.

If several of the above parameters are specified in the same command then speed limitation is applied first then redirection and only then priority. If "vlan" and "dot1p" parameters are specified in the same command then "vlan" is processed first.

qm chN clear

Cancels the N-th logical channel current specification, making its number free for another specification.

qm add[out] [num] [ifname] chN [pass] rule ...

Specifies one or more rules for accepting incoming packets at the channel #N. When used with optional parameter "out (addout)" it specifies the rules for outgoing packets. Rules are specified using the same syntax as in the "ipfw" command.

Optional "ifname" parameter specifies the device's interface through which a packet shall arrive for being accepted at the specified channel.

All rules specified on a device constitute a numbered list; a rule is added at the end of this common list at the moment when it is specified for some channel, and then may be moved to another position (see below). To display the list of all rules with their numbers, use the config show command.

The optional "num" parameter may be used to explicitly specify the number of the new filter in the list.

Each packet arriving to the device is checked against the set of rules in the order of their enumeration, until a rule is found which the packet satisfies, or until the end of the list of rules is encountered. Once such a rule is found, the packet is directed to the channel corresponding to the rule, without checking it against the remaining rules in the list (if not using "pass" parameter). Therefore, the order of rules is very important for correct dispatching of packets among channels.

Optional “pass” parameter allows a packet to pass a rule executing the related actions of this rule and continue with other rules in the list.

  • "qm stat [full] [clear]" command displays statistics of the specific channel (only for channels with specified speed limitation). “Full” option allows viewing enhanced statistics. “Clear” option zeroizes the statistics.

NOTE

The “Qm stat” command displays PPS (Packets Per Second) statistics only if the limit for the packets per second is set for the specified channel (qm chN pps=N).

qm del RULE_NUMBER

This command deletes the specified rule from the list.

qm RULE_A RULE_B

Change the number of the rule from A to B.

qm rearrange [N]

Renumbers all the rules with the given increment (default is 5).

Transparent packets prioritization is supported in MINT network. It is performed by using channels management in "qm" command. Administrator can put streams into different channels based on "qm/ipfw" rules as well as "tos" and "dscp" fields.

qm ch1 pri=12
qm add ch1 all from x/x to y/y
qm add ch1 dscp=31 all from a to b
qm add ch1 dscp=42

Each channel can be assigned a priority (0…16). Once assigned, a priority will be automatically recognized by every node inside MINT network.

ChannelPriority
QM_PRIO_NETCRIT  0
QM_PRIO_VOICE 1
QM_PRIO_VOICE2 2
QM_PRIO_VIDEO  3
QM_PRIO_VIDEO24
QM_PRIO_QOS15
QM_PRIO_QOS26
QM_PRIO_QOS3 7
QM_PRIO_QOS48
QM_PRIO_BUSINESS19
QM_PRIO_BUSINESS210
QM_PRIO_BUSINESS311
QM_PRIO_BUSINESS4 12
QM_PRIO_BUSINESS5  13
QM_PRIO_BUSINESS614
QM_PRIO_REGULAR15
QM_PRIO_BACKGROUND16
Table - Priority scheme

Priorities "1" and "2" are additionally processed as "voice". Packets that have no priority set receive QM_PRIO_REGULAR=15 and processed accordingly.

"Qm option":

qm option {[-]rtp [-]dot1p [-]tos [-]icmp [-]tcpack [-]strict}[no]tunnel
  • allows automatic prioritization management of data flows in the device. Command options "[-]rtp [-]dot1p [-]tos [-]icmp [-]tcpack" enable/disable automatic prioritization of real time packets, packets labeled with IEEE 802.1p priority (below is a compliance scheme of MINT and IEEE 802.1p priorities), packets labeled with TOS, ICMP (Internet Control Message Protocol) packets, TCP ACK (acknowledgments) packets.
  • "[-]strict" option means that "Strict Priority" policy is applied to all queues, otherwise (by default) "Weighted Fair Queuing" policy is used. "Strict Priority" policy is when packets from queue with lower priority are not processed before queue with higher priority is not empty. "Weighted Fair Queuing" policy is when even if higher priority queue is not empty packets from other queues will be processed in a distinct sequence relative to a higher priority queue. For example, 4 package from queue with priority 1 - 1 package from the queue with priority 2, 8 packages from queue priority 1 - 1 package from the queue with priority 3.
  • "[no]tunnel" option enables/disables automatic packet prioritization for tunnel traffic. Default setting is disabled.
MINTIEEE 802.1p
QM_PRIO_REGULAR0 BE Best Effort
QM_PRIO_BACKGROUND1 BK Background
QM_PRIO_BUSINESS12 EE Excellent Effort
QM_PRIO_QOS13 CA Critical Applications
QM_PRIO_VIDEO 4 VI Video
QM_PRIO_VOICE5 VO Voice
QM_PRIO_NETCRIT6 IC Internetwork Control
QM_PRIO_SYS17 NC Network Control
Table - Compliance scheme of MINT and IEEE 802.1p priorities

For example, the unit is configured to automatically prioritize packets labeled with IEEE 802.1p priority. The node receives a package labeled with IEEE 802.1p priority, "5 VO Voice". The node will assign him “QM_PRIO_VOICE” priority and in accordance with the priorities scheme, this package will be processed before packets with other priorities.

Another way to perform packet marking is to use "pcap" rules.

Real prioritization within MINT network is conducted by priority, given by the option "pri=N".

DSCP label is transparently transmitted through MINT in any of its modes.

802.1p priority is transparently transmitted only in switch MINT mode.

If necessary, when leaving MINT network dot1p and "dscp" parameters can be assigned by the operator. 

QoS Manager allows enough flexibility for prioritizing and remapping traffic (see examples below).

Examples,

qm ch1 max=64
qm add eth0 ch1 all from 0/0 to 0/0

When used on a client unit, sets the data rate for outgoing traffic at 64 Kbit/s limit.

qm ch1 pri=5 qm add ch1 all from 1.1.1.0/24 to 0/0
qm add ch1 all from 0/0 to 1.1.1.0/24

Establishes for the traffic from or to 1.1.1.0/24 network the highest priority over all other data flows.

qm ch1 pri=5
qm ch2 pri=10
qm add ch2 all from 1.1.1.0/24 to 0/0
qm add ch2 all from 0/0 to 1.1.1.0/24
qm add ch1 all from 0.0 to 0/0

The 1.1.1.0/24 network traffic will have the lowest priority as compared to other data flows. Please note the order of rules in the above list. The last rule, which is satisfied by any packet, may only be at the end of the list.

qm ch1 to=10.10.10.10
qm ch2 to=20.20.20.20
qm add ch1 all from 1.1.1.0/24 to 0/0
qm add ch2 all from 2.2.2.0/24 to 0/0

Subscribers of the 1.1.1.0/24 network will be serviced by the 10.10.10.10 provider, while the 2.2.2.0/24 subscribers will use the 20.20.20.20 provider.

In more complicated situations, when the routers of service providers are not directly accessible from the given node, one would better start with defining tunnels to those providers, and then redirect traffic to those tunnels.

qm option –rtp tos

This command disables real time packets automatic prioritization and enables TOS automatic prioritization.

Priority can also be changed using the following commands:

qm ch1 addpri=N

All packets in channel 1that have priority less than N would be upgraded to N

qm ch1 setpri=N

All packets in channel 1 will have priority equal to N

Example of traffic prioritization and remapping:

Channel 1 disables DSCP labels and 802.1p priorities

qm ch1 dscp=0 dot1p=-1

Channel 2 sets flow priority QM_PRIO_BUSINESS1 and DSCP label 31

qm ch2 pri=9 dscp=31

Channel 3 sets flow priority QM_PRIO_VIDEO and DSCP label 11

qm ch3 pri=3 dscp=11

Channel 4 sets flow priority QM_PRIO_BUSINESS8 and DSCP label 51

qm ch4 pri=16 dscp=51

All the traffic is coming through channel 1 for setting all priorities to null

qm add ch1 pass all from 0/0 to 0/0

Some traffic is setting into channel 2

qm add ch2 tcp from X.X.X.0/24 to 0/0

Another part of traffic is setting into channel 3

qm add ch3 udp from X.X.X.0/24 PORT to 0/0

Other traffic will be processed as non-priority traffic or can be appointed with some priority by setting into channel 4

qm add ch4 all from 0/0 to 0/0

Channel 25 sets 802.1p packet priority. If there is no VLAN heading it will be added automatically.

qm ch25 dot1p=5

Channel 26 sets 802.1p priority and VLAN ID. If there is no VLAN heading it will be added automatically.

qm ch26 vlan=7 dot1p=4

Packets which are coming from MINT network through eth0 interface and having DSCP label 11 is put into channel 25.

qm addout eth0 ch25 dscp11 from 0/0 to 0/0

Packets which are coming from MINT network through eth0 interface and having DSCP label 13 is put into channel 26.

qm addout eth0 ch26 dscp13 from 0/0 to 0/0

The following example describes pcap rules usage for traffic marking. All ICMP traffic from/to hosts 1.1.1.1 and 1.1.1.5 will be assigned to channel 5

qm add ch5 –f “icmp and host (1.1.1.1 or 1.1.1.5)“

Example of using a hierarchy of service classes:

Figure - Example of using a hierarchy of service classes
qm class1 max=1000
qm class2 max=600 ceil=1000
qm class3 max=300 ceil=1000 ceilprio=1
qm ch1 max=200 ceil=1000 class2
qm ch2 max=400 ceil=1000 class2
qm ch3 max=100 ceil=300 class3
qm ch4 max=200 ceil=300 class3

The result of these commands are a hierarchy of service classes (see figure) where channels (Ch1 and Ch2), members of the Class2, have a higher priority to use a bandwidth of 1000 kbps then channels (Ch3 and Ch4), since Class2 is of higher priority than Class3. 

  • No labels