A short introduction about linux and iptables architecture as well as traffic shaping engines in this environment, and relational issues.
A solution is provided by k-shaper, and these slides show a mini how-to.
This is part of my academic training, and it was introduced at HackMeeting in Naples, in 2005.
K-Shaper code is available at: https://github.com/k0smik0/k-shaper