Usage of Powerline Communication (PLC) technology in-home for entertainment applications and in access networks for management of smart grid (SG) applications has lately received much interest from customers and manufacturers of communication devices. For the further promotion of this technology on the market a PLC performance study is helpful. This has become a hot topic for many researchers. As far as the experience in wireless communication modeling cannot be directly taken for an accurate analysis of the PLC network, a necessity of a PLC model has arised. There was much work done on the modeling of the PLC protocols' OSI layers separately. This paper describes the simulation model of the ITU G.hn standard for a PLC medium. The model contains the detailed implementation of multiple OSI layers. It uses accurate physical layer and channel models. The data link layer is implemented based on ITU specifications. Transport and network layers have become available with the usage of the ns-3 simulation environment. The application layer is based on a traffic measurement tool, which was used in our test field measurements.