On Monday 25 August 2003 12:50, Jan Rovner wrote:
> Hello,
>
> I'm newbie to HTB and need to solve really simple problem:
>
> I have an single IP internet connection @ 1024kbit attached to a linux
> box (2.4.21), doing NAT for clients at internal 192.168.1.x network.
>
> I need to setup a simple traffic shaping, for a single PC 192.168.1.2
> I wish to guarantee minimum rate of 768kbit, for others 32kbit.
> Maximum rates must be always full speed (1024kbit) !
>
> Can you please tell me what's wrong with that (wlan0 is the internal
> iface),
> because this does not work (192.168.1.2 does not get the guaranteed
> bandwidth,
> but only a 1/n of bandwidth for case that another n stations saturate
> the line).
>
> Thank you. My script follows.
>
> tc qdisc del dev wlan0 root
>
> #by default, all clients go through slow :30 class
> tc qdisc add dev wlan0 root handle 1: htb default 30
>
> tc class add dev wlan0 parent 1: classid 1:1 htb rate 1024kbit ceil
> 1024kbit
You have to limit the total bandwidth to less then your link bandwidth so YOU
are the bottleneck. So take 1000kbit as the ceil and not 1024kbit.
> # i wish :10 class 768-1024, :30 class 32-1024
> tc class add dev wlan0 parent 1:1 classid 1:10 htb rate 768kbit ceil
> 1024kbit prio 0
> tc class add dev wlan0 parent 1:1 classid 1:30 htb rate 32kbit ceil
> 1024kbit prio 2
Give both classes the same prio.
Also see www.docum.org for more info.
Stef
--
[EMAIL PROTECTED]
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.oftc.net
_______________________________________________
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/