## 2 State of the Art
### Design of a SDN Management Layer to Control Service Reconfiguration Policies on the SDN-GPON Model
Each sliding window contains \(N\) samples (_win_size_), and its operation is represented in Figure 3. As it can be observed, each sample contains the total number of bytes sent by the ONT \(\left(Bytes^{ONT_{i},service_{j}}\right)\) of one specific service that passes over the ROVS, and the time in which that statistics was received \((t_{N},t_{N+1},t_{N+2},\ldots)\). Each time a sample is inserted, the estimation of the mean requested bandwidth (in Mbps) for the specific residential user and service is updated with every sample of the window \(\left(\overline{B^{ONT_{i},service_{j}}_{request}}\right)\). To calculate the term \(\left(\overline{B^{ONT_{i},service_{j}}_{request}}\right)\), at a certain instant, the mean is done with all the \(Bytes^{ONT_{i},service_{j}}\) values contained in the samples and the time they were sent. Moreover, the first sample of the queue will be discarded when the maximum duration of the window is exceeded, that is, _win_size_ samples. Sliding windows show a good performance, since they contain the updated requested bandwidth of residential users and their services. The process of assigning bandwidth to users (ONTs) and their services inside PON architectures is led by the OLT. Then, DBA algorithms (based on TDMA) are the most widespread methods, since the OLT allocates bandwidth to users in a dynamic way depending on the priority of the contracted services of users and its real-time demand. In this way, among the different bandwidth assignation disciplines, the DBA algorithm implemented in the OLT in our GPON testbed (as well as in legacy GPONs) follows a limited scheme, one of the most widespread policies in PONs due to its high efficiency and easy operation [29]. In this scheme, the OLT gives the required bandwidth to each service (_service_) of one ONT (\(ONT_{i}\)) in one cycle as long as its demand is lower than an established maximum  
Figure 3: Operation of the sliding window implemented in the algorithm. bandwidth \(\left( \begin{array}{c}B_{max}^{ONT_{i},service_{j}}\\ \end{array} \right)\) in Mbps, which consists of a minimum guaranteed bandwidth \(\left( \begin{array}{c}B_{guaranteed}^{ONT_{i},service_{j}}\\ \end{array} \right)\) that has to be ensured plus an extra best effort or non-guaranteed bandwidth \(\left( \begin{array}{c}B_{effort}^{ONT_{i},service_{j}}\\ \end{array} \right)\), which is optional and only depends on the configuration made by the operator or service provider inside the DBA (Equation (1)). \[B_{max}^{ONT_{i},service_{j}}=B_{guaranteed}^{ONT_{i},service_{j}}+B_{effort}^{ONT _{i},service_{j}} \tag{1}\]  
In case the user asks for more than this maximum, the algorithm will allocate at most this maximum value. In this way, the DBA algorithm in the OLT must ensure the guaranteed bandwidth and it may provide non-guaranteed bandwidth in case GPON resources are available. In contrast, if the demanded bandwidth is lower than the guaranteed bandwidth, the algorithm will offer this demand. Therefore, a limited scheme makes the cycle time adaptive depending on the updated demand of every ONT. Therefore, in our OpenFlow approach, the bandwidth is not only controlled by the DBA algorithm in the OLT but is also managed by the SDN layer to provide a tighter control of this process. The SDN layer limits the maximum bandwidth for each residential user (and services) and the global available bandwidth at both channels of the GPON (upstream, downstream). In this way, the DBA is configured to treat residential users equally, but allocating bandwidth considering real-time traffic demands, as the differentiation and the fulfilment of bandwidth guarantees is provided by the emulated SDN layer implemented on GPON devices (OVS). Therefore, the OVSs (ROVS, COVS) drops those packets exceeding the maximum assigned bandwidth at each channel. In this way, the maximum associated with each service \(\left( \begin{array}{c}B_{max}^{ONT_{i},service_{j}}\\ \end{array}