Re: [LARTC] What's wrong here? HELP PLEASE!!!!

2003-10-08 Thread Lawrence MacIntyre
I'm grasping at straws here, but is it possible that you put your new tc
in, for example, /usr/local/sbin/tc and your script is calling the
original version in /sbin/tc ?

You shouldn't have to patch the kernel, and the patched tc should work. 
When you run the script, is the first error (RTNETLINK answers: No such
file or directory) coming from the first line in your script (/sbin/tc
qdisc add dev eth1 root handle 1: htb default 10)?  It would be helpful
if you could give us the errors interspersed with the commands   If you
add sh -x to the beginning of the command running the script, it will do
that.

example:

[EMAIL PROTECTED] root]#  sh -x /etc/tc.conf
+ /usr/local/bin/tc qdisc add dev eth0 root handle 1: htb default 12
+ /usr/local/bin/tc class add dev eth0 parent 1: classid 1:1 htb rate
13Mbit ceil 10Mbit
+ /usr/local/bin/tc class add dev eth0 parent 1:1 classid 1:10 htb rate
12Mbit ceil 10Mbit
+ /usr/local/bin/tc class add dev eth0 parent 1:1 classid 1:11 htb rate
1Mbit ceil 10Mbit
+ /usr/local/bin/tc qdisc add dev eth0 parent 1:10 handle 20: sfq
+ /usr/local/bin/tc qdisc add dev eth0 parent 1:11 handle 30: sfq
+ /usr/local/bin/tc filter add dev eth0 protocol ip parent 1:0 prio 1
u32 match
ip dport 1234 0x flowid 1:10
+ /usr/local/bin/tc filter add dev eth0 protocol ip parent 1:0 prio 1
u32 match
ip dport 5001 0x flowid 1:11


When I try the old tc on my machine (red hat 8.0), I get this:
tc qdisc add dev eth0 root handle 1: htb default 12
Unknown qdisc htb, hence option default is unparsable

Which version of linux are you using?

