An SDN controller based on the OpenFlow protocol written in the Java language.
The basic architecture, like webserver, has an underlying module that maintains the switch connection information, and when a switch is connected to the controller, Floodlight saves the connection to the connection pool and communicates with the switch by NIO.
The controller also contains other switch packet storage processing modules, such as the Network topology module (Compute shortest communication path), Link discovery module (using the LLDP protocol to discover the topology of the network changes), the Device Management module (responsible for the completion of the MAC address and IP address mapping), The storage module (load stores the storage state of each switch, such as saved stream table entries, etc.), the RESTAPI module (responsible for the management of flow table entries through Restapi), the WebUI module (providing a web interface, querying the controller state).
Floodlight determines which modules are loaded by configuration information, and which messages are registered by the module at the same time.
Floodlight has two main functions in general:
- Handles the switch connection and converts the OpenFlow message to event (events) so that other modules can listen for processing. such as the discovery of switches, link failures, port failures, received packets and other messages.
- Make decisions about certain specific OpenFlow messages (for example, Packetin, flowremoved, portstatus, etc.) and forward them sequentially to the configured listening module. Each module then decides whether to process this message and pass it to the next listener or stop processing the message.
The ability to handle event messages that require a module that handles OpenFlow messages implements the Iofmessagelistener interface.
The event has the connection information of the switch, which can be manipulated by the switch, and the information of other switches can be obtained and manipulated by the global method.
The overall feeling is similar to the webserver pattern.
- A module that maintains client connections, a servlet for Java (Controller maintenance switch connection, Netty)
- There is a module that handles client requests, sending request and response to the controller (the Director abstracts the change of the switch into an event, sends it to the appropriate module for processing, and can operate on the switch when the module is processed)
Insufficient: At present, the controller's custom module network programming mode still needs to write a lot of code, is a computer language-oriented program portable mode, rather than network-oriented. This results in a great effort to write custom modules, long development cycles, and the difficulty of debugging and discovering errors in flow table item decisions.
Floodlight use Feeling