Sunteți pe pagina 1din 6

CS6316 - Network Simulation lab 1.

In this lab, well explore several aspects of simulating networks.


Why?
A simulated network allows us to test different topologies, assess the stability of network expansions, test the
performance of a new protocol and help us troubleshoot problems and identify bottlenecks on the network.
In research, a network simulator is a valuable tool that helps with the validation of a new algorithm/protocol, and
can provide insight on the behaviour and performance of a new technology, as well as a cost-effective means of
testing scalability. Software simulators also allow for more extensive benchmarking and monitoring of network
resources.
A network simulator can be modular, providing abstract models of some not important parts of the network,
while implementing in full detail the part a user is focused on. For example, a wired link can be completely
abstract, by only defining transmission speed and delay, omitting MAC and physical layer signalling, while TCP
is implemented in full detail, with many variations available to choose from.
How?
Network operations, protocols and messages are usually modeled and implemented in Discrete Event Simulators.
Simulations usually run in virtual time, rather than real-time, decreasing the time needed for extensive
evaluations of scenarios that would need to be monitored for hours or days in a real testbed.
There is a number of network simulators available, open-source, free, or commercial ones. Open source solutions
include the popular NS2 / NS3, and OmNet++. We will be using one of the most popular commercial ones,
Opnet.
Lab checklist
Familiarise with Opnet.
Create a simple wired network topology.
Add traffic and run simulation.
Collect and analyse statistics.
Start the Virtual PC
Go to C:\vpc\. Start the XP-opnet VM.
Log in with
Username: user1
Password: Password1
Select Tools from the menu bar on the top of the window, and make sure Integration Features are enabled.
Go to Tools->Settings, activate sharing of your home drive (most probably Z), and click ok.
Press the Ctrl-Alt-Del button on the top menu, and shutdown and restart the VM. This way you can save
your files and projects on your home folder.
Launch Opnet Modeler.
OPNET Modeler
In order to create a new network model and run a simulation, you must create a new project and scenario. A
project is a group of related scenarios that each explores a different aspect of the network design. Projects my
contain multiple scenarios.
From the File menu, choose New, select Project and press OK.
Name the project as cs6316, the scenario as wired, and press OK.
Create an empty scenario, modeling an office environment of 100x100 meters size.
Select only Ethernet from Model family and click next.
Review your selection and click Finish. You should see an empty Project Editor and an Object palette
window.
There are three ways to create a network topology, manually placing each node into the workspace from the
Object Palette, create the topology with Rapid Configuration, or import the topology. Since we want to create a
simple network topology, we will automatically create the basic network and then add a server node manually.

Go to Topology->Rapid Configuration.

Select Star and press next.

Fill the fields with the values shown and press OK.

With the main topology ready, we need to add a server node and connect it to the network. Find the
ethernet_server object in the Object Palette window and drag it into the workspace. You dont need any
additional copies of this model, so right-click to turn off node creation.

To connect the server to the network we need to use the same link type we used for the rest of the nodes. Find
10BaseT object in the Palette, and drag it into the workspace. Click on the server object once and then click
on the hub in the centre of the star. Dont forget to right-click to turn off link creation.

Finally, traffic is controlled by applications and application profiles. You will need to add 1 Application
Config and 1 Profile Config objects using drag-and-drop again. These are special utility objects, and not
nodes of the network, so they do not have to be connected to the network topology. Your workspace should
look like this:
Traffic definition
The network topology is ready, and now we will have to define some traffic profiles and instruct the workstations
to use these profiles. First we need to define the applications. Opnet has some built-in of application traffic
models, so we are going to use these.

Right click on the Application Definition object, and select edit attributes.

Set the Application Definitions attribute to Default. The Attributes window should look like this:
2

Press OK.
Profile Definition
Now we have to define the profiles that control the instances of the applications (i.e. how many times an
application is used, when, how often etc). A profile can include many applications. We will create two profiles,
one describing a typical network usage pattern from a software developer and one describing a VOIP call.

Right click on the Profile Definition object and select Edit Attributes.

Expand the Profile configuration option and set the the Number of rows value to 2.

Click on the Profile configuration value field and click edit.

Fill in the following values:

