## 3 DenseNet-Hybrid Control Plane Architecture
### Control Logic Switching Algorithm
\begin{table}
\begin{tabular}{p{85.4 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**Parameter** & **Value** & **Explanation** \\ \hline \(CPLR_{max}(\%)\) & 15 & \begin{tabular}{l} CPLR value over which the network is not operational \\ in centralized mode. \\ \end{tabular} \\ \hline \(\delta\) & 0.5 & \begin{tabular}{l} Slope that if exceeded for two consecutive periods \\ implies switching to distributed mode. \\ \end{tabular} \\ \hline Period & 10 & \begin{tabular}{l} Period (in s.) with which CPLR is evaluated by local \\ agent of each node. \\ \end{tabular} \\ \hline Network size & 9, 16 & Number of nodes in the grid. \\ \hline CPLR (\%) & 5, 10, 15, 20, 25 & \
\begin{tabular}{l} Average CPLR values generated to test network \\ performance. \\ \end{tabular} \\ \hline Links impairments & 0, 1, 2, 3, 4, 5 &
\begin{tabular}{l} Number of link impairments (switching links up/down) \\ randomly distributed through the network (yet \\ guaranteeing having a connected graph). \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The experimental parameters and their corresponding values. SDN controller. We used netem [27] in combination with TCLink to add impairments to all of the communication channels (including the channel that connects the SDN controller to the gateway node) in our emulated scenarios. We also broke data plane links (e.g., the link between two nodes) randomly by maintaining a sequence of link down/up at arbitrary periods of our emulation time. We did so to emulate the extreme instability that could appear in a wireless channel, and, in this sense, it represents a quite complex situation to be handled by the control plane. As with data plane link failure, control messages (_PortStatus_, _FlowMod_, _PacketIn_, and _PacketOut_ messages) [5] continue being exchanged between the SDN controller and data plane nodes in order to redirect these control messages to the SDN controller over the degraded channels. Moreover, in our evaluated scenarios, every 5 s, LLDP messages are exchanged between the SDN controller and the forwarding nodes; the SDN controller knows about the topology by receiving LLDP packets from the data plane nodes. We performed evaluations with different network sizes under unreliable conditions, by injecting various flows in order to understand what were the CPLRs that allowed the control communication channel to operate (even if with difficulties) and those for which it was impossible in most repetitions. Figures 4-7 depict the data plane performance metrics (aggregated throughput and average latency) during unreliable control plane conditions of canonical-SDN for various network sizes (blue curve for three flows and red curve for five flows in the centralized case). We injected three and five TCP flows in each topology and varied the CPLR of each link. We also broke four data plane links randomly during our emulation time. For both network sizes, the results reveal that the increase of CPLR caused degradation of the data plane throughput and substantial growth of the latency in the canonical-SDN scenario, which is enormous for a CPLR of 25%. In the evaluated scenario, during the presence of link impairments in the data plane, the affected nodes sent _PortStatus_ messages to the SDN controller to inform the SDN controller about data plane link failure. In this case, due to the presence of faulty control communication links between the SDN controller and the forwarding nodes, the control messages (i.e., _PortStatus_, _PacketIn_, _PacketOut_, and _FlowMod_) were dropped and could not be exchanged on time. Moreover, LLDP messages that were used by the SDN controller for discovering network topology, were also dropped. As the SDN controller and forwarding nodes used a TCP connection to maintain the communication between them, dropped packets were retransmitted again. Therefore, for low CPLR values (e.g., 10%) throughput was maintained to an acceptable level through TCP retransmission of control messages.