## 3 DenseNet-Hybrid Control Plane Architecture
### Hybrid Node Architecture
#### 3.2.2 Local Agent  
We included a local agent in the data plane node in order to enable centralized or distributed control depending on the reliability of the control communication channel between data plane devices and the centralized SDN controller. The local agent is composed of _(i) a CPLR detector (ii) a decision module, and (iii) a rules modifier_. The module _CPLR detector_ is based on a monitoring framework that continuously infers the reliability of the control plane by periodically monitoring the status of the control communication channel. In this  
Figure 2: Hybrid node architecture with an integrated local agent.  
paper, the metric is based on determining the packet loss ratio of the control communication channel.  
The resulting metric is referred to as the Control Packet Loss Ratio (CPLR) (as well as the slope of the \(CPLR\) vs. \(t\) curve), which determines the status of the control communication channel between the data plane node and the SDN controller. Depending on the reliability of the control communication channel, which is determined by the CPLR value of the links, as well as the CPLR trend, the decision module integrated into the data plane nodes (see Figure 2) decides activation of the distributed operation from the centralized operation and vice versa. In this sense, it embeds a control logic switching algorithm (see Section 3.3) that selects the mode of operation of network nodes by detecting trends that describe the quality of the control communication channels.  
The prediction is based on the various measurements gathered from the centralized or the distributed control plane logic, which is active in a given data plane node. Under a high loss regime, the decision module triggers the action to perform network switching from centralized to distributed control plane operation. Then, the _rules modifier_ of the local agent pushes some predefined rules to activate the distributed operation in the node that is decided by the decision module.  
Though the network switching operation happens because of the failure of the centralized operation, the module \(CPLR\)_detector_ of the local agent continues monitoring the control communication channel as well as the control plane. While the control plane as well as control communication channel performance becomes fair and the \(CPLR\)_detector_ of the local agent characterizes the control channel as a reliable-enough medium by measuring the CPLR, the decision module again triggers the action to switch back network operation to a centralized mode.  
2.3 Interaction between the Data Plane Node Forwarding Pipe, The Local Agent, and the Centralized SDN Controller  
By default, packets are tagged with a VLAN ID to enable the use of a centralized control plane logic embedded in the SDN controller. In the following, we summarize the centralized operation.  
1. When a packet with VLAN ID is received by a physical interface of the SCS, the SCS conducts a lookup in its flow tables to find a match for the current packet.
2. If a match is found in one of the flow tables, the packet is then forwarded according to the rule installed previously by the SDN controller into that flow table. Otherwise, the incoming packet is forwarded to the centralized SDN controller for the appropriate handling of the packet according to the policies defined. Section 3.2.4 recalls the regular operation of canonical SDN.  
Figure 3: Packet processing in the SCS flow table.  
3. The centralized SDN controller installs the necessary OpenFlow rules to serve the current incoming packet. Thus, the forwarding data plane node simply follows the instructions set by the SDN controller to forward a packet.
4. The _CPLR detector_ module of the local agent periodically monitors the control communication channel as well as the control plane by inspecting CPLR.