Re: [ns] UMTS on NS-2

2009-08-17 Thread Mats Folke

Hi!

Did you remember to recompile ns-2, as the instructions imply? 

Best wishes,
-- 
Mats Folke, M.Sc., Lic.Eng.
Research Engineer

Ericsson AB Office: +46 10 7171385
Ericsson Research   Fax: +46 920 99621
P.O. Box 920Mobile: +46 76 1271385
SE-971 28 LuleƄ
Sweden 
-Original Message-
From: dka...@gmail.com [mailto:dka...@gmail.com] 
Sent: den 15 augusti 2009 22:48
To: Mats Folke
Subject: Re: UMTS on NS-2

I recently installed ns-2.30 and added the required eurane patch to run UMTS on 
it, however when i try to run the test_tcp.tcl file or any other file i get the 
following error:
any suggestions as to why this is happening?

d...@dk-laptop:~$ ns test1.tcl

(_o3 cmd line 1)
invoked from within
_o3 cmd create-Umtsnode
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 _o3 line 2)
(SplitObject unknown line 2)
invoked from within
$ns create-Umtsnode
invoked from within
set rnc [$ns create-Umtsnode]
(file test1.tcl line 28)
d...@dk-laptop:~$ 


Mats Folke-2 wrote:
 
 
 Hi!
 
 First of all, please post your questions to the mailing list. It adds
 value to the list.
 
 Yes, you can have multiple versions of ns running in parallel, but you
 need to be very careful how you set up your paths. Please search the web
 for setting up paths in the shell. That will search your other problems
 you wrote about.
 
 Best regards,
 Mats
 
 Syed Faraz Hasan wrote:
 Dear Mats,
 
 Please advise me, can I have both NS-2.33 and NS-2.30 at the same
 time? Will they both ok if they coexist or do I need to get rid of
 one for th other?  
 
 Thanks a lot in anticipation
 
 Faraz
 
 
 From: ns-users-boun...@isi.edu [ns-users-boun...@isi.edu] On Behalf
 Of Mats Folke [mats.fo...@ericsson.com] 
 Sent: Tuesday, March 24, 2009 12:47 AM
 To: ns-users@isi.edu
 Subject: Re: [ns] UMTS on NS-2
 
 Hi!
 
 Syed Faraz Hasan wrote:
 Hello!
 
 Reference to my previous email about UMTS implementation on NS-2. Can
 some one tell me if I need a separate patch for UMTS while working on
 NS-2.33? If so, where can I download it from? I have seen
 http://eurane.ti-wmc.nl/eurane/, patch available there is in diff.gz
 format. I am a newbie to open suse linux, I think I should be after
 something .tar.gz?
 
 There is currently no patch for ns-2.33 and since Eurane is not
 supported anymore, there probably never will be. You have two
 options. 1) Download ns-2.30 and patch with existing eurane patch. If
 you need something introduced in later versions of ns-2, you cannot
 use it. 2) Patch an existing ns-2.33 with the eurane patch for
 ns-2.30. This could result in difficulties which you must manually
 resolve.
 
 The patching procedure is documented in the manual, section 2.3.
 
 A patch is distributed in something called a diff-file, hence the
 file extension .diff. Gzip then adds the extension .gz. Before
 pathing the .diff.gz file needs to be uncompressed using gunzip. The
 result will be the diff-file.   
 
 Anyway, when I download and open eurane1.12.diff.gz, it gives an
 error associated help application does not exist! This patch is
 available for NS-2.30, I am using 2.33.
 
 What gives an error? A patch file should not be opened, see the
 eurane manual for correct usage, or the patch man page, or google for
 unix command patch or similar.  
 
 Also, what is CLEAN NS-2.3
 
 A clean version is a version not messed up by changes, builds etc. A
 fresh downloaded version is a clean version. 
 
 I downloaded test_tcp.tcl (UMTS implementation on NS-2 test run),
 without installing any patch on my existing NS-2.33. When I execute
 it, it says 
 
 (_o3 cmd line 1)
 invoked from within
 _o3 cmd create-Umtsnode
 .
 .
 .
 $ns create-Umtsnode
 invoked from within
 set rnc [$ns create-Umtsnode]
 file umtstcp.tcl line 42
 
 This is because ns-2 (without the patch) does not understand the
 instructions in those tcl files. You need the patch to be able to run
 the tcl files.  
 
 Regards,
 
 
 
 -- 
 Mats Folke, M.Sc., Lic.Eng.
 Research Engineer
 
 Ericsson AB Office: +46 10 7171385
 Ericsson Research   Fax: +46 920 99621
 P.O. Box 920Mobile: +46 76 1271385
 SE-971 28 LuleƄ
 Sweden
 
 
 
Quoted from:  http://www.nabble.com/UMTS-on-NS-2-tp22659223p22703758.html




Re: [ns] awk script for calculating end to end delay in a wired-wireless scenario

2009-08-17 Thread David McMullin

hi,

Because of inconsistencies in the trace format, sometimes the node id
is given in a hierarchical way (eg, 0.0.1) and other times in a
decimal way (hierarchical addresses normally allocate bits as
10.11.11, so 1.0.1 becomes 4194305). It's generally simplest to have a
look through your trace file and figure out which id is being given to
which node under which circumstances. (eg., sending from a wired node
to a wired node seems to result in hierarchical addresses, but
receiving at a wireless node seems to result in the confusing decimal
format). Here's what I use for calculating loss, it should get you
started and make calculating throughput and delay easier.

#
#Hierarchical routing is used with bits allocated as 10.11.11,  #
#addresses must be converted#
#0.0.0 = 0  (our server node)   #
#1.0.0 = 4194304(our Access point node) #
#1.0.1 = 4194305(our destination node)  #
#

BEGIN{totaltime=input;}

