Can somebody tell me what''s wrong in this script? I''m a
begginer in traffic shaping and I can''t figure it out
#!/bin/sh
DEV="dev eth1"
tc qdisc del $DEV root
tc qdisc add $DEV root handle 10: prio
tc qdisc add $DEV parent 10:1 handle 20: est 1sec 8sec
bfifo
tc qdisc add $DEV parent 10:2 handle 30: est 1sec 8sec
bfifo
tc qdisc add $DEV parent 10:3 handle 40: est 1sec 8sec
bfifo
tc filter add $DEV parent 10: protocol ip prio 1 u32
match ip tos 0x10 0xff flowid 10:1
tc filter add $DEV parent 10: protocol ip prio 1 u32
match ip tos 0x06 0xff flowid 10:2
tc filter add $DEV parent 10: protocol ip prio 1 u32
match ip tos 0x0c 0xff flowid 10:3
Thanks a lot
alexCOS
On Monday 05 May 2003 00:41, Alexandru Coseru wrote:> Can somebody tell me what''s wrong in this script? I''m a begginer in > traffic shaping and I can''t figure it outBut what''s the problem? Is it not working? Do you get any errors if you execute this script? 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/
Yes.. this is the error part: [root@alexcos root]# tc qdisc del dev eth1 root [root@alexcos root]# tc qdisc add dev eth1 root handle 10: prio [root@alexcos root]# tc qdisc add dev eth1 parent 10:1 handle 20:est 1sec 8 sec bfifo Unknown qdisc "1sec", hence option "8" is unparsable [root@alexcos root]# tc qdisc add dev eth1 parent 10:1 handle 20:est 1 sec 8 sec bfifo Unknown qdisc "1", hence option "sec" is unparsable Full source script: tc qdisc del $DEV root tc qdisc add $DEV root handle 10: prio tc qdisc add $DEV parent 10:1 handle 20: est 1sec 8sec bfifo tc qdisc add $DEV parent 10:2 handle 30: est 1sec 8sec bfifo tc qdisc add $DEV parent 10:3 handle 40: est 1sec 8sec bfifo tc filter add $DEV parent 10: protocol ip prio 1 u32 match ip tos 0x10 0xff flowid 10:1 tc filter add $DEV parent 10: protocol ip prio 1 u32 match ip tos 0x06 0xff flowid 10:2 tc filter add $DEV parent 10: protocol ip prio 1 u32 match ip tos 0x0c 0xff flowid 10:3 ----- Original Message ----- From: "Stef Coene" <stef.coene@docum.org> To: "Alexandru Coseru" <alexcos@home.ro>; <lartc@mailman.ds9a.nl> Sent: Monday, May 05, 2003 10:49 AM Subject: Re: [LARTC] Script problem> On Monday 05 May 2003 00:41, Alexandru Coseru wrote: > > Can somebody tell me what''s wrong in this script? I''m a begginer in > > traffic shaping and I can''t figure it out > But what''s the problem? Is it not working? Do you get any errors if you > execute this script? > > 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/
On Monday 05 May 2003 20:42, Alexandru Coseru wrote:> Yes.. this is the error part: > > > [root@alexcos root]# tc qdisc del dev eth1 root > [root@alexcos root]# tc qdisc add dev eth1 root handle 10: prio > [root@alexcos root]# tc qdisc add dev eth1 parent 10:1 handle 20:est 1sec 8 > sec bfifo > Unknown qdisc "1sec", hence option "8" is unparsable > [root@alexcos root]# tc qdisc add dev eth1 parent 10:1 handle 20:est 1 sec > 8 sec bfifo > Unknown qdisc "1", hence option "sec" is unparsableI don''t know the syntac for the bfifo qdisc. But what if you simple remove some parameters : tc qdisc add dev eth1 parent 10:1 handle 20: bfifo 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/
it worked... thanks..
I''m gonna test it later to see if it really works & shapes the
traffic..
One more question though ...
Can I add more than 3 (three) bands ?
Like:
tc qdisc add dev eth1 parent 10:1 handle 20:bfifo
tc qdisc add dev eth1 parent 10:2 handle 30:bfifo
tc qdisc add dev eth1 parent 10:3 handle 40:bfifo
tc qdisc add dev eth1 parent 10:4 handle 50:bfifo
of course , i get an error at the last line... but can I do it in another
way ?
Thanks
Alex
----- Original Message -----
From: "Stef Coene" <stef.coene@docum.org>
To: "Alexandru Coseru" <alexcos@home.ro>
Cc: <lartc@mailman.ds9a.nl>
Sent: Monday, May 05, 2003 10:08 PM
Subject: Re: [LARTC] Script problem
> On Monday 05 May 2003 20:42, Alexandru Coseru wrote:
> > Yes.. this is the error part:
> >
> >
> > [root@alexcos root]# tc qdisc del dev eth1 root
> > [root@alexcos root]# tc qdisc add dev eth1 root handle 10: prio
> > [root@alexcos root]# tc qdisc add dev eth1 parent 10:1 handle 20:est
1sec 8> > sec bfifo
> > Unknown qdisc "1sec", hence option "8" is
unparsable
> > [root@alexcos root]# tc qdisc add dev eth1 parent 10:1 handle 20:est 1
sec> > 8 sec bfifo
> > Unknown qdisc "1", hence option "sec" is
unparsable
> I don''t know the syntac for the bfifo qdisc. But what if you
simple
remove> some parameters :
> tc qdisc add dev eth1 parent 10:1 handle 20: bfifo
>
>
> 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/
On Monday 05 May 2003 21:51, Alexandru Coseru wrote:> it worked... thanks.. > > I''m gonna test it later to see if it really works & shapes the traffic.. > > > One more question though ... > > Can I add more than 3 (three) bands ? > > > Like: > > tc qdisc add dev eth1 parent 10:1 handle 20:bfifo > tc qdisc add dev eth1 parent 10:2 handle 30:bfifo > tc qdisc add dev eth1 parent 10:3 handle 40:bfifo > tc qdisc add dev eth1 parent 10:4 handle 50:bfifo > > > of course , i get an error at the last line... but can I do it in another > way ?Isn''t there an option if you add the prio qdisc to specify the number of bands? 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/
Hello,
: > One more question though ...
: > Can I add more than 3 (three) bands ?
: > of course , i get an error at the last line... but can I do it in
another
: > way ?
: Isn''t there an option if you add the prio qdisc to specify the
number of
: bands?
Yes.
http://lartc.org/howto/lartc.qdisc.classful.html#AEN886
<snipped>
9.5.3.1. PRIO parameters & usage
The following parameters are recognized by tc:
bands
Number of bands to create. Each band is in fact a class. If you change
this number, you must also change:
</snipped>
-Martin
--
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hey all,
Just a quick question -- does anyone know what impact the txquelen as displayed
by ifconfig for a nic really has?
I noticed that, with an HTB qdisc installed (which is what, 128 packets by
default?), the txqeuelen is still listed as 100 (ip link list). As an experiment
I set off some downloads, and reduced the txqeuelen to 0 (ifconfig eth0
txqueuelen 0) with no effect at all on the stream.
According to man ifconfig:
txqueuelen length
Set the length of the transmit queue of the device. It is useful
to set this to small values for slower devices with a high
latency (modem links, ISDN) to prevent fast bulk transfers from
disturbing interactive traffic like telnet too much.
Even with the default pfifo_fast qdisc all nics start with, reducing or setting
the txqueuelen to 0 seems to have no effect. Should it be having an impact, and
if not, then why is it there?
I''m optimising a link for certain streams, and using a pfifo with limit
25 on one of the classes. Wondering if any latency saved here is going to be
lost further up the chain.
Regards,
Ashton