Skip to contentSkip to conversation

Useing HashTable

LARTC [email protected] 2 participants 2 messages Oct 22, 2002

lore
Share & tools
lore
#0 lore raw

I have a quesiton about hashtables I'm trying to understan how I can use this.
the default hash table would be 800::

tc filter add dev eth1 protocol ip parent 1:0 prio 5 u32 ht 800:: \

        match ip src 1.2.0.0/16 \
        hashkey mask 0x000000ff at 12 \
        link 2:

tc filter add dev eth1 protocol ip parent 1:0 prio 5 u32 ht 2:7b: \

        match ip src 1.2.4.123 flowid 1:2

so I would understand this to get the last octect of the IP address and use it to choose the ht

I'm wondering if I could set the mask to something like 0x0000ff00 so that I could only get the 3rd octect? Or am I not understanding how the mask works?
and also could I use it like a normail netowrk mask so that I could use
something like 0x00000080 or something?

-zoop

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw
Quoted 3 lines · On Mon, Oct 21, 2002 at 06:08:39PM -0700, [email protected] wrote:

I'm wondering if I could set the mask to something like 0x0000ff00 so that I could only get the 3rd octect? Or am I not understanding how the mask works?

Would also work, yes.

Quoted 2 lines

and also could I use it like a normail netowrk mask so that I could use
something like 0x00000080 or something?

Even that!

Regards,

bert

Signature · 5 lines
http://www.PowerDNS.com          Versatile DNS Software & Services
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/