Opnet Exercise 1
Opnet Exercise 1
Opnet Exercise 1
Introduction to Opnet
Objective
This laboratory is about basics of using Optimized Network Engineering Tools (OPNET).
Overview
The OPNET is a very powerful network simulator. Main purposes are to optimize cost,
performance and availability.
The goal of this laboratory is to learn the basics of how to use Modeler interface, as well
as some basic modeling theory. The following tasks are considered:
• Build and analyze models.
• Configure the object palette with the needed models.
• Set up application and profile configurations.
• Model a LAN as a single node.
• Specify background utilization that changes over a time on a link.
• Simulate multiple scenarios simultaneously.
• Apply filter to graphs of results and analyze the results.
Before starting working on the Exercise part of this laboratory, one has to read the
Preparations part.
Preparations
To build a network model the workflow centers on the Project Editor. This is used to
create network models, collect statistics directly from each network object or from the
network as a hole, execute a simulation and view results. See Fig.1.
Figure 1 - Workflow
Project Editor
The main staging area for creating a network simulation is the Project Editor. This is used
to create a network model using models from the standard library, collect statistics about
the network, run the simulation and view the results. Using specialized editors accessible
from the Project Editor via File ! New one can create node and process models, build
packet formats and create filters and parameters.
Depending on the type of network being modeled, a network model may consist of
subnetworks and nodes connected by point-to-point, bus, or radio links. Subnetworks,
nodes, and links can be placed within subnetworks, which can then be treated as single
objects in the network model. This is useful for separating the network diagram into
manageable pieces and provides a quick way of duplicating groups of nodes and links.
The Node Editor
The Node Editor is used to create models of nodes. The node models are then used to
create node instances within networks in the Project Editor. Internally, OPNET node
models have a modular structure. You define a node by connecting various modules with
packet streams and statistic wires. The connections between modules allow packets and
status information to be exchanged between modules. Each module placed in a node
serves a specific purpose, such as generating packets, queuing packets, processing
packets, or transmitting and receiving packets.
To create process models which control the underlying functionality of the node models
created in the Node Editor one can use the Process Editor. Process models are
represented by finite state machines (FSMs) and are created with icons that represent
states and lines that represent transitions between states. Operations performed in each
state or for a transition are described in embedded C or C++ code blocks.
This editor enables for the possibility to create new types of link objects. Each new type
of link can have different attribute interfaces and representation. Specific comments and
keywords for easy recognition are also possible.
The Path Editor is used to create new path objects that define a traffic route. Any protocol
model that users logical connections or virtual circuits such as MPLS, ATM, Frame
Relay, etc can use paths to route traffic.
By making use of this editor it is possible to define the internal structure of a packet as a
set of fields. A packet format contains one or more fields, represented in the editor as
colored rectangular boxes. The size of the box is proportional to the number of bits
specified as the field’s size.
This editor is used to specify the statistics to be collected. By using different probes there
are several different types of statistics that can be collected, including global statistics,
link statistics, node statistics, attribute statistics, and several types of animation statistics.
It is mentioned that similar possibilities for collecting statistics are also available under
the Project Editor. These are however not as powerful as the Probe Editor.
The Analysis Tool has several useful additional features like for instance one can create
scalar graphics for parametric studies, define templates for statistical data, create analysis
configurations to save and view later, etc.
There are several areas in the Project Editor window (a.k.a. workspace) that are important
for building an executing a model. See Figure 11 as an example.
Buttons
Several of the more commonly used menu bar can also be activated through buttons.
Each editor has its own set of buttons. The buttons shown below appear in the Project
Editor.
1 2 3 4 5 6 7 8 9 10 11
Occasionally, the messages Modeler generates may be larger than the message area. You
can left-click on the icon next to the message area to open the message buffer, where
the entire message displays.
Tool tips
If you place your cursor over a button or a menu selection, a help balloon soon appears.
The first step in setting up the WAN is to specify the overall context for the network with
the Startup Wizard.
Steps:
1) Begin by starting up Modeler and create a new project. Select File -> New and click
OK
2) Name the new project <initials>_LAN_Mod and the scenario no_back_util, then
click OK. Write down your project name here:_____________________
3) To create an empty scenario for the Initial Topology click next when prompted by
the Startup Wizard.
4) Next you can specify a map to use as a background for your network. Click Choose
From Maps for Network Scale and click Next.
7) Finally review your settings and click OK to finish the Startup Wizard.
The workspace now shows the specified map and object palette.
8) Zoom in Sweden from the Europe map (Zoom in until you are satisfied).
To work with Modeler’s full set of node and link models would be overwhelming, so the
object palette can be configured to show only a specific subset, or model list. Further you
can use the standard model list, adapt them for your own needs, or make your own list.
For this lab we created LAN_Mod_Model_List. Now you will adapt that model list by
adding the LAN node model to it.
9) To open the Configure Palette dialog box click the Configure Palette button in the
object palette.
The Configure Palette dialog box lets you change the object palette and then save it
10) Click the Node Models button in the Configure Palette dialog box.
11) Find 10BaseT_LAN in the list and change its status from not included to included.
13) Click OK to close the Configuration Palette dialog box, then click OK again to save
the model list as <initials>_LAN_Mod_Model_List-no_back_util.
You will now configure the Application Configuration Object and the Profile
Configuration Object. Before you begin constructing the network it’s a good idea to
predefine the profiles and applications that will be used by the LAN.
14) To configure the Application Configuration Object, open the object palette in the
case it is not already open and drag an Application Config object to the project
workspace.
15) Right click and select Edit Attributes from the pop up menu.
15) Click on the question mark next to the name attribute to see a description of the
attribute. When done close the attribute description dialog box.
17) Now change the Application Definitions attribute to Default by clicking in the
attribute’s Value column and selecting Default from the pop-up list.
Selecting Default configures the application definition object to have the eight standard
applications which are: Database Access, Email, File Transfer, File Print, Telnet Session,
Video conferencing, Voice over IP Call and Web Browsing.
19) Drag a Profile Configuration object from the object palette to project workspace.
21) Set the name attribute to Profile Configuration as shown in the box above.
22) Change now the Profile Configuration attribute by clicking in its value column
and selecting Edit from the drop down menu.
The Profile Configuration Table box appears.
25) Click in the profile’s Start Time (seconds) cell to open the Start Time Specification
dialog box.
Since you will be modeling FTP performance, that application should be included in the
profile.
28) Click in the LAN Client’s Applications column and choose Edit from the pop-up
menu
30) Set the name to File Transfer (Heavy) by clicking in the cell and selecting the
application from the pop-up menu.
By selecting Default as the value for the Application Definition attribute in this object,
you enable this list of applications. The list includes 16 entries, a heavy and a light
version for each of the eight standard applications.”
32) The completed dialog box should look like this. Verify and then click OK to close the
Applications Table dialog box.
33) Click OK to close the Profile Configuration Table, then click OK once again to
close the Attributes dialog box.
You are now ready to begin the construction of the WAN. In this scenario the network
contains 2 identical subnets in Karlskrona and Karlshamn. You can create the first subnet
in Karlskrona , with its nodes inside it, and then copy the subnet to Karlshamn. You will
also copy it to Ronneby and modify it further.
Hint: A subnet is a single network object that contains other network objects (links,
nodes and other subnets). Subnetworks allow you to simplify the display of a complex
network through abstraction.
Subnets are useful when organizing your network model. Subnets can be nested within
subnets to an unlimited degree.
36) Right-click on the subnet and select set name. Change the name to Karlskrona.
The extent of the subnet needs to be modified. The subnet extent is the geographic area
covered by the subnet, which may be much larger than the actual area you wish to model.
37) Right-click on the Karlskrona subnet and select Advanced Edit Attributes.
The unit of measure of these attributes is determined by the unit of measure of the top-
level area, degrees in this case.
In order to see what’s inside subnets just double-click on that subnet icon and the
Modeler will change the view.
By default a subnet’s grid properties is based on its parent subnet. You can change them
to fit your network.
The network in BTH does not require modeling the precise nature of each node in each
subnet, so you can represent the subnets with a LAN model.
50) Right-click on the 10BaseT_LAN and choose the Edit Attribute menu item.
You can change the attributes so that it represents a network with a certain number of
workstations and a particular traffic profile.
54) Change the Profile Name to LAN Client, then click OK.
This LAN will now use the LAN Client profile you created earlier. This profile includes
the File Transfer (Heavy) application. The LAN will send traffic that models heavy FTP
use.
55) Change the Number of Workstations attribute to 10, then click OK.
56) Close the Edit Attributes dialog box.
You have now modeled a 10 workstation LAN inside the Karlskrona subnet. Further
because this LAN model is composed of workstations and links only, it must be
connected to a router. The router can then be connected to other routers in the network.
57) To create an router drag a BN_BLN_4s_e4_f_sl8_tr4 node from the object palette to
the workstation near the Office_LAN node.
58) After naming the new node router connect it to the Office_LAN nodes with a
10BaseT link. Right click to turn off link creation.
The Karlskrona subnet is now configured. Because the subnets in Karlshamn and
Ronneby are identical, you can copy the Karlskrona subnet and place it appropriately.
59) To copy the subnet you must first return to the parent subnet, this is done either by
60) After returning to the parent subnet, select the subnet and copy it, this is done either
by clicking Edit=>Copy or by pressing <Control>+c.
61) Now paste the subnet to Karlshamn and Ronneby by selecting Edit=>Paste or by
pressing <Control>+v and then click on the Karlshamn and Ronneby region. When done
the new subnets appears.
62) You will now have to rename the subnets. To do so right-click on each of the two
subnets and choose set name.
63) Next you should connect the Karlshamn and the Karlskrona subnets to Ronneby.
To do so select the LAN_Mod_PPP_DS0 link in the object palette.
Next a Select Nodes dialog box appears asking which nodes in each subnet are to be
endpoints of the link.
The network should resemble the one shown in the picture below.
To complete the network, the main office in Ronneby needs to have a switch and a server
added to it.
70) To configure the network in Ronneby double-click on the Ronneby subnet to enter its
subnet view.
71) Place one <Bay Network Accelar1050> switch and one ethernet_server node in the
workspace.
This is done by right-clicking on each icon and select Set name from the menu.
74) Connect the router and the server to the switch with 10BaseT links. Right-click to
turn off link creation, and close the object palette.
75) Open the Attributes dialog box for the FTP server.
78) Select File Transfer (Heavy) from the Name column pop-up menu.
79) Click OK to close the Supported Services dialog box, and then click OK to close the
FTP Attributes dialog box.
80) Return to the parent subnet view.
You have now created a model to act as a baseline for the performance of the network.
Background traffic will now be added to the links connecting the cities. The results from
the two scenarios will be compared.
We begin with duplicating a scenario to be able to compare the results later.
85) Display the Edit Attributes dialog box for the link between Karlskrona-Ronneby.
86) Click in the Value cell for the Background Utilization attribute and select Edit...
from the pop-up menu.
Network studies show that traffic rises gradually over the course of the day as
employees/students arrive.
The last step in setting background utilization is to apply the changes made to the
Karlskrona-Ronneby link to all the selected links.
89) Check the Apply Changes to Selected objects check box in the Karlskorna-Ronneby
Attributes dialog box.
90) Click OK to close the dialog box.
Now you have configured two scenarios, one without background utilization and one
with background utilization. You are ready to collect data and analyze it.
The relevant statistics for this network are:
• Utilization statistics for the links.
• Global FTP download time for the network.
92) Right-click in the workspace to display the workspace pop-up menu, and select
Choose Individual Statistics.
93) Select the Global Statistics => Ftp => Download Response Time (sec) statistic.
94) Select the Link Statistics => point-to-point => untilization --> Statistic.
In order to compare the statistics in the back_util scenario to the no_back_util scenario,
the same statistics must be collected in the no_back_util scenario.
Change scenario and collect statistics.
The statistics are now ready to be collected by running the simulations. Instead of
running each simulation separately, you can batch them together to run consecutively.
101) Click on the Results value for the no_back_util and back_util scenarios and
change the value to <collect>.
102) Set the Sim Duration value for each scenario to 30 and the Time Units to minutes.
Hint: You are now ready to view the results of the two scenarios. To view the results
from two or more different scenarios against each other, you can use the Compare
Results feature. With this topic you can also apply different built-in filters to the graphs.”
104) Continue by comparing the results, to do so display the workspace pop-up menu and
choose Compare Results.
105) In the Compare Results dialog box, select Object Statistics => Choose From
Maps Network => Karlshamn <-> Ronneby[0] => point to point => utilization ->.
106) Further you will also have to change the filter from menu from As Is to
time_average. This must be done because utilization varies over the course of a
simulation and it is therefore helpful to look at time average for this statistic.
107) Click Show to display the graph. The graph should resemble the one below, though
it will not match exactly.
You may want to look at the utilization of other links to determine the maximum
utilization of any link.
Let’s look at Global FTP response time.
108) Click the Unselect button in the Compare Results dialog box.
109) Check the Global Statistics => FTP => Download Response Time statistic in the
Compare Statistics dialog box.
110) Verify that the filter menu shows time_average, then click Show.
The graph should resemble the one below, though it will not match exactly.
The laboration is now completed.
Before you leave please remove your saved project from the computer.
By default it is located on: C:\Documents and Settings\[your login name]\op_models
Remove all your saved files.