You are on page 1of 13

OPnet Tutorial

Written by Andrew Kim


Last updated: March 7, 2003


I. INTRODUCTION
This material is a required reading for student taking TCM-250. To use the OPNET
simulation software you should read and understand the theories and concepts that is
described below. You will be quizzed upon these ideas presented here and during the
lecture. Again, the material contain herein is required reading for TCM-250.
The OPNET simulation software is currently not available for student purchase. OPNET
does not sell student version of software. Your only choice is to use the OPNET software
installed in the TCOM-LAB. This software is currently also being used at the Tinley
Campus.
This tutorial is written for expressed purpose of the students of the DeVry at Addison
Illinois campus by Andrew Kim. The original tutorial files that is included with the OPNET
is often viewed as difficult to comprehend by students; therefore, purpose of this
introduction is to give students basic understanding of the OPNET and also to give the
students mathematical/probability theory which underlies the operation of OPNET using as
much as simple to understand language as possible.
To understand OPNET operations and OPNET simulation setup, the knowledge from
previous math courses MATH-168 and MATH-220 are essential. Both of these courses are
prerequisite of the TCM-255. Without these courses, students may not take TCM-255 and
will have difficult time comprehending the lectures.

A. Why OPNET is being used for TCM-250
The software simulations are widely used in the industry currently. Much of the proposed
hardware as well as protocols are pre-tested in the software domain. Most of the wireless
network as well as the protocol to support wireless networks are currently being developed
using the simulation programs. The advantages of using simulation program are obvious :
less time to develop working hardware/software, ability to try out vast different scenarios of
hardware and software attempts without the down side of the cost and time, and predict
potential problems of hardware software before the actual use.
First, some information on the OPNET itself.
OPNET Modeler is the industry's leading network development software first introduced in
1986 by MIT graduate. OPnet allows you to design and study communication networks,
devices, protocols, and application. Modeler is used by the world's most prestigious
technology organizations to accelerate the R&D process. Some of the customers include,
Pentagon, MIT, UIC, and many more.
Opnets object-oriented modeling approach and graphical user interface(GUI) enable
relatively easy means of developing models from the actual world network, hardware
devices, and protocols. Modeler supports all major network types and technologies,
allowing you to design and test various scenarios with reasonable certainty of the output
results.
The application areas include:

1. Network planning (both LAN and/or WAN) and analysis of performance and
problems prior to actual implementation
2. Wireless and Satellite communication schemes and protocols
3. Microwave and Fiber-optic based Network Management
4. Protocol Development and management
5. Routing algorithm evaluation for routers, switches, and other connecting devices.

Some promiscuous features of features that make it such a comprehensive tool are as
follows:

1. Hierarchical network models (The model can be nested within layers)
2. Object oriented modeling (Model can be reference and used as logical extension of
Object oncepts.)
3. Multiple scenarios can be simulated concurrently and compared.
4. The traffic patterns can be imported into the modeling software
5. Ability to analyze using built-in graphing tools.

Opnet allows you to model network topologies with nested sub-networking approach. This
software allows nodes and protocols to be modeled as classes with all features of object
oriented design It facilitates modeling the behavior of individual objects at the
Process Level and interconnect them to form devices at the "Node Level" So that you can
interconnect devices using links to form networks at the "Network Level." You can
organize multiple network scenarios into Projects to compare designs and Aggregate
traffic from LANs or "Cloud" nodes.

