All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Hashing Filters Repost
@ 2003-05-27 14:11 Matias Bjørling
  2003-05-27 14:49 ` Gideon le Grange
  0 siblings, 1 reply; 2+ messages in thread
From: Matias Bjørling @ 2003-05-27 14:11 UTC (permalink / raw)
  To: lartc

[-- Attachment #1: Type: text/plain, Size: 1884 bytes --]

Hey

Can anybody tell me what i'm doing wrong, im getting crasy of this hashing filters, and the doc at lartc is too unexplained for me. Can't get it to work

# tc qdisc del dev eth0 root > /dev/null
# tc qdisc add dev eth0 root handle 1: htb
# tc class add dev eth0 parent 1: classid 1:2 htb rate 100MBit ceil 100MBit

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

// Adding a divisor 

# tc class add dev eth0 parent 1:2 classid 1:10 htb rate 512kbit ceil 512kbit burst 0k
# tc filter add dev eth0 protocol ip parent 1:2 u32 ht 2:1: match ip src 10.0.0.1 flowid 1:10

# tc class add dev eth0 parent 1:2 classid 1:11 htb rate 512kbit ceil 512kbit burst 0k
# tc filter add dev eth0 protocol ip parent 1:2 u32 ht 2:2: match ip src 10.0.0.2 flowid 1:11

# tc class add dev eth0 parent 1:2 classid 1:13 htb rate 512kbit ceil 512kbit burst 0k
# tc filter add dev eth0 protocol ip parent 1:2 u32 ht 2:4: match ip src 10.0.0.4 flowid 1:13

# tc class add dev eth0 parent 1:2 classid 1:15 htb rate 512kbit ceil 512kbit burst 0k
# tc filter add dev eth0 protocol ip parent 1:2 u32 ht 2:6: match ip src 10.0.0.6 flowid 1:15

// Making Hashing Filtering for Network 10.0.0.0/16
# tc filter add dev eth0 protocol ip parent 1:2 prio 5 u32 ht 800:: match ip src 10.0.0.0/16 hashkey mask 0x000000ff at 12 link 2:

I know i have to set 
# tc filter add dev eth1 parent 1: protocol ip prio 100 match ip src 10.0.02 classid 1:2
between the class and filter where i point to the src ip. But it wont accept the config. telling me that 

Unknown filter "match", hence option "ip" is unparsable

It's breaking my neck soon am i'm going crazy :)

If any have a working script with more than 256 hosts, i would greatly appreciate it :)

Thank You

Regards 

Matias Bjørling


[-- Attachment #2: Type: text/html, Size: 2875 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [LARTC] Hashing Filters Repost
  2003-05-27 14:11 [LARTC] Hashing Filters Repost Matias Bjørling
@ 2003-05-27 14:49 ` Gideon le Grange
  0 siblings, 0 replies; 2+ messages in thread
From: Gideon le Grange @ 2003-05-27 14:49 UTC (permalink / raw)
  To: lartc

The first thing that bugs me, is that you are hashing 64K ip addresses
onto a 256 slot hash table. This means 10.0.0.1 and 10.0.1.1 both go to
the same class. Hashtables are limit to 256 entries (AFAICS), which is
why you need to pre-select the class C like in my previous example.

Gideon 

On Tue, 2003-05-27 at 16:11, Matias Bjørling wrote:
> Hey
>  
> Can anybody tell me what i'm doing wrong, im getting crasy of this
> hashing filters, and the doc at lartc is too unexplained for me. Can't
> get it to work
>  
> # tc qdisc del dev eth0 root > /dev/null
> # tc qdisc add dev eth0 root handle 1: htb
> # tc class add dev eth0 parent 1: classid 1:2 htb rate 100MBit ceil
> 100MBit
> 
> # tc filter add dev eth0 parent 1:2 prio 5 protocol ip u32
> # tc filter add dev eth0 parent 1:2 handle 2: protocol ip u32 divisor
> 256
>  
> // Adding a divisor 
> # tc class add dev eth0 parent 1:2 classid 1:10 htb rate 512kbit ceil
> 512kbit burst 0k
> # tc filter add dev eth0 protocol ip parent 1:2 u32 ht 2:1: match ip
> src 10.0.0.1 flowid 1:10
>  
> # tc class add dev eth0 parent 1:2 classid 1:11 htb rate 512kbit ceil
> 512kbit burst 0k
> # tc filter add dev eth0 protocol ip parent 1:2 u32 ht 2:2: match ip
> src 10.0.0.2 flowid 1:11
> 
> # tc class add dev eth0 parent 1:2 classid 1:13 htb rate 512kbit ceil
> 512kbit burst 0k
> # tc filter add dev eth0 protocol ip parent 1:2 u32 ht 2:4: match ip
> src 10.0.0.4 flowid 1:13
> 
> # tc class add dev eth0 parent 1:2 classid 1:15 htb rate 512kbit ceil
> 512kbit burst 0k
> # tc filter add dev eth0 protocol ip parent 1:2 u32 ht 2:6: match ip
> src 10.0.0.6 flowid 1:15
> 
> // Making Hashing Filtering for Network 10.0.0.0/16
> # tc filter add dev eth0 protocol ip parent 1:2 prio 5 u32 ht 800::
> match ip src 10.0.0.0/16 hashkey mask 0x000000ff at 12 link 2:
>  
> I know i have to set 
> # tc filter add dev eth1 parent 1: protocol ip prio 100 match ip
> src 10.0.02 classid 1:2
> between the class and filter where i point to the src ip. But it wont
> accept the config. telling me that 
> 
> Unknown filter "match", hence option "ip" is unparsable
> 
> It's breaking my neck soon am i'm going crazy :)
>  
> If any have a working script with more than 256 hosts, i would greatly
> appreciate it :)
>  
> Thank You
>  
> Regards 
>  
> Matias Bjørling
>  

_______________________________________________
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:[~2003-05-27 14:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-27 14:11 [LARTC] Hashing Filters Repost Matias Bjørling
2003-05-27 14:49 ` Gideon le Grange

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.