为了使研究者更好地理解802.11协议在NS2中的仿真过程和原理,在分析NS2系统工作机制的基础上,结合802.11协议的工作原理,对802.11协议物理层信道判断和数据收发机制,以及MAC层分布协调功能工作机制在NS2中具体的仿真实现过程进行了分析与说明.同时针对NS2中仿真时不考虑收发节点距离对数据接收率影响的问题,在仿真源码中增加了距离对数据接收率的影响比重,仿真结果表明,在理解NS2中实现802.11协议的基础上,对仿真机制的改进是有效的,并为相关研究者提供了借鉴.%In order to make researchers understand the simulation process and principle of 802. 11 protocol in NS2, based on the explanation of working principle of NS2, the concrete simulation process in NS2 about the mechanism of channel judgment and data transceiving in physical layer is analyzed, and the distributed coordination function of MAC layer combined with working principle of 802. 11 protocol is explained. In addition, the simulation in NS2 ignores the effect of distance between nodes on the data receiving rate. This paper increases weight of effect of the distance on data receiving rate. The simulation result shows that the improvement of 802. 11 protocol in NS2 is effective, and provided a reference for related researchers.
展开▼