I'm not sure if it supports this complex of bandwidth management, but
cbq.init is a good place to begin with bandwidth management.
If you'd rather get a bit more hands on, definitely look into the
Linux Advanced Routing & Traffic Control HOWTO. They cover traffic control in
extremely great detail. In particular, take a look at the section on
CBQ. If that gets too tricky [which it most certainly will], take a look at the
Heirarchial Token Bucket [HTB]. It is widely regarded as a much simpler version of CBQ.
Let me know if there's anything else I can help with!