When configuring SOS, all the switches – whether hardware or software – must be connected to a central Floodlight controller. This controller is equipped with an SOS module that communicates with the four switches and with the SOS agents themselves. The following is a general guide to configure the SOS controller.
...
Code Block | ||
---|---|---|
| ||
$ git clone https://github.com/rizard/SOSForFloodlight.git -b sossmart-131.3 |
Then, install any Floodlight prerequisites:
...
To kill the controller (e.g. to stop and restart it), which is simply a Java process, use your favorite way of killing processes.
Setting SOS Module Parameters
The present version of the SOS module in the controller is not very intelligent and thus requires setting some configuration variables prior to running the controller. These variables will define for the controller SOS agent addresses, ports, and other SOS config options.
The file of interest is referred to as floodlightdefault.properties and is located here.
The first large chunk of the file defines a list of modules as a floodlight.modules variable that will be loaded and run when the controller starts up. We want SOS to be run, so make sure the following line is in the list:
Code Block | ||
---|---|---|
| ||
net.floodlightcontroller.sos.SOS,\ |
This will tell the controller to load the SOS module in addition to the rest in the list. Note that the trailing ,\ is only required if the module is not the last one in the list. As an example, notice that without any modification to floodlightdefault.properties, the Floodlight web interface module, last in the list, is missing the comma and backslash. (Also note that net.floodlightcontroller.sos.SOS should be in another properties file that defines the module's existence – this has been done for you though.)
After instructing the SOS module to load with the rest of the Floodlight modules, we need to modify the SOS module's parameters, which are also in floodlightdefault.properties as:
Code Block | ||
---|---|---|
| ||
net.floodlightcontroller.sos.SOS.agent-msg-port = 9998
net.floodlightcontroller.sos.SOS.agent-tcp-port = 9877
net.floodlightcontroller.sos.SOS.controller-mac = 00:26:b9:75:1d:45
net.floodlightcontroller.sos.SOS.controller-ip = 192.168.1.5
net.floodlightcontroller.sos.SOS.buffer-size = 512
net.floodlightcontroller.sos.SOS.queue-capacity = 2000
net.floodlightcontroller.sos.SOS.parallel-tcp-sockets = 64
net.floodlightcontroller.sos.SOS.flow-timeout = 15
net.floodlightcontroller.sos.SOS.dst-client-sw-port = 2
net.floodlightcontroller.sos.SOS.src-agent-mac = 02:b0:b6:91:cb:89
net.floodlightcontroller.sos.SOS.src-agent-ip = 10.10.1.2
net.floodlightcontroller.sos.SOS.src-agent-sw-port = 1
net.floodlightcontroller.sos.SOS.src-agent-ovs-port = 1
net.floodlightcontroller.sos.SOS.dst-agent-mac = 02:6b:11:90:99:05
net.floodlightcontroller.sos.SOS.dst-agent-ip = 10.10.2.2
net.floodlightcontroller.sos.SOS.dst-agent-sw-port = 1
net.floodlightcontroller.sos.SOS.dst-agent-ovs-port = 1
net.floodlightcontroller.sos.SOS.src-ntwk-switch-dpid = 00:00:00:00:00:00:00:11
net.floodlightcontroller.sos.SOS.dst-ntwk-switch-dpid = 00:00:00:00:00:00:00:22
net.floodlightcontroller.sos.SOS.src-agent-switch-dpid = 00:00:00:00:00:00:11:11
net.floodlightcontroller.sos.SOS.dst-agent-switch-dpid = 00:00:00:00:00:00:11:22
net.floodlightcontroller.sos.SOS.src-ntwk-sw-port = 3
net.floodlightcontroller.sos.SOS.dst-ntwk-sw-port = 3 |
First, let's clarify a couple of terms frequented in this configuration file: "source" and "destination." The "source" side of the network is where the request for the data originates from. It's the side of the network where the first TCP SYN packet is sent from the "source client" requesting the data. This TCP SYN packet (and other subsequent packets) are redirected to the local "source agent," which will act as a proxy for the real server hosting the data requested. On the contrary, the "destination" is the side of the network that will receive this first TCP SYN packet and respond to the request with data, files, etc. It contains the server the "source client" wants to pull data from – the "destination client" – as well as the "destination agent," which helps facilitate the data transfer on the "destination" side of the network. Note: These terms should arguably be renamed at this stage in the SOS project. They made more sense during initial testing, but should be changed now.
The first block of parameters from agent-msg-port to flow-timeout consist mostly of performance-tuning knobs that do not need to be changed under ordinary circumstances. The buffer-size, queue-capacity, and parallel-tcp-sockets parameters are directly related to SOS agent CPU and memory utilization. They can be tuned (raised or lowered) if the agents experience instability, which could be a sign of insufficient hardware resources.
The second small block consists of just a single parameter to configure the destination client called dst-client-sw-port. This is the in-network switch port, which is either an OVS or the physical switch. To set this parameter, ask yourself, "Where (on what switch port number) is the destination client machine plugged into the OpenFlow network?"
The third and fourth blocks of parameters define the source and destination agent addresses and locations in the network. We'll use the source agent as an example, but the same settings can be tweaked for the destination agent as well. The src-agent-mac and src-agent-ip variables define the MAC and IP addresses of the source agent, respectively. This is the MAC and IP of the agent machine's network interface used to route traffic into and out of the OpenFlow network. These addresses should belong to the OVS's LOCAL port, exposed as the name you assigned the OVS bridge and visible in ifconfig. Next, there are parameters to set the agent location in the network. The src-agent-sw-port defines, just as was done for the destination client, the location of the source agent in the network. Likewise, src-agent-ovs-port defines the port number leading out of the agent towards the OpenFlow network. This will be the port number of the ethernet interface attached as a port to the OVS bridge.
Lastly, we have a final block of parameters for configuring the datapath IDs (DPIDs) of the involved switches – the in-network physical switches or OVS's and the in-agent OVS's. The src- and dst-ntwk-switch variables set the DPIDs of the in-network switches, while the src- and dst-agent-switch-dpid variables set the OVS DPIDs in each agent. All four of these allow Floodlight to determine the role of each switch upon connection to the controller. The remaining parameters, src- and dst-ntwk-sw-port are the physical switch or OVS ports that lead into the network core. In an SOS deployment, there is a source LAN, a destination LAN, and a black box network in the middle, which is undefined in so long as it is a (logical) layer 2 network. The switch ports from the source and destination side LANs of the SOS deployment leading into this black box should be used here.