IP hashing filter in traffic shaping

1

I am using a traffic shaping by IP hashing filter.

I have Five networks /24 : 192.168.1.0/24, 192.168.2.0/24 .. 192.168.5.0/24

so i create a table with 5 cells and each cells has 256 cells.

this is a part of my configuration :

$tc qdisc add dev $DEV root handle 1: htb default 90
$tc class add dev $DEV parent 1:0 classid 1:1 htb rate 100Mbit
$tc filter add dev $DEV parent 1:0 prio 10 protocol ip u32

# divisor 5 --- table for 5 cells:
$tc filter add dev $DEV parent 1:0 protocol ip prio 10 handle 8: u32 divisor 5

for i in 1 2 3 4 5; do
$tc filter add dev $DEV parent 1:0 prio 10 handle ${i}: protocol ip u32 divisor 256
done

for i in 1 2 3 4 5; do
$tc filter add dev $DEV parent 1:0 protocol ip prio 10 \
u32 ht 8:$[i-1]: \
match ip dst 192.168.${i}.0/24 \
hashkey mask 0x000000ff at 16 \
link $i:
done

$tc filter add dev $DEV parent 1:0 protocol ip prio 100 u32 ht 800:: \
match ip dst 192.168.0.0/21 \
hashkey mask 0x00000700 at 16 link 

But my problem is that it doesn't let me to create a table with 5 cells and says i must create table with 256 cells. how can i do it ?

linux
networking
linux-networking
traffic-shaping
asked on Server Fault Apr 4, 2015 by samie

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0