1

I have a question.

I have now configured the topology using mininet. Here I want to limit the flow table size of the switch.

Is there a way to limit the flow table size of the switch??? Or can OpenVSwitch limit it?

Thank you.

pchaigno
  • 11,313
  • 2
  • 29
  • 54
장예훈
  • 35
  • 4

1 Answers1

1

Yes, you can instruct Open vSwitch to limit the size of a flow table, either by refusing new flows, or by evicting old flows. From the ovs-vsctl documentation:

Make flow table 0 on bridge br0 refuse to accept more than 100 flows:

    ovs-vsctl -- --id=@ft create Flow_Table flow_limit=100 overflow_policy=refuse -- set Bridge br0 flow_tables=0=@ft

Make flow table 0 on bridge br0 evict flows, with fairness based on the
matched ingress port, when there are more than 100:

    ovs-vsctl -- --id=@ft create Flow_Table flow_limit=100 overflow_policy=evict groups='"NXM_OF_IN_PORT[]"' -- set Bridge br0 flow_tables:0=@ft
pchaigno
  • 11,313
  • 2
  • 29
  • 54
  • Answer Thank you very much. I am using mininet. Can I use that command in mininet??? – 장예훈 Jan 13 '19 at 16:59
  • There's no reason it shouldn't work with Mininet. Anything you want me to detail to accept my answer? – pchaigno Jan 13 '19 at 17:18
  • One of the commands above, on the host, with `s1` instead of `br0`. – pchaigno Jan 13 '19 at 19:07
  • I have entered the above command using topology mininet and controller using onos. But with onos, the command does not apply ... I tried to set flow_limit to 10, but what is the problem..??? – 장예훈 Jan 14 '19 at 07:44
  • I checked again. There are terminals running mininet and onos. I opened a new terminal and changed s1's flow_limit to 10. Then, I found that onos has no flow limit. However, in the new terminal, the result of checking in ovs_ofctl dump-flows s1 confirmed that there are only 10 flows. What's the problem ?? – 장예훈 Jan 14 '19 at 09:18
  • The first command is to delete the flow that comes later when the flow reaches 100??? What happens if the second command exceeds 100??? – 장예훈 Jan 14 '19 at 12:13
  • When saying "Onos has no flow limit", I guess you mean the controller keeps more than 10 flows per switch in its own copies of the tables? The first command refuses to add new flows after the 100th; the second replaces the oldest flow by the new flow after the 100th. – pchaigno Jan 14 '19 at 17:28
  • Thank you for your answer. Yes, there are more than 10 flows in the switch if you check on the onos controller. However, 10 are in additional state and the rest are in additional standby state. I used the first command. Then, the flow cannot be added and the packet cannot reach its destination. But all the packets arrive well. Is there another reason? – 장예훈 Jan 14 '19 at 17:39
  • I guess maybe all packets go through the controller when they don't find a matching rule in the switch... – pchaigno Jan 14 '19 at 18:36
  • So, even if there is no flow in the switch, will it arrive using the controller?? Can you tell how it work?? – 장예훈 Jan 15 '19 at 07:27