49
Simulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By: Mukesh Singh Rawat Email: [email protected] KReSIT IIT Bombay

Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Embed Size (px)

Citation preview

Page 1: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Simulating Wireless Networks using OPNET Modeler

Tutorial on OPNET Modeler By: Mukesh Singh Rawat Email: [email protected]

KReSIT IIT Bombay

Page 2: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Objective

This tutorial focuses on the use of Opnet’s Project Editor

The Project Editor will allow you to quickly create, simulate, and analyze the performance of a computer network

By the end of this tutorial you should be able to: Build the network quickly Collect statistics about network’s performance Analyze these statistics

Page 3: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Objective

In this tutorial: We will build small wireless networks We will chose the statistics to collect Run a simulation Analyze the result Generating web report

Page 4: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Project and Scenario

When creating new network model you must first create project and scenario

Project: A group of related scenarios that each

explore different aspect of network model Can contain multiple scenarios Once you finished with project creation, you

can use startup wizard to create new scenario

Page 5: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Creating a Project

From the file menu choose New Select Project from popup menu and

click OK Name the Project <Project_Yourname>

and the scenario as <WirelessModel> Yourname in the Project Name will

distinguish Project from other’s projects Click OK

Page 6: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Scenario

The Scenario Wizard is shown Follow the steps according to the following

table Box Value

Click FinishReview check values

Click NextWireless LANModel Family

Click Next100 m x 100 mSize

Click NextOfficeNetwork Scale

Click NextCreate empty scenario

Initial Topology

Page 7: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Creating network topologies

There are three way to create network topologies Importing the topology Placing each individual node from object

palette into workplace Creating new network topology is by using

the Rapid Configuration feature

Page 8: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Creating topology using placing individual node from object palette

Adding Components: If it is not already open, open the object

palette by clicking on the Object Palette action button (first button on the left)

Find the ethernet_server object in the palette and drag it into the workspace

You don’t need additional copies of this model, so right-click to turn off node creation

Page 9: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Adding Components

You also need to have an Access Point for modeling infrastructure based network

You also need to connect this Access Point to ethernet_network server Find the 10BaseT link object in the palette, click on

it and drag it to the workspace Click on the server object, then click on the access

point object. A link is drawn, connecting the two objects

Right-click to turn off link creation

Page 10: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Adding Components

You also need to have some wireless stations in your model Find the wlan_wkstn object in the object palette Select it then drag it into the work space and drop it You can make any number of copies of

wlan_wkstn by just clicking Make the five copies of wlan_wkstn into work

space Right click to finish

Page 11: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

It should look something like this

Page 12: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Adding Components

Finally you need to add configuration objects to specify the application traffic that will exist on the network Find the Application Config object in the palette

and drag it into the workspace Right-click to indicate you are finished placing this

kind of object Find the Profile Config object in the palette and

drag it into the workspace Close the object palette

Page 13: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

It should look something like this

Page 14: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Adding Attributes

You can change the properties of objects by editing the attributes

Right click on the object you want to edit

Choose Edit attributes

Page 15: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Adding traffic to the network

In order to add the traffic into the network, edit the properties of the following objects: Application Definition:

Set the application definition to default

Page 16: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

It looks like this

Page 17: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Adding traffic to the network

Edit the Profile Configuration Edit the Profile Configuration in the new

window Put number 2 in rows Set the values as shown in the following

slide

Page 18: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

It looks like this

Page 19: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Profile Configuration cont…

Click on the application for each profile name and choose Edit Enter the values for profile WebApp as

shown in the following slide

Page 20: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

It will look like this

Page 21: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Profile Configuration cont…

Now perform the same for profile WirelessApp Edit the application as shown in the

following slide

Page 22: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

It will look like this

Page 23: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Adding the traffic

Now that you are done with Application and Profile, next you need to add traffic in each work station Select node_2 right click on it Select Edit attribute Do this for all the workstations

It will look like the image in the next slide

Page 24: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Adding traffic to node

Page 25: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Adding the traffic

