113 APPENDIX 1 SIMULATORS The Network Simulator-2 (NS-2) and Opportunistic Network Environment (ONE) Simulators are used for simulation purpose. Movement report of ONE generates suitable movement data for NS-2 simulator, so the ONE can be used as a mobility simulator for NS-2. NS-2 SIMULATOR NS-2 is a popular discrete event simulator targeted at networking research. It is a free open-source network simulator, the de-facto standard for research over a wide variety of networking areas. NS-2 provides extensive support for simulation of TCP, routing, and multicast protocols over wired and wireless networks. But it does not have good DTN support. ONE SIMULATOR Many simulators exist for MANETs (e.g., NS-2, OMNeT++, Glomosim, Qualnet) and also for DTN routing (e.g., dtnsim and dtnsim2) but the earlier one is lacking in good DTN support and the latter concentrates exclusively on routing simulation. For these reasons, a new DTN simulator is developed and it is called Opportunistic Network Environment simulator (ONE) with reasonable mobility modeling capabilities, integrated support for DTN routing and ways for visualizing the simulation progress and results in an intuitive way. It provides a powerful tool for generating mobility traces, running DTN messaging simulations with different routing protocols, and
114 visualizing both simulations interactively in real-time and producing results after their completion. It is also easily extendable and provides a rich set of reporting and analyzing modules. The core of the ONE is an agent-based discrete event simulator. To make it suitable and efficient enough for simultaneous movement and routing simulation, it uses time slicing approach so that simulation time is advanced in fixed time steps. The nodes are grouped in node groups and one group shares a set of common parameters such as message buffer size, radio range and mobility model. Since different groups can have different configurations, creating different groups e.g., a simulation with pedestrians, cars and public transportation is possible. All movement models, report modules, routing algorithms and event generators are dynamically loaded into the simulator. So extending and configuring the simulator with different type of plugins is made easy for users and developers. It is enough just to create a new class and define its name in the configuration file. Mobility modeling Mobility models state how the nodes move during the simulation. Three different types of mobility models were initially implemented for ONE. In Random Way Point Model (RWP) a node picks random destination, and after reaching the destination, it stops for the pause time. This procedure is repeated until simulation ends. The second mobility model is map-based movement model which constrains the node movement to predetermined paths. The third mobility model is an external mobility model which takes a set of time stamped coordinates as the input and moves the simulated nodes accordingly.
115 External Event Frameworks While the routing modules could spawn new messages whenever needed, it is often more convenient to have a routing module independent of creating them. There are two different ways to import events to the ONE: trace files and event generator modules. A trace file is a simple text file that has time stamped events such as creating a message, removing a message from the message buffer or setting up a new connection. The trace files can also be saved and loaded in binary mode to save time from parsing text files. Event generator modules are normal Java classes that can dynamically create the same events as the trace files. While the event traces are usually generated with a script or converted from some other program's output, the event modules can be configured using the same setting system as the rest of the simulator. The ONE supports multiple simultaneous event generators and their events are automatically interleaved in the simulation. Running simulations The ONE can be run in two different modes: batch and GUI. The GUI mode is especially useful for testing, debugging and demonstration purposes and the batch mode can be used for running a large number of simulations with different sets of parameters. Both modes can include any number of report modules which produce statistics of the simulation. These statistics can be further analyzed with post-processing tools to create different kinds of summaries, graphs and plots. Extending the simulator ONE has an easily extendable simulation environment. Since the program is released under an open-source GPL license, anyone is free to modify the behavior of the simulator practically in any way.
116 Reporting Frameworks ONE has numerous reporting modules, for example, for message statistics (such as delivery probability and round-trip times), node contact and inter-contact times and message delivery delays and distances. Interface with other simulators Other interesting report modules are the ones used for communication with other programs. The node connectivity information can be directly reported in a suitable form for dtnsim2 simulators so the ONE can be used as a mobility simulator. Also, another report module is able to make output mobility traces suitable for NS-2's Monarch mobile node extension.
117 APPENDIX 2 SNAPSHOTS Figure A2.1 Epidemic routing with 75 nodes Figure A2.2 CMF with 75 nodes
118 Figure A2.3 SMFGW with 75 nodes Figure A2.4 MMF with 75 nodes
119 Figure A2.5 MMFGWDR with 75 nodes Figure A2.6 MMFGWFR with 75 nodes
120 APPENDIX 3 CONNECTIVITY GRAPHS Figure A3.1 Connectivity graph for 25 nodes in ER Figure A3.2 Connectivity graph for 25 nodes in CMF
121 Figure A3.3 Connectivity graph for 25 nodes in SMFGW Figure A3.4 Connectivity graph for 25 nodes in MMF
122 Figure A3.5 Connectivity graph for 25 nodes in MMFGWFR Figure A3.6 Connectivity graph for 25 nodes in MMFGWDR