Click on the Applications field for each Profile. For the SoftDevelopment profile first set rows to 3 and then
fill in the following values:
3

For the Telecom profile first set rows to 1 and then fill in the following values:
Now that traffic profiles are defined, we have to assign profiles to workstations. For this lab we will enable all
profiles to all clients. So, either sequentially do the following to all workstations (nodes 0 - 4), or ctrl-click to
select all workstations and edit their attributes.

Add 2 rows to Supported Profiles and fill in the following values. If you are editing multiple objects
please remember to tick the Apply to selected objects textbox:

The applications need to have a service endpoint somewhere in the network, so that they will know which
node to connect to. Edit the servers attributes and change the value of the Application: Supported
Services to All. This way the server can support all configured applications. It should look like this:
4
Statistics Collection
A number of statistics can be collected, either at a global or per-node level. We will use both types in this lab.

Server load: Right click on the server node and select Choose individual DES statistics. Go to Node
Statistics -> Ethernet and select Load(bits/sec). Press OK.

Hub collisions and utilisation: Right click on the hub node and select Choose individual DES statistics.
Go to Node Statistics -> Ethernet, select Collision Count and Utilization. Press OK.

Global end-to-end delay: Right-click in the project workspace and select Choose individual DES
statistics. Go to Global Statistics -> Ethernet and select Delay. Press OK.
Run the simulation
If all is configured correctly, we are ready to run the simulation. Before running it, you might want to save the
project (File->save). It is recommended to save it in your own home directory, so that you can access it again for
the next labs.

From the menu, go to DES -> Configure/Run Discrete Event Simulation. Change the duration to 10 min
and the simulation kernel to Optimized. Click Run. The simulation should take no more than two minutes to
finish.
When the simulation is done you can view the results. Well now see how to display the collected statistics for
individual nodes.

Return to the workspace window, right click on the server node, and select View Results.

Under Object Statistics, find and select Load (bits/sec).

A graph with the server load should appear on the right side of the window. If you want to have more control
on your graph, press Show. The right-click menu on this graph includes Export graph data to spreadsheet.
Since there is no spreadsheet configured in OPNET, you will see a message indicating the location of a text
file containing the graph data, like this:

This file is useful for creating plots and analysing the data with other Applications, such as Microsoft Excel,
MatLab, etc. Return to the Workspace window.

Now lets do the same for the statistics collected for the Hub. Right-click on the hub node, select View
Results, and find and select Collision Count and Utilization. You can see that both statistics are shown
on the same graph. Lets change the presentation, by changing As Is to Average.
We still have the global delay statistics.

Right-click on an empty space in the workspace and select View Results. Locate the delay under Global
Statistics and select it.

When viewing results for the complete workspace, all collected results are available. Select all four collected
statistics, press Show, right-click on the grey background of the plot window, and export all graph data to
spreadsheet. Locate and copy the produced text file to your home drive.
5
LAB1 TASK
A significant part of simulating and running experiments on a network is the presentation of the results.
For this lab your task is to use any application of your choosing to analyse the data produced by Opnet, and
present it. You can use Microsoft Excel, OpenOffice Calc, or whatever method you feel you are comfortable
with. Parsing the text file with a script you wrote and creating the plot with GNUplot is a perfectly valid option
as well. Please choose the method you will use accordingly to your abilities, as there will be no assistance on
how to create the plots.
You are to submit a report in pdf format before the start of the next lab to it1@cs.ucc.ie.
The report must include:

Four plots (one for each collected statistic).

One table showing the average, standard deviation, minimum and maximum values for each collected
statistic.

Your name, student number and email address.


The plots have to be properly presented, showing the plot title on top, and clearly identifying statistics types and
measurement units on the axes. An example of a plot follows:
An example of the table expected follows:
Average Standard dev. Minimum Maximum
Server load
(bits/sec)
Hub load
(bits/sec)
Hub collisions
(collision no.)
Global Ethernet
delay (sec)
0 20 40 60 80 100
!1
!0.5
0
0.5
1
Time (sec)
A
m
p
l
i
t
u
d
e

(
m
)
Sinusoid function f(x)
6

S-ar putea să vă placă și