Hi guys..sorry for a giving a long gap after the last post, we had our final exams so we couldn't do much.
Okay so where are we? In the previous blog we told you the we are shifting to OpenVswitch part in order to support multiple controllers. As you all know, Mininet makes calls to the underlying OpenVswitch by passing the commands to the 'cmd()' method.
Example: self.cmd( 'ovs-vsctl add-br', self ). Here 'ovs-vsctl add-br' is a command and self is the parameter you are passing to the command.
Let me explain what is our goal and what is the approach we have decided to take-
Our goal: We want each switch to talk to a particular controller depending on the source address of the incoming packet. An example will make this much clear- Assume there are two networks represented by network numbers, n1 and n2. Both these networks are connected to switch, s1, which is connected to, say, two controllers, c1 and c2. Now what we want to achieve is that whenever a new packet comes from, say, network n1, we want the switch to contact controller c1 in order to obtain the flow; similarly when new packet comes from network n2, the switch should contact controller c2. This was we are trying to split the network and making the switch contact different controller for different packets.
Our approach: After some brain storming sessions, we have decided on a way to specify the switch about the way to split the network. As I told before, the commands to switch are sent via 'cmd()' in Mininet. Yes, we added a new command line argument to specify the network splitting in Mininet as explained in previous post, but what about specifying the OpenVswitch? How will the switch know which controller does is have to talk to? Moreover, when should the switch make the decision of sending a packet to a controller?
Here are the solutions we have decided to provide for all the above questions:
Firstly, we have to give a new command line argument for one of the commands on OpenVswitch. Mininet will call the command along with the command line argument, notifying OpenVswitch that the user wants to split the network.
Secondly, we decided to provide some form of table which can be referred by the switch whenever a new packet comes in and the table would contain information like n1:c1 specifying which controller to talk to for a given network. The progress about this will be explained in the next post.
Thirdly, we have to look-up this table when a packet-in action occurs and there is no flow entry for that packet, as in it is a new packet.
But if you have tried to see how source code of OpenVswitch looks, it is all written in C!! Till now we looked at source code of Mininet written in Python, now we have to shift to C, which is going to cause quite some trouble. And also OpenVswitch is itself an open-source project which is really very huge! You can clone the source code by the directions given here. Next blog, we will tell you what are the modifications done in OpenVswitch.
No comments:
Post a Comment