PONs (Passive Optical Networks) are the most promising networks for the future. In 1998, the first standard of PONs was developed. Since that time, quality of optical transmissions and technologies has been massively improved and today's standards are capable of transferring an enormous amount of data. For example, NG-PON2 networks are able to transfer up to 40 Gbit/s, which means these networks provide subscribers with a symmetric bandwidth up to 10 Gbit/s using 4 different wavelengths. The higher transmission speeds are required, the more sophisticated bandwidth allocation reflecting requirements of each ONU (Optical Network Unit) in real-time is necessary. This article deals with implementation of NG-PON2 networks using OPNET Modeler and simulations of static and dynamic grants allocations. We also present a modification of dynamic bandwidth allocation for increasing the free bandwidth of idle ONU to heavily loaded ONU(s). We propose a simplified NG-PON2 (Next-Generation PON stage 2) network, for example, activation machine for ONUs is not implemented. At present, OPNET Modeler is being used to simulate EPON (Ethernet PON) networks that use a different approach for data transmission. Thanks to its own implementation, basic data transmission in NG-PON2 networks, and simulations of algorithms for dynamic bandwidth allocation can be achieved.