You are on page 1of 10

CEG 4286

Wireless Mobile Networks

LABORATORY 2 @STE 2052


Introduction to OPNET
OPNET modeler is used for wireless network lab simulations of this course. You will learn how to use OPNET first by reviewing this tutorial. Further information can be obtained by studying OPNET documentations or consulting TAs. The purpose of this laboratory it to explain general structure of the OPNET modeler, how information flow during network simulations and view some of the capabilities of OPNET. This tutorial mainly concentrates on the parts of OPNET that we will utilize for CEG 4286 class. Definitions and screen shots of all the advanced OPNET editors are also given in this tutorial.

Overview
OPNET work flow OPNET Basics and Structure Network Model Editor Node Model Editor Process Model Editor Other OPNET Editors

OPNET Work flow


While using OPNET, you should follow certain steps in order to simulate a network configuration. First, you should create the network model that you want to work on. (Details of creating a network model is given in the following sections). An example wireless LAN network connected through bridges is given in the figure below:

Illustration 1: An example wireless LAN network

CEG 4286

Wireless Mobile Networks

After creating the network, you should choose network statistics that you want to work on or observe as you change the simulation parameters. For instance, for WLANs, these statistics could be communication delay, system throughput, packet error rate etc. You can choose wanted statistics by right clicking the on the network model window and choosing Choose individual statistics option as illustrated below in figure 2.

Illustration 2: Choosing the simulation statistics to observe

Running the simulation would be the next step after choosing statistics to analyze. Running the simulation can be accomplished by calling Configure Discrete Event Simulation option from the Simulation tab in the Network model window.

CEG 4286

Wireless Mobile Networks

Illustration 3: Example network simulation set-up

The last step in simulating a network is analyzing the results of the network. Analyzing results means observing the change of selected network statistics relative to different simulation parameters. For a WLAN example this could be the change of network throughput relative to time as the load of the network changes, as illustrated in the figure below. Simulation results can be observed by right clicking the network window and choosing view results option from the drop down menu. The variation of the chosen statistics relative to time is shown in a graph.

Illustration 4: Analyzing network simulation results

CEG 4286

Wireless Mobile Networks

OPNET Basics and Structure


OPNET has three-tiered hierarchy Network model: Specifies actual network components (e.g. computers, hubs, routers) Node model: Specifies objects in network components (e.g. source in transmitter, queue) Process model: Specifies the algorithm and behavior of the node models

Illustration 5: OPNET hierarchy

Project editor is the first interface that you come across with, when you start OPNET. You can specify network topology, choose statistics to analyze, run simulations and view results by this editor. Node editor specifies the internal structure of the components in project model. (e.g. router or hub) Process editor implements the algorithm in node models. (e.g. ARQ algorithms)

Network Model Editor


Network models consist of nodes, links and subnets Nodes can represent any network device, e.g. servers, mobile stations, routers, etc. Subnets are used to cluster group of devices, e.g. Consider a WLAN network of school and you can represent a room with a subnet where there are multiple wireless computers in each room.

CEG 4286

Wireless Mobile Networks

Illustration 6: An example network model

Links enable the connection between nodes, e.g. An Ethernet link connecting multiple computers.

Node Model Editor


Node model includes basic build blocks of network components Basic building blocks might include source, sink, queue, link and processor modules Processor modules can be fully programmable. (e.g. MAC interface) Nodes interface with other network components with transceivers and receivers Node modules can be connected with packet streams for data transmission and statistics wires for data analysis

Illustration 7: An example node model

Process Model Editor

CEG 4286

Wireless Mobile Networks

Process model determines the behavior of the nodes by state transition diagrams, C-modules and built-in functions (i.e. Kernel procedures) Process model consists of Finite state machine or state transition diagrams Chunks of C-codes called C modules State/Temporary variables Every action taken by process model is called process In finite state machine, every state has enter executives (top half) and exit executives (bottom half) The states can be forced (green) and unforced (red). Unforced state waits for an interrupt to continue execution of exit executives. Example for green (forced) state: When first entered it performs enter execs in the first state Without any wait, it executes the exit execs (i.e. The reason it is called forced). (That is the only difference between the unforced state. Unforced [Red] state passes the control to kernel after enter execs and waits for a signal [interrupt] in order to continue with exit execs.) Evaluates the condition for transition. If the conditions are true it continues with the second state

Illustration 8: Example state diagram of process model

Other OPNET Editors


OPNET has many advanced editors to be used in specific network modeling. For the labs that we are going to prepare we will not use all of its capabilities. Therefore in this section we will mention those editors. For more information about these editors, please refer to OPNET help files.

Link Model Editor


The link model editor lets you create new types of wired link objects, i.e. Ethernet connection. Each new type of link can have different type of attributes, i.e. connection speed, duplex etc. The link model editor has a window as illustrated below.

CEG 4286

Wireless Mobile Networks

Illustration 9: Link Model Editor

The Path Editor


The path editor is used to create new path objects that define a traffic route.

Illustration 10: Path editor window

The Packet Format Editor

CEG 4286

Wireless Mobile Networks

The packet format editor lets you define the fields and the length of fields of a packet. For example IEEE 802.11 wireless channel simulations requires two types of packet formats, namely control packet format and information packet format. Different fields are color coded for illustration and the length of fields are proportional to the number of bits each field contains.

Illustration 11: Packet format editor window

The PDF Editor


The probability density function (pdf) editor lets you analyze the probability distribution of an event. It represents the spread of probability of any outcome over the range of probabilities.

Illustration 12: PDF editor window

The Probe Editor

CEG 4286

Wireless Mobile Networks

The probe editor lets you choose the statistics to be collected during the simulation. With probe editor you can specify, save and load the statistics to be collected for any simulation.

Illustration 13: Probe editor window

The Simulation Sequence Editor


With OPNET, you can run simulations within the project editor. But you may want to simulate the same simulation with different constraints and conditions. For example, considering the wireless networks, you might want to get the throughput results for the same network with different loading conditions. You can specify the simulation editor to run the same simulation multiple times with the specified system parameters.

CEG 4286

Wireless Mobile Networks

Illustration 14: Simulation sequence window

The Analysis Tool


With analysis tool, you can create scalar graphs for parametric studies and define templates to which you apply statistical data and create analysis configurations that you can save and view later.

Illustration 15: Analysis tool