Está en la página 1de 6

VANS: Visual Ad hoc Network Simulator

Masako Shinohara, Hideki Hayashi, Takahiro Hara, Akimitsu Kanzaki and Shojiro Nishio Graduate School of Information Science and Tech., Osaka University {sinohara.masako, hideki, hara, kanzaki, nishio}@ist.osaka-u.ac.jp ABSTRACT
In this paper, we describe the design of a visual simulator for ad hoc networks that provides a function that allows users to perform various operations during the simulation. This enables users to congure the evaluation environment by checking its behavior. These operations can be easily performed with a GUI. We also describe the implementation of a simulator prototype that visually shows the behavior of routing protocols. Keywords: ad hoc network, simulator, visualization tool, mobile computing, routing of network topology changes and packet propagation, graphs and statistics of evaluation results, and information on mobile hosts. This function enables users to visually comprehend the simulation status. VANS also provides functions by which users can perform various operations during the simulation. These functions enable users to congure the experimental environment by checking its behavior. Moreover, VANS offers a GUI to users for easy operation. We also describe the implementation of a VANS prototype that visually shows the behavior of routing protocols. The remainder of this paper is organized as follows. In section 2, we introduce related works. We describe the design and implementation of VANS in sections 3 and 4, respectively. Finally, in section 5, we conclude this paper.

INTRODUCTION 2 RELATED WORKS


Some conventional simulators can simulate ad hoc networks [1], [7], [8]. In this section, we introduce some typical simulators and describe differences between VANS and such typical simulators.

As one of the research elds in mobile computing environments, interest is increasing in ad hoc networks constructed of only mobile hosts that function as routers. In conventional research on ad hoc networks, the performance of the proposed protocols is usually evaluated by using simulation experiments since it is difcult to evaluate them on practical platforms. For this reason, various network simulators for ad hoc networks have been proposed [1], [7], [8]. These conventional simulators provide the facility to simulate typical protocols in different layers; users evaluate the performance of their proposed protocols in various situations by setting parameters to congure the experimental environment. However, in conventional simulators, it is usually difcult to comprehend protocols behavior because experimental results are shown as a set of numerical data. For example, when a user nds an unexpected behavior during the protocol evaluation, it is difcult to comprehend the cause only from numerical data since network topology frequently changes due to the movement of mobile hosts. Moreover, conventional simulators do not support user operations during the simulation. That is, users can set parameters to congure the simulation environment only before starting the experiment, and they can see results only after the experiment is terminated. Therefore, users cannot recongure the experimental environment by checking its behavior. In addition, users must read a large number of manuals to learn how to use the simulator because source coding is usually specialized for each simulator. In this paper, we propose a Visual Ad hoc Network Simulator (VANS), which is a visual simulator for ad hoc networks. VANS visually shows various information such as animation
This research was partially supported by The 21st Century Center of Excellence Program New Information Technologies for Building a Networked Symbiotic Environment and Grant-in-Aid for Young Scientists (A)(1668005) of the Ministry of Education, Culture, Sports, Science and Technology, Japan and by the Tateishi Science and Technology Foundation.

2.1 NS-2
NS-2 [8] is a discrete event network simulator developed at the University of California, Berkeley. NS-2 can support users to conduct various simulations by providing typical protocols in each OSI layer. Users can also implement their proposed protocols by creating agents that are derivative classes inherited from basic classes provided by NS-2. NS-2 outputs the information on mobile host movements, packet propagation, and experimental results to external les. It supports the creation of gnuplot/Xgraph graphs by reading these external les and shows the animation of the simulation status by using Network AniMator (Nam). Nam reexecutes the simulation process after the experiment is terminated and displays it as animation. NS-2 is different from VANS because users can congure the experimental environment only before the experiment starts and can see the experimental results only after the experiment is terminated.

2.2 GloMoSim
GloMoSim [1] is a discrete event network simulator for wireless networks developed at University of California, Los Angeles that provides various protocols of different layers that users can select at each layer. Since GloMoSim provides various APIs, users can easily implement their proposed protocols. Parameters for determining evaluation environments, trafc generation, and protocols are specied in conguration les. Users can see an animation of a simulation status, check