/^+/  /0.0.0.0/  /1.0.1.0/  /Multimedia/{

   wtimefield=2
   wpacketidfield=12

   loss[int($wtimefield)]++;
   packet[$wpacketidfield]=1;

}


/^r/  / -Is 0.0/  / -Id 4194305.0/  /AGT/  /Multimedia/ {

   if(timefield==0 ||packetidfield==0) {
   for(i=1; i=NF; i++) {
   if($i==-t)
   timefield=i+1;
   if($i==-Ii)
   packetidfield=i+1;
   }
   }

   loss[int($timefield)]--;
   packet[$packetidfield] = 0;
}

END{
   for(i=0;itotaltime;i++)
   print i loss[i]*1000*8;
}

Good Luck,

David McMullin
Dublin City University.

2009/8/15 Oladapo Oluwadiya ooluwad...@yahoo.com:

 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] linking tcl with c++

2009-08-17 Thread kundavi

hi friends..

i have a cpp file of RTRAgent of odmrp protocol.

when i implement it ,an error occurs as invalid command name,

how should i link c++ with tcl

wit regards
sangeetha.k


Re: [ns] Segmentation fault with wireless simulation

2009-08-17 Thread Hakim192009


in your script you have to change ifq value Queue/DropTail/PriQueue by
CMUPriQueue 
#Define wirleess scenario parameters
 
set val(chan) Channel/WirelessChannel;
set val(prop) Propagation/TwoRayGround1;
set val(netif) Phy/WirelessPhy;
set val(mac) Mac/802_11;
set val(ifq) CMUPriQueue ;
set val(ll) LL;
set val(ant) Antenna/OmniAntenna;
set val(ifqlen) 50;
set val(nn) 5;
set val(rp) DSR;
set val(x) 500;
set val(y) 400;
set val(stop) 150;
set ns [new Simulator]
set tracefd [open problem1Trace.tr w]
set windowVsTime2 [open problem1Win.tr w]
set namfd [open problem1Namtrace.nam w]
$ns trace-all $tracefd
$ns namtrace-all-wireless $namfd $val(x) $val(y)
set topo [new Topography]
$topo load_flatgrid $val(x) $val(y)
create-god $val(nn)
$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) \
-channelType $val(chan) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON\
-macTrace OFF \
-movementTrace ON
for {set i 0} {$i  $val(nn) } {incr i} {
set node_($i) [$ns node]
}
$node_(0) set X_ 5.0
$node_(0) set Y_ 5.0
$node_(0) set Z_ 0.0
$node_(1) set X_ 490.0
$node_(1) set Y_ 285.0
$node_(1) set Z_ 0.0
$node_(2) set X_ 150.0
$node_(2) set Y_ 240.0
$node_(2) set Z_ 0.0
$node_(3) set X_ 495.0
$node_(3) set Y_ 100
$node_(3) set Z_ 0.0
$node_(4) set X_ 495
$node_(4) set Y_ 395
$node_(4) set Z_ 0.0
 
$ns at 10.0 $node_(0) setdest 250.0 250.0 3.0
$ns at 15.0 $node_(1) setdest 45.0 285.0 5.0
$ns at 20.0 $node_(2) setdest 480.0 300.0 5.0
$ns at 25.0 $node_(3) setdest 50.0 150.0 5.0
$ns at 15.0 $node_(4) setdest 50.0 50.0 3.0
#set TCP Connection between node_(0) and node_(1)
set tcp0 [new Agent/TCP/Newreno]
$tcp0 set class_ 2
set sink0 [new Agent/TCPSink]
$ns attach-agent $node_(0) $tcp0
$ns attach-agent $node_(1) $sink0
$ns connect $tcp0 $sink0
set ftp [new Application/FTP]
$ftp attach-agent $tcp0
$ns at 10.0 $ftp start
#set TCP Connection between node_(0) and node_(4)
set tcp1 [new Agent/TCP/Newreno]
$tcp1 set class_ 2
set sink1 [new Agent/TCPSink]
$ns attach-agent $node_(0) $tcp1
$ns attach-agent $node_(4) $sink1
$ns connect $tcp1 $sink1
set ftp1 [new Application/FTP]
$ftp1 attach-agent $tcp1
$ns at 12.0 $ftp1 start
#set TCP Connection between node_(3) and node_(2)
set tcp2 [new Agent/TCP/Newreno]
$tcp2 set class_ 2
set sink2 [new Agent/TCPSink]
$ns attach-agent $node_(3) $tcp2
$ns attach-agent $node_(2) $sink2
$ns connect $tcp2 $sink2
set ftp2 [new Application/FTP]
$ftp2 attach-agent $tcp2
$ns at 15.0 $ftp2 start
proc plotWindow {tcpSource file} {
global ns
set time 0.01
set now [$ns now]
set cwnd [$tcpSource set cwnd_]
puts $file $now $cwnd
$ns at [expr $now+$time] plotWindow $tcpSource $file }
$ns at 10.1 plotWindow $tcp0 $windowVsTime2
#define node position in NAM
for {set i 0} {$i  $val(nn)} {incr i} {
$ns initial_node_pos $node_($i) 30
}
for {set i 0} {$i  $val(nn) } {incr i} {
$ns at $val(stop) $node_($i) reset;
}
$ns at $val(stop) $ns nam-end-wireless $val(stop)
$ns at $val(stop) stop
$ns at 150.01 puts \end simulation\ ; $ns halt
proc stop {} {
global ns tracefd namfd
$ns flush-trace
close $tracefd
close $namfd
}
$ns run
  #Good Luck

-- 
View this message in context: 
http://www.nabble.com/Segmentation-fault-with-wireless-simulation-tp14679409p25017741.html
Sent from the ns-users mailing list archive at Nabble.com.