You have to use Linux traffic shaper. That's quite advanced thing, not something that "just work". Search this forum for "HTB", you will find discussion about it as well as example script.
On the other hand, you can google for "linux traffic shaper" and find almost same thing.
In both cases you have to understand what are you doing and adapt the script and/or settings for your own environment.