the evaluation environment, pause, and restart the simulation execution by using a visualization tool written in Java. After a simulation experiment is terminated, its results are output as a set of numerical data. GloMoSim is similar to VANS because both simulators assume wireless network environments and have a facility to visually check simulation behaviors. However, GloMoSim is different from VANS because it does not have a GUI to congure experimental environments.

User - Simulation status - Experimental results - Information on mobile host - Pause and restart - Simulation reexecution - Change of configuration parameters

Display manager Display manager


display request

display request

Event manager Event manager


requests for log processing request for processing on mobile hosts

Log manager Log manager


Log data

2.3 OPNET Modeler


OPNET Modeler [7] is a network simulator developed at the Massachusetts Institute of Technology that can model and simulate communication networks, devices, and protocols. OPNET Modeler is based on a series of hierarchical editors that directly parallel the structure of actual networks and protocols. OPNET Modeler shows animations of simulation status and graphs of simulation results, a facility similar to that provided by VANS. However, OPNET Modeler is different from VANS because the conguration of the experimental environment is very complicated, and users also cannot change the conguration of the experimental environment during simulations.

Mobile host manager Mobile host manager


Mobility manager Communication manager

Figure 1: Composition of VANS.

3.2 Composition
Figure 1 shows the composition of VANS, which consists of four modules: event manager, mobile host manager, display manager, and log manager. In the following subsection, we explain each of them. 3.2.1 Event manager

3 VANS DESIGN
In this section, we describe the VANS design.

3.1 Overview
VANS visually shows simulation status during the simulation so that users can comprehend the behavior of the evaluated protocol. Specically, it shows the following statuses: Network topology changes and packet propagation. Graphs and statistics of experimental results, e.g., control trafc and setting delays. Mobile host information. Since VANS continuously updates the displays of the above statuses, users can easily comprehend the ever-changing simulation statuses. Moreover, users can visually comprehend the process (packet ow) when a source transmits data packets to a destination. VANS provides some functions by which users can perform various operations during the simulation so that they can recongure the experimental environment by checking its behavior. Specically, users can perform some operations that change simulation progress, e.g., pause, restart, and reexecution. They can also change conguration parameter values of the evaluation environment and mobile hosts. When users want to recheck a past simulation, VANS supports such reexecution by using log data. During this, users can add or delete mobile hosts to the network and change evaluation metrics and displayed statuses. When users perform changes during the simulation, these changes are immediately displayed. These functions enable users to construct the evaluation environment by checking the simulation behavior. Moreover, since VANS offers a GUI to users for easy operation, they need not read a large number of manuals to learn how to use it.

The event manager receives events as inputs from users and sends execution requests to other modules as needed. Inputs from users are classied into two types of events: by GUI operations and by timer. Events by GUI operations are generated when users operate VANS. Events by GUI operations and modules handling them are summarized as follows: Event manager Changes the simulation progress operations. Changes conguration parameters of experimental environments. Changes displayed statuses. Mobile host manager Changes conguration parameters of mobile hosts. Selects destinations for data transmission. Adds and deletes mobile hosts. Display manager Displays windows, popup menus, and dialogs. Log manager Simulates reexecution by log data. On the other hand, events by timer are automatically generated during the simulation according to the simulation program written by users. For example, communication events between mobile hosts, movement of mobile hosts, display of simulation status, and log output are automatically generated at constant time intervals. The event manager always monitors the entire simulation during execution. When it detects an event by GUI operations, it immediately processes the event if it is not processing other events at that time. 3.2.2 Mobile host manager

The mobile host manager receives requests for processing on mobile hosts from the event manager and sends display

