Score:0

Ingress traffic shaping with OVS port

sd flag

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?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.