hi
I'm currently working on my final project in which i should create a node moving from one base station to another. I have a problem in creating the handover between two base station. My topology is as follows: --------- | Wired | | Node | | w(0) | --------- | | --------- | Wired | | Node | w(1) --------- | | _________|_________ | | ------- ------- | BS0 | | BS1 | ------- ------- ------------- |MobileNode0| ------------- my tcl script is the following: #802.11p default parameters Phy/WirelessPhyExt set CSThresh_ 3.162e-12 ;#-85 dBm Wireless interface sensitivity (sensitivity defined in the standard) Phy/WirelessPhyExt set Pt_ 0.001 Phy/WirelessPhyExt set freq_ 5.9e+9 Phy/WirelessPhyExt set noise_floor_ 1.26e-13 ;#-99 dBm for 10MHz bandwidth Phy/WirelessPhyExt set L_ 1.0 ;#default radio circuit gain/loss Phy/WirelessPhyExt set PowerMonitorThresh_ 6.310e-14 ;#-102dBm power monitor sensitivity Phy/WirelessPhyExt set HeaderDuration_ 0.000040 ;#40 us Phy/WirelessPhyExt set BasicModulationScheme_ 0 Phy/WirelessPhyExt set PreambleCaptureSwitch_ 1 Phy/WirelessPhyExt set DataCaptureSwitch_ 0 Phy/WirelessPhyExt set SINR_PreambleCapture_ 2.5118; ;# 4 dB Phy/WirelessPhyExt set SINR_DataCapture_ 100.0; ;# 10 dB Phy/WirelessPhyExt set trace_dist_ 1e6 ;# PHY trace until distance of 1 Mio. km ("infinty") Phy/WirelessPhyExt set PHY_DBG_ 0 Mac/802_11Ext set CWMin_ 15 Mac/802_11Ext set CWMax_ 1023 Mac/802_11Ext set SlotTime_ 0.000013 Mac/802_11Ext set SIFS_ 0.000032 Mac/802_11Ext set ShortRetryLimit_ 7 Mac/802_11Ext set LongRetryLimit_ 4 Mac/802_11Ext set HeaderDuration_ 0.000040 Mac/802_11Ext set SymbolDuration_ 0.000008 Mac/802_11Ext set BasicModulationScheme_ 0 Mac/802_11Ext set use_802_11a_flag_ true Mac/802_11Ext set RTSThreshold_ 2346 Mac/802_11Ext set MAC_DBG 0 #===================================================================== #configure RF model parameters Antenna/OmniAntenna set Gt_ 1.0 Antenna/OmniAntenna set Gr_ 1.0 Propagation/Nakagami set use_nakagami_dist_ false Propagation/Nakagami set gamma0_ 2.0 Propagation/Nakagami set gamma1_ 2.0 Propagation/Nakagami set gamma2_ 2.0 Propagation/Nakagami set d0_gamma_ 200 Propagation/Nakagami set d1_gamma_ 500 Propagation/Nakagami set m0_ 1.0 Propagation/Nakagami set m1_ 1.0 Propagation/Nakagami set m2_ 1.0 Propagation/Nakagami set d0_m_ 80 Propagation/Nakagami set d1_m_ 200 #======================================================================= set val(chan) Channel/WirelessChannel set val(prop) Propagation/TwoRayGround set val(netif) Phy/WirelessPhyExt set val(mac) Mac/802_11Ext set val(ifq) Queue/DropTail/PriQueue set val(ll) LL set val(ant) Antenna/OmniAntenna set val(x) 700 ;# X dimension of the topography set val(y) 600 ;# Y dimension of the topography set val(ifqlen) 50 ;# max packet in ifq set val(nn) 1 ;# how many Mobile nodes are simulated set val(rp) DSDV set val(stop) 250 ;# simulation time set num_wired_nodes 2 set num_bs_nodes 2 # ===================================================================== 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 for each domain AddrParams set nodes_num_ $eilastlevel set tracefd [open trace.tr w] set namtrace [open out.nam w] $ns trace-all $tracefd $ns namtrace-all-wireless $namtrace $val(x) $val(y) $ns namtrace-all $namtrace # set up topography object set topo [new Topography] $topo load_flatgrid $val(x) $val(y) #God (General Operations Director) is the object that is used to store global information about the state of the environment, network or nodes create-god [expr $val(nn) + $num_bs_nodes] # Create channel set chan_ [new $val(chan)] # create wired nodes set temp {0.0.0 0.1.0} # for {set i 0} {$i < $num_wired_nodes} {incr i} { # set W($i) [$ns node [lindex $temp $i]] # } set W(0) [$ns node 0.0.0] set W(1) [$ns node 0.1.0] # configure for base-station node # nodes configuration $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) \ -channel $chan_ \ -topoInstance $topo \ -wiredRouting ON \ -agentTrace OFF \ -routerTrace OFF \ -macTrace ON # -movementTrace OFF \ # -phyTrace OFF #create base-station node set BS(0) [$ns node 1.0.0] $BS(0) random-motion 0 ;# disable random motion set BS(1) [$ns node 2.0.0] $BS(1) random-motion 0 ;# disable random motion # Provide initial location of mobile nodes $BS(0) set X_ 200.0 $BS(0) set Y_ 400.0 $BS(0) set Z_ 0.0 $BS(1) set X_ 400.0 $BS(1) set Y_ 400.0 $BS(1) set Z_ 0.0 #configure for mobilenodes $ns node-config -wiredRouting OFF # now create mobilenodes set node(0) [ $ns node 1.0.1 ] $node(0) base-station [AddrParams addr2id \ [$BS(0) node-addr]] ;# provide each mobilenode with hier address of its base-station $node(0) set X_ 40.0 $node(0) set Y_ 330.0 $node(0) set Z_ 0.0 # create links between wired and BaseStation nodes $ns duplex-link $W(0) $W(1) 5Mb 200ms DropTail $ns duplex-link $W(1) $BS(0) 5Mb 200ms DropTail $ns duplex-link $W(1) $BS(1) 5Mb 200ms DropTail $ns duplex-link-op $W(0) $W(1) orient down $ns duplex-link-op $W(1) $BS(0) orient left-down $ns duplex-link-op $W(1) $BS(1) orient right-down # setup TCP connections between a wired node and the Mobilenode set tcp1 [new Agent/TCP] $tcp1 set class_ 2 set sink1 [new Agent/TCPSink] $ns attach-agent $W(0) $tcp1 $ns attach-agent $node(0) $sink1 $ns connect $tcp1 $sink1 set ftp1 [new Application/FTP] $ftp1 attach-agent $tcp1 $ns at 6.0 "$ftp1 start" # Generation of movements $ns at 10 "$node(0) setdest 500.0 330.0 20.0" # Define node initial position in nam $ns initial_node_pos $node(0) 20 # Telling nodes when the simulation ends $ns at $val(stop).0000010 "$BS(0) reset"; $ns at $val(stop).0000010 "$BS(1) reset"; $ns at $val(stop).0000010 "$node(0) reset"; # ending nam and the simulation #$ns at $val(stop).0010 "$ns nam-end-wireless $val(stop)" $ns at $val(stop).1 "puts \"end simulation\" ; $ns halt" proc finish {} { global ns tracefd namtrace $ns flush-trace close $tracefd close $namtrace exec nam out.nam & } $ns at 150 "finish" $ns run my problem is while the mobile node is moving out of the range of BS0, it can not connect to BS1. hoping that you have any idea about my problem. thank you very much best regards, Chadi Jabroun