кривая иерархического добросовестного обслуживания (Hierarchical Fair Service Curve)
CAVEAT: RANDOM ONLINE EXAMPLES
For reasons unknown (though well guessed), many examples you can
google love to overuse UL criterion and stuff it in every node
possible. This makes no sense and works against what HFSC tries
to do (and does pretty damn well). Use UL where it makes sense:
on the uppermost node to match upstream router's uplink capacity.
Or in special cases, such as testing (limit certain subtree to
some speed), or customers that must never get more than certain
speed. In the last case you can usually achieve the same by just
using a RT criterion without LS+UL on leaf nodes.
As for the router case - remember it's good to differentiate
between "traffic to router" (remote console, web config, etc.)
and "outgoing traffic", so for example:
tc qdisc add dev eth0 root handle 1:0 hfsc default 0x8002
tc class add dev eth0 parent 1:0 classid 1:999 hfsc rt m2 50Mbit
tc class add dev eth0 parent 1:0 classid 1:1 hfsc ls m2 2Mbit ul m2 2Mbit
... so "internet" tree under 1:1 and "router itself" as 1:999