requests to the display manager as needed. This module consists of two submodules: a mobility manager that processes movements of mobile hosts, and a communication manager that processes communications between mobile hosts. Mobility manager: This submodule updates the current positions of mobile hosts at every unit of time, according to the mobility model selected by the user. This submodule manages parameters about mobile host mobility so that users can continue the simulation experiment even if they change these parameters during the simulation. Communication manager: This submodule processes packets that mobile hosts transmit and receive according to the communication protocol selected by the user. Also, this submodule calculates data for displaying graphs and statistics of experimental results and information on mobile hosts from the processing results. In addition, this submodule manages parameters about communication between mobile hosts. 3.2.3 Display manager When the display manager receives a display request from the event or mobile host managers, it displays or updates windows, menus, and dialogs; it also shows animation of network topology changes and packet propagation, graphs and statistics of evaluation results, and information on mobile hosts. This module shows the simulation status of the display and reects conguration changes from users immediately without being affected by internal processes because the display process is independent of internal ones. This module displays the simulation area as a rectangle and draws a mobile host as a circle on the current position in the area, where its host identier is specied at the lower left. A radio link between two mobile hosts within communication range of each other is drawn as a dotted line. If a mobile host transmits a series of data packets, a ow identier is assigned to the transmission. That is, packets associated with the same transmission are assigned to the same ow identier. When a user selects a data transmission ow, the characters showing the source and destination of the data transmission are displayed near the mobile hosts. Therefore, the user can distinguish the selected source and destination even when a large number of mobile hosts exist. This module also draws propagating packets that correspond to the selected ow as solid arrowheads. An arrowhead is drawn from the position of the mobile host sending a packet to the position of the mobile host receiving it. In addition, this module displays experimental results and information on mobile hosts as graphs and statistics during the simulation. Evaluation metrics are shown as polygonal line graphs, frequency distribution graphs, and dissemination graphs. The scale of the vertical and horizontal axes in each graph are automatically adjusted as the simulation progresses. The statistics of simulation metrics are shown as tables. 3.2.4 Log manager The log manager outputs logs to external les during the simulation. When users reexecute the simulation, this mod-

ule reloads the corresponding logs to VANS. When the log manager receives a request for log processing from the event manager, it retrieves logs from the external log les and transfers them to the mobile host manager. Logs are categorized into three types: experimental environment, mobile host, and random number. The experimental environment log stores conguration parameters about the experimental environment and data about the entire simulation. The mobile host log stores conguration parameters about mobile hosts, information on their positions, and their sent and received packets. Both the experimental environment and mobile host logs are output to external les at constant time intervals and when users change conguration parameters about the experimental environment and mobile hosts. The random number log stores all random numbers generated during the simulation. By using random numbers stored in a random number log and other information stored in the experimental environment and mobile host logs, this module supports users who reexecute the same simulation experiment. Since this module records conguration parameter changes about the experimental environment and mobile hosts as log data, the reexecuted experiment can reect such changes.

IMPLEMENTATION OF VANS

Since in the research eld of ad hoc networks, the design of routing protocols is a very popular issue [3][6], we implemented a VANS prototype that visually shows behaviors of routing protocols and evaluates their performances. The prototype was implemented by Microsoft Visual C++ .NET on Windows XP. In the following, we describe the conguration parameters in the implemented prototype and the implementation details. We also describe a procedure in which a user incorporates the proposed protocol in VANS.

4.1 Conguration parameters


The prototype offers various conguration parameters about experimental environments and mobile hosts. A user can set these values by using a GUI. The conguration parameters about the experimental environment are as follows: Simulation area The atland in which mobile hosts exist. A user can specify either a atland with certain vertical and horizontal lengths or a torus as an innite atland. Unit of simulation time The actual time of the unit time in the simulation experiment. We dene unit time as the period between when a mobile host processes the received packet and sends it to a neighboring mobile host. Simulation time The period in which a user executes the simulation experiment. These conguration parameters can be congured not only before starting an experiment but also during its execution.

The mobile host conguration parameters are as follows: Initial number of mobile hosts The number of mobile hosts when the simulation experiment starts. Radio communication range The range (radius) in which a mobile host can send a packet to other mobile hosts and receive a packet from other mobile hosts by radio communication. Maximum/minimum movement speed The range of movement speed of mobile hosts. Mobility model The mobility model of mobile hosts. In this prototype, a user can choose one of three typical mobility models [2]: Random Walk, Random Waypoint, and Random Gauss Markov. Routing protocol The protocol used for communication between mobile hosts. In this prototype, a user can choose one of three typical routing protocols: Dynamic Source Routing (DSR) [3], Ad hoc On-Demand Distance Vector (AODV) [6], and Flooding, which is the simplest way to transmit data packets to a destination. Mode The mobile host mode during the simulation. There are three modes: active, sleep, and exit. Active denotes that the mobile host is participating in a network; sleep denotes that the mobile host is temporarily leaving a network; and exit denotes that the mobile host has already left the network. Among these conguration parameters, the initial number of mobile hosts and routing protocol can only be set before starting an experiment, and the mode can only be changed during the experiments execution. The others can be set and changed not only before starting an experiment but also during its execution.

