hi,

I am new to NS 2.  I am facing this small problem...please can anyone help in 
this regard....

I simulating wireless scenario.  I have one mobile node and one 
static(non-mobile) node.   

I set a specified route for mobile node.  while it travels, it may enter and 
exit the communication range of static node.  I established the tcp connection 
between them as follows,

set tcp1 [new Agent/TCP]
$tcp1 set interval_ 0.0003
$tcp1 set class_ 2
$ns attach-agent $node_(0) $tcp1

set sink1 [new Agent/TCPSink]
$ns attach-agent $node_(1) $sink1
$ns connect $tcp1 $sink1

set ftp1 [new Application/FTP]
$ftp1 attach-agent $tcp1
$ns at 1.3 "$ftp1 start"
$ns at 7.0 "$ftp1 stop"  ; ## This is optional
$ns at 32.11 "$ftp1 start"

In the above node_(0) is mobile node......node_(1) is static node.....

At 1.3 "$ftp1 start" is working....the mobile node enters the communication 
range of static node........I can able to view the packet flow(animation) 
between the nodes.

At 7.0 "$ftp1 stop"...I mentioned "this line is optional", since at this point 
the mobile node exit the communication range of static node.  Even I delete 
this line...I can able to see the packet drop at this point.....and the 
communication(packet-flow) is stopped.

After some time, Again, I am making the mobile node to revisit the static 
node...that is....Again I am making the mobile node to enter into the 
communication range of static node...so I mentioned "$ns at 32.11 "$ftp1 
start"".......but this time there is no communication is taking place....and I 
cannot able to view the packet-flow as animation.....moreover....the mobile 
node simply crosses the static node......

I want to know whether my code is correct or not....Am I correct?.....Once the 
ftp is stopped...is it possible to start again????.....

Can any say....during runtime "how to close the tcp connection and start new 
one (or) Is it possible to establish more than one tcp connection in a single 
node???

I have one mobile node....I want this node to communicate to two other nodes at 
the same time.....is it possible??? 

Assume that...
node0 (mobile node)
node1 (static node)
node2 (static node)

I want node0 to establish tcp connection to node1 and node2 at the same 
time...?....more importantly.....if node0 established tcp connection with node1 
at time t1 and stopped at time t2....and I want to establish connection again 
at time t3 with the same tcp connection...

I am sorry...I cant to able to type msg as much as short....

please help in this regard....

regards
Sarwan


 
       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Reply via email to