Sie sind auf Seite 1von 49

Simulating Wireless Networks using

OPNET Modeler
Tutorial on OPNET Modeler

By: Mukesh Singh Rawat
Email: mukesh@it.iit.a!.in
"ReS#T ##T Bomay

O$e!ti%e

This tutorial &o!uses on the use o& O'net(s


Pro$e!t Editor

The Pro$e!t Editor will allow you to )ui!kly


!reate* simulate* and analy+e the 'er&orman!e
o& a !om'uter network

By the end o& this tutorial you should e ale


to:

Build the network )ui!kly

,olle!t statisti!s aout network(s 'er&orman!e

Analyze these statistics



O$e!ti%e

#n this tutorial:

We will uild small wireless networks

We will !hose the statisti!s to !olle!t

Run a simulation

-naly+e the result

.enerating we re'ort

Pro$e!t and S!enario
When !reating new network model you
must &irst !reate 'ro$e!t and s!enario

Pro$e!t:

- grou' o& related s!enarios that ea!h


e/'lore di&&erent as'e!t o& network model

,an !ontain multi'le s!enarios

On!e you &inished with 'ro$e!t !reation* you


!an use startup wizard to !reate new
s!enario

,reating a Pro$e!t

0rom the &ile menu !hoose New

Sele!t Project &rom 'o'u' menu and


!li!k OK

Name the Pro$e!t 1Project_Yourname2


and the s!enario as <WirelessModel>

Yourname in the Pro$e!t Name will


distinguish Pro$e!t &rom other(s 'ro$e!ts

,li!k OK

S!enario

The S!enario Wi+ard is shown

0ollow the ste's a!!ording to the &ollowing


tale
Box Value
,li!k Finish Re%iew !he!k %alues
,li!k Next Wireless 3-N Model 0amily
,li!k Next 455 m / 455 m Si+e
,li!k Next O&&i!e Network S!ale
,li!k Next ,reate em'ty
s!enario
#nitial To'ology

,reating network to'ologies

There are three way to !reate network


to'ologies

#m'orting the to'ology

Pla!ing ea!h indi%idual node &rom oject


palette into wor!place

,reating new network to'ology is y using


the "apid #on$i%uration &eature

,reating to'ology using 'la!ing
indi%idual node &rom o$e!t 'alette

-dding ,om'onents:

#& it is not already o'en* o'en the o$e!t


'alette y !li!king on the O$e!t Palette
a!tion utton 6&irst utton on the le&t7

0ind the ethernet&ser'er o$e!t in the


'alette and drag it into the works'a!e

8ou don(t need additional !o'ies o& this


model* so right9!li!k to turn o&& node
!reation

-dding ,om'onents

8ou also need to ha%e an Access Point &or


modeling in&rastru!ture ased network

8ou also need to !onne!t this -!!ess Point to


ethernet&networ! ser%er

0ind the 45BaseT link o$e!t in the 'alette* !li!k on


it and drag it to the works'a!e

,li!k on the ser%er o$e!t* then !li!k on the a!!ess


'oint o$e!t. - link is drawn* !onne!ting the two
o$e!ts

Right9!li!k to turn o&& link !reation



-dding ,om'onents

8ou also need to ha%e some wireless stations


in your model

0ind the wlan&w!stn o$e!t in the o$e!t 'alette

Sele!t it then drag it into the work s'a!e and dro' it

8ou !an make any numer o& !o'ies o&


wlan&w!stn y $ust !li!king

Make the &i%e !o'ies o& wlan&w!stn into work


s'a!e

Right !li!k to &inish



#t should look something like this

-dding ,om'onents

0inally you need to add !on&iguration o$e!ts


to s'e!i&y the a''li!ation tra&&i! that will e/ist
on the network

0ind the Application #on$i% o$e!t in the 'alette


and drag it into the works'a!e

Right9!li!k to indi!ate you are &inished 'la!ing this


kind o& o$e!t

0ind the Pro$ile #on$i% o$e!t in the 'alette and


drag it into the works'a!e

,lose the o$e!t 'alette



#t should look something like this

-dding -ttriutes

8ou !an !hange the properties o&


o$e!ts y editing the attriutes

"i%ht clic! on the o$e!t you want to


edit

,hoose Edit attriutes



-dding tra&&i! to the network

#n order to add the tra&&i! into the


network* edit the 'ro'erties o& the
&ollowing o$e!ts:

Application (e$inition:

Set the a''li!ation de&inition to de$ault



#t looks like this

-dding tra&&i! to the network

Edit the Pro$ile #on$i%uration

Edit the Pro&ile ,on&iguration in the new


window

Put numer : in rows

Set the %alues as shown in the &ollowing


slide

#t looks like this

Pro&ile ,on&iguration !ont;

#lic! on the a''li!ation &or ea!h 'ro&ile


name and !hoose Edit

Enter the %alues &or 'ro&ile )eApp as


shown in the &ollowing slide

#t will look like this

Pro&ile ,on&iguration !ont;

Now 'er&orm the same &or 'ro&ile


)irelessApp

Edit the a''li!ation as shown in the


&ollowing slide

#t will look like this

-dding the tra&&i!

Now that you are done with Application


and Pro$ile* ne/t you need to add tra&&i!
in ea!h work station

Sele!t node&* right !li!k on it

Sele!t Edit attriute

<o this &or all the workstations

#t will look like the image in the ne/t slide



-dding tra&&i! to node

-dding the tra&&i!

Enter : in the numer o& "ows* it is at


ottom le&t side o& window

#lic! on the Pro$ile Na+e and sele!t


)eApp in the &irst row and
)irelessApp in the se!ond row

,li!k OK to &inish setting

#t will look like image in the ne/t slide



#t will look like this

,onne!t to ser%er

8ou also need to make it !onne!ted with


the ser%er.

Right !li!k on the ser%er then !hoose


edit attriutes.

=nder -''li!ation: set Application


,upported ,er'ice attriute to -A../
&or the %alue &ield. #t should look like this

,onne!t to ser%er

Enale -P &un!tionality at
W3-N>Router 6de&ault: enaled7

,hoose Statisti!s

Now that you added the tra&&i!* you are


ready to !olle!t some statisti!s

There are two ways to !olle!t statisti!s

8ou !an !olle!t statisti!s &rom indi%idual


nodes in your network 6o$e!t statisti!s7

0rom the entire network as a whole 6gloal


statisti!s7

Ser%er Statisti!s

"i%ht #lic! on the ser%er then sele!t


#hoose 0ndi'idual (E, statistics

,li!k the plus sign ne/t to Ethernet in


the ,hoose Results dialog o/

,li!k on to the !he!k o/ ne/t to the


(elay 1sec2 and .oad 1its3sec2

#t will look like this

.loal Statisti!s

.loal statisti!s !an e used to gather


in&ormation aout the network as a whole.

0or e/am'le* you !an &ind out the throu%hput


&or the entire network y !olle!ting the %loal
Throu%hput statisti!

Right9!li!k in the 'ro$e!t works'a!e

Sele!t #hoose 0ndi'idual (E, ,tatistics &rom the


Works'a!e 'o'9u' menu

,li!k the 'lus sign ne/t to 4loal ,tatistics in the


!hoose Results dialog o/

.loal Statisti!s

,li!k on to the 'lus sign ne/t to the


)ireless .AN

,he!k the o/ ne/t to the (elay 1,ec25


.oad 1its3sec2 and Throu%hput
1its3sec2

,li!k OK do diminish the ,hoose


Statisti!s dialogue o/

,AVE the 'ro$e!t



.loal Statisti!s

Run the simulation

Now you ha%e &inished with all !on&igurations*


and you are ready to run the simulation

,li!k on to the (E, in the menu ar* and ,hoose


#on$i%ure3"un (iscrete E'ents ,i+ulation

Ty'e 45 minutes

,hoose Simulation "ernel as -!ernel&type/


pre$erence

,li!k on to "un to run the simulation



Run the simulation

While the simulation is running* the


window will a''ear* showing the
simulation(s 'rogress

Shown in the ne/t slide

When the simulation is &inished* !li!k the


#lose utton in the Simulation Se)uen!e
dialog o/

Run the simulation

Simulation Results

On!e you &inished with e/e!uting* you


will want to see in&ormation !olle!ted &or
ea!h statisti!s

8ou !an see result gra'hi!ally y:

Right ,li!k into the Pro$e!t work s'a!e and


sele!t View "esults

Simulation Results

To %iew ser%er Ethernet load:

Right !li!k on to the ser%er and sele!t %iew


result

,li!k on to the Ethernet !he!k o/ and


sele!t the uttons in &ront o& the (elay and
.oad

Sele!t a'era%e and then !li!k on ,how


utton

#t will look like ne/t slide

,li!k #lose to diminish window



Ethernet Ser%er Statisti!s

Simulation Results !ont;

8ou &inished with #ndi%idual results* now you may want


to %iew 4loal ,tatistics

8ou may want to %iew the wireless delay* load* and


through'ut o& the whole system. To %iew this:

Right !li!k into 'ro$e!t works'a!e and sele!t View results


&rom 'o'9u' menu

,he!k the 4loal statistics and then !li!k on to the )ireless


.AN* and then sele!t <elay* 3oad* Through'ut

Sele!t the a%erage and then !li!k to the ,how utton to show
the results to %iew the <elay* 3oad and Through'ut o& the
whole system

#t will look like the ne/t slide

,lose when you &inished with %iewing results



.loal Statisti!s

-nimation

To %iew animation !li!k on to the (E,


menu and sele!t "ecord Pac!et Flow
ani+ation $or sunet and "ecord
nodes +o'e+ent ani+ation $or
sunet

But you ha%e to do it e&ore you run the


simulation

-nimation

-nimation

Then Run the simulation* a&ter simulation


&inishes* !li!k on to the <ES menu and
sele!t Play Ani+ation

.enerate and 3aun!h we
re'ort

8ou !an generate the ?TM3 we re'ort


o& your simulation whi!h show all gra'hs*
and %arious other statisti!s

To generate we re'ort $ust !li!k on the


(E, menu* go to the "esult and sele!t
4enerate )e "eport &rom the list

0or laun!hing the we re'ort $ust &ollow the


ao%e ste's ut sele!t .aunch last )e
"eport

<eugging

The good deugging tool is ,i+ulation


.o% you !an !he!k your warnings and
errors

To %iew the 3og !li!k on the <ES menu and


sele!t Open (E, .o%

Thanks
6

Das könnte Ihnen auch gefallen