APP下载

基于NS2的802.11协议教学实验设计

2020-06-04李东晖尹云飞

计算机时代 2020年5期
关键词:机制测量实验

李东晖 尹云飞

摘  要: 提出使用NS2设计一个802.11协议的教学实验,并介绍了实验过程。在隐蔽站条件下测量吞吐量和延迟,加深对隐蔽站问题、虚拟载波侦听机制和确认机制的理解。测量节点耗能,并与SMAC协议进行比较,认识802.11协议的耗能性能。该实验使用TCL脚本语言即可完成,无需使用C++,难度适中,为802.11协议的实验教学提出一种方案,有助于学生实践能力的培养。

关键词: 网络模拟; NS2; 802.11; TCL

Abstract: This paper proposes to design an 802.11 teaching experiment on the platform of NS2 (Network Simulator version2), and introduces the experiment process. On the condition of hidden stations, the throughput and the delay are measured, which helps deepen the understanding of Hidden Station Problem, virtual carrier sensing and the acknowledge mechanism. The energy consumptions of 802.11 station and SMAC station are measured respectively and the results are compared to help cognizing the energy consumption feature. The designed experiment can be completed by using TCL scripting language, but not C++, so that the experiment is moderate difficult. This experiment project introduces a new solution to the experiment teaching of 802.11, and is helpful to cultivate students' ability of practice.

Key words: network simulation; NS2; 802.11; TCL

0 引言

IEEE 802.11协议是一种无线局域网协议[1],是无线网络、无线传感器网络和计算机网络等课程的教学内容。实验是重要的教学环节,实验可在真实平台上或者模拟平台上开展,真实平台需要设备投入,而模拟平台由于有免费的模拟软件可用,因此不存在购买的问题,免费的模拟软件在应用上也具有较大的灵活性。常用的网络模拟软件有NS2,OPNET,MNET++等,其中NS2[2]具有组件丰富、免费、开源和使用广泛等特点,能够满足一般教学需要。NS2使用TCL和C++两种编程语言,其中TCL语言需要花课时介绍。

实验的重点是观测802.11协议的网络性能,并将其和隐蔽站问题结合,隐蔽站问题既是无线局域网的重要问题,也是教学的难点[3],NS2的802.11组件能够模拟虚拟载波侦听机制,在该机制开启和关闭条件下分别测量吞吐量和延时等,通过比较,加深对隐蔽站问题、虚拟载波侦听、RTS/CTS机制和确认机制的理解。实验的另外一个重点是测量802.11协议的耗能,并与节能型的SMAC[4]协议进行比较,理解协议的工作原理和特点。

1 实验设计

1.1 实验目的

设计802.11协议的网络模拟验证性实验,观察隐蔽站问题,测量吞吐量、延时和耗能。……

登录APP查看全文

猜你喜欢

机制测量实验
记一次有趣的实验
做个怪怪长实验
自制力是一种很好的筛选机制
NO与NO2相互转化实验的改进
实践十号上的19项实验
测量
破除旧机制要分步推进
注重机制的相互配合
打基础 抓机制 显成效