Qualnet Tutorial 5.0
Qualnet Tutorial 5.0
Qualnet Tutorial 5.0
Part 1: Installation
TODO: I would recommend getting AITS to provide the installation instructions as Im sure the license restrictions will determine how/where QualNet gets installed.
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 adhoc 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).
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 (leave it blank). 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.
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).
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. 5). Click on the
4
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.
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 upto a transmission limit, when that limit is passed then the packet is discarded ( for values of these limits see Fig. 7).
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.
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 . The Visualization Controls panel opens in the left window. You should see the coordinates icon of the nodes and the current simulation time (which is 0.0000 seconds) in the output window. Before running the simulation, we note that the Developer package will by default animate various aspects of the 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 Fig10.
10
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 (Fig. 11). on the menu bar. You should see the simulation animations as the simulator runs
11
You can enable or disable the different animations while the simulation runs. Wait until the simulation completes.
12
Figure 12 The two subnetworks communicate through the router node [2] Next we will configure node 2 as a router. For this click on the Table view, then on the Node button, then double click on the row for node 2 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.
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 2 as a router ( see Fig.14)
13
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 toolbar. in the Components
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 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 nodes transmission range, then, these nodes are not aware of each other. They can not communicate with each other and they will not know each others 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.
15
In Fig. 15, 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. 16 which shows the bart charts for the total number of packets generated at the application layer of each node.
16
17