All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] simple htb script which does not work
@ 2002-06-05 16:10 Ludovic Drolez
  2002-06-05 19:16 ` Stef Coene
  0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Drolez @ 2002-06-05 16:10 UTC (permalink / raw)
  To: lartc

Hi !

I'm using the htb.init script to do simple things with my adsl
connection:
- uploads through a VPN (port 2001 used) can use all BW (128Kbits) 
(rate\x15kbps, ceil\x16kbps), class 10
- and others have only 8 kbits but can take all the BW if there is no
VPN activity. (rate=1kbps, ceil\x16kps), class 20

But, BW sharing does not seem to work, and if I make 2 uploads, one
through the VPN, the other with ssh on the net, I get 8kbps/8kbps
instead of 15kbps/1kbps.

Some stats show that packets are filtered the right way.

here's this simple script: (got it with 'htb.init compile')

tc qdisc del dev ppp0 root
tc qdisc add dev ppp0 root handle 1 htb default 20

tc class add dev ppp0 parent 1: classid 1:2 htb rate 16kbps mtu 1492

tc class add dev ppp0 parent 1:2 classid 1:10 htb rate 15kbps ceil 
16kbps prio 1 mtu 1492
tc qdisc add dev ppp0 parent 1:10 handle 10 sfq perturb 10
tc filter add dev ppp0 parent 1:0 protocol ip prio 100 u32 match ip 
dport 2001 0xffff classid 1:10
tc filter add dev ppp0 parent 1:0 protocol ip prio 100 u32 match ip 
sport 2001 0xffff classid 1:10

tc class add dev ppp0 parent 1:2 classid 1:20 htb rate 1kbps ceil 16kbps 
prio 5 mtu 1492
tc qdisc add dev ppp0 parent 1:20 handle 20 sfq perturb 10



Any idea ?


Cheers,

-- 
Ludovic DROLEZ                                       Free&ALter Soft
152, rue de Grigy - Technopole Metz 2000                  57070 METZ
tel : 03 87 75 55 21                            fax : 03 87 75 19 26

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [LARTC] simple htb script which does not work
  2002-06-05 16:10 [LARTC] simple htb script which does not work Ludovic Drolez
@ 2002-06-05 19:16 ` Stef Coene
  0 siblings, 0 replies; 2+ messages in thread
From: Stef Coene @ 2002-06-05 19:16 UTC (permalink / raw)
  To: lartc

On Wednesday 05 June 2002 18:10, Ludovic Drolez wrote:
> Hi !
>
> I'm using the htb.init script to do simple things with my adsl
> connection:
> - uploads through a VPN (port 2001 used) can use all BW (128Kbits)
> (rate=15kbps, ceil=16kbps), class 10
> - and others have only 8 kbits but can take all the BW if there is no
> VPN activity. (rate=1kbps, ceil=16kps), class 20
>
> But, BW sharing does not seem to work, and if I make 2 uploads, one
> through the VPN, the other with ssh on the net, I get 8kbps/8kbps
> instead of 15kbps/1kbps.
>
> Some stats show that packets are filtered the right way.
>
> Any idea ?
You need to shape lower then 16kbps so you never use the full bandwidth.  
Otherwise, the queues on you modem will be filled and it will be the modem 
that controls the bandwidth.

The scripts is OK.

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-06-05 19:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-05 16:10 [LARTC] simple htb script which does not work Ludovic Drolez
2002-06-05 19:16 ` Stef Coene

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.