On Tue, 2003-10-07 at 17:13, Alex wrote:
 (this is a repost, nobody said anything about this so maybe it did not
 go
 throu the list)
 I downloaded iproute2-2.4.7-now-ss010824.tar.gz and I did patched tc
 with
 the htb3.6_tc.diff from htb3.6-020525.tgz and when I try to use a htb
 script
 I get just errors. I did not patch the kernel, since I use kernel
 2.4.22 and
 I saw on - HTB Homepage that I need to patch it only if I run version
 2.4.20
 or earlier. Do also need the kernel patch ? Or maybe is something else
 wrong? (I also used the precompiled tc but the situation is the
 same)
 
 Errors:
 ---
 RTNETLINK answers: No such file or directory
 Deleted old root disk on eth1
 Unknown filter flowid, hence option 1:10 is unparsable
 Unknown filter flowid, hence option 1:2 is unparsable
 RTNETLINK answers: Invalid argument
 RTNETLINK answers: Invalid argument
 RTNETLINK answers: Invalid argument
 RTNETLINK answers: Invalid argument
 .etc (same error over and over...)
 
 Part of my script (the full script is accesible on
 http://retea.hostingcenter.ro/htb.txt   ..is too long to post here) :
 ---
 /sbin/tc qdisc add dev eth1 root handle 1: htb default 10
 /sbin/tc class add dev eth1 parent 1: classid 1:1 htb rate 10mbit
 
 /sbin/tc class add dev eth1 parent 1:1 classid 1:10 htb rate 5mbit
 /sbin/tc filter add dev eth1 protocol ip parent 1:10 prio 5 handle 6
 flowid
 1:10
 
 /sbin/tc class add dev eth1 parent 1:1 classid 1:2 htb rate 5mbit
 /sbin/tc filter add dev eth1 protocol ip parent 1:10 prio 5 handle 5
 flowid
 1:2
 
 
 /sbin/tc class add dev eth1 parent 1:10 classid 4:11 htb rate 128kbit
 ceil
 256kbit prio 5
 /sbin/tc filter add dev eth1 parent 1:10 protocol ip prio 5 u32 match
 ip dst
 192.168.254.10 flowid 4:11
 
 /sbin/tc class add dev eth1 parent 1:10 classid 4:12 htb rate 128kbit
 ceil
 256kbit prio 5
 /sbin/tc filter add dev eth1 parent 1:10 protocol ip prio 5 u32 match
 ip dst
 192.168.254.11 flowid 4:12
 
 etc (full script at http://retea.hostingcenter.ro/htb.txt)
 
 Thanks!
 
 Alex
 
 
 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
-- 
Lawrence MacIntyre 865.574.8696 [EMAIL PROTECTED]
   Oak Ridge National Laboratory
High Performance Information Infrastructure Technology Group



signature.asc
Description: This is a digitally signed message part


[LARTC] Excess bandwidth sharing

2003-10-08 Thread Tom Olexa
Hello there,

I do
tc qdisc add dev eth0 root handle 1: htb r2q 1 default 12
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 64kbit
ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:11 htb
rate 256kbit ceil 512kbit

tc filter add dev eth0 parent 1: protocol ip prio 1 u32 \
match ip dst 195.28.103.7 flowid 1:10
tc filter add dev eth0 parent 1: protocol ip prio 1 u32 \
match ip dst 195.28.103.5 flowid 1:11

and I expect both streams to share the total 512kbit in
proportion of their rates (1/4). Unfortunately the rates are some
100/120, total 512kbit.
Can anyone tell me whatsda problem?
This behavior may vary when all rates are different.
Thanks, Tom Olexa

-- 
Potrebujete vice prostoru pro vase stranky?
Ptejte se na http://sluzby.volny.cz/cs/product/ftp_paid


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


[LARTC] htb v3 not as good as htb v2?

2003-10-08 Thread Anton Yurchenko
Hello,

I`ve been using htb v2 for more then a year without any major problems. 
Recently I needed to upgrade to newer kernel becouse of non LARTC 
related issues. After installing 2.4.22 when the htb qdisc was attached 
to the interface even without any rules, I was not able to send more 
~1mbit through the interface. After I reversed the htb3 patch and 
rebuild with htb2 everything works as normal. Has anyone experienced the 
same issue? thanks

--

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


Re: [LARTC] htb v3 not as good as htb v2?

2003-10-08 Thread nuclearcat
Hello Anton,

Wednesday, October 8, 2003, 4:49:30 PM, you wrote:

I am using HTB3 with more than 10 megabits customers, and
amount of classes about 100-200 without any problem.
Only one what i do - i make filter with lowest priority, to not pass
ass unclassified traffic to default class, just to drop it. I think
you just need review your classes, because also if you have any rate
more 468 Kbit, you need change r2q or quantum.

AY Hello,

AY I`ve been using htb v2 for more then a year without any major problems. 
AY Recently I needed to upgrade to newer kernel becouse of non LARTC 
AY related issues. After installing 2.4.22 when the htb qdisc was attached 
AY to the interface even without any rules, I was not able to send more 
AY ~1mbit through the interface. After I reversed the htb3 patch and 
AY rebuild with htb2 everything works as normal. Has anyone experienced the 
AY same issue? thanks




-- 
Best regards,
 Denismailto:[EMAIL PROTECTED]

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


AW: [LARTC] Tc - Class HTB - Filter u32 - Match ip dport

2003-10-08 Thread Jan Gerritsen
Hi,

  ftp get test
  local: test remote: test
  227 Entering Passive Mode (203,200,72,102,12,231)

  150 Opening BINARY mode data connection for test (1025830 bytes).
  ##
  ...
  226 Transfer complete.
  1025830 bytes received in 262 secs (3.8 Kbytes/sec)
  ftp

This log shows that you are using Passive FTP

 tc filter add dev eth0 parent 10: protocol ip prio 100 u32 match ip sport
 20 0x flowid 10:10

now you put up a rule for sport 20.
Passiv FTP does not use sport 20, it uses any port  1024, 
only active FTP uses port 20 as sport for data transfare,..

Jan Gerritsen
™¨¥Šx%ŠË,S
f¢–f§vÏZžXm¶Ÿÿ™¨¥™©Ý³Ö§—ùšŠYšŸùb²Ø§~åj»\å“:m§ÿåj»\¢¸?

Re: [LARTC] htb v3 not as good as htb v2?

2003-10-08 Thread Lawrence MacIntyre
I've used HTB and CBQ to protect MPEG2 traffic streams from UDP traffic
over 100 Mb/s interfaces.  I have not yet attempted this with 1000 Mb/s
interfaces, but I hope to get to that this year (it it much more
difficult to measure accurately at this speed).

On Wed, 2003-10-08 at 09:49, Anton Yurchenko wrote:
 Hello,
 
 I`ve been using htb v2 for more then a year without any major problems. 
 Recently I needed to upgrade to newer kernel becouse of non LARTC 
 related issues. After installing 2.4.22 when the htb qdisc was attached 
 to the interface even without any rules, I was not able to send more 
 ~1mbit through the interface. After I reversed the htb3 patch and 
 rebuild with htb2 everything works as normal. Has anyone experienced the 
 same issue? thanks
-- 
Lawrence MacIntyre 865.574.8696 [EMAIL PROTECTED]
   Oak Ridge National Laboratory
High Performance Information Infrastructure Technology Group



signature.asc
Description: This is a digitally signed message part


Re: [LARTC] filter

2003-10-08 Thread Catalin BOIE
Don't worry. It's tc fault (or maybe kernel).
The filters are once in the kernel but are showed no_of_prios_used times.

On Thu, 9 Oct 2003, Victor wrote:

 The difrence betwen these 2 configurations is only the prio parameter from
 the second filter, from each configutation.
 (tc filter add dev eth0 parent 1: prio 5 protocol ip u32 ht 800:: match ip
 src 80.97.24.0/24 hashkey mask 0x00ff at 12 link 2:)

 Configuration 1

 tc qdisc add dev eth0 root handle 1: htb
 tc class add dev eth0 parent 1: classid 1:1 htb rate 500Kbit prio 1
 quantum 2000
 tc class add dev eth0 parent 1:1 classid 1:201 htb rate 4Kbit ceil 500Kbit
 prio 0 quantum 2000
 tc filter add dev eth0 parent 1: prio 1 handle 2: protocol ip u32 divisor 256
 tc filter add dev eth0 parent 1: prio 5 protocol ip u32 ht 800:: match ip
 src 80.97.24.0/24 hashkey mask 0x00ff at 12 link 2:
 tc filter add dev eth0 prio 1 protocol ip u32 ht 2:01 match ip src
 80.97.24.1 flowid 1:201

 Configuration 2

 tc qdisc add dev eth0 root handle 1: htb
 tc class add dev eth0 parent 1: classid 1:1 htb rate 500Kbit prio 1
 quantum 2000
 tc class add dev eth0 parent 1:1 classid 1:201 htb rate 4Kbit ceil 500Kbit
 prio 0 quantum 2000
 tc filter add dev eth0 parent 1: prio 1 handle 2: protocol ip u32 divisor 256
 tc filter add dev eth0 parent 1: prio 1 protocol ip u32 ht 800:: match ip
 src 80.97.24.0/24 hashkey mask 0x00ff at 12 link 2:
 tc filter add dev eth0 prio 1 protocol ip u32 ht 2:01 match ip src
 80.97.24.1 flowid 1:201

 Configuration 1
 tc filter show dev eth1
 shows the next lines:
 filter parent 1: protocol ip pref 1 u32
 filter parent 1: protocol ip pref 1 u32 fh 801: ht divisor 1
 filter parent 1: protocol ip pref 1 u32 fh 2: ht divisor 256
 filter parent 1: protocol ip pref 1 u32 fh 2:1:800 order 2048 key ht 2 bkt
 1 flowid 1:201
   match 50611801/ at 12
 filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
 filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800
 bkt 0 link 2:
   match 50611800/ff00 at 12
 hash mask 00ff at 12
 filter parent 1: protocol ip pref 5 u32
 filter parent 1: protocol ip pref 5 u32 fh 801: ht divisor 1
 filter parent 1: protocol ip pref 5 u32 fh 2: ht divisor 256
 filter parent 1: protocol ip pref 5 u32 fh 2:1:800 order 2048 key ht 2 bkt
 1 flowid 1:201
   match 50611801/ at 12
 filter parent 1: protocol ip pref 5 u32 fh 800: ht divisor 1
 filter parent 1: protocol ip pref 5 u32 fh 800::800 order 2048 key ht 800
 bkt 0 link 2:
   match 50611800/ff00 at 12
 hash mask 00ff at 12



 Configuration 1
 tc filter show dev eth1
 shows the next lines:

 filter parent 1: protocol ip pref 1 u32
 filter parent 1: protocol ip pref 1 u32 fh 2: ht divisor 256
 filter parent 1: protocol ip pref 1 u32 fh 2:1:800 order 2048 key ht 2 bkt
 1 flowid 1:201
   match 50611801/ at 12
 filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
 filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800
 bkt 0 link 2:
   match 50611800/ff00 at 12
 hash mask 00ff at 12

 Why the configutaion1 has many filters than configuration2?
 How can the prio paramenter influence this?
 What is the range for the prio parameter in the filter context?
 Thank you.

 Victor


 -
 This email was sent using SquirrelMail.
Webmail for nuts!
 http://squirrelmail.org/


 Random Thought:
 --
 Integrity has no need for rules.
 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] tc filter expression

2003-10-08 Thread Niels Vorgaard Christensen
Hi.

I am working on a router with three interfaces. eth2 and eth0 are
connected to two different Internet providers. The interface eth1 are
connected to an internal network. Now I need a tc filter expression
that will determine which interface the packet was routed in through
to be able classify packets going out eth1 based on provider. I know I
could mark packets with netfilter, but if it is possible to construct
a tc filter expression to do the job I would much prefere that.


Regards,
Niels V. Christensen
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] tc filter expression

2003-10-08 Thread Catalin BOIE
On Thu, 9 Oct 2003, Niels Vorgaard Christensen wrote:

 Hi.

 I am working on a router with three interfaces. eth2 and eth0 are
 connected to two different Internet providers. The interface eth1 are
 connected to an internal network. Now I need a tc filter expression
 that will determine which interface the packet was routed in through
 to be able classify packets going out eth1 based on provider. I know I
 could mark packets with netfilter, but if it is possible to construct
 a tc filter expression to do the job I would much prefere that.

I think you can use ingress + policy + ds to mark packets (DSCP IP field)
on eth0 and eth2. Then on eth1 you can classify base on this field.



 Regards,
 Niels V. Christensen
 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/