Figure 2: Dialog for initial setting. and information on mobile hosts during the simulation, an information window is displayed, as shown in Figure 4. In the following, we explain the four windows: Setting window At the top of this window, a turn number that denotes simulation progress is displayed. Users can suspend and restart the simulation by pushing the play/pause button. If a user suspends the simulation and inputs a turn number less than the current one, the simulation returns to the status corresponding to the input number. This window also displays conguration parameters about the evaluation environment and mobile hosts. A user can change these values by pushing the change button and setting new values. Simulation window This window shows the animation of the simulation status. In this window, a circle denotes a mobile host, a number at the lower left denotes the identier of the mobile host, a dotted line denotes a radio link, and a solid arrowhead denotes a packet propagation. SRC denotes the source of data transmission corresponding to the selected ow, and DST denotes the destination to which the source sends a data packet. During the simulation, this window shows network topology changes and packet propagations. Figure 5 shows popup menus displayed on the simulation window when a user clicks on the right side of a mouse (a) where the mouse cursor is on a mobile host, and (b) where it is not on a mobile host. A user can change mobile host conguration parameters by clicking on the right side of a mouse where the mouse cursor is on a mobile host. Specically, a user can perform the following operations: Specifying a source or a destination: A user species a source or a destination from or to which packet propagations are displayed. Changing mobile status: A user selects the status of the mobile host among active, sleep, and exit. Displaying experimental results and information on mobile hosts: A user displays experimental results about the mobile host and information on the mobile host as graphs and statistics. Changing conguration parameters: A user changes the mobility model, the movement speed, and the radio communication range of the mobile host.

4.2 Implementation details


In this subsection, we describe the initial setting before starting a simulation experiment and operations performed during the simulation. 4.2.1 Initial setting When a user starts up VANS, the dialog for initial setting is displayed (see Figure 2). Users can congure parameters about the evaluation environment and mobile hosts described in subsection 4.1 by using this dialog. In this dialog, users can choose one of the provided mobility models and routing protocols. 4.2.2 Operations during simulation After completing the initial setting, VANS starts the simulation experiment and displays three windows: setting, simulation, and packet, as shown in Figure 3. In addition, when a user performs an operation to display experimental results

Setting Window

Simulation Window

Packet Window

Figure 3: Simulation execution.

(b) Statistic (a) Graph Figure 4: Information window.

(a) On a mobile host (b) Not on a mobile host Figure 5: Popup menus on the simulation window. and keeps updating it with simulation progress. In the prototype, two evaluation metrics can be shown without users coding: control trafcs is shown as polygonal line graphs on the timeseries, and setting delay is shown as a frequency distribution graph. In addition, this window can show routing tables held by mobile hosts. A routing table records route information for mobile hosts to transmit data packets to destinations. Figure 4 shows examples of a graph of the control trafc and a routing table.

On the other hand, a user can execute the following operations by clicking on the right side of a mouse where the mouse cursor is not on a mobile host. Adding a mobile host: A user adds a new mobile host, i.e., makes a host participate at the position where the user clicks on a mouse. Displaying experimental results: A user displays experimental results as graphs in the entire network. Changing conguration parameters: A user changes the mobility model, the movement speed, and the radio communication range of all mobile hosts in the entire network. Packet window On this window, a user can determine whether propagations of each kind of packets are displayed on the simulation window. Specically, if a user checks the box on the left side of a packet name, propagations of the corresponding packet are displayed on the simulation window. Information window This window shows experimental results and information on mobile hosts during the simulation. Specically, this window shows an evaluation metric selected by the user

4.3 Addition of protocols by users


Similar to conventional simulators, a user can implement his/her proposed protocols on VANS and conduct a performance evaluation. In the implemented prototype, a user can add the protocol by implementing in C++. For this aim, VANS provides some functions for easy utilization of its visualization function. 4.3.1 Basic classes

When implementing a proposed protocol, the user needs to dene the packets and procedures of the protocol. Therefore,