Opnet has highly efficient simulation engine and with users ability to modify memory
utilization during the simulation. Very granular simulation can be accomplished in
relatively short amount of time. This in part due to the complied nature of the model when
it is executed. The OPNET model in its very core consists of C++ codes. These codes are
complied and executed just like the C++ program. This enables very detailed control of the
model by the user (if the user is proficient in C++). We shall not delve into such level of
detail in our class.
The network simulation software OPNET provides student with the ability to modify
network parameters and see the effect of these changes in immediately. The number of the
network types that is covered during the class is numerous, and it would be impractical to
perform labs physically on multitude of the networks which is constantly becoming
outdated. The time required to physically set up networks including software would require
much more time than what is available for the TCM-255 labs. The actual installation and
setup of network in server-client environment is coming up in classes TCM-340 and TCM-
343. and TCM-430. The network simulation gives students insight into changes in various
network parameters upon network performance without extended hardware and software
setup.
Using the OPNET simulation tool, one can ask various "What-If" questions such as, "What
if I added two more client stations to the existing network? Will the network become over
loaded?" "What if I were to use token ring verses 10BaseT what would be my performance
improvement?" "What if I were to increase the channel utilization to 30% what would be
impact upon my message delay?" "How many printers do I need at 16 PPM for the 40
station client server network at a given printing requirements". These types of the questions
can be analyzed using the simulation tool, without purchasing the hardwares and hoping
that your 'guestimate' of selection of hardwares and softwares are going to work. If one's
job is on the line, hoping for everything to work out just fine, is not a good proven path to a
sure promotion.
OPnet web page is located at www.opnet.com You may wish to search the web site for
more information. In a persons word, the reason why simulation is required:
Network simulation provides a means of testing proposed changes prior to placing them into effect,
performing what-if analysis concerning the reliability of key components in a network and the effects of
losing a component, planning for future growth, and initial design of a proposed network. The costs
associated with the building and operating of a network make simulation a viable option in making choices in
the building, modification, and performance analysis of a network.

B. What LAN's OPNET support
OPNET can simulate virtually any type of LAN (as well as WAN) that is being used in the
world. It is designed to simulate down to the minute detailed of network operation(
including speed of processor, number of processor, amount of RAM, speed of RAM among
other hardware specific parameters). in TCM-250 we concentrate on the big pictures and
will not concern ourselves with that minute level of hardware detail. The class lab will use
predominantly Ethernet (802.3) and Frame Relay for lab exercises.
II. Simulation and network basics
Student is expected to have basic understanding of the OPNET operation. This section
deals with the basic understanding of OPNET required to setup the network simulations.
The first portion will review basic probability theory. Most of the material should be a
refresher for the student and should have been covered in the previous math courses. There
are other concepts in this tutorial which may have not been covered during the previous
math courses which is covered here. First, some basic terminology which will be used
throughout this document and throughout the class.
Channel Utilization : Percentage of network capacity used by the network. For
example, if network is capable of delivering 100Mbit/s (i.e. 100BaseT) and the
observed amount of data transmitted during a time period turns out to be 10 Mbit/s,
the effective channel capacity is 10% = 10 Mbps/100Mbps.
Throughtput: Actual amount of data being transmitted in a given time. This figure
is generally lower then the channel utilization. Typically given in bit per seconds,
Kbit/s, M bit/s.
Offered Load: Amount of data that network is given to transmit during a period of
time. For example, if there is 10 stations transmitting 0.1 Mbps, the offered load to
the network is 1 Mbps.
Channel Capacity: The maximum amount of data a network may transmit within a
given period. For example, 10BaseT is capable of 10 million bits per second
(Mbps), and T1 is capable of 24 voice channel at 64Kbps.
Buffer (input and output) : The temporary storage for the data either just received or
ready to be transmitted. The buffer may be physically a storage device such as Hard
drive, or RAM.
Message size: OPNET terms used to describe the source data and reply data. The
source data is the data that initiates the information exchange. Typically a message
source has corresponding response source. For example, message source may be a
workstation (client) which request information download from a server, and
message response may be the information that message source requested. Within
the message source, such information as interarrival PDF, message PDF must be
defined. The terms and theory behind distribution and other probability theory will
be covered in subsequent sections.
Interarrival rate and Interarrival PDF: Interarrival rate is the average rate at which
message source is generated in terms of seconds(default). For example, interarrival
rate of 10seconds means that a new message is generated every 10 seconds.
Interarrival PDF(Probability Density Function will be covered in following section)
describes how interarrival are distributed in time. It will show how variable the
interarrival is.
Inter-arrival: Literally means between arrival, or time between successive a
rrivals. Another word, how long can I wait before next message arrives to be
transmitted.
Message Size PDF: This defines how the message to be transmitted is distributed.
You must define this window for both message source and response source. For
example, if message size distribution is uniformly distributed between 10K byte and
20 Kbytes, the average message size transmitted will be 15K byte, and the range of
the messages sizes generated to be transmitted will range from 10Kbyte to 20Kbyte.
Uniform PDF: This distribution defines how data is distributed. The parameters
used in Uniform distribution are (3) lower_bound, upper_bound, and stream. The
stream selection is used to ensure that each separate processes are independent of
another. For example, if two computer is defined to have interarrival distribution
using same stream number, then the result of the simulation will result in non-
independent simulation run. Another word, the result of the simulation might not be
what you expect due to dependence of two PDF on a same random number
generator stream. The uniform is often used to model both message size and the
interarrival PDF.
Exponential PDF: This PDF takes 2 arguments: average interarrival and
stream. This distribution is almost always used for the interarrival distribution (i.e.
this is not used for message size distribution). Use in this manner, this interarrival
distribution used to generate how much time have to elapse before the next arrival
of message to be transmitted. The second argument is same as above. Note, for
the class, we shall use above two PDF's exclusively.
Message/Frame/Ethernet/etc Delay: Time to get the complete data from source to
destination.
Frame Delay: Time required to get the complete frame from source to
destination. The OPNET gives the raw data as well as the the graphical form of the
data.
Dropped frame: If the frame is received but the input buffer capacity have been
exhausted, the frames may be dropped by the network. The Opnet has option of
keeping track of this occurrence in the network operation.
Collision Episodes: The occurances of number of collision that has been seen on the
network in Ethernet
Multiple Collision Episodes: If the collision was result of more than two frames in
Ethernet.


