探讨了网络仿真软件NS2 的结构、功能、仿真原理及仿真方法以及UDP 协议的特点, 在此基础上深入分析了系统模型和链路结构。通过NS2 平台对吞吐量、丢包率、带宽和传输距离进行仿真测试,最后给出了在无线网络和有线网络中的适用范围。 关键词:UDP;吞吐量;丢包率;带宽 Abstract: The paper discussed the structure, function, principle and method of NS2 and the characteristic of the UDP protocol. Furthermore, an in-depth analysis of the model of system and link construction was carried out. And the system was tested using Network Simulator 2 (NS2) on throughput, packet drop rate, bandwidth, transmitting distance. Finally it gave the appropriate application field in wire line and wireless networks. Keywords: UDP;throughput;packet drop rate;bandwidth