Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Ubuntu server on a router and I'm facing the following problem. If one person starts a download that is able to take all the bandwidth, it does. Which means, all other people start experiencing problems using the internet.

Is there a way (with iptables, tc or whatever) to make the router give higher priority to packets from connections with lower bandwidth? So that this high bandwidth downloads won't overtake other connections.

share|improve this question
up vote 1 down vote accepted

You can tc to shape your traffic. For example, you can set a limit on the allowed download/upload speed to each IP address in the network. There are several queuing options to allow different configurations. Maybe, you can try to use the SFQ (stochastic fair queuing).

For more details, you can look at the advanced Linux routing website and see man tc.

share|improve this answer
I prefer not using limits. Instead, is it possible to have one queue for each connection and the resource is allocated for one queue at a time? I'm not sure if I made myself clear, but I just want all the connections to have equal access to the network. We don't have p2p, so i think a policy like this would work. – Diogo Melo Dec 6 '11 at 22:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.