📄 readme
字号:
Network Simulator (ns-2) Modules for Mesh Netoworking (Vivek Mhatre, mhatre at gmail.com). DISCLAIMER: This is very much work in progress! Use at your own risk. The modifications were made with ns-2.30 Trying to compile these files with other versions may not work. Details of implementation in the ACM Sigcomm CCR July 2007 paper "Enhanced Wireless Mesh Networking for ns-2 simulator". Quick ns-2 installation on the blades. The ns-2 installation was performed such that all the modules (tcl, tk, otcl, and tclcl) were locally installed in my home in that sequence. All the original tar-balls for each of the packages are located /home/mhatre/ See the following files to know the exact ./configure command: /home/mhatre/tcl8.4.14/unix/config.status /home/mhatre/tk8.4.14/unix/config.status /home/mhatre/otcl-1.12/config.status /home/mhatre/tclcl-1.18/config.status Follow up the "./configure" with a "make" and then "make install" The options for configuring ns after installing the above packages can be found in /home/mhatre/ns/ns-2.30/config.status Grep for "./configure" Then follow it up with "make". Set the following path variables in .bashrc or .cshrc so that the new tcl executables and libraries are visible. LD_LIBRARY_PATH=/home/mhatre/tcl/lib LD_RUN_PATH=/home/mhatre/tcl/lib At this point, you should have a basic ns up and running. Installing contributed ns-Agents Follow instructions given at the following URL and install the NOAH routing agent. It is a static routing package needed for mesh routing. NOAH ROuting Agent Install the Fading Agent contributed by CMU. CMU Fading agent Install the corrected version of the above agent. Corrected Fading Agent, Rutgers Note that any addition such as NOAH or Fading should be followed up with "make depend" and then a "make" for the changes to take effect. Now ns should be running with all the external agents installed. Modules Added by Vivek All the modified .cc, .h and .tcl files in the source directory of ns have a tag VIVEK as a comment, and should be easy to spot. Cumulative Interference Model During a packet reception, current ns just compares the strength of a newly arriving packet with the current packet, and if the ration of RSSI is bigger than capture, it ignores the new packet. However, the model does not take into account the cumulative effect of multiple packets that might arrive during the reception of a given packet. This is a major limitation as pointed by Bagrodia etal. A cumulative interference model has now been implemented. We look at interference plus noise power. Note that it is necessary to specify noise power in the ns script. Files affected: ns-2.30/mac/wireless-phy.cc, h ns-2.30/mac/mac-802_11.cc, h ns-2.30/common/packet.h ns-2.30/common/packet-stamp.h Combined Shadow-Fading Current Fading model works only with Two Ray Propagation Model. I have modified it so that we can use shadowing and fading at the same time. This is needed, because shadow-fading combined with path loss is the most accurate model. See Rappaport, Stuber. Files affected: ns-2.30/mobile/shadowing.cc,h ns-2.30/mobile/prop_ricean.cc,h However, note that there is still an incomplete task whereby the randomization of shadowing through seeding has not been implemented. Earlier shadowing module had a bug whereby it recomputed the shadowing gains during each packet reception. Shadowing gains are NOT time-varying. So depending on the seed, one should generate random shadowing gains between nodes, and these should stay fixed during the course of the simulation. A new module needs to be added for this, and without this module, NO REPEATABILITY can be ensured. This is part of ongoing work. Multi SINR and Multi Rate Links Current ns version forces us to use a common rate for all the wireless links in the network (unless you use multiple interfaces). However, in reality, wireless links can use multiple (8 for 11a/g) rates. Multi-SINR multi-rate module has been added. There are 8 rates (6, 9, 12, 18, 24, 36, 48, 54 Mbps) and correspondingly, there are 8 SINRs. Each link can now operate independently at its own rate depending on its SINR. Files affected: ns-2.30/mac/mac-802_11.cc, h Auto Rate Fallback When the channel is time-varying, and there are multiple rates that can be used, one needs an auto rate algorithm to pick the best rate for each link. The original ARF (Auto Rate Fallback) has been implemented for this purpose. I also implemented AARF (Adaptive Auro Rate Fallback), but there is a bug in my implementation of AARF. For the time begin, ARF is simple and does the job, and so I did not bother to fix AARF code. One can also specify fixed link rate for each link instead of using ARF. The description of ARF and AARF can be found in the following paper. INRIA Report on AARF (and ARF) Files affected: ns-2.30/mac/mac-802_11.cc, h Framework for measuring ETX and ETT Currently, there are no broadcast MAC layer packets that can be generated for periodic probing. At least I couldn't find an easy way to generate them. So I implemented the following, so that ETX and ETT metrics can be measured with periodic broadcast and unicast probes. The ping agent has been modified to support an option whereby the receiving node does not reply back with an ICMP echo reply. This uses the newly added send-no-echo option. See the pingSend function in example scripts. There is a sniffer running on all the nodes which log the rssi of all the successfully decoded packets using printf. To avoid tampering with normal ns, separate ns executables called ns_brdcst_sniff and ns_unicst_sniff have been created as follows. Search for ETT_ETX_HACK in mac-802_11.cc, then comment out the printfs at three different places. This printfs ensure that the per packet rssi info of the probes (ping send-no-echo pkts) are logged. Do a make, and copy the generated ns executable to ns_brdcst_sniff. For performing ETX measurements of a given topology, instead of using ns, use ns_brdcst_sniff, and redirect the output to a file using > pipe. Postprocessing of this file gives info about the transmitted probes, and received probes at all the nodes. ns_brdcst_sniff skeleton.tcl ETX_probes.tcl > output.tr Similarly, for ETT, there are three places where the printf corresponding to the tag ETT_ETX_HACK in mac-802_11.cc has to be uncommented. Do a make, and copy the generated ns executable to ns_unicst_sniff. For running unicast probes with ARF, to determine the steady state rate and packet loss probability in ETT metric, use the ns_unicst_sniff executable instead of ns, and redirect the output to a file using > pipe. Postprocessing of this script gives info about no. of transmitted and received probe pkts for each link. ns_unicst_sniff skeleton.tcl ETT_probes.tcl > output.tr To run TCP traffic ns skeleton.tcl traffic.tcl Example tcl files are in ex/ directory. TODO: There seems to be a packet size mismatch issue (somewhere I must not have deducted the MAC hdr size). The traces show rcvd pkts larger than the tx pkts by MAC hdr size.. Potentially due to the new MAC header settings that I am using for 802.11g.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -