Planning your application

Before you can write your application, you should at least have an outline of what a successful application would look like. It does not need to be very detailed; in fact, most people don't have all the details. But you should have at least a high-level outline of what you envision it to be. It is like writing an essay: you would need to know where to start, then illustrate your points, and know what the ending would be like. In our scenario, we know our application should perform the same as a switch, so we would envision it to do the following:

  1. Upon initialization, the switch will negotiate its capabilities with the controller so that the controller will know which version of OpenFlow operations the switch can perform.

 

 

  1. The controller will install a table miss flow action so that the switch will send any table miss flows to the controller and a PacketIn event for further instructions from the controller.
  2. Upon receiving the PacketIn event, the controller will perform the following:
    1. Learn the MAC address connected to the port. Record the MAC address and port information.
    2. Look at the destination MAC address and see whether the host is already known. If it is a known host, use the PacketOut function on the port and install the flow for future packets. If the host is unknown, use the PacketOut function to flood to all ports.
  3. This step is optional during initial application construction, but when in production, you want to set a timeout value associated with both the MAC address table as well as the flow. This is to conserve your resources as well as to avoid stale entries.
OpenFlow packet-processing pipeline

Now that we have a good idea of what is required of us, let's look at the stock application and its different components.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.188.138