Hierarchical switches workflow in SDN

2019-07-26 18:43发布

问题:

Is is possible to send data packets from end to end nodes(Hosts) in SDN using OVS switches, where OVS switches formation is like tree or hierarchical structure and only the top or higher level OVS switches can communicate with SDN Controller, not the leaf or intermediate switches.

回答1:

If by "top or higher level" you mean the root of the tree, then the answer is -- it depends. In an SDN, the controller typically needs to be connected to the switches at some point in order to make forwarding decisions and install flows in the switches. However, some switches, like OVS, have a fail-mode where if the switch is not connected to a controller, you can choose how it is to behave.

  • If the OVS fail mode is set to "secure", the switch will only forward packets according to how its flow table is currently programmed. If a packet does not match any flow, it will be dropped.
  • If the OVS fail mode is set to "standalone", the switch will mimic a learning switch and forward packets automatically between switch ports.

More information on OVS fail modes can be found here (search for "fail-mode"): http://openvswitch.org/support/dist-docs/ovs-vsctl.8.txt

Let's say you have a simple topology:

         c
         |
     +--s0--+
     |      |
     s1     s2
     |      |
     h1     h2

where c is your controller connected only to s0. s1 and s2 are set in fail-mode=standalone. In this case, if c installs flows to forward packets between s1 and s2, then h1 and h2 will be able to communicate. On the other hand, if either of s1 or s2 are in fail-mode=secure, then unless there already are flows in the secure switch flow table(s) to forward packets between h1 and h2, then h1 and h2 will not be able to communicate.

Side note: You can install flows manually in an OVS using ovs-ofctl: http://openvswitch.org/support/dist-docs/ovs-ofctl.8.txt

This command can be used locally on s1 and s2 to install the required flows if you use fail-mode=secure and did not proactively install flows in them with a previously-connected controller.