What I have tried to stitch together in this post is how a packet flows between a OpenFlow enabled network device to the controller which processes it (& how or using which interfaces) and return back path of the packet.
You might have seen the standard OpenDaylight architecture as below already.
- OpenFlow Enabled Devices: This is the network infrastructure that is managed via OpenDaylight. In this case OpenFlow plug-in.
- Protocol Plugins: OpenDaylight supports these protocols for managing your network devices. One of the plugins is OpenFlow.
- Service Abstraction Layer (SAL): Magic! This layer does all the plumbing between the applications and the underlying plugins.
- Controller Platform: These are the applications that come pre-bundled with OpenDaylight to manage the network. (You can write your’s too!)
- Network Applications: These are applications with leverage REST NBI of OpenDaylight to build intelligence. Here is a sample Network Statistics SDN Application that I have done!
Now, below is how packet flow from network to OpenDaylight & back to network takes place:
- A packet arriving at a network device will be sent to the appropriate protocol plugin of OpenDaylight which is managing the switch.
- IPluginOutDataPacketService: The plugin (in our case OpenFlow Plug-in) will parse the packet, generate an event for Service Abtraction Layer (SAL) for further processing.
- IListenDataPacket: SAL will dispatch the packet to all the modules listening for DataPacket. These could be existing OpenDaylight applications like ARP Handler of your applications.
- IDataPacketService: Application/Module does the processing on the packet as per the business logic built and sends a PACKET_OUT using IDataPacketService.
- IPluginInDataPacketService: SAL recieves the DataPacket and dispatches it to the modules listening for plug-in DataPackets. In this case OpenFlow plugin.
- OpenFlow plugin then sends the packet back to the switch from where the packet was originated.
This is as per my understanding & if you think I have missed something or you need more details and code samples, let me know.