What is Qualnet?
Network simulator Commercial version of GloMoSim Discrete event simulator Allows simulation of both wired and wireless links Qualnet community forum @
http://www.qualnet.com/training_and_support/support/forums/index.php
Installation
For Windows
qualnet-3.8-university-MANET-QoS-windows.exe
License file Unzip the tar file from the home directory
tar xvfz filename
Installation
Edit shell startup script:
QUALNET_HOME=/home-directory/qualnet/3.8; export QUALNET_HOME PATH=$PATH:/home-directory/qualnet/3.8/gui/bin export PATH
Go to ~/qualnet/3.8/main
cp Makefile-redhat-9 Makefile make
Go to ~/qualnet/3.8/bin
./qualnet default.config
Installation
Possible error: Invalid (inconsistent) license key Get the hostname of your workstation:
hostname
IF localhost is reported:
hostname my-hostname
File Organization
Subdirectory QUALNET_HOME/addons QUALNET_HOME/bin QUALNET_HOME/gui QUALNET_HOME/include QUALNET_HOME/lib QUALNET_HOME/mac QUALNET_HOME/main QUALNET_HOME/network QUALNET_HOME/phy QUALNET_HOME/transport Description Optional or alternative features Executable, configuration and input/output files (.stat) Visual environment toolset Common include files Runtime library files for the GUI Code for the MAC layer protocols Core files Code for the Network layer and routing protocols Code for the radio and related propagation models Code for the transport layer protocols QUALNET_HOME/application Code for the application layer protocols
Finalization
Types of events:
Packet events simulate exchange of data packets between layers or between nodes (i.e.: communication between different entities at same level) Timer events simulate time-outs; internal to a protocol
Packet Events
MSG_Alloc( ) MSG_PktAlloc( ) MSG_Send( ) MSG_AddHdr( ) MSG_Send( )
APP
MSG_Free( )
Transport
MSG_RemoveHdr( ) MSG_Send( )
IP
MSG_RemoveHdr( ) MSG_Send( )
MSG_AddHdr( ) MSG_Send( )
MAC
MSG_AddHdr( ) MSG_Send( )
MAC
MSG_RemoveHdr( ) MSG_Send( )
PHY
PHY
Timer Events
Examples of usage:
Periodic routing updates Periodic broadcasts
Message *newMsg; clocktype delay; newMsg = MESSAGE_Alloc(node, LAYER_NAME, PROTOCOL_NAME, EVENT_TYPE); delay = 5*SECOND; MESSAGE_Send(node, newMsg, delay);
Event Handling
~/addons/seq/node.cpp Determines layer which event has occurred Calls event dispatcher for appropriate layer E.g.: NODE_ProcessEvent calls APP_ProcessEvent APP_ProcessEvent determines protocol type and handles it accordingly
Finalization
Prints statistics
Running Simulations
Compile the Makefile in ~/main
make clean make
Simulation Parameters
Simulation time Seed number Terrain dimensions Number of nodes Node placement (random, uniform, file, ) Mobility (group, random waypoint, ) Propagation pathloss model Fading model, shadowing model PHY layer, MAC layer, NETWORK layer, TRANSPORT layer, APPLICATION layer Statistics, Traces
Data structures
What are the data structures to be maintained? Where should they be stored? Where will they be accessed?
new_protocol.cpp
network.cpp in ~/network mac.cpp in ~/mac ProcessEvent
Qualnet Animator
Requirements:
Java SDK 2 or higher with Netbeans support <windows> Visual Studio 6 <unix server> X-terminal software
<unix> Go to ~/gui/netbeans/bin
./runide.sh
Build the scenario (similar to default.config) Press the RUN button Press PLAY to start the simulation
Tracing data
TRACER Trace options in ~/bin/default.config # PACKET-TRACE # TRACE-TRANSPORT-LAYER # TRACE-NETWORK-LAYER # TRACE-DIRECTION # TRACE-ALL # TRACE-TCP # TRACE-UDP # TRACE-IP # TRACE-OSPFv2 YES | NO YES | NO YES | NO INPUT | OUTPUT | BOTH YES | NO YES | NO YES | NO YES | NO YES | NO
Packet id (source node id, seq. no.) Simulation time Id of node processing that packet Id of originating protocol Protocols ids with hdr description Header field values for protocol id 1 Header field values for protocol id 2 Payload
Additional
Duplicate a copy of the original files Keep a log of changes to files
Enclose modified codes with commented tags