## 2 State of the Art
### Design of a SDN Management Layer to Control Service Reconfiguration Policies on the SDN-GPON Model  
As it was said before, we have deployed an OpenFlow-GPON scenario to propose moving some time-critical service reconfiguration policies to an external SDN controller that provide a full SDN control of the GPON network operation and configuration. In order to do it, we have programmed an SDN management layer that interacts with the ODL controller, which is responsible for periodically monitoring the demanded bandwidth of residential users (ONTs traffic) and to apply real-time policies to efficiently reconfigure the maximum allocated bandwidth of their contracted services, as it can be observed in  
Figure 1: The software defined networking (SDN)-OpenFlow scenario implemented in the gigabit passive optical networks (GPONs) testbed. Figure 2. Indeed, our approach configures Internet services and their associated maximum bandwidth to users according to real-time bandwidth requirements of users by means of flows that are sent by the SDN controller following the instructions of the SDN management layer. Our OpenFlow-based proposal provides several advantages for ISPs and network operators. First, although legacy OLT/ONT devices are built compliant with the GPON standard, many times the management software and the Application Programming Interfaces (APIs) provided by vendors to configure the network are quite different, thus causing interoperability and compatibility issues between the equipment of different vendors. Therefore, our OpenFlow proposal permits controlling the legacy GPON equipment of different vendors since every device (OLT, ONT) understand the same protocol, that is OpenFlow, due to the emulated SDN layer implemented on each of them, as it can be observed in Figure 2.  
Secondly, our proposal allows simultaneously controlling several SDN controllers and GPONs using the same SDN management layer in a centralized, efficient, and dynamic way. Then, as it is shown in Figure 2, the SDN management layer can deal with a set of GPONs sending configuration instructions to its corresponding SDN controller. Moreover, in our approach, any SDN controller capable of understanding the OpenFlow protocol can be deployed in the network scenario (ODL, ONOS), since the SDN management layer is able to interact with every controller. As a consequence, these advantages optimize the network operation and reduce its complexity, since our approach allows remotely controlling and allocating flows to provide and configure services in GPONs in a dynamic, programmable, centralized, and unified way. Therefore, to carry out this dynamic control, the SDN management layer needs to know the packet statistics of every OVS (COVS, RVOS), so these statistics are periodically sent by every OVS to the ODL and the ODL to the SDN management layer. These statistics are sent in specific OpenFlow messages, called OFPM_METER messages, which contain the number of packets and bytes processed by the meters inside the OVS, the number of packets and bytes deleted, and the time the message is sent. Then, the SDN management layer is continually executing a dynamic bandwidth management program, which is listening to the messages sent by every OVS so when the program receives a message, it extracts the different statistics of the message together with the MAC address of the corresponding residential user (ONT). These data provide the real-time demanded bandwidth of each user, since one OVS is located at each residential home just before the ONT. In order to calculate the mean requested bandwidth using these OpenFlow statistics of the different residential OVSs (ROVSs), fixed sliding windows that store this information are used, one for each service of the residential subscriber.