sharing bandwidth download+upload+NAT - [debian]

From: Gaetan (gaetan.semet_at_free.fr)
Date: 10/05/03


Date: Sun, 05 Oct 2003 03:37:40 +0200

Hello

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 :

internet
   |
   | ADSL. down 512 kps (60kb), up 128 (16 kb)
   |
   |
linux server
| | |
| | |
| | |
| | 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

Server:
PC linux debian sid, kernel 2.4.22
iptables 1.2.8

users:
Windows and linux PCs

-- 
~~ Gaetan ~~
http://www.xeberon.net


Relevant Pages

  • Re: sharing bandwidth download+upload+NAT - [debian]
    ... > adresses (ip are fixed in my LAN). ... I have lot of problems to share DOWNLOAD speed. ... > I tryed with IMQ but it doesn't work: the NAT translation is done AFTER ... > linux server ...
    (comp.os.linux.networking)
  • Re: does iptables 100% safe for my LAN ?
    ... > network address,I use a Linux machine to do NAT(via iptables) for my LAN.can ... > my private LAN by setting up iptables? ...
    (comp.os.linux.security)
  • IPtables block BT
    ... I am using Linux + IPtables as my company firewall. ... I found that someone is using BT to download something. ...
    (comp.os.linux.security)
  • iptables performance
    ... I have a linux box with 2 nic ... connected to the internet ... iptables is slowing my lan traffic and i only get 22MB/s ...
    (comp.os.linux.networking)
  • Re: IPtables block BT
    ... > I am using Linux + IPtables as my company firewall. ... > I found that someone is using BT to download something. ...
    (comp.os.linux.security)