[ns] How to set up mobile nodes?
Hi all, I get an error which I have enclosed when I try setting up nodes in wireless scenarios. I have tried a lot of different things as suggested by other tutorials but get the same error everytime. When I delete the lines defining the nodes from the code, there are no error messages. Code that I am using is also enclosed. Please help me out at this, I really need help quickly. Faraz
Re: [ns] How to set up mobile nodes?
Thanks a lot Mubashir, heres the code 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 ;# 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) 20 ;# number of mobilenodes set val(rp) DumbAgent ;# routing protocol set val(x) 50 set val(y) 50 Mac/802_11 set dataRate_ 11Mb #Create a simulator object set ns_ [new Simulator] #Open the NAM trace file set nf [open out.nam w] $ns_ namtrace-all $nf #Define a 'finish' procedure proc finish {} { global ns_ nf $ns_ flush-trace #Close the NAM trace file close $nf #Execute NAM on the trace file exec /home/faraz/Desktop/ns-allinone-2.33/nam-1.13/nam out.nam exit 0 } # set up topography object set topo [new Topography] $topo load_flatgrid $val(x) $val(y) # Create God create-god $val(nn) # Create channel set chan_1_ [new $val(chan)] $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) \ -topoInstance $topo \ -agentTrace OFF \ -routerTrace OFF \ -macTrace ON \ -movementTrace OFF \ -channel $chan_1_ for {set i 0} {$i $val(nn) } {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0 ;# disable random motion } $ns_ at 0.1 finish puts Starting... $ns_ run Regards, Faraz From: Mubashir Rehmani [mshrehm...@gmail.com] Sent: Thursday, January 08, 2009 2:49 AM To: Syed Faraz Hasan Subject: Re: [ns] How to set up mobile nodes? Hi Faraz Can you please write the code in your email, because ns user mailing list drops all the attachments. Regards 2009/1/8 Syed Faraz Hasan faraz_hasa...@email.ulster.ac.ukmailto:faraz_hasa...@email.ulster.ac.uk Hi all, I get an error which I have enclosed when I try setting up nodes in wireless scenarios. I have tried a lot of different things as suggested by other tutorials but get the same error everytime. When I delete the lines defining the nodes from the code, there are no error messages. Code that I am using is also enclosed. Please help me out at this, I really need help quickly. Faraz -- Mubashir Husain Rehmani
[ns] NAM does not run wireless simulation over ns 2
Hello ALL, I am trying to visualize the entire simulation using NAM. I open the .nam file in the finish procedure. I have associated CBR source with one of the nodes to make it send packets to another node. NAM executes properly at the beginning (but does not show nodes at all), as soon as the scheduled time of sending packets arrive NAM exits. Although it generates the trace file. Please write back soon Heres the code... # == # 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) 3 ;# number of mobilenodes set val(rp) AODV ;# routing protocol set val(x) 880 ;# x-axis of grid set val(y) 880 ;# y-axis of grid set opt(energymodel)EnergyModel ; set opt(radiomodel) RadioModel ; set opt(initialenergy) 1000;# Initial energy in Joules set num_ms_nodes10; set opt(nn) 2; # == # Main Program # == # # Initialize Global Variables # #start the simulator set ns [new Simulator] #open the trace file set tracefile1 [open a.tr w] $ns trace-all $tracefile1 #Open NAM file set nf [open attachment.nam w] $ns namtrace-all $nf #define the procedure finish #proc finish {} { #global ns tracefile1 #$ns flush-trace #close $tracefile1 #exit 0 #} proc finish {} { global ns nf $ns flush-trace close $nf exec /home/faraz/Desktop/ns-allinone-2.33/nam-1.13/nam attachment.nam exit 0 } # set up topography object set topo [new Topography] $topo load_flatgrid $val(x) $val(y) # Create God General Operations Director create-god [expr $opt(nn) + $num_ms_nodes] # Create channel #1 and #2 set chan_1_ [new $val(chan)] # # Create the specified number of mobilenodes [$val(nn)] and attach them # to the channel. # Here two nodes are created : node(0) and node(1) # configure node $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) \ -topoInstance $topo \ -agentTrace OFF \ -routerTrace ON \ -macTrace OFF \ -movementTrace OFF\ -channel $chan_1_ #-energyModel $opt(energymodel) \ -idlePower 1.0 \ -rxPower 1.0 \ -txPower 1.0 \ -sleepPower 0.001 \ -transitionPower 0.2 \ -transitionTime 0.005 \ -initialEnergy $opt(initialenergy) for {set i 0} {$i $val(nn) } {incr i} { set node_($i) [$ns node] $node_($i) random-motion 0 ;# disable random motion } set udp0 [new Agent/UDP] $ns attach-agent $node_(0) $udp0 set cbr0 [new Application/Traffic/CBR] $cbr0 set packetSize_ 1000 $cbr0 set interval_ 0.005 $cbr0 attach-agent $udp0 set null0 [new Agent/Null] $ns attach-agent $node_(1) $null0 $ns connect $udp0 $null0 $ns at 1 $cbr0 start $ns at 4 $cbr0 stop $ns at 4.1 finish puts Starting Simulation... $ns run
Re: [ns] segmentation fault
Hi Dasari Mallikarjuna Look at this link to resolve the problem of segmentation fault. http://article.gmane.org/gmane.network.simulator.isi/2766/match=segmentation+fault Besides this, after making any changes in c++ code of ns2, do this: make clean make sudo make install Regards Mubashir Lip6, UPMC, Paris, France. 2009/1/8 dasari mallikarjuna dnm...@yahoo.com I am using programs written by Lavina Jain et al (in ns-2). I have made some changes to the program and tried to run it.It is giving Segmentation fault. I removed the changes and again used make, still the problem is persisting. I had to re-install theoperating system (fedora linux) to remove the erro. What could be the problem? -- Mubashir Husain Rehmani
Re: [ns] NAM does not run wireless simulation over ns 2
Hi there, In a wireless simulation for nam trace you have to use $ns namtrace-all-wireless $nf $val(x) $val(y) Hope it works, Luis On Thu, Jan 8, 2009 at 2:31 PM, Syed Faraz Hasan faraz_hasa...@email.ulster.ac.uk wrote: Hello ALL, I am trying to visualize the entire simulation using NAM. I open the .nam file in the finish procedure. I have associated CBR source with one of the nodes to make it send packets to another node. NAM executes properly at the beginning (but does not show nodes at all), as soon as the scheduled time of sending packets arrive NAM exits. Although it generates the trace file. Please write back soon Heres the code... # == # 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) 3 ;# number of mobilenodes set val(rp) AODV ;# routing protocol set val(x) 880 ;# x-axis of grid set val(y) 880 ;# y-axis of grid set opt(energymodel)EnergyModel ; set opt(radiomodel) RadioModel ; set opt(initialenergy) 1000;# Initial energy in Joules set num_ms_nodes10; set opt(nn) 2; # == # Main Program # == # # Initialize Global Variables # #start the simulator set ns [new Simulator] #open the trace file set tracefile1 [open a.tr w] $ns trace-all $tracefile1 #Open NAM file set nf [open attachment.nam w] $ns namtrace-all $nf #define the procedure finish #proc finish {} { #global ns tracefile1 #$ns flush-trace #close $tracefile1 #exit 0 #} proc finish {} { global ns nf $ns flush-trace close $nf exec /home/faraz/Desktop/ns-allinone-2.33/nam-1.13/nam attachment.nam exit 0 } # set up topography object set topo [new Topography] $topo load_flatgrid $val(x) $val(y) # Create God General Operations Director create-god [expr $opt(nn) + $num_ms_nodes] # Create channel #1 and #2 set chan_1_ [new $val(chan)] # # Create the specified number of mobilenodes [$val(nn)] and attach them # to the channel. # Here two nodes are created : node(0) and node(1) # configure node $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) \ -topoInstance $topo \ -agentTrace OFF \ -routerTrace ON \ -macTrace OFF \ -movementTrace OFF\ -channel $chan_1_ #-energyModel $opt(energymodel) \ -idlePower 1.0 \ -rxPower 1.0 \ -txPower 1.0 \ -sleepPower 0.001 \ -transitionPower 0.2 \ -transitionTime 0.005 \ -initialEnergy $opt(initialenergy) for {set i 0} {$i $val(nn) } {incr i} { set node_($i) [$ns node] $node_($i) random-motion 0 ;# disable random motion } set udp0 [new Agent/UDP] $ns attach-agent $node_(0) $udp0 set cbr0 [new Application/Traffic/CBR] $cbr0 set packetSize_ 1000 $cbr0 set interval_ 0.005 $cbr0 attach-agent $udp0 set null0 [new Agent/Null] $ns attach-agent $node_(1) $null0 $ns connect $udp0 $null0 $ns at 1 $cbr0 start $ns at 4 $cbr0 stop $ns at 4.1 finish puts Starting Simulation... $ns run
[ns] IEEE 802.11n simulation model for ns2. Click to flag this post
Hi everybody, I am interested in working on IEEE 802.11n. But I could NOT find any simulation model or package of IEEE 802.11n for ns2. It would be grateful if you could send me the IEEE 802.11n simulation model for ns2 or its URL link that I could download it. Thanks, Navid **http://click.nyx.adbrite.com/mb/click.php?sid=761063banner_id=12338955variation_id=1244589uts=1231446507cpc=302e3130333131353237343539303734keyword_id=1474020zk_id=34635025ab=168362131sscup=5297a521774c6896345741745501debcsscra=71848d4a3966740142f1c46e97eaa9c0ub=3483503248guid=28d56f6db88e39fe69418afbe765bcacrs=r=
[ns] IEEE 802.11n simulation model for ns2.
Hi everybody, I am interested in working on IEEE 802.11n. But I could NOT find any simulation model or package of IEEE 802.11n for ns2. It would be grateful if you could send me the IEEE 802.11n simulation model for ns2 or its URL link that I could download it. Thanks, Navid -- View this message in context: http://www.nabble.com/IEEE-802.11n-simulation-model-for-ns2.-tp21360180p21360180.html Sent from the ns-users mailing list archive at Nabble.com.