Re: variable speed with fixed minimum speed

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 31 October 2002 15:57, Der echte Paul wrote:
> Hi!
>
> I have a couple of PCs here of which one is my linux server. All of
> those pcs are connected to the internet via the server which runs very
> well. I now want to cut the bandwidth of two of the pcs to the internet.
> let's say they can have a minimum (fixed) speed of about 128kbit/s for
> downloading and 64kbit/s for uploading and if no one else is using the
> bandwidth they can gain the rest. I have something like this currently
> running with the fixed speed but don't know how I can give them more if
> nobody needs it. On my linux pc I have the following devices, ppp0 (=dsl
> connection), eth1 (=dsl network card ip: 10.10.10.1) and eth0
> (="default" network card 192.168.0.1, server ip). Can anyone maybe help
> me out?
Yes.  You can find the needed info on www.lart.org and www.docum.org.  

Basically, you have to add a cbq or htb root qdisc to your internet NIC, add 
1 class that will contains all traffic and 2 other classes.  

In case you use HTB :
root qdisc 128kbit
 |- class rate = ceil = 128kbit
    |- class 1 : rate = 64kbit, ceil = 128kbit
    |- class 2 : rate = 64kbit, ceil = 128kbit

Use a filter (u32) to redirect the traffic from the hosts you will bound to 
class 1 and all other traffic to class 2.

Class 1 and class 2 will always get 64 kbit and will use all bandwidth that's 
not used by the other class.

Remember you can only shape outgoing bandwidth with this setup.

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux