0% found this document useful (0 votes)
95 views

Qualnet Tutorial 5.0-6

The document provides instructions for setting up a wireless network simulation in QualNet 5.0. It describes installing QualNet, opening the developer IDE, creating a new scenario, randomly deploying 15 nodes, connecting the nodes to form a wireless network, and setting up an application layer connection between two nodes with exponentially distributed packet sizes and intervals to simulate UDP traffic over 30 seconds. It also notes that the simulation time must be equal to or greater than the connection duration.

Uploaded by

anupama N
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views

Qualnet Tutorial 5.0-6

The document provides instructions for setting up a wireless network simulation in QualNet 5.0. It describes installing QualNet, opening the developer IDE, creating a new scenario, randomly deploying 15 nodes, connecting the nodes to form a wireless network, and setting up an application layer connection between two nodes with exponentially distributed packet sizes and intervals to simulate UDP traffic over 30 seconds. It also notes that the simulation time must be equal to or greater than the connection duration.

Uploaded by

anupama N
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 22

QualNet 5.

0 Tutorial

Part 1: Installation
TODO: I would recommend getting AITS to provide the installation instructions as I’m sure the license restrictions will
determine how/where QualNet gets installed.

Part 2: The QualNet 5.0 Developer


The QualNet Developer IDE is a GUI program for developing network scenarios that comes with QualNet 7.3. It can be
used to visually design network scenarios and then run simulations of these networks. Although networks can be
designed and simulated in a command-line fashion as well, we will focus on the Developer IDE package.

The first step is to open the Developer IDE program. Depending on the installation procedure, it can be opened via the
start menu or by opening the directory where QualNet was installed. Double-click on the “QualNet-EDU 7.3 GUI” icon

on the desktop (this option is available only if you chose to install desktop shortcuts during installation).

Part 3: Setting Up a Network - Basics


The first task is to create a new network scenario. To do this, go to the File Menu ->New. Save it in your local folder:
File Menu ->Save As. Choose the local directory where you want to save the scenario. Enter a name for the new scenario
(for example, “Example1”). Click Save. A grid should appear in the right hand window ( see Fig 1). This is where we will
deploy the nodes and create network connections. The left hand window has four panels: File System, Toolset,
Visualization Controls and Runtime Analysis (Toolset panel is opened by default).

1
Figure 1: A new scenario has just been created.

To setup our first network, we will proceed by a simple example of a 15 node wireless network that accesses the channel
using the CSMA/CA scheme defined by the 802.11 protocol. The first step in creating a network is to deploy the nodes.
This is done in the right hand window, the so-called Canvas Area. Nodes can be deployed manually according to an
arbitrary topology by selecting Toolset -> Device -> Default (just a generic node), then clicking anywhere on the canvas
area. In ad-hoc networking scenarios it is often assumed that the nodes are deployed randomly on the terrain and we
will assume random deployment in this example. To randomly deploy the nodes we go to the Tool menu -> Node
Placement. The Automatic Node Placement Wizard will open (see Fig. 2).

2
Figure 2: Node placement

We then enter the desired number of nodes we would like in our network. Node Placement Strategy: Random. It then
asks for a seed value for the random number generator (do not change the default value unless it is required). Click OK.
The Placement Wizard will close and the nodes will be deployed randomly on the grid in the Scenario Designer window
(see Fig. 3). Location of a node may be changed by left clicking the mouse on the arrow button then left clicking it on the
node and dragging it to the desired location.

3
Figure 3: Random node deployment

We now want to add these nodes to a wireless network. The first step is to select the nodes we wish to add to the
wireless network. To do this we can use the selection tools (arrow or lasso in the View Toolbar). Select all of the nodes
by using either of the selection tools and left clicking and dragging the mouse around the nodes. To connect these
nodes to a wireless network, select Toolset -> Network Components -> Wireless Network. Now click anywhere on the
area you selected earlier. A cloud should appear on the canvas area representing this wireless network and the nodes
should be joined to this cloud with blue lines representing the newly formed wireless connections (see Fig. 4).