Enter 2 in the number of Rows, it is at bottom left side of window

Click on the Profile Name and select WebApp in the first row and WirelessApp in the second row

Click OK to finish setting It will look like image in the next slide

Page 26: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

It will look like this

Page 27: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Connect to server

You also need to make it connected with the server.

Right click on the server then choose edit attributes.

Under Application: set Application Supported Service attribute to “ALL” for the value field. It should look like this

Page 28: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Connect to server

Page 29: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Enable AP functionality at WLAN_Router (default: enabled)

Page 30: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Choose Statistics

Now that you added the traffic, you are ready to collect some statistics

There are two ways to collect statistics You can collect statistics from individual

nodes in your network (object statistics) From the entire network as a whole (global

statistics)

Page 31: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Server Statistics

Right Click on the server then select Choose Individual DES statistics

Click the plus sign next to Ethernet in the Choose Results dialog box

Click on to the check box next to the Delay (sec) and Load (bits/sec)

Page 32: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

It will look like this

Page 33: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Global Statistics

Global statistics can be used to gather information about the network as a whole.

For example, you can find out the throughput for the entire network by collecting the global Throughput statistic Right-click in the project workspace Select Choose Individual DES Statistics from the

Workspace pop-up menu Click the plus sign next to Global Statistics in the

choose Results dialog box

Page 34: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Global Statistics

Click on to the plus sign next to the Wireless LAN

Check the box next to the Delay (Sec), Load (bits/sec) and Throughput (bits/sec)

Click OK do diminish the Choose Statistics dialogue box

SAVE the project

Page 35: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Global Statistics

Page 36: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Run the simulation

Now you have finished with all configurations, and you are ready to run the simulation Click on to the DES in the menu bar, and Choose

Configure/Run Discrete Events Simulation Type 10 minutes Choose Simulation Kernel as “kernel_type”

preference Click on to Run to run the simulation

Page 37: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Run the simulation

While the simulation is running, the window will appear, showing the simulation’s progress Shown in the next slide

When the simulation is finished, click the Close button in the Simulation Sequence dialog box

Page 38: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Run the simulation

Page 39: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Simulation Results

Once you finished with executing, you will want to see information collected for each statistics You can see result graphically by:

Right Click into the Project work space and select View Results

Page 40: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Simulation Results

To view server Ethernet load: Right click on to the server and select view

result Click on to the Ethernet check box and

select the buttons in front of the Delay and Load

Select average and then click on Show button

It will look like next slide Click Close to diminish window

Page 41: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Ethernet Server Statistics

Page 42: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Simulation Results cont…

You finished with Individual results, now you may want to view Global Statistics

You may want to view the wireless delay, load, and throughput of the whole system. To view this: Right click into project workspace and select View results

from pop-up menu Check the Global statistics and then click on to the Wireless

LAN, and then select Delay, Load, Throughput Select the average and then click to the Show button to show

the results to view the Delay, Load and Throughput of the whole system

It will look like the next slide Close when you finished with viewing results

Page 43: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Global Statistics

Page 44: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Animation

To view animation click on to the DES menu and select Record Packet Flow animation for subnet and Record nodes movement animation for subnet

But you have to do it before you run the simulation

Page 45: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Animation

Page 46: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Animation

Then Run the simulation, after simulation finishes, click on to the DES menu and select Play Animation

Page 47: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Generate and Launch web report

You can generate the HTML web report of your simulation which show all graphs, and various other statistics To generate web report just click on the

DES menu, go to the Result and select Generate Web Report from the list

For launching the web report just follow the above steps but select Launch last Web Report

Page 48: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Debugging

The good debugging tool is Simulation Log you can check your warnings and errors To view the Log click on the DES menu and

select Open DES Log

Page 49: Simulating Wireless Networks using OPNET Modelerread.pudn.com/downloads201/doc/945701/OPNETTutorial.pdfSimulating Wireless Networks using OPNET Modeler Tutorial on OPNET Modeler By:

Thanks

?