I have a ovs topology like this:
h1
|
|
[SW 1]
/ \
/ \
[SW 2] [SW 3]
\ /
\ /
[SW 4]
|
|
h2
Traffic is sent from h1 to h2. I want do this thing: in normal traffic will go in path: sw1 -> sw2 -> sw4. But, if traffic rate is more than 300kbit/s, rate exceeded traffic will go through path sw1 -> sw3 -> sw4. I know ovs egress policy will drop rate exceeded traffic, so i tried use tc filter with mirred action:
sudo tc qdisc add dev s1-eth1 handle ffff: ingress
sudo tc filter add dev s1-eth1 parent ffff: protocol ip u32 /
match ip src 10.0.0.1/32 /
action police rate 300kbit burst 100k conform-exceed pipe /
action mirred egress redirect dev s1-eth2 /
with s1-eth1 and s1-eth2 is ports connect s1 with s2 and s3. But it doesn't work. So, can anybody help me to do this?