I am trying to apply the htb algorithm to packets coming into my network. The openwrt docs had a great example on how to apply that algorithm to the output stream and I am trying to modify it to send it to the input stream.
This is the command that is doing it. The -o option is the output and i tried to switch it to the -i for input, but it wouldn't work. I also tried to switch around the POSTROUTING with PREROUTING and INPUT and none of those combos work.
$IPT -t mangle -A POSTROUTING -o $IF_DSL
Help would be greatly appreciated. Also, here is the link to the example code I followed. HTB Example
Have you looked at the SQM scripts, either as a package, or from the source?
I haven't, is that an easier route to implementing a simple htb traffic shaping algorithm?
Many people find the use of the SQM scripts to meet their bandwidth-shaping needs, especially with some of the "more sophisticated" approaches available (such as "CAKE").
It seems like the biggest challenges people face are not with the implementation and tuning of the algorithms, but with having sufficient CPU power to be able to shape at high rates (over 100-200 mbps for many MIPS-based routers).
Ok that makes sense, I'll look into it. In the mean time, do you know how to switch up the iptables mangle command to an input? That would give me a quick implementation that I can change later by adding the SQM script
There are no Qdiscs on input in Linux, only policing. SQM copies packets to an IFB device, but this happens before iptables. Start with SQM and come back if the point and click Luci config isn't enough.