Successfully pass the free certification exam at IW Academy and become an Infinet Certified Engineer.
Description
QoS (Quality of Service) is a convenient and flexible mechanism, allows to manipulate data streams going through the device. Allows to 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 [no]rtp [no]dot1p [no]dscp [no]tos [no]tcpack [no]icmp [no]strict [no]tunnel [no]pppoe [no]mpls [no]selfqos [no]auto [no]ipfw classN {max=N} | {clear} chN [max=N[%]|0] [classN] [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]] [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] ...
CAUTION
Parameter values shall be put after their keywords (if any) without blanks, as shown above; no blank may be put before or after "=".
Parameters
Parameter | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
option [no]rtp [no]dot1p [no]dscp [no]tos [no]tcpack [no]icmp [no]strict [no]tunnel [no]pppoe [no]mpls [no]selfqos [no]auto [no]ipfw | Allows automatic prioritization management of data flows on the device.
A compliance scheme of MINT and IEEE 802.1p/TOS/DSCP priorities is shown below:
For example, the unit is configured to automatically prioritize packets labeled with IEEE 802.1p priority. The node receives packets labeled with IEEE 802.1p priority "5" and assign them "VOICE" priority. In accordance with the priorities scheme, these packets will be processed before packets with other priorities. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
classN {max=N} | {clear} | Сreates a service class "N". It is used for dynamic bandwidth allocation between different channels.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
chN [max=N[%]|0] [ceil=N[%]|0] [ceilprio=N|0] [latency=N|0] | Defines a logical channel "N" with properties specified by one or more options.
NOTE For all auto-prioritization functions the "addpri" argument must be used. Thus, priorities will be set in the following order:
The same order will be applied for outgoing packets if corresponding rules are configured.
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.
NOTE If several of the above parameters are specified in the same command then rate limitation is applied first then redirection and priority last. If "vlan" and "dot1p" parameters are specified in the same command then "vlan" is processed first. Each channel can be assigned a priority (0…16). Once assigned, a priority will be automatically recognized by every node inside MINT network.
Packets that have no priority are labeled as "REGULAR Best Effort=15" and processed accordingly. Packets classification can also be performed using "pcap" rules. CAUTION Real prioritization within MINT network is conducted by priority, given by "pri=N" parameters. A DSCP label is transparently transmitted through the MINT network in any mode. A 802.1p priority is transparently transmitted only in switch mode of the MINT network. If necessary, for packets leaving the MINT network required "dot1p" and "dscp" parameters can be assigned by the operator. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stat [full] [clear] | Displays statistics of the specific channel (only for channels with specified rate limitation):
qm ch1 max=128 cur=127 packets=12345 (1234) bytes=1234567 (12345) 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). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
del RULE_NUMBER | Deletes the specified rule from the list. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dump RULE_NUMBER | Displays the compiled pseudo-code of the PCAP rule. Allows to check visually the complexity / optimality or the correctness of the rule. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mov RULE_A RULE_B | Changes the number of the rule from "A" to "B". | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rearrange [STEP] | Renumbers all rules with the given increment "STEP" (default is 5). The "config show" command displays rules number. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
add[out] [NUM] [IFNAME] chN rules.. | Allows to add an ingress/egress packet to / from the device that satisfies the channel "N" rule.
NOTE All manipulations with packet headers, for example changing of dscp and 802.1p label, are possible only by using the "qm addout" command, i.e. only for leaving the device packets. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rules: [{setpri|addpri}=[N]] [pass] | The rules syntax fully corresponds to the syntax of the "ipfw" command (see "ipfw command (IP Firewall)" section). NOTE Each packet passing through the system is checked if it matches rules strictly in order, from the first to the last, until there is a rule that satisfies the properties of the packet.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PROTO from [not] ADDR [PORTs] to [not] ADDR [PORTs] | Specify a direction of transmission from and / or to:
Possible options: nn.nn.nn.nn nn.nn.nn.nn:xxx.xxx.xxx.xxx nn.nn.nn.nn/NN The "0/0" record includes all possible IP-addresses. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PROTO: [all] | tcp | udp | icmp | arp | proto NUMBER | The limitation is based on the compliance with a certain protocol. Possible values: TCP, UDP, ICMP, ARP or numeric value of the protocol. ARP-packets are allowed for all IP-addresses and for ranges of IP-addresses, which are specified in the permit filters, even if these filters are created for other types of packets. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ADDR: IP | $LOCAL | $ROUTE | $ACL | mac x:x:x:x:x:x } | It is possible to group all the necessary addresses into the appropriate access list and set the name of this list as an IP-address ($ACLRULE). There are several predefined dynamic lists:
NOTE Rules that use MAC-addresses for ingress packets will be processed before all the other rules, and rules for egress packets will be processed last. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PORTS: NUM[:NUM] [NUM] ... | Filters traffic by port numbers. It is possible to use a list of ports to specify multiple ports in one command. The first item of the list of ports can specify a range of numbers from smaller to greater, separated by a colon. |
Examples
Limit all outgoing traffic on the subscriber terminal to 64 Kbps. qm ch1 max=64 qm add eth0 ch1 all from 0/0 to 0/0 |
Set to the "1.1.1.0/24" network traffic higher priority than for all other data streams. 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 |
Set to the "1.1.1.0/24" network traffic lower priority than for all other data streams. Take attention on the rules order. The last rule that each packet meets should be at the end of the list. 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 |
Network subscribers:
In case of more complicated topology when providers routers are not reachable from this node, it is necessary to configure tunnels to providers first, then make redirection. 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 |
Disable automatic prioritization of real time packets and enable automatic prioritization of packets labeled with TOS. qm option –rtp tos |
Increase the priority of all packets to the value "N" in case if "N" is higher than the current priority. qm ch1 addpri=N |
Set the priority level "N" to all packets. qm ch1 setpri=N |
Channel 1 resets DSCP labels and 802.1p priorities. qm ch1 dscp=0 dot1p=-1 |
Channel 2 sets the "QM_PRIO_BUSINESS1" priority and DSCP 31 label. qm ch2 pri=9 dscp=31 |
Pass all traffic through channel 1 to reset all priorities. qm add ch1 pass all from 0/0 to 0/0 |
Forward TCP part of the traffic to the channel 2. qm add ch2 tcp from X.X.X.0/24 to 0/0 Forward the UDP part of the traffic to the channel 3. qm add ch3 udp from X.X.X.0/24 PORT to 0/0 The remaining traffic will be processed as a non-priority and directed to the channel 4. qm add ch4 all from 0/0 to 0/0 |
Set 802.1p priority to packets from channel 25. qm ch25 dot1p=5 |
Set 802.1p priority and VLAN ID for channel 26. The VLAN header will be added automatically in case it is missing. qm ch26 vlan=7 dot1p=4 |
Forward egress packets assigned to the "eth0" interface and labeled with the DSCP 11, to the channel 25. qm addout eth0 ch25 dscp=11 from 0/0 to 0/0 |
Forward egress UDP packets assigned to the "eth0" interface to the channel 25 and label them as DSCP 51. qm ch25 dscp=51 qm addout eth0 ch25 udp from 0/0 to 0/0 |
The example of using PCAP filters for packet classification: all ICMP-traffic will be added to the channel 5 directed from or to nodes "1.1.1.1" and "1.1.1.5". qm add ch5 –f “icmp and host (1.1.1.1 or 1.1.1.5)“ |
The example of using service class. qm class1 max=1000 qm ch1 max=200 ceil=1000 class1 qm ch2 max=400 ceil=1000 class1 qm ch3 max=100 ceil=300 class1 qm ch4 max=200 ceil=300 class1 As a result of these commands the hierarchy as in the picture below will appear: ![]()
|