[ns] Mobile ip- Handovers- Sctp--HELP!!
Spyros Marinis
spyros_mar at yahoo.gr
Mon Mar 2 12:35:25 PST 2009
Hi!
I have a problem in making handovers in my script when I use
sctp at transport layer. I use the topology and the method just like in
the standard wireless3.tcl.
However, when I run my script, only
the first init and init-ack messages are transmitted and received more
than once but nothing more and of course no data packets are
exchanged...
Can anyone please help me?? How else can I do it??
In
order to use hierarchical addresses with sctp I have found that I must
use the -wiredRouting ON option even for mobile nodes, and I wonder if
that's why it doesn't work.
Any help will be appreciated!! Any ideas what may be wrong??? I am in a great hurry....
Thanks in advance,
My full tcl script:
set ns_ [new Simulator]
set opt(chan)
Channel/WirelessChannel
set opt(prop) Propagation/TwoRayGround
set opt(netif) Phy/WirelessPhy
set opt(mac) Mac/802_11
set opt(ifq) Queue/DropTail/PriQueue
set opt(ll) LL
set opt(ant) Antenna/OmniAntenna
set opt(x) 1000 ;# X dimension of the topography
set opt(y) 1000 ;# Y dimension of the topography
set opt(ifqlen) 50 ;# max packet in ifq
#set
val(seed) 0.0
set opt(rp) DSDV ; # routing protocol
set opt(nn) 1 ;# how many nodes are simulated
set num_wired_nodes 2
set num_bs_nodes 2
set topo [new Topography]
$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_ $eilastlevel ;# of each domain
# create trace object for ns and nam
set tracefd [open apop.tr w]
set namtrace [open apop.nam w]
$ns_ trace-all $tracefd
$ns_ namtrace-all-wireless $namtrace $opt(x) $opt(y)
# define topology
$topo load_flatgrid $opt(x) $opt(y)
#create wired nodes
set Server [$ns_ node 0.0.0]
$Server set X_ 500.0
$Server set Y_ 850.0
$Server set Z_ 0.0
set W_node [$ns_ node 0.1.0]
$W_node set X_ 500.0
$W_node set Y_ 710.0
$W_node set Z_ 0.0
set god_ [create-god $opt(nn)+2]
# Create channel #1 and #2
set chan_1 [new $opt(chan)] ;#umts
Mac/802_11 set dataRate_ 2.0Mb ;# UMTS data rate
Phy/WirelessPhy
set Pt_ 4.5099 ;# UMTS coverage: r=500m
Phy/WirelessPhy set freq_ 2.175e9 ;# UMTS radio frequency
$chan_1 set delay 10ms
Phy/WirelessPhy set bandwidth_ 384k
$ns_ node-config -mobileIP ON \
-adhocRouting $opt(rp) \
-llType $opt(ll) \
-macType $opt(mac) \
-ifqType $opt(ifq) \
-ifqLen $opt(ifqlen) \
-antType $opt(ant)
\
-propType $opt(prop) \
-phyType $opt(netif) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace OFF \
-macTrace ON \
-wiredRouting ON \
-channel $chan_1
# Create BSs
set BS_umts [$ns_ node 1.0.0]
$BS_umts random-motion 0
$BS_umts set X_ 150.0
$BS_umts set Y_
610.0
$BS_umts set Z_ 0.000000000000
set MN [$ns_ node 1.0.1]
$MN random-motion 0
$MN set X_ 160.0
$MN set Y_ 530.0
$MN set Z_ 0.0
set HAaddress [AddrParams addr2id [$BS_umts node-addr]]
[$MN set regagent_] set home_agent_ $HAaddress
set BS_umts2 [$ns_ node 2.0.0]
$BS_umts2 random-motion 0
$BS_umts2 set X_ 850.0
$BS_umts2 set Y_ 610.0
$BS_umts2 set Z_ 0.000000000000
$ns_ at 1.0 "$MN setdest 950.0 530.0 15.0"
$ns_ duplex-link $Server $W_node 50Mb 0.2ms DropTail
$ns_ duplex-link-op $Server $W_node orient
down
$ns_ duplex-link $W_node $BS_umts 50Mb 0.2ms DropTail
$ns_ duplex-link-op $W_node $BS_umts orient down-left
$ns_ duplex-link $W_node $BS_umts2 50Mb 0.2ms DropTail
$ns_ duplex-link-op $W_node $BS_umts2 orient down-right
set sctp0 [new Agent/SCTP]
$ns_ attach-agent $Server $sctp0
$sctp0 set fid_ 0
$sctp0 set debugMask_ -1
$sctp0 set debugFileIndex_ 0
$sctp0 set mtu_ 1500
$sctp0 set dataChunkSize_ 1468
$sctp0 set numOutStreams_ 1
$sctp0 set oneHeartbeatTimer_ 1 # one heartbeat timer shared for all dests
$sctp0 set heartbeatInterval_ 1 #kathe 1 sec ena heartbeat
set trace_ch [open trace.sctp w]
$sctp0 set trace_all_ 1 # trace them all on oneline
$sctp0 trace cwnd_
$sctp0 trace rto_
$sctp0 trace errorCount_
$sctp0 attach $trace_ch
set sctp1 [new Agent/SCTP]
$ns_ attach-agent $MN $sctp1
$sctp1 set debugMask_
-1
$sctp1 set debugFileIndex_ 1
$sctp1 set mtu_ 1500
$sctp1 set initialRwnd_ 131072
$sctp1 set useDelayedSacks_ 1
$sctp1 set oneHeartbeatTimer_ 1
$sctp1 set heartbeatInterval_ 1 #kathe 1 sec ena heartbeat
$ns_ color 0 Red
$ns_ color 1 Blue
$ns_ connect $sctp0 $sctp1
set ftp0 [new Application/FTP]
$ftp0 attach-agent $sctp0
$ns_ at 0.5 "$ftp0 start"
$ns_ at 50 "stop";
$ns_ at 50 "puts \"NS EXITING...\" ; $ns_ halt"
proc stop {} {
global ns_ tracefd
$ns_ flush-trace
close $tracefd
exec nam apop.nam &
exit 0
}
$ns_ run
___________________________________________________________
Χρησιμοποιείτε Yahoo!;
Βαρεθήκατε τα ενοχλητικά μηνύματα (spam); Το Yahoo! Mail
διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών
μηνυμάτων http://login.yahoo.com/config/mail?.intl=gr
More information about the Ns-users
mailing list