[LARTC] First post, first problem

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 6 Mar 2002, bert hubert wrote:

> On Wed, Mar 06, 2002 at 02:43:52PM +0200, Mihai RUSU wrote:
>
> > Well I found out the "problem" . You cannot have u32 filter witout telling
> > the protocol too. The correct line should be:
> > /sbin/tc filter add dev eth0 parent 1:0 prio 5 handle 2: protocol ip u32
> > divisor 256
> >
> > There is also another error in the HOWTO (I think):
>
> Fixed. Can you check if it is 100% ok now?
>
It seems ok. Anyway I also have another question about that part of the
HOWTO.
In the example there it appears to be a line that doesnt do nothing (at
least for me):

"Configuration is pretty complicated, but very worth it by the time you
have this many rules. First we make a filter root, then we create a table
with 256 entries:

# tc filter add dev eth1 parent 1:0 prio 5 protocol ip u32
# tc filter add dev eth1 parent 1:0 prio 5 handle 2: protocol ip u32
divisor 256"

the first line:
# tc filter add dev eth1 parent 1:0 prio 5 protocol ip u32

What is the porpose of this line? Because I removed it from my test
configuration and it works the same (the hashes). I even did a 2 level
hash and I can say its the COOOLEST THING I have found yet in linux. This
CBQ rules ! :)

This is my test configuration in case somebody needs it:

/sbin/tc qdisc del dev eth0 root
/sbin/tc qdisc add dev eth0 root handle 1: cbq bandwidth 100Mbit allot
1514 avpkt 1000 cell 8

/sbin/tc class add dev eth0 parent 1: classid 1:1 cbq bandwidth 100Mbit
rate 100Mbit avpkt 1000 prio 8 allot 1514 weight 1 maxburst 21

/sbin/tc class add dev eth0 parent 1:1 classid 1:10 estimator 1sec 8sec
cbq bandwidth 100Mbit rate 16kbit avpkt 1000 prio 5 allot 1514 weight 1
maxburst 21 bounded

/sbin/tc class add dev eth0 parent 1:1 classid 1:20 estimator 1sec 8sec
cbq bandwidth 100Mbit rate 128kbit avpkt 1000 prio 5 allot 1514 weight 1
maxburst 21 bounded

/sbin/tc qdisc add dev eth0 parent 1:10 pfifo limit 131
/sbin/tc qdisc add dev eth0 parent 1:20 pfifo limit 131

/sbin/tc filter add dev eth0 parent 1:0 prio 5 handle 2: protocol ip u32
divisor 256
/sbin/tc filter add dev eth0 parent 1:0 prio 5 handle 3: protocol ip u32
divisor 256

/sbin/tc filter add dev eth0 parent 1:0 prio 5 protocol ip u32 ht 800::
match ip dst 0/0 hashkey mask 0x0000ff00 at 16 link 2:

/sbin/tc filter add dev eth0 parent 1:0 prio 5 protocol ip u32 ht 2:7b
match ip dst 0/0 hashkey mask 0x000000ff at 16 link 3:

/sbin/tc filter add dev eth0 parent 1:0 prio 5 protocol ip u32 ht 3:7c
match ip dst 0/0 flowid 1:20

In this example I limit the traffic towards any x.y.123.124 IP.

>
> Fixed too, and added you to the 'thanks to' list. Thanks!
>

Thanks, Im very proud to be near * Rusty Russell <rusty%rustcorp.com.au>
:)))

----------------------------
Mihai RUSU

Disclaimer: Any views or opinions presented within this e-mail are solely
those of the author and do not necessarily represent those of any company,
unless otherwise specifically stated.



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux