sharing bandwidth download+upload+NAT - [debian]
From: Gaetan (gaetan.semet_at_free.fr)
Date: Sun, 05 Oct 2003 03:37:40 +0200
I use a linux box to share my ADSL (512dw/128up) between some PC on a
LAN (5 persons). I would like to be able to surf html pages and play
games (ie it requieres low ping for these services) while heavy
downloads (emule, bittorrents and other download/upload nibbles).
So i started to look around iptables. I use MASQUERADING to translate
adresses (ip are fixed in my LAN). After reading lot of HOWTO i started
to build some scripts using tc classes.
But the only thing i succeeded to is to share UPLOAD (using qdisc and
filters). I have lot of problems to share DOWNLOAD speed.
What i would like to have is a simple thing: share connexion with ip and
NOT with services. I found lot of scripts which share upload and
download traffic using services (ie 10% for pop, 20% for http (but
hipriority), 30% for emules and clones...).
I tryed with IMQ but it doesn't work: the NAT translation is done AFTER
packets go throught IMQ table (iptables) so iptables doesn't know the
true recipient packets go to. i tried with a kernel patch which should
correct this but it doesn't work.
Now a diagram of what i would like to have :
| ADSL. down 512 kps (60kb), up 128 (16 kb)
| | |
| | |
| | |
| | user 3 : download 170 kps (21 kb), upload 48 kps (5kb)
| user 2 : download 170 kps (21 kb), upload 48 kps (5kb)
user 1 : download 170 kps (21 kb), upload 48 kps (5kb)
i don't want to have these limits to be fixed, but i would like it to
work like HTB should work : unused bandwidth is "lend" to other users...
but i really want it to work for upload AND download. It's very important...
Thanks for you help
PC linux debian sid, kernel 2.4.22
Windows and linux PCs
-- ~~ Gaetan ~~ http://www.xeberon.net