## 5 Conclusions  
In this paper, we have proposed and experimentally tested an OpenFlow-based approach over a legacy GPON to allow real-time service configuration policies applying SDN techniques. In this way, we have implemented an external SDN management layer able to communicate with SDN controllers, in this case ODL, to send orders through OpenFlow messages that configure and modify Internet services in residential users connected to the GPON. In particular, the SDN management layer can configure real-time Internet services and their associated maximum bandwidth to users according to their real-time demand and contracted bandwidth requirements. These service configuration policies do not require a cycle-by-cycle communication between the SDN management layer and the OLT, thereby not degrading performance despite the distance between the SDN infrastructure and the PON. Therefore, our approach provides a global network management and configuration of legacy GPONs using OpenFlow. Results have shown that the SDN management layer efficiently implements online service reconfiguration policies over residential users and their services demonstrate a good performance in terms of speed and efficiency, since it responds quite quick to real-time bandwidth requirements and fluctuations of bandwidth transitions are not very important.  
This SDN proposal could provide great advantages for the GPON network and configuration. In fact, the approach allows ISPs or network operators to simultaneously control GPONs that belong to different providers, avoiding interacting with specific APIs of equipment from different manufacturers and minimizing compatibility problems. In our approach, every PON device can understand the OpenFlow protocol, since we have emulated a SDN layer over each device and consequently the SDN management layer interacts with SDN controllers (ODL in this case) in a transparent and automatic way. Even more, the implemented solution allows simultaneously controlling several SDN controllers and GPONs from the same SDN management layer in a centralized, efficient, and dynamic way. Finally, our approach allows moving global service configuration strategies out of the PON intelligence to an external SDN management layer which dynamically adjust these types of strategies according to the real-time QoS requirements, permitting ISPs/Network Operators to enable new business models for residential users. As a consequence, these advantages optimize the network operation and reduce its complexity, since it permits remotely controlling and configuring service profiles (Internet, VoIP, Video) in a dynamic, programmable, centralized, and unified way.  
Conceptualization, N.M., J.C.A., L.d.M., and R.J.D.; Methodology, N.M., J.C.A., I.d.M., R.J.D., P.F.; Software, D.d.P., N.M., and J.C.A.; Investigation, N.M., D.d.P., J.C.A.; Validation, I.d.M., R.J.D., P.F., R.M.L., and E.J.A., Writing--Original Draft Preparation, N.M., D.d.P., J.C.A., I.d.M., R.J.D., P.F.; Writing--Review & Editing, R.M.L. and E.J.A.; Supervision, R.M.L. and E.J.A.; Project Administration, N.M., R.J.D., I.d.M., and E.J.A. All authors have read and agreed to the published version of the manuscript.  
This research has been funded by the Spanish Ministry of Science, Innovation and Universities (TEC2017-84423-C3-1-P and RTC2019-007043-7), Consejeria de Educacion de la Junta de  
Figure 10: Real-time evolution of the allocated bandwidth for the residential user that contract the Premium Flexible Internet Plan.  
Castilla y Leon (VA085G19), and the European Union through INTERREG V-A Espana-Portugal (POCTEP) program (0677_DISRUPITIVE_2_E).  
**Institutional Review Board Statement:** Not applicable.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** Data is contained within the article.  
**Conflicts of Interest:** The authors declare no conflict of interest.