4
Figure 4: The nodes connected to the wireless network.

Enable IP Forwarding:

By default, the nodes in Qualnet can forward packets and in a sense act like a router. If the distance between the source
and destination node is large and another third node is between them, it can start forwarding the packets going from
the source node to destination node. But this doesn’t depict the behaviour of an actual wireless network, only the nodes
that are supposed to act like routers should forward packets. So to simulate an actual wireless network this property
should be edited and this behaviour should be avoided. Just going into the “Node Configuration” of any node (by right
clicking on any node and selecting properties), there is a field “Enable IP Forwarding” (inside Routing Protocol) which is
set to “Yes” by default. But if this field is changed to “No” then that node will not forward the packets. So changing this
field to “No” of all the nodes in the network, except the nodes acting as routers, it can be ensured that only routers will
forward packets in the network.

Part 3a: Creation of Application Layer Connections


After setting up the network, the next step is creation of application layer connections between the nodes. At any time,
there may be several connections active simultaneously in the network. Each connection will have a source and a
destination node. The source node generates traffic and transmits to a destination node. Let us create a connection
between nodes 3 (source) and 4 (destination),

- Selection of the source node: Left click the mouse over the arrow selection tool and then left click it over the
device symbol for node 3, the color of number 3 should turn to red.

5
- Next Select a traffic source, the available pre-defined applications such as CBR (Constant Bit Rate), VBR (Variable
Bit Rate), FTP Generic, VOIP, and Traffic-Gen are listed in the left window under the heading -Applications. We
note that Traffic-Gen generates UDP traffic while FTP Generic generates TCP traffic. Let us select the Traffic

Generator button by left clicking the mouse over it.

- Creation of the connection: Now left click the mouse over node 3, hold, and drag it to node 4. When the mouse is
released over node 4, a green arrow pointing from node 3 to node 4 will appear. This creates a basic Traffic
Generation application between the nodes 3 and 4 as source and destination respectively.

- The next step is to choose the parameter values of this connection:

Let us create a Poisson process of data packets at the source and make the packet length exponentially
distributed. To do this, click Table View on the bottom of the right window, and select the Application tab. You
should see the connection Traffic-Gen 3->4 listed. Double click the connection. A window of Traffic Generator
Properties will show up (Fig. 5a). Click on the Packet Size. Recall, we want the packet lengths to be exponentially
distributed with mean packet length 2048 bytes. The default size is deterministically set to 512 bytes. Change the
Data Size from Deterministic to Exponential. Then change the Mean Size to 2048 bytes. To make the source
generate traffic according to a Poisson process, click on Interval from the Traffic Type menu for this connection.
By default traffic is generated deterministically every 1 second. Change the distribution of the interval between
successive packets to Exponential and change the Mean Interval to 0.5 seconds (recall that the inter-arrival times
for a Poisson process are exponentially distributed). As well, set the Start Time of the connection to Exponential
with mean 0.5 seconds, and the Duration to Deterministic with fixed duration of 30 seconds. These steps have
been summarized below,

- 1. Click on Packet Size Distribution. (The packet lengths are exponentially distributed with mean packet length
2048 bytes.) Change the Data Size from Deterministic to Exponential. Then change the Mean Size to 2048 bytes.

- 2. Click on Packet Interval Distribution. (The source generates traffic according to a Poisson process.) Change the
distribution of the interval between successive packets to Exponential and change the Mean Interval to 0.5
seconds.

- 3. Click on Start Time Distribution Change the distribution to Exponential with mean 0.5 seconds.

- 4. Click on Duration Distribution to Deterministic with fixed duration of 30 seconds.

6
Figure 5a Traffic Generator Properties

Simulation Time:

The scenario property “Simulation Time” should be changed corresponding to the Duration value in Duration
Distribution. The “Simulation Time” is the total time that the current simulation will run. So this value should be either
equal to or greater than the “Duration” value so that the complete connection is simulated from start to finish.

To edit this value, go to “Scenario Properties” and change the value of “Simulation Time” (Figure 5b).

7
-

- Figure 5b Traffic Generator Properties

