Abstract:This paper researches the question of how to create a new network flows generator in NS.After study on the principle and realization of flows generator in NS, we set up a mathematical model for VBR flows generator, and propose a method of migration for a new flows generator in detail, and analyse key programming code in VBR generator. Experiments on the generation and random rate of network flows showed that the VBR generator has effective and is adaptive to network simulation in different environment with different parameters.