The Linux Advanced Routing & Traffic Control,
http://www.lartc.org/,
is the place to start. There are also other routes, the Linux Virtual Server project as an example:
http://www.linuxvirtualserver.org/
I know that what you described can be done, but the practical issues can be quite involved, involving some black magic for many of us...
Open a new thread when you have direct and specific questions.