Re: [LARTC] An example of prio qdisc please...

2002-09-25 Thread Soulfly

I'm happy to help! I just want to make sure you've know the basics so you
don't fall into pitholes. Examples is one of the best sources of
information.

Oh I didn't look up the number for your protocol, so exchange the 'XX' with
this.

- Original Message -
From: Emmanuel Lacour [EMAIL PROTECTED]
To: Soulfly [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, September 25, 2002 11:18 AM
Subject: Re: [LARTC] An example of prio qdisc please...


 On Wed, Sep 25, 2002 at 09:28:28AM +0200, Soulfly wrote:
  tc qdisc add dev eth0 root handle 1: prio bands 5 priomap 2 3 2 2 3 3 3
3 1
  1 1 1 2 2 2 2
  tc qdisc add dev eth0 parent 1:1 handle 10: sfq perturb 10
  tc qdisc add dev eth0 parent 1:2 handle 20: sfq perturb 10
  tc qdisc add dev eth0 parent 1:3 handle 30: sfq perturb 10
  tc qdisc add dev eth0 parent 1:4 handle 40: sfq perturb 10
  tc filter add dev eth0 protocol ip parent 1: prio 10 u32 match ip
protocol
  0xXX 0xff flowid 1:1
 
  have you read the docs? If not, do so to understand how it works and
what
  the quirks are. http://www.lartc.org/
 
 

 Of course, I did it already, the lartc howto is a really good doc, but
 all of this is not really easy so by giving me this example I will be
 able to understand more and do what I wan't.

 Thanks!

 --
 Easter-eggsSpécialiste GNU/Linux
 44-46 rue de l'Ouest  -  75014 Paris   -   France -  Métro Gaité
 Phone: +33 (0) 1 43 35 00 37- Fax: +33 (0) 1 41 35 00 76
 mailto:[EMAIL PROTECTED]   -http://www.easter-eggs.com
 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] An example of prio qdisc please...

2002-09-25 Thread Soulfly

 Soulfly [EMAIL PROTECTED] thus wrote:

  tc qdisc add dev eth0 root handle 1: prio bands 5 priomap 2 3 2 2 3 3 3
3 1
  1 1 1 2 2 2 2
  tc qdisc add dev eth0 parent 1:1 handle 10: sfq perturb 10
  tc qdisc add dev eth0 parent 1:2 handle 20: sfq perturb 10
  tc qdisc add dev eth0 parent 1:3 handle 30: sfq perturb 10
  tc qdisc add dev eth0 parent 1:4 handle 40: sfq perturb 10
  tc filter add dev eth0 protocol ip parent 1: prio 10 u32 match ip
protocol
  0xXX 0xff flowid 1:1


I have a configuration which use 5 prio levels (2 above the standard
priolevels). I conerted it to 4 and forgot to alter the band parameter.. so
the correct line is..

tc qdisc add dev eth0 root handle 1: prio bands 4 priomap 2 3 2 2 3 3 3 3 1
1 1 1 2 2 2 2

 Hi there
 This is ver infornmative
 I've long wanted priority of some protocol over the other.
 Now my question is:
 Can i use this with htb?

 I want:
 o ip 172.16.0.5 bandwidth restriction of 32 kbps (htb ceil)
 o ip 172.16.0.49 bandwidth restriction of 64 kbps (htb ceil)
 o protocol 23 priority over protocol 80

 U see, I don't want to limit protocol 80 to some bandwidth
 restriction so that protocol 23 gets the rest available bandwidth
 I just want proto 23 packets priority over proto 80

 In the above example u used the prio qdisc
 Can i use this with my htb as the roo qdisc and prio
 lower down in the class?


Yes, this should work out well. I suggest you add prio qdisc to the leafs in
your htb class-tree.

 Thanx


no problem

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] adding ingress and egress

2002-04-12 Thread Soulfly

If you use IMQ you can should be able to send all incoming/outgoing packets
to the same egress qdisc.You can use HTB with two classes below root qdisc,
one for incoming packets and one for outgoing packets. Just a thought but
well worth trying.

There will surly be problems though and some finetuning.
Can he use iptables to separate the incoming/outgoing packets from the IMQ
device?

I don't even know if all steps are solvable with routing and filtering...
anyone?

/Torgil


 Hi!

 I'm trying to shape my traffic based on the sum of in- and outgoing
traffic,
 but haven't been able to find any hints in the HOWTO.

 What I want is, that the sum of in- and outgoing traffic does not exceed a
 given limit, but that both can borrow traffic. For example when there is
no
 incoming traffic, outgoing traffic may use all bandwidth, but when when
 there is more incoming traffic, outgoing should stay below a limit. (just
 like the webserver and smtp example from the CBQ-Chapter, but either with
to
 interfaces or with ingress and egress bounded together)

 I was already considering writing a script that checks the current traffic
 total and then adjusts the numbers in the qdiscs accordingly, but I think
it
 would be better if I could do it with iproute2 alone, but I just can't
 figure out how.

 Any suggestions?
 Arvid
 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] typo ?

2002-04-04 Thread Soulfly

Mihai RUSU wrote

 Hi

 While reading the HOWTO (pdf downloaded and printed last night) I have
 noticed a little strange thing. In the 9.2.1 chapter, explaining the
 pfifo_fast qdisc, it is shown a TOS field mapping table and also it
 appears a command line version:

 The last column shows the result of the default priomap. On the
 commandline, the default priomap looks like this:
 1, 2, 2, 2, 1, 2, 0, 0 , 1, 1, 1, 1, 1, 1, 1, 1

 This means that priority 4, for example, gets mapped to band number 1. The
 priomap also allows you to list higher priorities ( 7) which do not
 correspond to TOS mappings, but which are set by other means.

 The numbers on the command line version are 16, thus I presume its a one
 to one corespondation to the table, only that it is completly different. I
 dont see any explanation why it is like that. Shouldnt that be:
 1,2,1,1,2,2,2,2,0,0,0,0,1,1,1,1 ?

 Thanks

 
 Mihai RUSU


nope. Try the following:

# tc qdisc del dev eth0 root
# tc qdisc add dev eth0 root handle 1: prio
# tc -s qdisc ls dev eth0
qdisc prio 1: bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
 Sent 455336 bytes 1237 pkts (dropped 0, overlimits 0)

which is the default priomap on the commandline. The one you mention is the
priomap in the kernel for pfifo_fast.

I usually set the priomap manually to get the latter priomap. example:
tc qdisc add dev eth0 root handle 1: prio bands 4 priomap 2 3 2 2 3 3 3 3 1
1 1 1 2 2 2 2
(which is the kernels default + 1, here I use the 0 band for very important
traffic which goes above the TOS-field.)

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/