A wireless network with multiple connections is shown in Fig. 6.

8
Figure 6 A wireless network with multiple connections

Part 3b: MAC Protocol


The default settings of the MAC protocol can be viewed by clicking on Table View in the bottom panel below the canvas.
Click the network tab and double click Wireless Subnet (see Fig. 7). MAC protocol determines how the nodes access to
the physical channel to transmit their packets. We note that the default MAC protocol is 802.11 standard. This standard
has two modes of operations known as Distributed Coordination Function (DCF) and Point Coordination Function (PCF).
The DCF is more popular in practice and based on the random access mechanism. Briefly, DCF function as follows, (see
section 6.10.3 in the textbook for the description of this MAC protocol),

- DCF uses the CSMA protocol, thus a node, with a packet to transmit, first has to sense the channel. If the channel
is busy the node backs off for a random amount of time.

- We note that the channel may be idle at the source but not at the destination node. If the source node senses the
channel idle, it transmits a short request to send (RTS) packet. If the channel is also idle at the destination node
and it receives the RTS packet then replies with clear to send (CTS) packet. After that the source transmits the data
packet and destination node replies with an ACK packet if the packet is received error free which completes the
transmission of the packet. If the source node does not receive the CTS packet or an ACK following the
transmission of the data packet then it backs off for a random amount of time. A source node may retransmit an
unsuccessful packet up to a transmission limit, when that limit is passed then the packet is discarded (for values of
these limits see Fig. 7).

9
The routing protocol is Bellman-Ford (a Distance Vector routing algorithm). The default settings of the OSI layers can be
modified here according to the requirements of the network. As well, the default settings of an individual node can be
viewed by clicking the Nodes tab and double clicking each node. The nodes update their routing tables regularly by
exchanging routing packets. We not that in a single wireless subnetwork all the nodes are one hop away from each
other, thus there is no routing, but nevertheless nodes will send routing packets regularly. It is worthwhile to spend a
few minutes navigating through the menus to learn where to go in order to view or modify parameters in our network
scenario. We can right-click the nodes or wireless network in the canvas area.

Figure 7 Properties of the MAC Protocol.

10
Part 3c. Wireless channel with Fading
We may include fading in the wireless channel by choosing the Scenario Properties button on the left side of the
window and then selecting the Channel Properties tab in the new window (see Fig. 8). In the Channel Properties
window go to the row which says Fading Model and click on where it says None. From the drop out menu choose
Fading. Then press Apply and OK and go to the row which says Specify Gaussian Component File click where it says No
and change it to Yes. After this step is taken, a new menu item is open with the name Gaussian Component File, then fill
that tab with the following entry, and select the file (default.fading) following the address below

C:/Scalable/qualnet-edu/7.3/scenarios/default/default.fading

Failure to provide this link will give the following error.


“Error: Error in file ..\libraries\wireless\src\propagation.cpp:3933
PROPAGATION-FADING-GAUSSIAN-COMPONENTS-FILE is missing”

Figure 8. Incorporation of fading to the simulation

11
Part 4: Running Simulation
The next step is to run simulation of our network. One useful feature of the QualNet Developer package is the ability to
trace packets. To enable packet tracing, go to Scenario Properties in the left hand window, select Statistics and Tracing
tab, click Packet Tracing in the left window, select Enabled Packet Tracing, click where it says No and change it to Yes.
See Fig.9.

Figure 9 Enabling packet tracing.

On the Run Toolbar, there are a set of icons related to simulation which include an Open Current Scenario in File Editor,
a Run Settings, a Run Simulation and Record Animation Trace. To initialize the scenario, click on the Run Simulation icon

. The mode of the Architect will be changed from Design Mode to Visualize Mode. To switch back to Design Mode,

click Switch to Design Mode icon . The Visualization Controls panel opens in the left window. You should see the
coordinates of the nodes and the current simulation time (which is 0.0000 seconds) in the output window (see Fig. 10).
Before running the simulation, we note that the Developer package will by default animate various aspects of the
12
simulation such as packet receptions, packet drops and collisions, and unicast and multicast transmissions. Others
aspects such as packet queue animation can be enabled by clicking on the button in the Animation Filters which should
appear in the left hand window. Enable the radio range animation. Simulation will tend to run very fast so if we wish to
see the animation it will help to slow down the speed of the animation. This is done by sliding the speed bar to about
half way in the Animator window. See Fig. 10.

Figure 10 Initialization and animation settings for simulation

The total simulation time can be changed by switching back to the Design Mode, click the Scenario Properties button on
the left window, and select the General tab. The Simulation Time is set to 30 seconds by default. We will leave this at

its default value for now. We run the simulator by clicking the Play button on the menu bar. You should see the
simulation animations as the simulator runs (Fig. 11).

13
Figure 11 Simulation animation during a run.

You can enable or disable the different animations while the simulation runs. Wait until the simulation completes.

Part 5. Routing of the traffic between subnetworks.


We need to have a router for to be able to route the traffic from one wireless subnetwork to another. The router will
have two network interfaces each one being member of a one subnetwork. We can create a router as an ordinary node
which belongs to both subnetworks. Thus the router node is selected among the nodes belonging to that subnetwork
when each subnetwork is created (see Fig. 12).

14
Figure 12 The two subnetworks communicate through the router node [2]

Next we will configure node 5 as a router. For this click on the Table view, then on the Node button, then double click on
the row for node 5 and click on the Node Configuration button in the window that opens. Then click on the router
properties on the left hand window which displays Fig. 13.

15
Fig. 13 Node configuration window

In the Node Configuration window in the row for Type of Router click on the arrow for the value User Specified and
from the opening menu choose Predefined. Then in the row for Router Type choose the value Generic. Finally
choosing Apply button at the bottom of the window configures node 5 as a router (see Fig.14)

16
Fig. 14 Node 5 has been configured as a router

Make sure that the property “Enable IP Forwarding” in “Node Configuration” is set to “Yes” for the nodes which are
selected as the routers, while this property is set as “No” for all other nodes.

Part 6. Simulation Statistics


After the simulation has been completed, we can view the data collected during the simulation. To view the statistics of

the simulation, click on the Analyze Statistics icon in the Components toolbar.

1- Statistics File

- If you click on the Statistics File button at the bottom of the window, you will see large amount of per node
simulation data. Among the collected statistics we see,

- The packets generated by the source nodes and received by the destination nodes are listed as unicast
packets. In a connection not all the generated packets may be successfully delivered to the destination. As explained, in
Part 3b a packet will be discarded by the source as a result of reaching the number of retransmissions’ limit.
Transmissions may not be successful because of destination node not sending a CTS packet or as a result of the bit errors
in the received packet. We note that the bit errors will depend on the distance between source and destination nodes,
fading and shadowing. The strength of the received signal which will decrease as the distance between the source and
17
destination nodes increases. As a result of packet discarding, the throughput of the source and destination nodes in a
connection may not be same.

- If the distance between two nodes is higher than the node’s transmission range, then, these nodes are not
aware of each other. They cannot communicate with each other and they will not know each other’s IP addresses.
Therefore, if two such nodes will exchange data traffic with each other, the packets will be generated by the Application
layer of the source node but they will not be passed to the transport and then to the network layers because the IP
address of the destination node is unknown.

- In addition to unicast traffic packets, as may be seen there are other packets being transmitted in the
network, RTS, CTS, ACK and Broadcasting packets for routing. For each successfully received unicast packet there will be
a corresponding ACK path. The number of RTS and CTS packets will correspond to the total number of transmissions of a
packet until it is successfully transmitted.

STAT file:
Going to the folder where the project is saved, there is a .STAT file which has a filename with the format QualNet.
[Date]_[Time].STAT. For example if the simulation was run on March 09th 2017 at 14:48:40 then the name of the
corresponding stat file is qualnet_Apr_12_17_14_06_28.STAT. This file can be opened in Notepad or Notepad++. The
format of the file is shown in Fig. 15.

18
Fig. 15 .STAT file format

Unicast and Broadcast Packets:


This file provides detailed information about the packets going from one layer to another. In this file, the “Application”
and “MAC” layers give the number of data/unicast packets and broadcast packets separately while other layers give the
total sum of all packets in that layer.

Application,TRAFFIC-GEN Client and Server:


In the application layer “Application,TRAFFIC-GEN Client” indicates the transmitter node and gives information about the
transmitting statistics of the node. “Application,TRAFFIC-GEN Server” indicates receiver node and gives information of
the receiver statistics of the node. Note that these fields will not exist for a node which doesn’t transmit/receive
anything.

Example:
Going from layer to layer, the number of packets that go from one layer to the higher or lower layer can be extracted
from this file. For example for a UDP connection, Fig. 16 shows the STAT file information for the transmitter node 6.
Total data units generated by the Application layer are 508, given by “Application,TRAFFIC-GEN Client,Total Data Units
Sent”, note that if this value and the value below it “Total Fragmented No.” are not the same, use the “Total Fragmented
No.”. This is the total number of data or unicast packets. Then the fields “Application,Bellman-Ford,Number of periodic
updates sent” and “Application,Bellman-Ford,Number of triggered updates sent” give the total number of broadcast
packets sent by the Application Layer. Which adds up to 25+18=43. Then the field “Transport, UDP,Packets from
Application Layer = 551” gives the number of packets coming from the Application layer. But this layer gives the sum of
unicast and broadcast packets both so, 508+43=551, so it all adds up. Similarly this information for other layers can be
extracted from this file. This information can be extracted in a similar way going from higher layer to lower layer.

Figure 16 STAT file for a UDP transmitter node.

Fragments:
If the size of the packet is too big then the packets have to be fragmented. Fragment information can also be extracted
from the stat file. Figure 17 shows the network layer statistics from the STAT file. The total number of packets going into
the Network layer is 551. Then out of these, 7 packets are fragmented given by the field “IP,Packets fragmented = 7”.
From these 7 packets, 14 fragments are created given by the field “IP,Fragments created = 14”. So 551-7=544 is the total
19
number of packets which are not fragmented. Then adding the number of fragments to this gives the total number of
packets sent to the lower layer. This is given by the field “IP,ipOutRequests = 558”. As 544+14=558 so everything adds
up. This information can be extracted in a similar way going from higher layer to lower layer.

Figure 17 Fragmentation in Network Layer

Physical Layer:
The actual information about the signals transmitted by the Physical layer can also be extracted, this value is much
higher compared to the total number of packets generated in the Application layer. Considering the same example from
above, Fig. 18 shows the Physical layer from the STAT file. As this UDP connection follows the protocol that to transmit
each packet, first it sends an RTS packet, then if it recives a CTS from the destination, it then sends the actual packet. So
from the figure below, the total RTS sent is 566 given by the field “RTS packets sent = 566”. The total unicast packets
sent is “Unicasts sent = 515” and broadcast is “Broadcasts sent = 43”, also any packets resent will be retransmitted given
by “Packet retransmissions due to ACK timeout = 6”. Adding this all up 566+515+43+6=1130. Which is exactly given by
the field “802.11,Signals transmitted = 1130” in the Physical layer. So everything adds up.

Figure 18 Physical layer statistics

20
2- Graph Analyzer Window

If you click on the Overview button at the bottom of the window, then we can navigate through the Physical, MAC,
Network, Transport, and Application layers shown on left hand window. We can access to each layer data by clicking on
the button for that layer at the bottom of left hand window. This results in opening of a menu for that layer in the left
hand window. Then clicking on any of the menu items displays a submenu. Clicking on any submenu item displays a bar
chart for the data collected for that item during the simulation.

In Fig. 19 we are ready to view the data collected in the application layer.

Fig. 19 Viewing the data collected during the simulation.

21
In Fig. 19, when we click on the Traffic-Gen Client button on the left hand window, then from the drop out menu we
click on the data units sent. This results in Fig. 20 which shows the bar charts for the total number of packets generated
at the application layer of each node.

Fig.20 Traffic generated at the application layer of each node

22

You might also like