Professional Documents
Culture Documents
This document is the users manual for ViSim simulation tool. Different aspects of ViSim are discussed both for naive and advanced users. The document is free for use. Permission is granted for its free distribution, sharing, and publicity. After downloading and installing ViSim, this document can be used for using it in the best possible way. For any query, comment, or suggestion please contact: {nsaquib, srsakib}@bracu.ac.bd or spathan@ieee.org
BRAC University, 66 Mohakhali, Dhaka 1212, Bangladesh Copyright 2009-2010, BRAC University, Bangladesh. All rights reserved.
2009
1. Introduction
ViSim, a visual simulator tool incorporated with a user-friendly graphical interface, is built to make comparisons among various Mobile Ad-hoc Network (MANET) routing. Most of the available tools are somewhat not user-friendly. ViSim is built in such a way that even a naive user can be able to use this tool to visualize the background simulations done in ns-2 (that is run with the help of ActiveTcl in Windows operating system). Hence, ViSim could be useful for researchers, students, teachers in their works, and for the demonstration of various wireless network scenarios on the computer screen. It could make the task of simulation more exciting and enhance the interest of the users without going into complex command-only text interface. ViSim runs .tcl files for three well-known MANET protocols; DSDV, DSR, AODV and extracts the required information from the trace files that are generated. Eventually the graphs are plotted for different performance indicators such as Throughput, Goodput, and Routing Loads. ViSim can make the task of a network administrator easy to decide which routing protocol would be better for the particular MANET scenario.
2009
2009
2009
4. Repeatedly click Next button with your choice of installation method and you will eventually reach this window:
5. Click Next. Installation process will start and following display will appear:
2009
Now keep patience for a few seconds and finally installation process will be successful. 6. Click Finish to complete the installation. 7. A display will appear like below. Click OK.
8. ViSim will use the installed ActiveTcl for running simulations in the background!
2009
Figure 1. Visual Simulation Tool Interface, ViSim 1.0 (run in Windows XP).
(b) Comparison: This area has the options; Throughput vs Time, Goodput (Packets), Routing Load (Packets), Goodput (Bytes), and Routing Load (Bytes). All these buttons are used to select the parameters that the user needs for the performance analysis and comparison among the routing protocols. (c) Scenarios and Protocols: This area specifies the options of three network scenarios (radio buttons) and three routing protocols (tick boxes). Also it has two buttons namely; Simulate and Create Graph. Simulate button is used for playing the simulations and Create Graph is used to plot the comparison graphs. (d) Output: Output area is the right-bottom area which is shown as a blank window area when ViSim is run for the first time. Based on the choice of various options, the outputs or further options are shown in this area. The graphs are also plotted on this area when the user chooses the option of creating graphs after performing various simulations and comparisons.
2009
2009
2009
Figure 4. An example where Throughput vs Time, Scenario 1, and three protocols are selected for running the simulations.
2009
Figure 5. A sample output graph (Throughput vs Time) using network scenario 1, all three protocols; DSDV, DSR, and AODV are compared.
Let us talk about the working mechanism of ViSim buttons a bit. When the user selects the simulation option in order to view the simulation for a particular scenario corresponding to the selected ad hoc network protocol, ViSim calls up a .bat file which contains shell script. This shell script calls the ns-2 and feeds files or file having extension .tcl, according to the choice of simulation. Then ns-2 generates trace file (extension .tr) and nam file (extension .nam). After that NAM is called via shell script and using NAM the script feeds .nam file into NAM which gives a GUI (Graphical User Interface) popup and using it, a user can actually observe the simulation. Again, when the user selects the Comparison option and clicks Create Graph after performing simulations, ViSim gathers the .tr files according to the choice of protocol, reads those and according to the performance indicators, it filters the data and picks up important information to generate the graph. Details about the features of our simulation tool; ViSim, its installation, and users manual can be found in this URL: http://faculty.bracu.ac.bd/~spathan/research/visim.html For ViSim, we have used some fixed network specifications. Note that any specification can be modified in the related .tcl files according to the requirements to simulate another network setting. Also, various parameters used in ViSim code could be given new values. We talk about these issues in the next section (Section 5). Note that the following section is for the advanced users.
10
2009
Y (Scenario)
0 (Scenario 1) 1 (Scenario 2) 01 11 21 2 (Scenario 3) 02 12 22
X (Protocol)
00 10 20
From the above table, we may draw the following conclusions regarding the selection of a particular .tcl file: a00 = AODV Simulation for scenario 1" a01 = "AODV Simulation for scenario 2" a02 = "AODV Simulation for scenario 3" a10 = "DSR Simulation for scenario 1" a11 = "DSR Simulation for scenario 2" a12 = "DSR Simulation for scenario 3" a20 = "DSDV Simulation for scenario 1" a21 = "DSDV Simulation for scenario 2" a22 = "DSDV Simulation for scenario 3" Therefore, if a user needs to change the specification of the 2nd scenario of DSR routing protocol, he needs to open the a11.tcl file. 2. Modify the specifications of the scenario: Once the selection of the MANET routing protocol for a specific scenario is done according to the naming convention, the scenario specification can be changed as per requirements. Now, to modify things in a .tcl file, it needs to be opened with notepad (or any standard text editor). Say for example, the user wants to change the specification that is used in the 2nd scenario of DSR routing protocol. For this, the following steps should be done: 1. Right click on the specific file. In this case a11.tcl.
11
2009
2. Then choose the open / open-with option. 3. From the open-with option the user needs to select notepad in order to open the a11.tcl file with the notepad. 4. Once the change is made as per requirement, the user needs to save the particular .tcl file before closing the file (with the same name as is given with ViSim). Once the user opens the a11.tcl file, he/she will have the access to the .tcl script of the corresponding file where the simulation specifications regarding the scenario and protocol are found. An example of these specifications is as follows:
set set set set set set set set set set set set set val(chan) val(prop) val(netif) val(mac) val(ifq) val(ll) val(ant) val(ifqlen) val(nn) val(rp) val(x) val(y) val(stop) Channel/WirelessChannel ;# channel type Propagation/TwoRayGround ;# radio-propagation model Phy/WirelessPhy ;# network interface type Mac/802_11 ;# MAC type Queue/DropTail/PriQueue ;# interface queue type LL ;# link layer type Antenna/OmniAntenna ;# antenna model 50 ;# max packet in ifq 10 ;# number of mobilenodes DSR ;# routing protocol 500 ;# X dimension of topography 400 ;# Y dimension of topography 150 ;# time of simulation end
The explanation of each parameter is given at the right side of each line of the code with a hash (#) sign. So, the user (advanced user) can change any of these according to the requirements at hand. For example, if the user wants to change the X or Y dimension of the simulation area (500x500), simulation time (100 sec.) or the number of the mobile nodes (15), then the change in the script will be as follows:
set set set set set set set set set set set set set val(chan) val(prop) val(netif) val(mac) val(ifq) val(ll) val(ant) val(ifqlen) val(nn) val(rp) val(x) val(y) val(stop) Channel/WirelessChannel ;# channel type Propagation/TwoRayGround ;# radio-propagation model Phy/WirelessPhy ;# network interface type Mac/802_11 ;# MAC type Queue/DropTail/PriQueue ;# interface queue type LL ;# link layer type Antenna/OmniAntenna ;# antenna model 50 ;# max packet in ifq 15 ;# number of mobilenodes DSR ;# routing protocol 500 ;# X dimension of topography 500 ;# Y dimension of topography 100 ;# time of simulation end
The advanced users may also change the protocol itself if required. In this case, the user needs to keep track of the file name in which he/she is making the change. For example, if the user wants make a comparison between AODV, TORA, and DSDV routing protocols for scenario 2, then he/she would need to make the following changes: Since AODV and DSDV protocols are given within the prototype, these protocols need no additional change in their respective .tcl scripts. However, TORA is not included within the prototype. In this case, the user can make some change in the .tcl script of DSR protocol. As we are giving this example for the 2nd scenario, we need to change the specification of a11.tcl script. [a+1 (DSR protocol )+1 (2nd Scenario)]. Therefore, the user needs to open the a11.tcl file. Now, since the protocol needs to be changed, the only change within the script will be as follows:
12
2009
set set set set set set set set set set set set set
val(chan) val(prop) val(netif) val(mac) val(ifq) val(ll) val(ant) val(ifqlen) val(nn) val(rp) val(x) val(y) val(stop)
Channel/WirelessChannel ;# channel type Propagation/TwoRayGround ;# radio-propagation model Phy/WirelessPhy ;# network interface type Mac/802_11 ;# MAC type Queue/DropTail/PriQueue ;# interface queue type LL ;# link layer type Antenna/OmniAntenna ;# antenna model 50 ;# max packet in ifq 10 ;# number of mobilenodes TORA ;# routing protocol 500 ;# X dimension of topography 400 ;# Y dimension of topography 150 ;# time of simulation end
The user should also keep it in mind that the rest of the specifications must remain the same since no change is made in scenario 2 for other protocols (AODV and DSDV). Then the file needs to be saved as a11.tcl before closing it (with the same given name). Now, for comparison click the ViSim 1.0 exe file. Then: a. Select the particular performance parameter. b. Click the routing protocols. (AODV, DSR, DSDV). c. Select scenario 2. d. Click Simulate option. e. Once the simulation is over Click Create Graph option.
Finally, in the output area, the prototype would generate a graph for the selected performance indicator. In the graph the bar / the line that represents the DSR protocol would actually represent the results for TORA for scenario 2 since we made the change in DSR: scenario 2 (a11.tcl) file. Thus, the user can also change in other files according to the requirements and can perform analysis not only for AODV, DSR, and DSDV but also for any other MANET routing protocol.
13