What it is for
Quality of Service decides which traffic goes first when a line is full: voice before backup, video calls before updates. It is set per interface and per direction: each interface can have one rule on egress and one on ingress. The rule goes into the kernel at the save, without “Apply”.
The scenario Priority for VoIP and a cap on backup traffic builds a complete rule for John Smith Ltd.
How it works
Each rule has a line speed and a priority ladder: one class per kind of traffic, each with a guaranteed rate, an optional ceiling and the ports that identify it.
- The ladder is sorted by guaranteed rate, from the highest to the lowest: the class with the highest guaranteed rate is the one with the highest priority and carries the “Priority” label. So choose the guaranteed rates bearing in mind the order that results from them as well.
- Each class always has at least its guaranteed rate; as long as the line is not full, it can also take what the others leave free, up to its ceiling or, without a ceiling, up to the line speed.
- Traffic that matches no class ends up in the default class: 256 kbit/s guaranteed and, up to the line speed, the bandwidth the other classes leave free. It is the last in order of priority.
Tip Priorities work only if the queue forms on the appliance and not in the modem. That is why the “Line speed” must be set a little below the contract’s real speed in that direction (for a fibre with 20 Mbit/s of upload, for example 19000 kbit/s on egress). With 0 there is no overall limit and only the classes’ ceilings remain.
How the page is laid out
The list shows for each rule the interface, the direction (“Egress” or “Ingress”), how many classes it has, the guaranteed rate of the first class, the description and the state. The bar holds “Reload” and “Add shaping rule”; the detail “Delete rule”, which asks “Delete the shaping rule on eth0?”. The detail’s title is, for example, “Quality of Service / eth0 · Egress”.


The rule’s fields
- “Direction” — “Egress” or “Ingress”. The same interface can have one rule for each direction.
- “Interface” — the appliance’s cards, VLANs and PPPoE links, with the zone in brackets (for example “eth0 (WAN)” or “ppp0 (WAN)”).
- “Description” — optional; it also appears on the Status page.
- “Line speed (kbit/s)” — 0, or from 1 to 10000000 (10 Gbit/s). 0 means “not given”.
- “Enabled” — off, the rule stays saved and leaves the kernel.
On a PPPoE link the rule is built at every session: the pppN device
exists only while the session is up, and every new session is a new device.
If the session is up, the save installs the rule at once; if it is down, the
rule stays saved and the next session installs it.
Below, the “Priority ladder”: one row per class, with name, a bar proportional to the guaranteed rate, “N kbit/s” and any “ceil”. A new rule starts with an example class, “Voice” at 5000 kbit/s: rename it, edit it or remove it. “Add priority” opens the window of a new class; a click on a row opens the one of the existing class.
The classes
The window (“Add priority” or “Edit class”) asks for:
- “Name” — required, for example “Voice” or “Backup”.
- “Guaranteed rate (kbit/s)” — from 1 to 10000000. It also decides the position in the ladder.
- “Ceil (kbit/s)” — the ceiling: 0 means no ceiling, up to the line speed; if you set it, it must be at least equal to the guaranteed rate and, if you gave the line speed, not exceed it.
- “Egress ports” (in an ingress rule “Remote service ports”) — a
list of ports or ranges, separated by commas (
5060,10000-10010). In an egress rule they are the destination ports; in an ingress rule the ports of the remote service the traffic comes from (80,443,1935). It applies to TCP and UDP. 32 ports per class at most, counting one by one those of the ranges.
The window’s buttons are “Add” (new class) or “Save” (existing class), “Cancel” and, for an existing class, “Remove class”. Here “Add” and “Save” put the class into the form’s ladder and nothing more: the rule goes into the kernel only when you press “Create rule” or “Save rule” (“Rule applied” appears).
A rule has from 1 to 16 classes. The sum of the guaranteed rates, plus the 256 kbit/s of the default class, cannot exceed the line speed.
Example for John Smith Ltd’s fibre, on egress on eth0,
“Description” Fibre, 20 Mbit/s upload, “Line speed (kbit/s)”
19000 (it is the egress rule of the VoIP scenario):
| Class | Guaranteed rate | Ceil | Egress ports |
|---|---|---|---|
| Voice | 3000 | 0 | 5060 |
| Web | 2000 | 12000 | 80,443 |
| Backup | 1000 | 4000 | 873 |
Voice has the highest priority (largest guaranteed rate); web has 2 Mbit/s guaranteed and never goes beyond 12; backup has 1 Mbit/s guaranteed and never goes beyond 4; everything else goes into the default class, which thus always finds the bandwidth that web and backup leave free.
Ingress
On ingress the appliance cannot stop the traffic from arriving: it can only slow down what has already arrived, and the senders adapt. It works well with TCP (downloads, video), less well with flows that do not slow down by themselves. At most 16 interfaces can have an active rule on ingress.
Messages
| Message | What it means |
|---|---|
| “A rule for this direction already exists on this interface” | Edit the existing one. |
| “At most 16 interfaces can shape incoming traffic” | Limit of the ingress rules reached. |
| “At least one class is required” / “Max 16 classes” | Number of classes out of bounds. |
| “The line speed must be 0 or 1-10000000 kbit/s” | Value not valid. |
| “The guaranteed rates, plus the default class’s 256 kbit/s, exceed the line speed” | Lower the guaranteed rates or raise the line speed. |
| “Rate must be 1-10000000 kbit/s” | Guaranteed rate not valid. |
| “Ceil must be 0 (off) or >= rate” | Ceiling lower than the guaranteed rate. |
| “Ceil cannot exceed the line speed” | Ceiling beyond the line. |
| “Ports must look like 5060,10000-10010” | List of ports badly written. |
| “Max 32 ports per class” | Too many ports, ranges included. |
If the kernel refuses a step, “Applying the rule failed” appears, followed
by tc’s message.
The state on the Status page
The System status → Status page has a tile for each active rule.


- The title gives the interface, the zone and the direction (“eth0 · WAN · Egress”), with a green dot if the rule is active in the kernel and red if it is not; grey for a rule on a PPPoE link whose session is down.
- Below, the rule’s description (or “Traffic priority”); if the rule is not in the kernel, “Not active in the kernel”; on a PPPoE link without a session, “Waiting for the PPPoE session”.
- One bar per class, in the ladder’s order, and last “Unclassified” (the default class): the share of the traffic that went through each class since the rule was installed, with the bytes. “Dropped N” indicates packets dropped because the class was full.
- “Open Quality of Service” leads to this tab.
If an active rule is not in the kernel, the “Attention” strip shows “Traffic priority on eth0 is not active in the kernel: save its QoS rule again”. Open it again: the form says “This rule is not active in the kernel: ‘Save rule’ builds it again as it is.”, and “Save rule” is enabled even without a change; the save reinstalls it. A rule on a PPPoE link waiting for its session does not appear in the strip: the link itself shows the state of the session.
For the technician Each rule is an HTB tree built with
tc. On egress it sits on the card itself; on ingress Argos creates an ifb device (argos-ifb0,argos-ifb1…, reserved names), redirects the incoming traffic there with amirredfilter on theingressqdisc and builds the ladder on the ifb’s egress, matching the source port instead of the destination port. The tree, for the example above:tc qdisc del dev eth0 root tc qdisc replace dev eth0 root handle 1: htb default 10 tc class replace dev eth0 parent 1: classid 1:1 htb rate 19000kbit ceil 19000kbit quantum 200000 tc class replace dev eth0 parent 1:1 classid 1:10 htb rate 256kbit ceil 19000kbit prio 7 tc class replace dev eth0 parent 1:1 classid 1:11 htb rate 3000kbit ceil 19000kbit prio 0 tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dport 5060 0xffff flowid 1:11 tc class replace dev eth0 parent 1:1 classid 1:12 htb rate 2000kbit ceil 12000kbit prio 1 tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dport 80 0xffff flowid 1:12 tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dport 443 0xffff flowid 1:12 tc class replace dev eth0 parent 1:1 classid 1:13 htb rate 1000kbit ceil 4000kbit prio 2 tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dport 873 0xffff flowid 1:131:10 is the default class, 1:11 and onwards the ladder in order of priority; without a line speed the parent 1:1 is at 10 Gbit/s. Every rebuild deletes the qdisc first (
tc qdisc del … root/… ingress). The rules becomeup/downhooks in the stanzas Argos manages and theargos-networkboot pass reinstalls them all, even on the interfaces Argos does not manage. The rules of a PPPoE link are built at every session by pppd’s hook/etc/ppp/ip-up.d/argos-shaping, with the same commands.