Nowadays business and users traffic demands are getting higher and higher, leaving optical fiber as the only reliable solution to meet its demands, and in access networks the dominating technology is Passive Optical Networks (PONs). In this work we tackle the latest version of the GPON family, the NG-PON2. We analyze the Physical Media Dependent (PMD) and Transmission Convergence (TC) layer requirements and what is standardized in each one. We also have a look into the SDN paradigm, the OpenFlow protocol and the SIEPON (IEEE 1904.1) standard. In the TC layer specifications, of NG-PON2, it is not standardized the bandwidth allocation of the system, thus we set ourselves to create a simple Dynamic Bandwidth Allocation (DBA) algorithm that would optimize the use of channels and wavelengths. Taking into account the NG-PON2 technology and all its features, the emerging trend to extend SDN to the optical access networks, the multi-vendor adaptation provided by the SIEPON stantdard, andthe need to have a platform to develop and test DBA scheduling algorithms made that the creation and deployment of a fully SIEPON-SDN-NG-PON2 emulation environment became the main goal of this work.