Bandwidth limiting using Linux as a router...

Bandwidth limiting using Linux as a router...

Post by Siza » Wed, 27 Jun 2001 08:26:40



Once again I'm trying to make my linux box jump through hoops.  I have 2
similar questions, and if anybody could point me in the direction of some
good documentation/(free)software/books I'd appreciate it.

1.) I have several computers at home all currently plugged into a ethernet
hub which is plugged into my DSL modem.  Each computer is using one of the
5 IP addresses given to me by PacBell.  How would I make it so that in
given situations, each computer is alloted a certain amount of bandwidth
to use, and no more, and give certain ones priority.  So, if the webserver
were serving from the linux box, I was downloading some stuff on one Mac,
and doing work on another Mac, the 'work' Mac would get bandwidth
priority, over the webserver, over the 'downloading' Mac, but everybody
still gets a little bandwidth.  But if only one mac is on, it gets it all,
etc.  I imagine, I'll have to route everything through my Linux box but
thats fine, would it physically have to go through the linux box (ie,
installing a 2nd ethernet card in the box and putting the hub through the
linux-box then plugging the box into the modem) or can I just put
everything on the hub and route things through the linux box?

2.) How do I limit bandwidth on just the web server?  So random web
traffic gets only so much, but I can still ftp and telnet/ssh in at full
speed?

I'm not a 'professional' linux admin, but I play one on my network.

 
 
 

Bandwidth limiting using Linux as a router...

Post by Karl Heye » Wed, 27 Jun 2001 09:31:36




> Once again I'm trying to make my linux box jump through hoops.  I have 2
> similar questions, and if anybody could point me in the direction of some
> good documentation/(free)software/books I'd appreciate it.

like me then :)

Quote:> 1.) I have several computers at home all currently plugged into a ethernet
> hub which is plugged into my DSL modem.  Each computer is using one of the 5
> IP addresses given to me by PacBell.  How would I make it so that in given
> situations, each computer is alloted a certain amount of bandwidth to use,
> and no more, and give certain ones priority.  So, if the webserver were
> serving from the linux box, I was downloading some stuff on one Mac, and
> doing work on another Mac, the 'work' Mac would get bandwidth priority, over
> the webserver, over the 'downloading' Mac, but everybody still gets a little
> bandwidth.  But if only one mac is on, it gets it all, etc.  I imagine, I'll
> have to route everything through my Linux box but thats fine, would it
> physically have to go through the linux box (ie, installing a 2nd ethernet
> card in the box and putting the hub through the linux-box then plugging the
> box into the modem) or can I just put everything on the hub and route things
> through the linux box?

have a look on netfilter.samba.org for the 2.4 networking stuff.  It sounds
like you want the packet scheduling/classifying part.

Quote:> 2.) How do I limit bandwidth on just the web server?  So random web traffic
> gets only so much, but I can still ftp and telnet/ssh in at full speed?

You will be able to have a selection critera of destination port 80.  Have a
good read of the info available do some tryouts and come up with some
policies sharing out the bandwidth.

karl.

 
 
 

1. Limiting outgoing bandwidth per machine, using Linux (2.2.19) on ADSL

Hello,

Ok, to start, some facts:

- I have a local network within my home, with IP addresses in the
192.168.0.0/24 subnet, assigned via DHCP
- I'm using a linux 2.2.19 machine as a router/server, that does IP
masquerading to allow all the machines within my network to share the
one internet connection I have. The local network interface is eth0,
while the internet connection is ppp0 (or eth1).
 - I have an ADSL connection with 640 kilobits/sec downstream (80
kilobytes/sec), 90 kilobits/sec upstream (11.25 kilobytes/sec).
My service provider (Verizon Online) is rather facist with their
bandwidth allocation -- when anymore than 50% of my upstream bandwidth
is utilized, it cuts into my downstream. So say I'm downloading
something at 70 kilobytes/sec, and another computer on my network is
sending some data upstream, at 8 kilobytes/sec, my download speed will
drop to about 10kilobytes/sec, and it will stay that way until the
upstream bandwidth is no longer used.
 - I have iproute2 installed with support built into the kernel

I want to setup some kind of traffic shaping policy so each computer
in the network can only send a certain kilobytes/sec upstream, via the
adsl interface (ppp0).

I have read the linux advanced routing howto, and that only left me
really confused. I fiddled around with the tc command but
unfortunately I wasn't able to make any progress.

I would really appreciate any help anyone could give me.

Thanks in advance,

Paul Lesiak

2. how to get full file name in a bash script

3. limiting bandwidth to a IP using linux

4. still no patch for recent BIND exploits?

5. routers with bandwidth shaping/limiting

6. *** ECC2-89 call for volunteers ***

7. Limit bandwidth using QoS?

8. malloc'd memory after a process is killed

9. using squid to limit bandwidth based on domain

10. Limiting Linux routing bandwidth

11. New way to do QOS and limit bandwidth with Linux, new site , new software Howto Included

12. Setting-up a linux-based router for bandwidth Rashioning

13. Bandwidth limiting on Linux gateway