VANS provides the following two basic classes that include common and important factors for simulation experiments. Packet class This class manages parameters that send, receive, and draw propagating packets. These parameters include the source and the destination of the packet, the type, and the ow identier of the packet, and the time (turn) when the packet was sent. It also provides virtual functions to copy packets, draw packets propagation, process the log data, and check the ow identier of the packet. Network class This class is for communication between mobile hosts and manages the basic procedures and parameters for packet processing. These parameters include the radio communication range and sequence numbers to identify packets. This class provides virtual functions to draw the network, process the log data, and execute processes at the mobile host manager before data transmissions. If a user needs new parameters or functions for the proposed protocol, it can add the parameters or functions to derivation classes inherited from basic classes. Virtual functions can be redened as needed if procedures of the proposed protocol are different from the basic classes. 4.3.2 Change of interface When a user evaluates a proposed protocol, it usually conducts simulation experiments by changing parameters that impact the performance. Therefore, VANS provides the following two functions as APIs to add new conguration parameters and congure evaluation metrics: Addition of conguration parameters A user can add new parameters into the conguration parameters that impact the performance of the proposed protocol. If a user adds new parameters, VANS adds new handles corresponding to the parameters into the dialog for initial setting and the setting window. By doing so, the added parameters are shown in the dialog for initial setting, and the user can congure them. These parameters are also shown in the setting window, and the user can change their values by pushing the change buttons and inputting them. Conguration of evaluation metrics A user can set evaluation metrics for the proposed protocol. In doing so, the user sets periodical intervals at which VANS calculates the evaluation metrics. By conguring the display graphs and statistics of the evaluation metrics, the user can comprehend temporal changes of metrics.

restart, and reexecution, and change conguration parameter values of the evaluation environment and mobile hosts. This function enables users to congure the evaluation environment by checking its behavior. We also described the implementation of a VANS prototype that visually shows routing protocol behavior. By using VANS, a researcher can examine the validity of a proposed protocol in an assumed environment by visually checking network topology changes and experimental results. When an unexpected problem, e.g., the generation of a huge number of error packets or abnormal protocol behavior, occurs due to design/implementation errors of the protocol, users can detect the cause of the problem.VANS is also effective for researchers or students to learn routing protocol behavior. Users can easily comprehend such behavior by checking the network topology changes, the packet propagation, and the experimental results on simulation windows. They also can comprehend the effects of each parameter on the experimental results by changing the conguration parameters using a GUI. As part of our future work, we plan to implement typical protocols in various layers, e.g., TCP and UDP in the transport layer and IEEE802.11 and Bluetooth in the MAC layer. We also plan to evaluate VANS on a practical platform to verify its effectiveness in an actual environment.

REFERENCES
[1] L. Bajaj, M. Takai, R. Ahuja, K. Tang, R. Bagrodia, and M. Gerla, GloMoSim: A scalable network simulation environment, Technical Report 990027, UCLA Computer Science Department (1999). [2] T. Camp, J. Boleng, and V. Davies, A survey of mobility models for ad hoc network research, Wireless Communications and Mobile Computing (WCMC): Special issue on Mobile Ad Hoc Networking: Research, Trends and Applications, Vol. 2, No. 5, pp. 483502 (2002). [3] D.B. Johnson, Routing in ad hoc networks of mobile hosts, Proc. IEEE Workshop on Mobile Computing Systems and Applications (WMCSA94), pp. 158 163 (1994). [4] M.R. Pearlman, and Z.J. Haas, Determining the optimal conguration for the zone routing protocol, IEEE Journal on Selected Areas in Communications, Vol. 17, No. 8, pp. 13951414 (1999). [5] C.E. Perkins, and P. Bhagwat, Highly dynamic destinationsequenced distancevector routing (DSDV) for mobile computers, Proc. ACM SIGCOMM94, pp. 234244 (1994). [6] C.E. Perkins, and E.M. Royer, Ad hoc on demand distance vector routing, Proc. IEEE Workshop on Mobile Computing Systems and Applications (WMCSA99), pp. 90100 (1999). [7] Making Networks and Applications Perform, http://www.opnet.com/. [8] The Network Simulator - ns-2, http://www.isi.edu/nsnam/ns/.

5 CONCLUSION
In this paper, we designed VANS, which is a visual simulator for ad hoc networks. VANS shows animation of simulation status, graphs and statistics of experimental results, and information on mobile hosts. Therefore, users can visually comprehend simulation status. In VANS, users perform several operations about the simulation progress, e.g., pause,

También podría gustarte