Hi........ I wana to measure the number of packets received and dropped in LEACH protocol implementation.....plz help me
On Mon, Nov 4, 2013 at 6:30 AM, <[email protected]> wrote: > Send Ns-users mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.isi.edu/mailman/listinfo/ns-users > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Ns-users digest..." > > > Today's Topics: > > 1. Help my friends (Magdy Fares) > 2. FW: Help my friends (jose nmrd) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 3 Nov 2013 00:47:14 -0700 (PDT) > From: Magdy Fares <[email protected]> > Subject: [ns] Help my friends > To: Ns-users List <[email protected]> > Message-ID: > <[email protected]> > Content-Type: text/plain; charset=us-ascii > > Please, i implemented a new technique for filtering packets in a > wired-based network. And I want to test the efficiency of this technique by > measuring the no. of false positive and false negative as you know. > > And to do that, I need a huge number of nodes in the simulation. > > So the question is: How could I create this huge no. of nodes in the > simulation? > Am I should create them manually, node by node, which will be a big > problem to create this huge no. > Or, is there another way in NS2 to do this for me? > > Please, waiting for your important reply. > > Eng. Magdy Fadel > > ------------------------------ > > Message: 2 > Date: Sun, 3 Nov 2013 09:35:39 +0000 > From: jose nmrd <[email protected]> > Subject: [ns] FW: Help my friends > To: "[email protected]" <[email protected]> > Message-ID: <[email protected]> > Content-Type: text/plain; charset="iso-8859-1" > > > > > > Hi Fares, > i had a tcl script for my experiments. it has a fixed source and > destination (node 0 and node 1 respectively), the others are randomely > generated, after is the code tcl . > > #********************beggining********************** > # Define options > set val(chan) Channel/WirelessChannel ;# channel type > set val(prop) Propagation/TwoRayGround ;# radio-propagation model > set val(netif) Phy/WirelessPhy ;# network interface type > set val(mac) Mac/802_11 ;# MAC type > set val(ifq) Queue/DropTail/PriQueue ;# interface queue type > set val(ll) LL ;# link layer type > set val(ant) Antenna/OmniAntenna ;# antenna model > set val(ifqlen) 50 ;# max packet in ifq > set val(nn) 300 ;# number of mobilenodes > set val(rp) AODV ;#DSDV# routing protocol > set val(x) 1000 ;# X dimension of topography > set val(y) 1000 ;# Y dimension of topography > set val(stop) 15 ;# time of simulation end > set opt(energymodel) EnergyModel ; > set opt(radiomodel) RadioModel ; > set opt(initialenergy) 1 ;# Initial energy in Joules > > set ns [new Simulator] > set tracefd [open simple.tr w] > set namtrace [open simwrls.nam w] > set windowVsTime2 [open win.tr w] > > $ns trace-all $tracefd > $ns namtrace-all-wireless $namtrace $val(x) $val(y) > > # set up topography object > set topo [new Topography] > > $topo load_flatgrid $val(x) $val(y) > > create-god $val(nn) > > # configure the nodes > $ns node-config -adhocRouting $val(rp) \ > -llType $val(ll) \ > -macType $val(mac) \ > -ifqType $val(ifq) \ > -ifqLen $val(ifqlen) \ > -antType $val(ant) \ > -propType $val(prop) \ > -phyType $val(netif) \ > -channelType $val(chan) \ > -topoInstance $topo \ > -agentTrace ON \ > -routerTrace ON \ > -macTrace OFF \ > -movementTrace ON \ > -energyModel $opt(energymodel) \ > -idlePower 1.0 \ > -rxPower 1.0 \ > -txPower 1.0 \ > -sleepPower 0.001 \ > -transitionPower 0.2 \ > -transitionTime 0.005 \ > -initialEnergy $opt(initialenergy) > > set topology [open topology.scn a] > > #**********************set the source and destinaon coordinates > #puts $remaining "$now\t " > puts -nonewline $topology "\$node_(0) set X_ 500" > puts -nonewline $topology "\n" > puts -nonewline $topology "\$node_(0) set Y_ 850" > puts -nonewline $topology "\n" > puts -nonewline $topology "\$node_(0) set Z_ 0.000000000000" > puts -nonewline $topology "\n" > puts -nonewline $topology "\$node_(1) set X_ 500" > puts -nonewline $topology "\n" > puts -nonewline $topology "\$node_(1) set Y_ 200" > puts -nonewline $topology "\n" > puts -nonewline $topology "\$node_(1) set Z_ 0.000000000000" > puts -nonewline $topology "\n" > close $topology > > #*********************generate the other nodes randomely > for {set i 2} {$i < $val(nn) } { incr i } { > set node_($i) [$ns node] > set xx [expr rand()*1000] > set yy [expr rand()*1000] > > set topology [open topology.scn a] > #puts $remaining "$now\t " > puts -nonewline $topology "\$node_($i) set X_ $xx" > puts -nonewline $topology "\n" > puts -nonewline $topology "\$node_($i) set Y_ $yy" > puts -nonewline $topology "\n" > puts -nonewline $topology "\$node_($i) set Z_ 0.000000000000" > puts -nonewline $topology "\n" > close $topology > } > #***************************End************************************** > actually there is some lignes in the code we don't need them. as you can > see the output of this code is a file called "topology.scn" . the data in > the file is a s follows: > > $node_(0) set X_ 500 > $node_(0) set Y_ 850 > $node_(0) set Z_ 0.000000000000 > $node_(1) set X_ 500 > $node_(1) set Y_ 200 > $node_(1) set Z_ 0.000000000000 > $node_(2) set X_ 524.31925038076895 > $node_(2) set Y_ 233.64114958496819 > $node_(2) set Z_ 0.000000000000 > $node_(3) set X_ 806.80107456017333 > $node_(3) set Y_ 905.66013283359825 > $node_(3) set Z_ 0.000000000000 > $node_(4) set X_ 429.85253428567785 > $node_(4) set Y_ 531.54373938755305 > $node_(4) set Z_ 0.000000000000 > ... > this file will be the entry of your real tcl code file. i mean you can > inject it anywhere you want by puting it with in the same folder as your > tcl file and use the command (after the ceation of nodes): > > for {set i 0} {$i < $val(nn) } {incr i} { > set node_($i) [$ns node] > $node_($i) random-motion 0 ;# disable random motion > } > > source ./topology.scn > > hope it will help. > > -Jose- > > > Date: Sun, 3 Nov 2013 00:47:14 -0700 > > From: [email protected] > > To: [email protected] > > Subject: [ns] Help my friends > > > > > > Please, i implemented a new technique for filtering packets in a > wired-based network. And I want to test the efficiency of this technique by > measuring the no. of false positive and false negative as you know. > > > > And to do that, I need a huge number of nodes in the simulation. > > > > So the question is: How could I create this huge no. of nodes in the > simulation? > > Am I should create them manually, node by node, which will be a big > problem to create this huge no. > > Or, is there another way in NS2 to do this for me? > > > > Please, waiting for your important reply. > > > > Eng. Magdy Fadel > > > ------------------------------ > > _______________________________________________ > Ns-users mailing list > [email protected] > http://mailman.isi.edu/mailman/listinfo/ns-users > > > End of Ns-users Digest, Vol 119, Issue 2 > **************************************** >