A. INTRODUCTION to PROBABILITY
All real world events such as network operation, traffic, check out counter at your local
grocery store, are not deterministic, rather they are probabilistic. One cannot, with absolute
certainty that if one get in the line at the grocery store at 10:00AM, your wait will be less
than 1 minute. Another example, the number of cars on the I-355 at 8:00AM on next
Monday cannot be predicted with 100% certainty (i.e. it is not deterministic), but it can be
described in terms probability. Another example might be number of people waiting in
queue to check out of a department store at certain time of the day, or number of individual
peanuts in a one pound bag. One can have a general idea as to approximately how many
peanuts are in a pound bag, but one cannot be 100% certain of that number. Of course, you
can state that within a one pound bag of peanuts there are less than million peanuts, or state
that there are at least one peanuts in the 1 pound bag of peanuts. However, you cannot state
with any 100% certainty there are x number of peanuts in that one pound bag. A much
more difficult question to answer is the number of customers waiting to check out at certain
time. As most have noticed, the number of people on a check outline are often widely
variable even if we were to compare similar time of same day of week. Predicting how
people will 'behave' can only be done using theory of probability (i.e. to predict how many
people will be on a particular checkout line is a very difficult mathematical problem; for
these of you who may wish to look further into this area look up the following topic on the
web: Queuing Theory. People's behavior is not deterministic. What this means is that no
one can predict out of population of 1000 how many people will be waiting on a checkout
line at any given time. In another word the real world process is not deterministic.
For example, lets say that your boss at a department store wishes to make a new store
policy saying that no customer will need to wait more than 5 minutes to finish the checkout
process. He left you to determine how such policy is to be implemented. How would you
go about determining how many cashiers will be required at any given time? How many
counters need to be open at 8:00AM? How many counters will need to be opened at
12:00PM? How many cashiers should be called in on the Thanksgiving weekends? How
would you answer these questions? These kinds of questions can be answered by using
Statistic and Queuing Theory, or can be simulated to figure out the desired numbers of
cahiers required at any given time.
Now, what does cashiers have to do with the network simulation and design using OPnet?
In the world of Queuing Theory, the arrival of packet of data, person coming to the
checkout counter, number of cars coming to the toll booths, are all similar and can be
solved similarly.
Consequently, the discussion above on the checkout counter, toll booth etc. can be extend
to LAN as well as WAN. For example, in a typical Netware based PC network, how can
we describe the operation of this particular network (such as what will be the average
message delay, what will be the channel utilization, etc.). Some of questions that can be
answered are such as how many workstations should be within a single subnet? How many
routers are required? How many Netware licenses are required?
How can we answer the above problems? Recall the maxim, Garbage in. Garbage out. In
order to get a reasonable accuracy in the simulation one must defined the problem in
reasonably accurate manner in mathematical form. How do you describe the inter-arrival
of customer at the checkout counter? How do you describe how much time it will take to
service the customer at the checkout counter? These and much more must be converted or
described in terms of mathematics.
The probability parameters such as average, maximum, standard deviation, Probability
Distribution Function (PDF), and Cumulative Distribution Function (CDF) among other
probability parameters can be used to described the network traffic to a fairly high accuracy
with respect to the real world observed operation of the network. In this section, these
probability terms to be used in class will be defined and how these terms are used by the
OPNET simulation. It has been shown that if the probability parameters are selected
properly, the network simulation can fairly accurately model the real world.
In the TCM-250 class you will perform simple calculation to find channel utilization's and
other network gauge parameters and compare the calculation to the result of the OPNET
simulation report. The report generated by the OPNET, students will find, is reasonably
close to the result obtained in calculation.
Again, the actual transaction of individual station cannot be predicted. No one can tell with
100% certainty that with the channel utilization at 1%, that there will not be collision using
Ethernet. One can say only say that with fairly high probability that the chance of collision
with the channel utilization at 1% is very low. But, again there is no way to predict the
actual behavior of each stations. The best we can do is to predict with certain probability,
and model the network working with certain statistical concepts. These concepts are
covered below.
A.1 Average, Maximum and Standard Deviation
It is important that student understand that average by itself cannot tell the complete story
of the network. Just as the average number of cars waiting on the toll booth at the Army
Trail Plaza (over a year), cannot not tell how many cars can I expect from on a particular
Monday at 8:00 AM. The Average can just gives you a rough idea of the traffic. Average
figure can be quite deceiving. For example, IDOT reports that the average number of cars
on a particular stretch of a highway is 5,000 cars. However, this cannot show you the true
nature of delay expected on the highway if you were on that highway during the rush hour.
Keep in mind that average does not give any indication of variability of the data under
question. Likewise, the channel utilization is an average of the channel used over a given
time. If you were to take the channel utilization reading via network monitoring tool such
as NetXray during the 12:00AM through 6AM on a DeVry Institute of Technology your
channel utilization average will not represent the true picture of the network activity.
Maximum indicates, as the name suggest, the highest observe event. For example, if the
maximum channel utilization figure is given, this information alone will not be very useful.
Maximum value can gives some clue as to how far from the average the worst case event(s)
could be. However, still the how data is distributed is rather unclear.
Standard Deviation can give you the better insight into how an observed set of data is
distributed. Of course, the best way to see the distribution of data set is via use of
distribution graph. However, the Standard Deviation gives much more clear picture of the
variability of data set than both average and maximum. You may calculate the standard
deviation using the formula for standard deviation, or use Excel Spread sheet and let the
Excel take care of calculation. The standard deviation correlates how widely distribute the
data set is. Wider the distribution of data set higher the standard deviation number. One
thing students should be aware is that standard deviation is not strictly limited to the
Gaussian distribution that was used in your probability class. The standard deviation can
be calculated for any set of data outcome. Therefore, statements such as +/-1 standard
deviation will contain 67% of all observed data cannot be applied to other types of
distribution. Another concept to keep in minds is that standard deviation should be
analyzed in conjunction with the average. For example, for a sample X average is 100 and
standard deviation is 10, and sample Y average 10000 and standard deviation is 10, even
though two data sets have same standard deviation, the data sample B has much tighter
distribution than Data sample A. Make sure that you compare apples to apples.
What implication does this have on the network operation?
A.2 PDF Probability Distribution Function
How a data set is distributed can best be seen by use of PDF. The two PDFs we will used
will be Uniform and Exponential (we will also use constant value but that is not really a
difficult distribution to visualize.) as previously defined. Please note that uniform
distribution can be used for both the interarrival and the message(frame/packet/etc) size
PDF. OPNET use the PDF to generate both interarrival, as well as the message
size. Within the simulation software OPNET there is a process which generates streams of
random numbers. These random number generation is used by the program in a statistical
way based upon the PDF chosen, to randomly generate arrival of messages with guideline
set by the PDF, as well as, use random number stream to calculate the actual message
required to be transmitted.
It is important to note that there are other distributions such as Erlang, Gamma, Hyper-
Exponential, geometric, etc. We shall not be using these PDF for the TCM-250 use. There
is way to use actual traffic patter observed for the simulation. We will not be using this
feature in this class.
The PDF is the best described via a graph. The typical x-axis takes such parameter as the
wait time until next message, the size of the message that is received (in other word it can
be either inter-arrival or message size PDF). The typical y-axis is the probability of a
particular event or particular message size. For example, if the x-axis is the message size
PDF, the y axis is the corresponding probability of these message sizes being
generated. Note, that the PDF can be either discreet or continuous. The discreet PDF only
have values at discreet point. Example of discreet PDF is such events as probability of the
outcome based upon throw of two fair die. In this example, the x-axis will have discreet
values from 2 to 12 inclusive. However, there cannot be values such as 2.5. The y-axis is
the probability of the outcome being 2,3,4...12. One can extend the similar concept to
understand the continuous PDF. The uniform PDF that TCM-250 will use will be both
discreet and continuous. If the interarrival PDF using exponential distribution is used, the
PDF here is no longer discreet, rather it is continuous between the zero and infinity.

B. Opnet, basic Introduction
B.1. Opnet startup
Opnet uses a relatively simple GUI to interface its rather very complex kernal engine.
What you see when you start the Opnet program is a simple rectangle window with the
Opnet logo and the basic top level project level interface (This interface is called, the
Main Menu.) This interface is used to open an existing project, or create a new project, or
many other tasks. Once you choose an existing project you will be shown a new window
with a GUI similar to the following screen shot.

The following are a simplified description of each major pull down tabs.
File: Just as in most programs, this tab is used to perform saves, setting the default working
directory. You must set the default working directory to your network drive (in current
network setting case its the U: drive). I suggest that you create a sub-directory underneath
the U: drive to house all your Project works. Please, note that each of the project that you
will be working on may use up 10 Mbyte or more. Since you are allotted 100Mbyte of
space, be judicious in saving multiple projects. I suggest that you keep backup of projects
at other network drives as well as on the ZIP drive. Also within the File operation is the
printing options. The printing options include page setup and special printing option of
graphs generated.
Edit: Major edit functions. Such functions as cut, paste, copy, etc. are located here. Also
included are find/search operation for objects, as well as preferences.
Scenario: This tab is used to work with creating, deleting, editing scenarios for What-if
scenarios. We will use this to make comparison of various settings of operation of the
network and compare such network parameters as delay, throughput, and others.
Topology: This table is used to create objects within the workspace. One can select the
pallet to be used, also select the Rapid Generator, as well as other tools for generating
objects within the work space.
Traffic: This tab is used to manage the traffic to be present during the simulation. One can
import or export the traffic to a file. One can get the traffic pattern from such program as
NetXray or any other network sniffer tools.
Protocols: This tab is used to configure and edit the protocols to be used during the
simulation.
Simulation: This tab is used to setup various configurations for the simulation run. The
simulation data to be collected is located here. Also included are various parameters for
simulation such as duration, samples taken, seed, etc.
Result: This tab is used to view the result of the simulation. Various different method of
viewing data is set here. One can group different data set in one window.
Windows: Used to arrange the opening and hiding various windows. If you do not see the
work space, use this tab to bring the work space to the front.
In general right clicking and selecting the edit attribute option enables you to configure
that object. Any object on the work space maybe edited this way. Single left-clicking does
not bring up the configuration editing window. That brings up the node model.
The icon below the drop down menu includes the following:

The left most icon is the Pallet this icon brings up a group of related objects to be used to
populate the work space. The current pallet can be change to any other pallet as well as
new pallet can be created of individual components as you wish.
The second link is to verify the connections between objects. This verifies that all
connections are valid. However this does not mean any higher level protocols are set
correctly or not.
Next to icons are used to fail or un-fail links.
The next icon is to move up in layer. The red octagon is used to indicate subnets. The
arrow in the middle indicate moving up the layer.
Next to tools are to expand and compress the viewing of the work space.
The next icon (man getting set to spring) is used to startup a simulation. Clicking this icon
bring up the Configure Simulation menu. The configuration menu is used to configure
various run parameters. Do not go crazy in setting the duration and update interval. Your
simulation run may last excessively long time without adding any more information.
Next icon is used to View Results. This brings up the configuration for bringing up the
graphs. The standard means of expanding the listing is used [+] and [-]. The report with
[+] indicates there is/are data underneath which can be used to generate graph(s). The
bottom three pull-down selection menu is used to configure how the data is to be displayed.
In general we shall use Statistics Stacked, Time_Average, and This scenario as
selection for displaying the graphs.
Next icon is used to open most recently generated result published on the web.
The last icon is used to hide and un-hide the graphs generated.

B.2 General notes on using Opnet.
Here I will discuss some general pointers in running the Opnet simulation. These are list of
suggested actions that I suggest and I suggest that you avoid.
Do:
1) Please set the working directory to the U: drive before starting your work. And
verify that files are saved to where you think they are saved, before exiting Opnet.
Note, floppy is not sufficient for saving project files, period.
2) Please save often. Save various incremental version of the projects. Make sure that
your lab partners have copy of the project in their directory as well. There should
be no excuse such as My lab partner is out of town; so, I cant do the lab.
Remember, late lab incur significant penalty.
3) Make sure you follow directions, word for word. If your do not you may have to re-
start the project.
4) Make periodic update of your ZIP drive. The network drive is backed up each day.
So, if you must get the data back, it can be. However, dont count on it from the IT
department. The major reason for the network backup is not to recover individual
files but all files upon major breakdown. So, make sure you keep a working backup
of all the labs that you work on a separate medium such as ZIP. I suggest that for
these of you who have CDRW drives make project files saved to the CD.
5) For these of you who wish to get more detailed understanding of the Opnet, run
through the tutorial in the help tab.
6) Please print out result of the simulation once it is completed. And you may wish to
save the graph in separate files to later insertion to the lab report.
Dont do:
1) Dont save file to the local machine. The files saved to the local machine to
directories such as c:\temp may not survive the reboot operation. If you save the
project without setting the default working directory, your work may not get saved
at all, or may get saved in location that others will be able to alter the content of the
lab.
2) Dont delete or modify any sample projects, files and configurations.
3) Dont have more applications open than absolutely necessary. The efficiency of
the Opnet modeling is reduced when there is limited resources available. Do not
browse the web while running Opnet simulation.

C.1 Concluding remark
The Opnet is a very powerful tool used in many disciplines of network design and
troubleshooting. The extent of this powerful tool that we will use is very limited.
However, even within that limited use of the software, it is enough to demonstrate to the
student the power of the simulation tool such as Opnet. With this tool the network
parameters and their effect on the network performance can be deduced . As with any new
tool, one must learn the basics, and the only way to learn the tool is to use them. Please
expect to spend some time with the software. And since the software is not available
outside the lab, you must come to the TCOM-LAB, no exceptions.

Andrew Kim

You might also like