| The application diversity is important in network development. Especially in recent years, as a new Internet technology, P2P develops fast, and there are more and more new kinds of P2P protocol and application software. The development of these applications will inevitably lead to the increase of network traffic, and often lead to network congestion. So, network bandwidth has become an urgent problem to be solved. Router is a key equipment to access network. To achieve flow control in the router is a more effective solution to network congestion problems. However, commercial routers can not meet the requirements of personalize on the flow control which is due to the constantly enrich of network applications. So it becomes a hot research to achieve the functions which are users want in the open-source router.A small open-source router is studied in this dissertation. Firstly the dissertation analyzes the states of flow control and open-source router research, and illustrates the necessity and significance of increasing the network traffic control system in open-source router. As follow, the packet capture mechanism libpcap and pf_ring are analyzed, and the reason why is pf_ring chosen. Then, it is analyzed why is it to control the majority of P2P network traffic, and the port identification method, the deep packet inspection identification method, (TCP / UDP) IP pair method and (ip, port) pair method, and other P2P traffic identification method are studied. Based on the above method a new P2P identification model is proposed, it identify the P2P traffic accurately and also enhance the efficiency of recognition. The system uses netfilter, iptables and TC in flow control model, it proposes different data flow for different control strategies according to the influence of networks with data flow. Based on the above theoretical basis and practical experimental environment, design and implement traffic control system, and achieve a new function in open-source router. Lastly, the experiments show that the network traffic control system has played a good role, thus ensured the smooth network transmission, and avoided network congestion. |