Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is there an easy way to prioritize network traffic?
I've tried to read up on tc, but I don't really get it. It took me ages to figure out iptables and tc doesn't seem to make things any easier.
Basically, I want a very simple setup... I have a linux box that acts as my router (it's also a firewall, dbserver, and file server).
For traffic shaping, I basically want 2 classes of traffic. 1 class is pretty much everything and the other class would be traffic for a single app. I would want the traffic for that app to have priority over everything else. It's a fairly low-bandwidth app, but latency affects performance. I'd like to be able to let other apps that use the net continue to run, if possible and let them use up as much of the rest of the bandwidth as they want without disturbing this app.
I believe I still need tc. I believe the default handling is for packets to be processed in a FIFO, or as the tc documents call it, PFIFO, or pure-first in, first out queue.
I believe what I need to do is the mangle to set the TOS and then use TC to do a PRIO qdisc.
But I don't know specifically the steps to do this and have not been able to divine it from the docs.
true - the default traffic handling is FIFO. but by using tc - you will be forced to specifically reserved certain amount of BW for your app (or host) - is that what you need?
using -m mark or TOS --> your priority will be first to be deliver.
I was just reading up on traffic shaping and found that thread - I know its old, but still:
Sorry - but I have to disagree with rossonieri#1
With iptables you can set marks of all kinds - but that does not change how the traffic is handeled.
Default is fifo
To change that - you need to use tc - and attach the qdisc you like/need/fits best - or even leave it at fifo
AFAIK only tc can put iptables marks to a use - sort the traffic according to those marks into the different qdiscs.
Without tc you can use those marks to do all kinds of things to packets - but would not change the qdics and the order and priority in which packets are sent out.
tc does not need iptables - but I find it a lot easier to use the iptables capabilities to mark packets by certain criteria and then use this mark in tc.
Only with tc will pdavis68 be able to prioritize his app.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.