All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] I thought it was right... please take a look...
@ 2002-06-19  2:40 Jeremy Nelson
  2002-06-19  6:29 ` Stef Coene
  0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Nelson @ 2002-06-19  2:40 UTC (permalink / raw)
  To: lartc

Hi

I dont think my script is quite right but I just cant see why. If you could have a look at it and let me know if anything is wrong or suggest any better ways of making this happen.
I have a 256kbit link, I want to give half of that (approx 124kbit) to a web site we run and let it burst to the full link if the bandwidth is not used (classid 1:10).
The other half of the link is divided into 4 parts that each have 31kbit. I want these classes to be able to burst to half the link (124kbit) if the bandwidth is not used (classid 1:20 -> 1:50).

What is happening is that no traffic ever gets over 124kbit/sec even traffic that should be in 1:10. My script is below.

Thanks in advance

Jeremy


        # Root
        tc qdisc add dev eth0 root handle 1: htb default 50

        # Parent to allow sharing
        tc class add dev eth0 parent 1: classid 1:1 htb rate 248kbit burst 15k

        # Main classes
        tc class add dev eth0 parent 1:1 classid 1:10 htb rate 124kbit ceil 248kbit burst 15k
        tc class add dev eth0 parent 1:1 classid 1:20 htb rate 31kbit ceil 124kbit burst 15k
        tc class add dev eth0 parent 1:1 classid 1:30 htb rate 31kbit ceil 124kbit burst 15k
        tc class add dev eth0 parent 1:1 classid 1:40 htb rate 31kbit ceil 124kbit burst 15k
        tc class add dev eth0 parent 1:1 classid 1:50 htb rate 31kbit ceil 124kbit burst 15k


        # Add SFQ Classes under
        tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
        tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10
        tc qdisc add dev eth0 parent 1:30 handle 30: sfq perturb 10
        tc qdisc add dev eth0 parent 1:40 handle 40: sfq perturb 10
        tc qdisc add dev eth0 parent 1:50 handle 50: sfq perturb 10


        # Add filters
        U32="tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32"
        $U32 match ip sport 80 0xffff flowid 1:10
        $U32 match ip sport 25 0xffff flowid 1:20
        $U32 match ip sport 1723 0xffff flowid 1:30
        $U32 match ip sport 53 0xffff flowid 1:30
        $U32 match ip dport 80 0xffff flowid 1:40





_______________________________________________
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] I thought it was right... please take a look...
  2002-06-19  2:40 [LARTC] I thought it was right... please take a look Jeremy Nelson
@ 2002-06-19  6:29 ` Stef Coene
  0 siblings, 0 replies; 2+ messages in thread
From: Stef Coene @ 2002-06-19  6:29 UTC (permalink / raw)
  To: lartc

On Wednesday 19 June 2002 04:40, Jeremy Nelson wrote:
> Hi
>
> I dont think my script is quite right but I just cant see why. If you could
> have a look at it and let me know if anything is wrong or suggest any
> better ways of making this happen. I have a 256kbit link, I want to give
> half of that (approx 124kbit) to a web site we run and let it burst to the
> full link if the bandwidth is not used (classid 1:10). The other half of
> the link is divided into 4 parts that each have 31kbit. I want these
> classes to be able to burst to half the link (124kbit) if the bandwidth is
> not used (classid 1:20 -> 1:50).
>
> What is happening is that no traffic ever gets over 124kbit/sec even
> traffic that should be in 1:10. My script is below.
The scripts looks ok to me.
Are you sure the filters are working ?  You can check with 
tc -s -d class show dev eth0
and hopely the counters of bytes/packets are incrementing.

And what if you make 1:10 the default class and remove all the filters so 
packets must end in 1:10?

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-19  6:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-19  2:40 [LARTC] I thought it was right... please take a look Jeremy Nelson
2002-06-19  6:29 ` 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.