[ns] global mobility setting for mobile ipv6 simulation
does any one know if i need to define any special setting for global mobility in mipv6 simulation. my mobile node isnt moving from its home bs. or does anyone know any other reason why # Basic Mobile IPv6 example without using ns-topoman # Needs proc defined in file proc-mipv6-config.tcl # == # Define options # == set opt(chan) Channel/WirelessChannel ;# channel type set opt(prop) Propagation/TwoRayGround ;# radio-propagation model set opt(netif) Phy/WirelessPhy ;# network interface type set opt(mac) Mac/802_11 ;# MAC type set opt(ifq) Queue/DropTail/PriQueue ;# interface queue type set opt(ll) LL ;# link layer type set opt(ant) Antenna/OmniAntenna ;# antenna model set opt(ifqlen) 50 ;# max packet in ifq set opt(nn) 1 ;# number of mobilenodes set opt(adhocRouting) DSDV ;# routing protocol set opt(cp) ;# cp file not used set opt(sc) ;# node movement file. set opt(x) 1500 ;# x coordinate of topology set opt(y) 1500 ;# y coordinate of topology set opt(seed) 0.0 ;# random seed set opt(stop) 130 ;# time to stop simulation set opt(ftp1-start) 10.0 set num_wired_nodes 4 #set num_bs_nodes 4 ; this is not really used here. # == Agent/MIPv6/MN set bs_forwarding_ 0 ; # 1 if forwarding from previous BS proc log-mn-movement_no_topo { } { global logtimer ns Class LogTimer -superclass Timer LogTimer instproc timeout {} { global mobile_ $mobile_ log-movement $self sched 1 } set logtimer [new LogTimer] $logtimer sched 1 } # Create Topology proc create-my-topo {} { global ns opt topo mobile_ cn_ mnn_nodes_ # Create and define topography set topo [new Topography] # set prop [new $opt(prop)] # $prop topography $topo $topo load_flatgrid 1500 1500 # god is a necessary object when wireless is used # set to a value equal to the number of mobile nodes create-god 5 # Call node-config $ns node-config \ -addressType hierarchical \ -agentTrace ON \ -routerTrace ON # set up for hierarchical routing $ns node-config -addressType hierarchical AddrParams set domain_num_ 5 ;# number of domains lappend cluster_num 4 1 1 1 1 ;# number of clusters in each domain AddrParams set cluster_num_ $cluster_num lappend eilastlevel 1 1 1 1 2 1 1 1 ;# number of nodes in each cluster AddrParams set nodes_num_ $eilastlevel ;# of each domain # Create Nodes set cn_ [create-router 0.0.0] set router1_ [create-router 0.1.0] set router2_ [create-router 0.2.0] set router3_ [create-router 0.3.0] set bs1_ [create-base-station 1.0.0 0.2.0 250 1050 0] set bs2_ [create-base-station 2.0.0 0.2.0 950 1050 0] set bs3_ [create-base-station 3.0.0 0.3.0 950 300 0] set bs4_ [create-base-station 4.0.0 0.3.0 250 300 0] set mobile_ [create-mobile 1.0.1 1.0.0 250 1000 0 0 20] $bs1_ random-motion 0 $bs2_ random-motion 0 $bs3_ random-motion 0 $bs4_ random-motion 0 # initial position $ns at 0.0001 $mobile_ setdest 250.0 1000.0 100.0 # MH starts to move towards FA1 $ns at 10. $mobile_ setdest 950. 1000. 20. $ns at 20. $mobile_ setdest 950. 1000. 20. $ns at 30. $mobile_ setdest 950. 1000. 20. $ns at 40. $mobile_ setdest 950. 1000. 20. # MH move from FA1 towards FA2 $ns at 50. $mobile_ setdest 950. 350. 20. $ns at 60. $mobile_ setdest 950. 350. 20. $ns at 70. $mobile_ setdest 950. 350. 20. $ns at 80. $mobile_ setdest 950. 350. 20. # MH move from FA2 towards FA3 $ns at 85. $mobile_ setdest 250. 350. 20. $ns at 95. $mobile_ setdest 250. 350. 20. $ns at 105. $mobile_ setdest 250. 350. 20. $ns at 115.
[ns] mobile node not moving during simulation of mipv6
hello, sorry to be a bother again. i solved all the previous problems mentioned earlier.BUT i have a final problem on my simulation. i configured my mobile node to move from bs1 to bs2 to bs3 to bs4 BUT it doesnt move. i have tried all i can but no luck.please does any one know what could be wrong.below is my script. # Basic Mobile IPv6 example without using ns-topoman # Needs proc defined in file proc-mipv6-config.tcl # == # Define options # == set opt(chan) Channel/WirelessChannel ;# channel type set opt(prop) Propagation/TwoRayGround ;# radio-propagation model set opt(netif) Phy/WirelessPhy ;# network interface type set opt(mac) Mac/802_11 ;# MAC type set opt(ifq) Queue/DropTail/PriQueue ;# interface queue type set opt(ll) LL ;# link layer type set opt(ant) Antenna/OmniAntenna ;# antenna model set opt(ifqlen) 50 ;# max packet in ifq set opt(nn) 1 ;# number of mobilenodes set opt(adhocRouting) DSDV ;# routing protocol set opt(cp) ;# cp file not used set opt(sc) ;# node movement file. set opt(x) 1500 ;# x coordinate of topology set opt(y) 1500 ;# y coordinate of topology set opt(seed) 0.0 ;# random seed set opt(stop) 130 ;# time to stop simulation set opt(ftp1-start) 10.0 set num_wired_nodes 4 #set num_bs_nodes 4 ; this is not really used here. # == Agent/MIPv6/MN set bs_forwarding_ 0 ; # 1 if forwarding from previous BS proc log-mn-movement_no_topo { } { global logtimer ns Class LogTimer -superclass Timer LogTimer instproc timeout {} { global mobile_ $mobile_ log-movement $self sched 1 } set logtimer [new LogTimer] $logtimer sched 1 } # Create Topology proc create-my-topo {} { global ns opt topo mobile_ cn_ mnn_nodes_ # Create and define topography set topo [new Topography] # set prop [new $opt(prop)] # $prop topography $topo $topo load_flatgrid 1500 1500 # god is a necessary object when wireless is used # set to a value equal to the number of mobile nodes create-god 5 # Call node-config $ns node-config \ -addressType hierarchical \ -agentTrace ON \ -routerTrace ON # Set NS Addressing AddrParams set domain_num_ 5 AddrParams set cluster_num_ {4 1 1 1 1 } AddrParams set nodes_num_ {1 1 1 1 2 1 1 1} # Create Nodes set cn_ [create-router 0.0.0] set router1_ [create-router 1.0.0] set router2_ [create-router 2.0.0] set router3_ [create-router 3.0.0] set bs1_ [create-base-station 2.1.0 2.0.0 250 1050 0] set bs2_ [create-base-station 2.2.0 2.0.0 1050 600 0] set bs3_ [create-base-station 3.1.0 3.0.0 950 300 0] set bs4_ [create-base-station 3.2.0 3.0.0 250 300 0] set mobile_ [create-mobile 2.1.1 2.1.0 250 1000 0 1 0.01] $bs1_ random-motion 0 $bs2_ random-motion 0 $bs3_ random-motion 0 $bs4_ random-motion 0 # Create Links $ns duplex-link $cn_ $router1_ 100Mb 2ms DropTail $ns duplex-link $router1_ $router2_ 100Mb 2ms DropTail $ns duplex-link $router1_ $router3_ 100Mb 2ms DropTail $ns duplex-link $router2_ $bs1_ 100Mb 2ms DropTail $ns duplex-link $router2_ $bs2_ 100Mb 2ms DropTail $ns duplex-link $router3_ $bs3_ 100Mb 2ms DropTail $ns duplex-link $router3_ $bs4_ 100Mb 2ms DropTail $ns duplex-link-op $cn_ $router1_ orient down $ns duplex-link-op $router1_ $router2_ orient left-down $ns duplex-link-op $router1_ $router3_ orient right-down $ns duplex-link-op $router2_ $bs1_ orient left-down $ns duplex-link-op $router2_ $bs2_ orient right-down $ns duplex-link-op $router3_ $bs3_ orient down $ns duplex-link-op $router3_ $bs4_ orient right-down display_ns_addr_domain } # End of Simulation proc finish { } { global tracef ns namf opt mobile_ cn_ puts Simulation finished # Dump the Binding Update List of MN and Binding Cache of HA [[$mobile_ set ha_] set regagent_] dump [$cn_ set regagent_] dump [$mobile_ set regagent_] dump $ns flush-trace flush $tracef close $tracef close $namf #puts running nam with $opt(namfile) ... #exec nam $opt(namfile) exit 0 }
[ns] interpretation of mipv6 set bs_ and set router_ commands
hello again, i think a better way to ask the question is what does these lines mean especially the set bs_ commands. set cn_ [create-router 0.0.0] set router1_ [create-router 0.1.0] set router2_ [create-router 0.2.0] set router3_ [create-router 0.3.0] set bs1_ [create-base-station 1.0.0 0.2.0 250 1050 0] set bs2_ [create-base-station 2.0.0 0.2.0 950 1050 0] set bs3_ [create-base-station 3.0.0 0.3.0 950 300 0] set bs4_ [create-base-station 4.0.0 0.3.0 250 300 0] set mobile_ [create-mobile 1.0.1 1.0.0 250 1000 0 1 0.01] --- On Wed, 8/26/09, Oladapo Oluwadiya ooluwad...@yahoo.com wrote: From: Oladapo Oluwadiya ooluwad...@yahoo.com Subject: mobile node not moving during simulation of mipv6 To: ns-users@ISI.EDU Date: Wednesday, August 26, 2009, 8:00 AM hello, sorry to be a bother again. i solved all the previous problems mentioned earlier.BUT i have a final problem on my simulation. i configured my mobile node to move from bs1 to bs2 to bs3 to bs4 BUT it doesnt move. i have tried all i can but no luck.please does any one know what could be wrong.below is my script. # Basic Mobile IPv6 example without using ns-topoman # Needs proc defined in file proc-mipv6-config.tcl # == # Define options # == set opt(chan) Channel/WirelessChannel ;# channel type set opt(prop) Propagation/TwoRayGround ;# radio-propagation model set opt(netif) Phy/WirelessPhy ;# network interface type set opt(mac) Mac/802_11 ;# MAC type set opt(ifq) Queue/DropTail/PriQueue ;# interface queue type set opt(ll) LL ;# link layer type set opt(ant) Antenna/OmniAntenna ;# antenna model set opt(ifqlen) 50 ;# max packet in ifq set opt(nn) 1 ;# number of mobilenodes set opt(adhocRouting) DSDV ;# routing protocol set opt(cp) ;# cp file not used set opt(sc) ;# node movement file. set opt(x) 1500 ;# x coordinate of topology set opt(y) 1500 ;# y coordinate of topology set opt(seed) 0.0 ;# random seed set opt(stop) 130 ;# time to stop simulation set opt(ftp1-start) 10.0 set num_wired_nodes 4 #set num_bs_nodes 4 ; this is not really used here. # == Agent/MIPv6/MN set bs_forwarding_ 0 ; # 1 if forwarding from previous BS proc log-mn-movement_no_topo { } { global logtimer ns Class LogTimer -superclass Timer LogTimer instproc timeout {} { global mobile_ $mobile_ log-movement $self sched 1 } set logtimer [new LogTimer] $logtimer sched 1 } # Create Topology proc create-my-topo {} { global ns opt topo mobile_ cn_ mnn_nodes_ # Create and define topography set topo [new Topography] # set prop [new $opt(prop)] # $prop topography $topo $topo load_flatgrid 1500 1500 # god is a necessary object when wireless is used # set to a value equal to the number of mobile nodes create-god 5 # Call node-config $ns node-config \ -addressType hierarchical \ -agentTrace ON \ -routerTrace ON # Set NS Addressing AddrParams set domain_num_ 5 AddrParams set cluster_num_ {4 1 1 1 1 } AddrParams set nodes_num_ {1 1 1 1 2 1 1 1} # Create Nodes set cn_ [create-router 0.0.0] set router1_ [create-router 1.0.0] set router2_ [create-router 2.0.0] set router3_ [create-router 3.0.0] set bs1_ [create-base-station 2.1.0 2.0.0 250 1050 0] set bs2_ [create-base-station 2.2.0 2.0.0 1050 600 0] set bs3_ [create-base-station 3.1.0 3.0.0 950 300 0] set bs4_ [create-base-station 3.2.0 3.0.0 250 300 0] set mobile_ [create-mobile 2.1.1 2.1.0 250 1000 0 1 0.01] $bs1_ random-motion 0 $bs2_ random-motion 0 $bs3_ random-motion 0 $bs4_ random-motion 0 # Create Links $ns duplex-link $cn_ $router1_ 100Mb 2ms DropTail $ns duplex-link $router1_ $router2_ 100Mb 2ms DropTail $ns duplex-link $router1_ $router3_ 100Mb 2ms DropTail $ns duplex-link $router2_ $bs1_ 100Mb 2ms DropTail $ns duplex-link $router2_ $bs2_ 100Mb 2ms DropTail $ns duplex-link $router3_ $bs3_ 100Mb 2ms DropTail $ns duplex-link $router3_ $bs4_ 100Mb 2ms DropTail $ns duplex-link-op $cn_ $router1_ orient down $ns duplex-link-op $router1_ $router2_ orient left-down $ns duplex-link-op $router1_ $router3_ orient right-down $ns duplex-link-op $router2_ $bs1_
[ns] finally, my mobile ipv6 patch works but.......
hello, finally, my mobile ipv6 patch worked. i was able to run the simple-mipv6.tcl script that came with the patch. however, my own tcl script doesnt run at all. it comes up with 0 byte output tracefile and 0 byte nam output file.what could be wrong? below is my tcl script and attached is the scenario i m trying to achieve. # Basic Mobile IPv6 example without using ns-topoman # Needs proc defined in file proc-mipv6-config.tcl Agent/MIPv6/MN set bs_forwarding_ 0 proc log-mn-movement_no_topo { } { global logtimer ns Class LogTimer -superclass Timer LogTimer instproc timeout {} { global mobile_ $mobile_ log-movement $self sched 1 } set logtimer [new LogTimer] $logtimer sched 1 } # Create Topology set opt(chan) Channel/WirelessChannel ;# channel type set opt(prop) Propagation/TwoRayGround ;# radio-propagation model set opt(netif) Phy/WirelessPhy ;# network interface type set opt(mac) Mac/802_11 ;# MAC type set opt(ifq) Queue/DropTail/PriQueue ;# interface queue type set opt(ll) LL ;# link layer type set opt(ant) Antenna/OmniAntenna ;# antenna model set opt(ifqlen) 50 ;# max packet in ifq set opt(nn) 1 ;# number of mobilenodes set opt(adhocRouting) DSDV ;# routing protocol set opt(cp) ;# cp file not used set opt(sc) ;# node movement file. set opt(x) 1500 ;# x coordinate of topology set opt(y) 1500 ;# y coordinate of topology set opt(seed) 0.0 ;# random seed set opt(stop) 130 ;# time to stop simulation set opt(ftp1-start) 10.0 set num_wired_nodes 4 #set num_bs_nodes 4 ; this is not really used here. proc create-my-topo {} { global ns opt topo mobile_ cn_ mnn_nodes_ # Create and define topography set topo [new Topography] # set prop [new $opt(prop)] # $prop topography $topo $topo load_flatgrid $opt(x) $opt(y) # god is a necessary object when wireless is used # set to a value equal to the number of mobile nodes create-god 5 # Call node-config $ns node-config \ -mipv6 ON \ -mipagent BS \ -mobileIP ON \ -wiredRouting ON \ -adhocRouting DSDV \ -llType LL \ -macType Mac/802_11 \ -ifqType Queue/DropTail/PriQueue \ -ifqLen 50 \ -antType Antenna/OmniAntenna \ -propType Propagation/TwoRayGround \ -phyType Phy/WirelessPhy \ -channelType Channel/WirelessChannel \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON # Set NS Addressing $ns node-config -addressType hierarchical AddrParams set domain_num_ 5 AddrParams set cluster_num_ {4 1 1 1 1} AddrParams set nodes_num_ {1 1 1 1 2 1 1 1 } # Create Nodes set cn_ [create-router 0.0.0] set router1_ [create-router 1.0.0] set router2_ [create-router 2.0.0] set router3_ [create-router 3.0.0] set bs1_ [create-base-station 1.1.0 1.0.0 200 200 0] set bs2_ [create-base-station 1.2.0 1.0.0 200 600 0] set bs3_ [create-base-station 1.3.0 1.0.0 600 200 0] set bs4_ [create-base-station 1.4.0 1.0.0 600 600 0] set mobile_ [create-mobile 1.1.1 1.1.0 190 190 0 1 0.01] $bs1_ random-motion 0 $bs2_ random-motion 0 $bs3_ random-motion 0 $bs4_ random-motion 0 # Position (fixed) for base-station nodes (HA FA). $bs1_ set X_ 250. $bs1_ set Y_ 1050. $bs1_ set Z_ 0. $bs2_ set X_ 950. $bs2_ set Y_ 1050. $bs2_ set Z_ 0. $bs3_ set X_ 950. $bs3_ set Y_ 300. $bs3_ set Z_ 0. $bs4_ set X_ 250. $bs4_ set Y_ 300. $bs4_ set Z_ 0. # Create Links $ns duplex-link $cn_ $router1_ 100Mb 2ms DropTail $ns duplex-link $router1_ $router2_ 100Mb 2ms DropTail $ns duplex-link $router1_ $router3_ 100Mb 2ms DropTail $ns duplex-link $router2_ $bs1_ 100Mb 2ms DropTail $ns duplex-link $router2_ $bs2_ 100Mb 2ms DropTail $ns duplex-link $router3_ $bs3_ 100Mb 2ms DropTail $ns duplex-link $router3_ $bs4_ 100Mb 2ms DropTail $ns duplex-link-op $cn_ $router1_ orient down $ns duplex-link-op $router1_ $router2_ orient left-down $ns duplex-link-op $router1_ $router3_ orient right-down $ns duplex-link-op $router2_ $bs1_ orient left-down $ns duplex-link-op $router2_ $bs2_ orient right-down $ns duplex-link-op $router3_ $bs3_ orient down $ns duplex-link-op $router3_ $bs4_ orient right-down # movement of the MH $mobile_ set Z_
[ns] simulation stops before stop time configured
hello all, my mipv6 simulation finally works but it stops 10s into simulation instead of 130s i configured. do u know what could be wrong. below is my script. # Basic Mobile IPv6 example without using ns-topoman # Needs proc defined in file proc-mipv6-config.tcl # == # Define options # == set opt(chan) Channel/WirelessChannel ;# channel type set opt(prop) Propagation/TwoRayGround ;# radio-propagation model set opt(netif) Phy/WirelessPhy ;# network interface type set opt(mac) Mac/802_11 ;# MAC type set opt(ifq) Queue/DropTail/PriQueue ;# interface queue type set opt(ll) LL ;# link layer type set opt(ant) Antenna/OmniAntenna ;# antenna model set opt(ifqlen) 50 ;# max packet in ifq set opt(nn) 1 ;# number of mobilenodes set opt(adhocRouting) DSDV ;# routing protocol set opt(cp) ;# cp file not used set opt(sc) ;# node movement file. set opt(x) 1500 ;# x coordinate of topology set opt(y) 1500 ;# y coordinate of topology set opt(seed) 0.0 ;# random seed set opt(stop) 130 ;# time to stop simulation set opt(ftp1-start) 10.0 set num_wired_nodes 4 #set num_bs_nodes 4 ; this is not really used here. # == Agent/MIPv6/MN set bs_forwarding_ 0 ; # 1 if forwarding from previous BS proc log-mn-movement_no_topo { } { global logtimer ns Class LogTimer -superclass Timer LogTimer instproc timeout {} { global mobile_ $mobile_ log-movement $self sched 1 } set logtimer [new LogTimer] $logtimer sched 1 } # Create Topology proc create-my-topo {} { global ns opt topo mobile_ cn_ mnn_nodes_ # Create and define topography set topo [new Topography] # set prop [new $opt(prop)] # $prop topography $topo $topo load_flatgrid 1500 1500 # god is a necessary object when wireless is used # set to a value equal to the number of mobile nodes create-god 5 # Call node-config $ns node-config \ -addressType hierarchical \ -agentTrace ON \ -routerTrace ON # Set NS Addressing AddrParams set domain_num_ 5 AddrParams set cluster_num_ {4 1 1 1 1 } AddrParams set nodes_num_ {1 1 1 1 2 1 1 1} # Create Nodes set cn_ [create-router 0.0.0] set router1_ [create-router 1.0.0] set router2_ [create-router 2.0.0] set router3_ [create-router 3.0.0] set bs1_ [create-base-station 2.1.0 2.0.0 250 1050 0] set bs2_ [create-base-station 2.2.0 2.0.0 1050 600 0] set bs3_ [create-base-station 3.1.0 3.0.0 950 300 0] set bs4_ [create-base-station 3.2.0 3.0.0 250 300 0] set mobile_ [create-mobile 2.1.1 2.0.0 250 1000 0 1 0.01] $bs1_ random-motion 0 $bs2_ random-motion 0 $bs3_ random-motion 0 $bs4_ random-motion 0 # Create Links $ns duplex-link $cn_ $router1_ 100Mb 2ms DropTail $ns duplex-link $router1_ $router2_ 100Mb 2ms DropTail $ns duplex-link $router1_ $router3_ 100Mb 2ms DropTail $ns duplex-link $router2_ $bs1_ 100Mb 2ms DropTail $ns duplex-link $router2_ $bs2_ 100Mb 2ms DropTail $ns duplex-link $router3_ $bs3_ 100Mb 2ms DropTail $ns duplex-link $router3_ $bs4_ 100Mb 2ms DropTail $ns duplex-link-op $cn_ $router1_ orient down $ns duplex-link-op $router1_ $router2_ orient left-down $ns duplex-link-op $router1_ $router3_ orient right-down $ns duplex-link-op $router2_ $bs1_ orient left-down $ns duplex-link-op $router2_ $bs2_ orient right-down $ns duplex-link-op $router3_ $bs3_ orient down $ns duplex-link-op $router3_ $bs4_ orient right-down display_ns_addr_domain } # End of Simulation proc finish { } { global tracef ns namf opt mobile_ cn_ puts Simulation finished # Dump the Binding Update List of MN and Binding Cache of HA [[$mobile_ set ha_] set regagent_] dump [$cn_ set regagent_] dump [$mobile_ set regagent_] dump $ns flush-trace flush $tracef close $tracef close $namf #puts running nam with $opt(namfile) ... #exec nam $opt(namfile) exit 0 } # Main proc main { } { global opt ns TOPOM namf n
[ns] simulation error: invalid command name Agent/MIPv6/MN
hello, when i tried running my mobile ipv6 tcl script, i got this error: invalid command name Agent/Mipv6/MN while executing Agent/Mipv6/MN set bs_forwarding_ 0 does anyone know what the problem could be.below is my tcl script # Basic Mobile IPv6 example without using ns-topoman # Needs proc defined in file proc-mipv6-config.tcl Agent/MIPv6/MN set bs_forwarding_ 0 proc log-mn-movement_no_topo { } { global logtimer ns Class LogTimer -superclass Timer LogTimer instproc timeout {} { global mobile_ $mobile_ log-movement $self sched 1 } set logtimer [new LogTimer] $logtimer sched 1 } # Create Topology set opt(chan) Channel/WirelessChannel ;# channel type set opt(prop) Propagation/TwoRayGround ;# radio-propagation model set opt(netif) Phy/WirelessPhy ;# network interface type set opt(mac) Mac/802_11 ;# MAC type set opt(ifq) Queue/DropTail/PriQueue ;# interface queue type set opt(ll) LL ;# link layer type set opt(ant) Antenna/OmniAntenna ;# antenna model set opt(ifqlen) 50 ;# max packet in ifq set opt(nn) 1 ;# number of mobilenodes set opt(adhocRouting) DSDV ;# routing protocol set opt(cp) ;# cp file not used set opt(sc) ;# node movement file. set opt(x) 1500 ;# x coordinate of topology set opt(y) 1500 ;# y coordinate of topology set opt(seed) 0.0 ;# random seed set opt(stop) 130 ;# time to stop simulation set opt(ftp1-start) 10.0 set num_wired_nodes 4 #set num_bs_nodes 4 ; this is not really used here. proc create-my-topo {} { global ns opt topo mobile_ cn_ mnn_nodes_ # Create and define topography set topo [new Topography] # set prop [new $opt(prop)] # $prop topography $topo $topo load_flatgrid $opt(x) $opt(y) # god is a necessary object when wireless is used # set to a value equal to the number of mobile nodes create-god 5 # Call node-config $ns node-config \ -mipv6 ON \ -mipagent BS \ -mobileIP ON \ -wiredRouting ON \ -adhocRouting DSDV \ -llType LL \ -macType Mac/802_11 \ -ifqType Queue/DropTail/PriQueue \ -ifqLen 50 \ -antType Antenna/OmniAntenna \ -propType Propagation/TwoRayGround \ -phyType Phy/WirelessPhy \ -channelType Channel/WirelessChannel \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON # Set NS Addressing $ns node-config -addressType hierarchical AddrParams set domain_num_ 5 AddrParams set cluster_num_ {4 1 1 1 1} AddrParams set nodes_num_ {1 1 1 1 2 1 1 1 } # Create Nodes set cn_ [create-router 0.0.0] set router1_ [create-router 1.0.0] set router2_ [create-router 2.0.0] set router3_ [create-router 3.0.0] set bs1_ [create-base-station 1.1.0 1.0.0 200 200 0] set bs2_ [create-base-station 1.2.0 1.0.0 200 600 0] set bs3_ [create-base-station 1.3.0 1.0.0 600 200 0] set bs4_ [create-base-station 1.4.0 1.0.0 600 600 0] set mobile_ [create-mobile 1.1.1 1.1.0 190 190 0 1 0.01] $bs1_ random-motion 0 $bs2_ random-motion 0 $bs3_ random-motion 0 $bs4_ random-motion 0 # Position (fixed) for base-station nodes (HA FA). $bs1_ set X_ 250. $bs1_ set Y_ 1050. $bs1_ set Z_ 0. $bs2_ set X_ 950. $bs2_ set Y_ 1050. $bs2_ set Z_ 0. $bs3_ set X_ 950. $bs3_ set Y_ 300. $bs3_ set Z_ 0. $bs4_ set X_ 250. $bs4_ set Y_ 300. $bs4_ set Z_ 0. # Create Links $ns duplex-link $cn_ $router1_ 100Mb 2ms DropTail $ns duplex-link $router1_ $router2_ 100Mb 2ms DropTail $ns duplex-link $router1_ $router3_ 100Mb 2ms DropTail $ns duplex-link $router2_ $bs1_ 100Mb 2ms DropTail $ns duplex-link $router2_ $bs2_ 100Mb 2ms DropTail $ns duplex-link $router3_ $bs3_ 100Mb 2ms DropTail $ns duplex-link $router3_ $bs4_ 100Mb 2ms DropTail $ns duplex-link-op $cn_ $router1_ orient down $ns duplex-link-op $router1_ $router2_ orient left-down $ns duplex-link-op $router1_ $router3_ orient right-down $ns duplex-link-op $router2_ $bs1_ orient left-down $ns duplex-link-op $router2_ $bs2_ orient right-down $ns duplex-link-op $router3_ $bs3_ orient down $ns duplex-link-op $router3_ $bs4_ orient right-down # movement of the MH $mobile_ set Z_ 0. $mobile_ set Y_ 1000. $mobile_ set X_ 250. # MH starts to move
[ns] error on simulating mobile ipv6
hello all, i tried running my mobile ipv6 simulation with the tcl script attached and i got the error below. i have tried every way to solve the problem but no way out. administra...@angel ~ $ ns wireless5.tcl num_nodes is set 5 warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl INITIALIZE THE LIST xListHead INITIALIZE THE LIST xListHead (_o350 cmd line 1) invoked from within _o350 cmd set-ha 1.1.0 invoked from within catch $self cmd $args ret invoked from within if [catch $self cmd $args ret] { set cls [$self info class] global errorInfo set savedInfo $errorInfo error error when calling class $cls: $args $... (procedure _o350 line 2) (SplitObject unknown line 2) invoked from within $local_node set-ha $ha_addr (procedure create-mobile line 9) invoked from within create-mobile 1.1.1 1.1.0 190 190 0 1 0.01 (procedure create-my-topo line 35) invoked from within create-my-topo (procedure main line 43) invoked from within main (file wireless5.tcl line 260) administra...@angel ~ $ below is my tcl script: # Basic Mobile IPv6 example without using ns-topoman # Needs proc defined in file proc-mipv6-config.tcl Agent/MIPv6/MN set bs_forwarding_ 0 proc log-mn-movement_no_topo { } { global logtimer ns Class LogTimer -superclass Timer LogTimer instproc timeout {} { global mobile_ $mobile_ log-movement $self sched 1 } set logtimer [new LogTimer] $logtimer sched 1 } # Create Topology set opt(chan) Channel/WirelessChannel ;# channel type set opt(prop) Propagation/TwoRayGround ;# radio-propagation model set opt(netif) Phy/WirelessPhy ;# network interface type set opt(mac) Mac/802_11 ;# MAC type set opt(ifq) Queue/DropTail/PriQueue ;# interface queue type set opt(ll) LL ;# link layer type set opt(ant) Antenna/OmniAntenna ;# antenna model set opt(ifqlen) 50 ;# max packet in ifq set opt(nn) 1 ;# number of mobilenodes set opt(adhocRouting) DSDV ;# routing protocol set opt(cp) ;# cp file not used set opt(sc) ;# node movement file. set opt(x) 1500 ;# x coordinate of topology set opt(y) 1500 ;# y coordinate of topology set opt(seed) 0.0 ;# random seed set opt(stop) 130 ;# time to stop simulation set opt(ftp1-start) 10.0 set num_wired_nodes 4 #set num_bs_nodes 4 ; this is not really used here. proc create-my-topo {} { global ns opt topo mobile_ cn_ mnn_nodes_ # Create and define topography set topo [new Topography] # set prop [new $opt(prop)] # $prop topography $topo $topo load_flatgrid $opt(x) $opt(y) # god is a necessary object when wireless is used # set to a value equal to the number of mobile nodes create-god 5 # Call node-config $ns node-config \ -mipv6 ON \ -mipagent BS \ -mobileIP ON \ -wiredRouting ON \ -adhocRouting DSDV \ -llType LL \ -macType Mac/802_11 \ -ifqType Queue/DropTail/PriQueue \ -ifqLen 50 \ -antType Antenna/OmniAntenna \ -propType Propagation/TwoRayGround \ -phyType Phy/WirelessPhy \ -channelType Channel/WirelessChannel \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON # Set NS Addressing $ns node-config -addressType hierarchical AddrParams set domain_num_ 5 AddrParams set cluster_num_ {4 1 1 1 1} AddrParams set nodes_num_ {1 1 1 1 2 1 1 1 } # Create Nodes set cn_ [create-router 0.0.0] set router1_ [create-router 1.0.0] set router2_ [create-router 2.0.0] set router3_ [create-router 3.0.0] set bs1_ [create-base-station 1.1.0 1.0.0 200 200 0] set bs2_ [create-base-station 1.2.0 1.0.0 200 600 0] set bs3_ [create-base-station 1.3.0 1.0.0 600 200 0] set bs4_ [create-base-station 1.4.0 1.0.0 600 600 0] set mobile_ [create-mobile 1.1.1 1.1.0 190 190 0 1 0.01] $bs1_ random-motion 0 $bs2_ random-motion 0 $bs3_ random-motion 0 $bs4_ random-motion 0 # Position (fixed) for base-station nodes (HA FA). $bs1_ set X_ 250. $bs1_ set Y_ 1050. $bs1_ set Z_ 0. $bs2_ set X_ 950. $bs2_ set Y_ 1050. $bs2_ set Z_ 0. $bs3_ set X_ 950. $bs3_ set Y_ 300. $bs3_ set Z_ 0. $bs4_ set X_ 250. $bs4_ set Y_ 300. $bs4_ set Z_ 0. # Create Links $ns duplex-link $cn_ $router1_ 100Mb 2ms
[ns] wrong node routing agent error
hello, i m having problems running my ns simulation after i patched ns2.33 with mobiwan to allow mobile ipv6 support. when i try running ns2.33 after the patching, i get this error: number of node is 5 ... wrong node routing agent! please does anyone know what the problem could be? regards
[ns] ns2.33 download
hi, does anyone know which url i can download ns2.33 from? regards
[ns] awk script for calculating end to end delay in a wired-wireless scenario
hello, does anyone have the awk script to calculate delay,throughput,packet loss in a mixed scenario i.e. wired-wireless scenario? i will really appreciate it. regards.
[ns] mobile ipv6 simulation
i tried running the mobile ipv6 scenario i ran for the mobile ipv4 using the scripts below but i got an error segmentation fault (core dumped)when i tried running the simulation.what do u think is the problem thanks # Basic Mobile IPv6 example without using ns-topoman # Needs proc defined in file proc-mipv6-config.tcl Agent/MIPv6/MN set bs_forwarding_ 0 proc log-mn-movement_no_topo { } { global logtimer ns Class LogTimer -superclass Timer LogTimer instproc timeout {} { global mobile_ $mobile_ log-movement $self sched 1 } set logtimer [new LogTimer] $logtimer sched 1 } # Create Topology proc create-my-topo {} { global ns opt topo mobile_ cn_ mnn_nodes_ # Create and define topography set topo [new Topography] # set prop [new $opt(prop)] # $prop topography $topo $topo load_flatgrid 1500 1500 # god is a necessary object when wireless is used # set to a value equal to the number of mobile nodes create-god 5 # Call node-config $ns node-config \ -addressType hierarchical \ -agentTrace ON \ -routerTrace ON # Set NS Addressing AddrParams set domain_num_ 5 AddrParams set cluster_num_ {4 1 1 1 1} AddrParams set nodes_num_ {1 1 1 1 2 1 1 1 } # Create Nodes set cn_ [create-router 0.0.0] set router1_ [create-router 1.0.0] set router2_ [create-router 2.0.0] set router3_ [create-router 3.0.0] set bs1_ [create-base-station 1.1.0 1.0.0 200 200 0] set bs2_ [create-base-station 1.2.0 1.0.0 200 600 0] set bs3_ [create-base-station 1.3.0 1.0.0 600 200 0] set bs4_ [create-base-station 1.4.0 1.0.0 600 600 0] set mobile_ [create-mobile 1.1.1 1.1.0 190 190 0 1 0.01] $bs1_ random-motion 0 $bs2_ random-motion 0 $bs3_ random-motion 0 $bs4_ random-motion 0 # Position (fixed) for base-station nodes (HA FA). $bs1_ set X_ 250. $bs1_ set Y_ 1050. $bs1_ set Z_ 0. $bs2_ set X_ 950. $bs2_ set Y_ 1050. $bs2_ set Z_ 0. $bs3_ set X_ 950. $bs3_ set Y_ 300. $bs3_ set Z_ 0. $bs4_ set X_ 250. $bs4_ set Y_ 300. $bs4_ set Z_ 0. # Create Links $ns duplex-link $cn_ $router1_ 100Mb 2ms DropTail $ns duplex-link $router1_ $router2_ 100Mb 2ms DropTail $ns duplex-link $router1_ $router3_ 100Mb 2ms DropTail $ns duplex-link $router2_ $bs1_ 100Mb 2ms DropTail $ns duplex-link $router2_ $bs2_ 100Mb 2ms DropTail $ns duplex-link $router3_ $bs3_ 100Mb 2ms DropTail $ns duplex-link $router3_ $bs4_ 100Mb 2ms DropTail $ns duplex-link-op $cn_ $router1_ orient down $ns duplex-link-op $router1_ $router2_ orient left-down $ns duplex-link-op $router1_ $router3_ orient right-down $ns duplex-link-op $router2_ $bs1_ orient left-down $ns duplex-link-op $router2_ $bs2_ orient right-down $ns duplex-link-op $router3_ $bs3_ orient down $ns duplex-link-op $router3_ $bs4_ orient right-down # movement of the MH $mobile_ set Z_ 0. $mobile_ set Y_ 1000. $mobile_ set X_ 250. # MH starts to move towards FA1 $ns at 10. $mobile_ setdest 950. 1000. 20. # MH move from FA1 towards FA2 $ns at 50. $mobile_ setdest 950. 350. 20. # MH move from FA2 towards FA3 $ns at 85. $mobile_ setdest 250. 350. 20. display_ns_addr_domain } # End of Simulation proc finish { } { global tracef ns namf opt mobile_ cn_ puts Simulation finished # Dump the Binding Update List of MN and Binding Cache of HA [[$mobile_ set ha_] set regagent_] dump [$cn_ set regagent_] dump [$mobile_ set regagent_] dump $ns flush-trace flush $tracef close $tracef close $namf #puts running nam with $opt(namfile) ... #exec nam $opt(namfile) exit 0 } # Main proc main { } { global opt ns TOPOM namf n tracef mobile_ cn_ # Source Files # source set-def-options.tcl # set BASEDIR to your own correct path source /home/Administrator/ns-allinone-2.33/ns-2.33/tcl/lib/proc-mipv6-config.tcl source /home/Administrator/ns-allinone-2.33/ns-2.33/tcl/lib/proc-tools.tcl source /home/Administrator/ns-allinone-2.33/ns-2.33/tcl/lib/proc-topo.tcl
[ns] help with setting base directory in mipv6 script
hello, i am setting up a mobile ipv6 scenario and i need to set up the basedir to my own path but i m getting the error : wrong # args:should be source filename below is the command # set BASEDIR to your own correct path source /home/Administrator/ns-allinone-2.33/ns-2.33/tcl/lib/proc-mipv6-config.tcl source /home/Administrator/ns-allinone-2.33/ns-2.33/tcl/lib/proc-tools.tcl source /home/Administrator/ns-allinone-2.33/ns-2.33/tcl/lib/proc-topo.tcl source /home/Administrator/ns-allinone-2.33/ns-2.33/tcl/lib/ns-topoman.tcl source /home/Administrator/ns-allinone-2.33/ns-2.33/tcl/lib/proc-mobi-global.tcl source /home/Administrator/ns-allinone-2.33/ns-2.33/tcl/lib/proc-mobi-config.tcl source /home/Administrator/ns-allinone-2.33/ns-2.33/tcl/mobility/timer.tcl the following tcl files above are in my c:/cygwin/home/administrator/ns-allinone-2.33/ns-2.33/tcl/lib folder. what am i doing wrong? regards
[ns] awk script error
hello , i am having error for this line command %g\n, pkt_id,time,pkt_id,recv[pkt_id]-send[pkt_id]) when i run the awk script. the error is: backslash not last character on line Pls help
[ns] Mobile node not handing over in mobile ip scenario
Hi , It seems my mobile node handed over just once instead of three times.i noticed from the trace file that the R2,BS3,BS4 werent listed in the tr file events.more like the area border router didnt re-route via the second access router to the two other base stations.what do you think could be wrong? i assumed the base station coverage area is about 250m radius.could this be the issue?attached is the network diagram/schematic showing mobile node movement and tcl file regards dapo
[ns] C++ scripts for calculating delay, packet loss and jitter in wireless networks
hello, i will be grateful if anyone knows the c++ scripts to add to the ns2 tcl script to be able to calculate the end to end delay,packet loss and jitter in wireless networks. regards, oladapo
[ns] tracefile events not sorted by time error warning
(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -channelType $opt(chan) \ -topoInstance $topo \ -wiredRouting ON \ -agentTrace ON \ -routerTrace OFF \ -macTrace OFF # Create HA and FA set HA [$ns_ node 1.0.0] set FA1 [$ns_ node 2.0.0] set FA2 [$ns_ node 3.0.0] set FA3 [$ns_ node 4.0.0] $HA random-motion 0 $FA1 random-motion 0 $FA2 random-motion 0 $FA3 random-motion 0 # Position (fixed) for base-station nodes (HA FA). $HA set X_ 250. $HA set Y_ 1050. $HA set Z_ 0. $FA1 set X_ 600. $FA1 set Y_ 1050. $FA1 set Z_ 0. $FA2 set X_ 600. $FA2 set Y_ 300. $FA2 set Z_ 0. $FA3 set X_ 250. $FA3 set Y_ 300. $FA3 set Z_ 0. # create a mobilenode that would be moving between HA and FA. # note address of MH indicates its in the same domain as HA. $ns_ node-config -wiredRouting OFF set MH [$ns_ node 1.0.1] set node_(0) $MH set HAaddress [AddrParams addr2id [$HA node-addr]] [$MH set regagent_] set home_agent_ $HAaddress # movement of the MH $MH set Z_ 0. $MH set Y_ 1000. $MH set X_ 250. # MH starts to move towards FA1 $ns_ at 10. $MH setdest 600. 1000. 20. # MH move from FA1 towards FA2 $ns_ at 360. $MH setdest 600. 350. 20. # MH move from FA2 towards FA3 $ns_ at 1010. $MH setdest 250. 350. 20. # create links between wired and BaseStation nodes $ns_ duplex-link $W(0) $W(1) 100Mb 2ms DropTail $ns_ duplex-link $W(1) $W(2) 100Mb 2ms DropTail $ns_ duplex-link $W(1) $W(3) 100Mb 2ms DropTail $ns_ duplex-link $W(2) $HA 100Mb 2ms DropTail $ns_ duplex-link $W(2) $FA1 100Mb 2ms DropTail $ns_ duplex-link $W(3) $FA2 100Mb 2ms DropTail $ns_ duplex-link $W(3) $FA3 100Mb 2ms DropTail $ns_ duplex-link-op $W(0) $W(1) orient down $ns_ duplex-link-op $W(1) $W(2) orient left-down $ns_ duplex-link-op $W(1) $W(3) orient right-down $ns_ duplex-link-op $W(2) $HA orient left-down $ns_ duplex-link-op $W(2) $FA1 orient right-down $ns_ duplex-link-op $W(3) $FA2 orient down $ns_ duplex-link-op $W(3) $FA3 orient right-down # setup TCP connections between a wired node and the MobileHost set tcp1 [new Agent/TCP] $tcp1 set class_ 2 set sink1 [new Agent/TCPSink] $ns_ attach-agent $W(0) $tcp1 $ns_ attach-agent $MH $sink1 $ns_ connect $tcp1 $sink1 set ftp1 [new Application/FTP] $ftp1 attach-agent $tcp1 $ns_ at $opt(ftp1-start) $ftp1 start # source connection-pattern and node-movement scripts if { $opt(cp) == } { puts *** NOTE: no connection pattern specified. set opt(cp) none } else { puts Loading connection pattern... source $opt(cp) } if { $opt(sc) == } { puts *** NOTE: no scenario file specified. set opt(sc) none } else { puts Loading scenario file... source $opt(sc) puts Load complete... } # Define initial node position in nam for {set i 0} {$i $opt(nn)} {incr i} { # 20 defines the node size in nam, must adjust it according to your # scenario # The function must be called after mobility model is defined $ns_ initial_node_pos $node_($i) 20 } # Tell all nodes when the simulation ends for {set i 0} {$i $opt(nn) } {incr i} { $ns_ at $opt(stop).0 $node_($i) reset; } $ns_ at $opt(stop).0 $HA reset; $ns_ at $opt(stop).0 $FA1 reset; $ns_ at $opt(stop).0 $FA2 reset; $ns_ at $opt(stop).0 $FA3 reset; $ns_ at $opt(stop).0002 puts \NS EXITING...\ ; $ns_ halt $ns_ at $opt(stop).0001 stop proc stop {} { global ns_ tracefd namtrace close $tracefd close $namtrace } # some useful headers for tracefile puts $tracefd M 0.0 nn $opt(nn) x $opt(x) y $opt(y) rp \ $opt(adhocRouting) puts $tracefd M 0.0 sc $opt(sc) cp $opt(cp) seed $opt(seed) puts $tracefd M 0.0 prop $opt(prop) ant $opt(ant) puts Starting Simulation... $ns_ run --- On Wed, 7/22/09, Huq, Syed M. ma...@ou.edu wrote: From: Huq, Syed M. ma...@ou.edu Subject: RE: [ns] Help with error To: Oladapo Oluwadiya ooluwad...@yahoo.com Date: Wednesday, July 22, 2009, 8:45 PM You should have pasted more information from the simulation script file. I think the destination of the node is beyond your topography grid size. Check that. Good luck. From: ns-users-boun...@isi.edu [ns-users-boun...@isi.edu] On Behalf Of Oladapo Oluwadiya [ooluwad...@yahoo.com] Sent: Wednesday, July 22, 2009 4:19 PM To: ns-users@ISI.EDU Subject: [ns] Help with error hello, i got this error when i tried simulating a mobile ip scenario in ns.though the simulation runs,but runs just for 9.6s instead of 1010s set in script. Sorting listsDone! ns: _o159 setdest 600. 1000.00
Re: [ns] tracefile events not sorted by time error warning
i m able to get a probable solution on this website which shows how to solve the problem (tracefile events not sorted by time) http://sokoyo.csit.tw/~blog/2008-07-10/155 but i dont know how to convert %.9f to time format characters bearing in mind that the TR files produces time in the format 0.504153598 for example. thanks --- On Fri, 7/24/09, Oladapo Oluwadiya ooluwad...@yahoo.com wrote: From: Oladapo Oluwadiya ooluwad...@yahoo.com Subject: [ns] tracefile events not sorted by time error warning To: ns-users@ISI.EDU Date: Friday, July 24, 2009, 12:54 PM I got this error when i tried running my nam simulation: tracefile events not sorted by time. What could be wrong? below is the tcl script # Copyright (c) 1997 Regents of the University of California. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. All advertising materials mentioning features or use of this software # must display the following acknowledgement: # This product includes software developed by the Computer Systems # Engineering Group at Lawrence Berkeley Laboratory. # 4. Neither the name of the University nor of the Laboratory may be used # to endorse or promote products derived from this software without # specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # wireless4.tcl # simulation of a wired-cum-wireless topology running with mobileIPv4 # == # Define options # == set opt(chan) Channel/WirelessChannel ;# channel type set opt(prop) Propagation/TwoRayGround ;# radio-propagation model set opt(netif) Phy/WirelessPhy ;# network interface type set opt(mac) Mac/802_11 ;# MAC type set opt(ifq) Queue/DropTail/PriQueue ;# interface queue type set opt(ll) LL ;# link layer type set opt(ant) Antenna/OmniAntenna ;# antenna model set opt(ifqlen) 50 ;# max packet in ifq set opt(nn) 1 ;# number of mobilenodes set opt(adhocRouting) DSDV ;# routing protocol set opt(cp) ;# cp file not used set opt(sc) ;# node movement file. set opt(x) 1500 ;# x coordinate of topology set opt(y) 1500 ;# y coordinate of topology set opt(seed) 0.0 ;# random seed set opt(stop) 70 ;# time to stop simulation set opt(ftp1-start) 10.0 set num_wired_nodes 4 #set num_bs_nodes 4 ; this is not really used here. # == # check for boundary parameters and random seed if { $opt(x) == 0 || $opt(y) == 0 } { puts No X-Y boundary values given for wireless topology\n } if {$opt(seed) 0} { puts Seeding Random number generator with $opt(seed)\n ns-random $opt(seed) } # create simulator instance set ns_ [new Simulator] # set up for hierarchical routing $ns_ node-config -addressType hierarchical AddrParams set domain_num_ 5 ;# number of domains lappend cluster_num 4 1 1 1 1 ;# number of clusters in each domain AddrParams set cluster_num_ $cluster_num lappend eilastlevel 1 1 1 1 2 1 1 1 ;# number of nodes in each cluster AddrParams set nodes_num_ $eilastlevel ;# of each domain set tracefd [open wireless4-out.tr w] set namtrace [open wireless4-out.nam w] $ns_ trace-all $tracefd $ns_ namtrace-all-wireless $namtrace $opt(x) $opt(y) # Create topography object set topo [new Topography] # define
[ns] Help with error
hello, i got this error when i tried simulating a mobile ip scenario in ns.though the simulation runs,but runs just for 9.6s instead of 1010s set in script. Sorting listsDone! ns: _o159 setdest 600. 1000.00 1.: (_o159 cmd line 1) invoked from within _o159 cmd setdest 600. 1000. 1. invoked from within catch $self cmd $arg ret invoked from within if [catch $self cmd $args ret] { set cls [$self info class] global errorinfo set savedInfo $error Info error error when calling class $cls: $args $... (procedure _o159 line 2) (SplitObject unknown line 2) invoked from within _o159 setdest 600. 1000. 1. below is part of the code involved in the error... # create a mobilenode that would be moving between HA and FA. # note address of MH indicates its in the same domain as HA. $ns_ node-config -wiredRouting OFF set MH [$ns_ node 1.0.1] set node_(0) $MH set HAaddress [AddrParams addr2id [$HA node-addr]] [$MH set regagent_] set home_agent_ $HAaddress # movement of the MH $MH set Z_ 0. $MH set Y_ 1000. $MH set X_ 250. # MH starts to move towards FA1 $ns_ at 10. $MH setdest 600. 1000. 1. # MH move from FA1 towards FA2 $ns_ at 360. $MH setdest 600. 350. 1. # MH move from FA2 towards FA3 $ns_ at 1010. $MH setdest 250. 350. 1.
[ns] Help with ns2.33 patch to support mobile ipv6
hello, i found patches for ns2.33 to support mobile ipv6 on this link http://nicta.com.au/people/mehanio/nsmisc i am not sure which of the two patches i need to install because there are two of them relating to ns2.33 mobiwan i.e. ns-233-mobiwan-1.patch and ns-233-mobiwan-rfc3775-1.patch. i m using ns2.33 with cygwin 1.5.25-15. the second question is how do i install the patch? regards
[ns] HELP WITH MOBILE IP TCL SCRIPTS
i need help with this. I have the code to simulate mobile ip such that there are two base stations...one mobile node and two wired nodes.the mobile node moves from base station to the second base station.the two base stations are connected to a wired node which in turn is connected to a second wired node i m using ns2.33 cygwin 1.5.25-15.The code is attached and also pasted below.. i need to modify the code to do the following; 1.) just one mobile node and a base station with the mobile node withing the bs range. 2.) further modification such that i have a mobile node communicating with a base station and the base station is connected to a wired node 3.) a further modification such that a mobile node communicates with a base station and the base station is connected to a wired node in which the wired node is also connected to another wired node thanks. # Copyright (c) 1997 Regents of the University of California. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. All advertising materials mentioning features or use of this software # must display the following acknowledgement: # This product includes software developed by the Computer Systems # Engineering Group at Lawrence Berkeley Laboratory. # 4. Neither the name of the University nor of the Laboratory may be used # to endorse or promote products derived from this software without # specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # wireless3.tcl # simulation of a wired-cum-wireless topology running with mobileIP # == # Define options # == set opt(chan) Channel/WirelessChannel ;# channel type set opt(prop) Propagation/TwoRayGround ;# radio-propagation model set opt(netif) Phy/WirelessPhy ;# network interface type set opt(mac) Mac/802_11 ;# MAC type set opt(ifq) Queue/DropTail/PriQueue ;# interface queue type set opt(ll) LL ;# link layer type set opt(ant) Antenna/OmniAntenna ;# antenna model set opt(ifqlen) 50 ;# max packet in ifq set opt(nn) 1 ;# number of mobilenodes set opt(adhocRouting) DSDV ;# routing protocol set opt(cp) ;# cp file not used set opt(sc) ;# node movement file. set opt(x) 670 ;# x coordinate of topology set opt(y) 670 ;# y coordinate of topology set opt(seed) 0.0 ;# random seed set opt(stop) 250 ;# time to stop simulation set opt(ftp1-start) 100.0 set num_wired_nodes 2 #set num_bs_nodes 2 ; this is not really used here. # == # check for boundary parameters and random seed if { $opt(x) == 0 || $opt(y) == 0 } { puts No X-Y boundary values given for wireless topology\n } if {$opt(seed) 0} { puts Seeding Random number generator with $opt(seed)\n ns-random $opt(seed) } # create simulator instance set ns_ [new Simulator] # set up for hierarchical routing $ns_ node-config -addressType hierarchical AddrParams set domain_num_ 3 ;# number of domains lappend cluster_num 2 1 1 ;# number of clusters in each domain AddrParams set cluster_num_ $cluster_num lappend eilastlevel 1 1 2 1 ;# number of nodes in each cluster AddrParams set nodes_num_
[ns] HOW TO CONVERT NS2 TRACEFILES TO TRACE GRAPH FORMAT
Hello, I m trying to generate a graph of a mobile ip simulation i ran in each i would love to plot for example delay against packet number or simulation time and also packet loss against simulation time ...etc... what is the easiest NS2 analysing tool i can use for this? below is part of the trace file.. regards, n -t 50.00 -s 2 -x 591.256560 -y 199.373307 -U -3.343610 -V -0.434985 -T 66.333489 n -t 51.00 -s 1 -x 257.046298 -y 345.357732 -U -1.967869 -V -14.778819 -T 17.897386 + -t 127.936679222 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 0 -k AGT - -t 127.936679222 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 0 -k AGT h -t 127.936679222 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 0 -k AGT r -t 128.006847881 -s 2 -d 2 -p cbr -e 512 -c 2 -a 0 -i 0 -k AGT + -t 131.663684440 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 4 -k AGT - -t 131.663684440 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 4 -k AGT h -t 131.663684440 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 4 -k AGT r -t 131.675524586 -s 2 -d 2 -p cbr -e 512 -c 2 -a 0 -i 4 -k AGT + -t 133.945590635 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 5 -k AGT - -t 133.945590635 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 5 -k AGT h -t 133.945590635 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 5 -k AGT r -t 133.958070782 -s 2 -d 2 -p cbr -e 512 -c 2 -a 0 -i 5 -k AGT + -t 137.188115528 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 6 -k AGT - -t 137.188115528 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 6 -k AGT h -t 137.188115528 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 6 -k AGT r -t 137.199595674 -s 2 -d 2 -p cbr -e 512 -c 2 -a 0 -i 6 -k AGT + -t 139.503813140 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 7 -k AGT - -t 139.503813140 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 7 -k AGT h -t 139.503813140 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 7 -k AGT r -t 139.516193286 -s 2 -d 2 -p cbr -e 512 -c 2 -a 0 -i 7 -k AGT + -t 142.916715894 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 8 -k AGT - -t 142.916715894 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 8 -k AGT h -t 142.916715894 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 8 -k AGT r -t 142.928796040 -s 2 -d 2 -p cbr -e 512 -c 2 -a 0 -i 8 -k AGT + -t 146.621508996 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 9 -k AGT - -t 146.621508996 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 9 -k AGT h -t 146.621508996 -s 0 -d -1 -p cbr -e 512 -c 2 -a 0 -i 9 -k AGT r -t 146.633649142 -s 2 -d 2 -p cbr -e 512 -c 2 -a 0 -i 9 -k AGT + -t 150.0 -s 1 -d -1 -p tcp -e 40 -c 2 -a 0 -i 10 -k AGT - -t 150.0 -s 1 -d -1 -p tcp -e 40 -c 2 -a 0 -i 10 -k AGT h -t 150.0 -s 1 -d -1 -p tcp -e 40 -c 2 -a 0 -i 10 -k AGT
Re: [ns] NODE 1 NOT DEFINED ERROR MESSAGE
hello, i tried running a simulation of simple multihop wireless scenario consisting of 3 mobilenodes here. However the node movements for this example defines random node movements for the 3 mobilenodes within a topology of 670mX670m. i get the error: cant read file .../mobility/scene/cbr-3-test...no such directory while executing. but the tcl file is in my cygwin home administrator folder below is the script...please can someone assist...Thanks alot # Copyright (c) 1999 Regents of the University of Southern California. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. All advertising materials mentioning features or use of this software # must display the following acknowledgement: # This product includes software developed by the Computer Systems # Engineering Group at Lawrence Berkeley Laboratory. # 4. Neither the name of the University nor of the Laboratory may be used # to endorse or promote products derived from this software without # specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # wireless1.tcl # A simple example for wireless simulation # == # Define options # == set val(chan) Channel/WirelessChannel set val(prop) Propagation/TwoRayGround set val(netif) Phy/WirelessPhy set val(mac) Mac/802_11 set val(ifq) Queue/DropTail/PriQueue set val(ll) LL set val(ant) Antenna/OmniAntenna set val(x) 670 ;# X dimension of the topography set val(y) 670 ;# Y dimension of the topography set val(ifqlen) 50 ;# max packet in ifq set val(seed) 0.0 set val(adhocRouting) DSR set val(nn) 3 ;# how many nodes are simulated set val(cp) ../mobility/scene/cbr-3-test set val(sc) ../mobility/scene/scen-3-test set val(stop) 400.0 ;# simulation time set ns_ [new Simulator] set tracefd [open simple.tr w] $ns_ trace-all $tracefd set nf [open simple.nam w] $ns_ namtrace-all-wireless $nf $val(x) $val(y) set topo [new Topography] $topo load_flatgrid $val(x) $val(y) set god_ [create-god $val(nn)] create-god $val(nn) #global node setting $ns_ node-config -adhocRouting $val(adhocRouting) \ -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 OFF \ -macTrace OFF # # Create the specified number of nodes [$val(nn)] and attach them # to the channel. for {set i 0} {$i $val(nn) } {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0 ;# disable random motion } # # Define node movement model # puts Loading connection pattern... source $val(cp) # # Define traffic model # puts Loading scenario file... source $val(sc) # Define node initial position in nam for {set i 0} {$i $val(nn)} {incr i} { # 20 defines the node size in nam, must adjust it according to your scenario # The function must be called after mobility model is defined $ns_ initial_node_pos $node_($i) 20 } # # Tell nodes when the simulation ends # for {set i 0} {$i $val(nn) } {incr i} { $ns_ at $val(stop).0 $node_($i) reset; } $ns_ at $val(stop).0002 puts \NS EXITING...\ ; $ns_ halt puts $tracefd M 0.0 nn $val(nn) x $val(x) y $val(y) rp $val(adhocRouting) puts $tracefd M 0.0 sc $val(sc) cp $val(cp)
[ns] Cant read file .../mobility/scene/cbr-3-test...no such directory while executing.
hello, i tried running a simulation of simple multihop wireless scenario consisting of 3 mobilenodes here. However the node movements for this example defines random node movements for the 3 mobilenodes within a topology of 670mX670m. i get the error: cant read file .../mobility/scene/cbr-3-test...no such directory while executing. but the tcl file is in my cygwin home administrator folder below is the script...please can someone assist...Thanks alot # Copyright (c) 1999 Regents of the University of Southern California. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. All advertising materials mentioning features or use of this software # must display the following acknowledgement: # This product includes software developed by the Computer Systems # Engineering Group at Lawrence Berkeley Laboratory. # 4. Neither the name of the University nor of the Laboratory may be used # to endorse or promote products derived from this software without # specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # wireless1.tcl # A simple example for wireless simulation # == # Define options # == set val(chan) Channel/WirelessChannel set val(prop) Propagation/TwoRayGround set val(netif) Phy/WirelessPhy set val(mac) Mac/802_11 set val(ifq) Queue/DropTail/PriQueue set val(ll) LL set val(ant) Antenna/OmniAntenna set val(x) 670 ;# X dimension of the topography set val(y) 670 ;# Y dimension of the topography set val(ifqlen) 50 ;# max packet in ifq set val(seed) 0.0 set val(adhocRouting) DSR set val(nn) 3 ;# how many nodes are simulated set val(cp) ../mobility/scene/cbr-3-test set val(sc) ../mobility/scene/scen-3-test set val(stop) 400.0 ;# simulation time set ns_ [new Simulator] set tracefd [open simple.tr w] $ns_ trace-all $tracefd set nf [open simple.nam w] $ns_ namtrace-all-wireless $nf $val(x) $val(y) set topo [new Topography] $topo load_flatgrid $val(x) $val(y) set god_ [create-god $val(nn)] create-god $val(nn) #global node setting $ns_ node-config -adhocRouting $val(adhocRouting) \ -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 OFF \ -macTrace OFF # # Create the specified number of nodes [$val(nn)] and attach them # to the channel. for {set i 0} {$i $val(nn) } {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0 ;# disable random motion } # # Define node movement model # puts Loading connection pattern... source $val(cp) # # Define traffic model # puts Loading scenario file... source $val(sc) # Define node initial position in nam for {set i 0} {$i $val(nn)} {incr i} { # 20 defines the node size in nam, must adjust it according to your scenario # The function must be called after mobility model is defined $ns_ initial_node_pos $node_($i) 20 } # # Tell nodes when the simulation ends # for {set i 0} {$i $val(nn) } {incr i} { $ns_ at $val(stop).0 $node_($i) reset; } $ns_ at $val(stop).0002 puts \NS EXITING...\ ; $ns_ halt puts $tracefd M 0.0 nn $val(nn) x $val(x) y $val(y) rp $val(adhocRouting) puts $tracefd M 0.0 sc $val(sc) cp $val(cp)
[ns] NODE 1 NOT DEFINED ERROR MESSAGE
I tried simulating a simple wireless scenario of two mobile nodes moving towards each other and after a while moves away . the simulation builds and runs well,but i cant see the two nodes in the NAM animation though the TR file shows the simulation generated correct results..below is the scripts.please help # = # Define options # = set val(chan) Channel/WirelessChannel ;# channel type set val(prop) Propagation/TwoRayGround ;# radio-propagation model set val(ant) Antenna/OmniAntenna ;# Antenna type set val(ll) LL ;# Link layer type set val(ifq) Queue/DropTail/PriQueue ;# Interface queue type set val(ifqlen) 50 ;# max packet in ifq set val(netif) Phy/WirelessPhy ;# network interface type set val(mac) Mac/802_11 ;# MAC type set val(rp) DSDV ;# ad-hoc routing protocol set val(x) 500 ;# x-axis of grid set val(y) 500 ;# y-axis of grid set val(nn) 2 ;# number of mobilenodes set ns_ [new Simulator] set tracefd [open simple.tr w] $ns_ trace-all $tracefd set nf [open simple.nam w] $ns_ namtrace-all-wireless $nf $val(x) $val(y) set topo [new Topography] $topo load_flatgrid $val(x) $val(y) create-god $val(nn) #(parameter examples) # $ns_ node-config -addressingType flat or hierarchical or expanded # -adhocRouting DSDV or DSR or TORA # -llType LL # -macType Mac/802_11 # -propType Propagation/TwoRayGround # -ifqType Queue/DropTail/PriQueue # -ifqLen 50 # -phyType Phy/WirelessPhy # -antType Antenna/OmniAntenna # -channelType Channel/WirelessChannel # -topoInstance $topo # -energyModel EnergyModel # -initialEnergy (in Joules) # -rxPower (in W) # -txPower (in W) # -agentTrace ON or OFF # -routerTrace ON or OFF # -macTrace ON or OFF # -movementTrace ON or OFF # Configure 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) \ -topoInstance $topo \ -channelType $val(chan) \ -agentTrace ON \ -routerTrace ON \ -macTrace OFF \ -movementTrace OFF for {set i 0} {$i $val(nn) } {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0 ;# disable random motion } # # Provide initial (X,Y, for now Z=0) co-ordinates for node_(0) and node_(1) # $node_(0) set X_ 5.0 $node_(0) set Y_ 2.0 $node_(0) set Z_ 0.0 $node_(1) set X_ 390.0 $node_(1) set Y_ 385.0 $node_(1) set Z_ 0.0 # # Node_(1) starts to move towards node_(0) # $ns_ at 50.0 $node_(1) setdest 25.0 20.0 15.0 $ns_ at 10.0 $node_(0) setdest 20.0 18.0 1.0 # Node_(1) then starts to move away from node_(0) $ns_ at 100.0 $node_(1) setdest 490.0 480.0 15.0 # TCP connections between node_(0) and node_(1) set tcp [new Agent/TCP] $tcp set class_ 2 set sink [new Agent/TCPSink] $ns_ attach-agent $node_(0) $tcp $ns_ attach-agent $node_(1) $sink $ns_ connect $tcp $sink set ftp [new Application/FTP] $ftp attach-agent $tcp $ns_ at 10.0 $ftp start # # Tell nodes when the simulation ends # for {set i 0} {$i $val(nn) } {incr i} { $ns_ at 150.0 $node_($i) reset; } $ns_ at 150.0001 stop $ns_ at 150.0002 puts \NS EXITING...\ ; $ns_ halt proc stop {} { global ns_ tracefd close $tracefd } puts Starting Simulation... $ns_ run