Norberto Bensa wrote:
Is there a straightforward way to make my Gentoo box 'play fair' and
not hog 100% of the bandwidth?
If your router doesn't give you bandwidth and/or traffic shaping
control, you can drop some packets. For example, the following rule
will accept up to 50 packets per second and drop the rest. The TCP
protocol will retry and slow down.
iptables -I INPUT -p tcp -m limit --limit 50/sec -j ACCEPT
iptables -I INPUT -p tcp -j DROP
Hmmm - that would likely be rather aggressive - I use the router to
shift data between the two PCs at 100mbps - it is only the traffic
eventually routed over ADSL which poses a problem.
Does anyone else have this problem?
Yes, everyone using TCP :)
You can read Linux Advanced Routing and Traffic Control for more info
(http://lartc.org/).
Snappy answer... but I'm pretty sure I've never seen this before - on a
wide range of OS and network topologies. I didn't have the same problem
with two Windows PCs connected to the same router - and it is always the
Gentoo box that "wins" in the landgrab-war for bandwidth.
It might also be worth mentioning that the Gentoo box serves DNS for my
LAN - so, the DNS request will get from my Windows PC to my Gentoo box
without any problem... so, it is actually a fight between bind on gentoo
and the download of packages during emerge that pose my annoyance. I
wonder, is it likely relevant that named is running as an ordinary user
- while emerge is run as root?
I also noticed that incoming emails to my postfix mail server timed out
during this period... "timeout after RCPT from extern.server.org"...
It seems odd to me.