All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gideon le Grange <gideon@adept.co.za>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Hashing Filters Repost
Date: Tue, 27 May 2003 14:49:31 +0000	[thread overview]
Message-ID: <marc-lartc-105404707310137@msgid-missing> (raw)
In-Reply-To: <marc-lartc-105404452706529@msgid-missing>

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/

      reply	other threads:[~2003-05-27 14:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-27 14:11 [LARTC] Hashing Filters Repost Matias Bjørling
2003-05-27 14:49 ` Gideon le Grange [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-105404707310137@msgid-missing \
    --to=gideon@adept.co.za \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.