Re: [ns] new class
Hi If you would like to add a new module into NS2, please read http://www.ns2ultimate.com/post/454001969/including-new-modules-into-ns-2 I hope this will help. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear On 12/3/2010, Ali Al-Shra'ah. alihussein2...@yahoo.com wrote: hi , I have a new class and put it in the /ns-2.29/tora folder and on the terminal I have implemented the following commands: cd ns-allinone-2.29 cd ns-2.29 make clean make make install but there is no object files for this class have appeared please, if any one knows why reply me soon. regards
Re: [ns] what does it means ???
Hi, The no-slot error occurs since you did not configure the classifier properly. In particular, you ask NS2 to send a packet to a non-existing object. For more information, please read the following post: http://www.ns2ultimate.com/post/520626807/classifier-no-slot-error Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 12/12/2010, El hadi Cherkaoui e_cherka...@yahoo.fr wrote: Dear all , Please ca n someone explain me this error in NS2 -- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o270: no target for slot 3 _o270 type: Classifier/Addr content dump: classifier _o270 0 offset 22 shift 1023 mask 1 slots slot 5: _o271 (Classifier/Addr) -- Finished standard no-slot{} default handler -- I can't find the object _o270 and _o271 so i can't understand where is the fault ??? I noted that I receive this error only when i have more then 2 mobile nodes. Best regards El hadi
Re: [ns] Classifying Packets
Hi Rob, You can use packet classifiers in NS2. Please go through the following slides for the details. http://www.ns2ultimate.com/post/513029699/classifiers-a-multi-target-packet-forwarder Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear On 9/16/2010, Rob robert.c.gr...@gmail.com wrote: Hello All, For part of my research I need to implement Packet Classification in NS2. I was wondering, where is the best place to insert classification? It seems to me this could be done in a Queue or Classifier. Any thoughts? Thanks. -- Robert C. Green II (412) 860-4825 http://www.parallelcoding.com
[ns] Has function Tcl::error(...) been changed to be a private function?
Hello all, I just found out that NS 2.35 has moved the following function Tcl::error(const char* s); as a private member function of class Tcl. This means we cannot exit from the simulation in a uniform way as indicated in the NS documentation. I would like to confirm my understanding, before publishing it online. Any comment would be appreciated. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat
Re: [ns] new block in simplelink structure?
Hi Pedro, Did you bind the C++ class to the OTcl class? Please read the following blog post to see how to bind C++ classes: http://www.ns2ultimate.com/post/689847378/c-and-otcl-linkage-binding-c-and-otcl-classes and http://www.ns2ultimate.com/post/720424694/c-and-otcl-linkage-binding-c-and-otcl-classes Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear On 8/24/2010, pedro chaparro pdr...@gmail.com wrote: *hi guys, i'm implementing a new block to insert into the SimpleLink strucutre , * between queue_ and link_. blocks, i create a new class call SKlink from class connector, it is simple i just wanna use the recv function to for now just print a message each time a packet is transmitted over the link. i achieve to compile everythink ok , but when i run my tcl script (at the end of this page) , i got and error i show below. i following the 14.1 section of Teerawat Issariyakul book, i suppose i'm missing something, i'll appreciate a lot any help. thabks * skmod.cc* #include skmod.h void SKHandler::handle(Event*){} SKlink::SKlink() : skh_(*this) { pkt_=0; qh_=0; }; void SKlink::recv(Packet* p, Handler* h) { printf(inside recv SK function \n); send(p,skh_); } *skmod.h* #include connector.h #include random.h #include timer-handler.h #include ranvar.h class SKlink; class SKHandler : public Handler { public: SKHandler(SKlink sk) : sk_link_(sk) {} void handle(Event*); private: SKlink sk_link_; }; class SKlink : public Connector { public: SKlink(); //int command(int argc, const char*const* argv); void recv(Packet* p, Handler* h); protected: SKHandler skh_; Packet* pkt_; Handler* qh_; }; * ns-link.tcl* SimpleLink instproc link-skt {} { $self instvar link_ queue_ drophead_ $self instvar SKlk_ set SKlk_ [new SKlink] queue_ target $SKlk_ $SKlk_ target $link_ $SKlk_ drop-target $drophead_ } *ns-lib.tcl* Simulator instproc link-skt {from to} { set link [$self link $from $to] $link link-skt } -- *Error i get* r...@hobbes:/home/pdro7/Desktop/nsCOSIM/ns-2.34# ./ns testTCP.tcl invalid command name SKlink while executing SKlink create _o38 invoked from within catch $className create $o $args msg invoked from within if [catch $className create $o $args msg] { if [string match __FAILED_SHADOW_OBJECT_ $msg] { delete $o return } global errorInfo error class $... (procedure new line 3) invoked from within new SKlink (procedure _o29 line 4) (SimpleLink link-skt line 4) invoked from within $link link-skt (procedure _o3 line 3) (Simulator link-skt line 3) invoked from within $ns link-skt $n0 $n1 (file testTCP.tcl line 41) Scrip Tlc # This script is created by NSG2 beta1 # http://wushoupong.googlepages.com/nsg #=== # Simulation parameters setup #=== set val(stop) 13.0 ;# time of simulation end #=== #Initialization #=== #Create a ns simulator set ns [new Simulator] #Open the NS trace file set tracefile [open out.tr w] $ns trace-all $tracefile #Open the NAM trace file set namfile [open out.nam w] $ns namtrace-all $namfile #=== #Nodes Definition #=== #Create 2 nodes set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] set n4 [$ns node] set n5 [$ns node] #=== #Links Definition #=== #Createlinks between nodes $ns simplex-link $n0 $n1 1000.0Mb 0.1ms DropTail $ns queue-limit $n0 $n1 50 *$ns link-skt $n0 $n1* $ns simplex-link $n2 $n0 1000.0Mb 0.1ms DropTail $ns queue-limit $n2 $n0 50 $ns simplex-link $n1 $n3 1000.0Mb 0.1ms DropTail $ns queue-limit $n1 $n3 50 $ns simplex-link $n4 $n0 1000.0Mb 0.1ms DropTail $ns queue-limit $n4 $n0 50 $ns simplex-link $n1 $n5 1000.0Mb 0.1ms DropTail $ns queue-limit $n1 $n5 50 #Give node position (for NAM) #$ns duplex-link-op $n0 $n1 orient right #=== #Agents Definition #=== #Setup a TCP connection set tcp0 [new Agent/UDP] $ns attach-agent $n2 $tcp0 set sink1 [new Agent/Null] $ns attach-agent $n3 $sink1 $ns connect $tcp0 $sink1 $tcp0 set packetSize_ 1500 set tcp1 [new Agent/UDP] $ns attach-agent $n4 $tcp1 set sink2 [new Agent/Null] $ns attach-agent $n5 $sink2 $ns connect $tcp1 $sink2 $tcp1 set packetSize_ 1500 #=== #Applications Definition #=== #Setup a CBR Application over TCP connection set cbr0 [new Application/Traffic/CBR] $cbr0 attach-agent $tcp0 $cbr0 set packetSize_ 1000 $cbr0 set rate_ 1.0Mb $cbr0 set
Re: [ns] Test cwnd size for TCP variants
Hi, Here is the code for recursively showing the value of the instvar cwnd_ of TCP for every 0.5s. $ns at 1.5 show_tcp_seqno proc show_tcp_seqno {} { global tcp ns puts TCP CWND is [$tcp set cwnd_] $ns at [expr [ $ns now ] + 0.5] show_tcp_seqno } Feel free to adjust it yourself. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 8/15/2010, Ghassan Akrem ghassanak...@yahoo.com wrote: Hi all, I try to test cwnd size for variant TCP,by using ns-2 simulation, in fact I want to test the performance of TCP throughputs of ordinary TCP and some other TCP's by monitoring cwnd size for each variant. I hope to get some script, TCL source code perform this test. Regards
Re: [ns] Error: no-slot{} default handler
Hi Sajad , The no-slot error occurs since you did not configure the classifier properly. In particular, you ask NS2 to send a packet to a non-existing object. For more information, please read the following post: http://www.ns2ultimate.com/post/520626807/classifier-no-slot-error Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 8/12/2010, sajad m sajadm1...@yahoo.com wrote: I'm trying to test my new routing by running a tcl script but it shows this error: channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 550.0 SORTING LISTS ...DONE! --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o26: no target for slot 0 _o26 type: Classifier/Port content dump: classifier _o26 0 offset 0 shift 2147483647 mask 1 slots slot 255: _o28 (CMUTrace/Recv) -- Finished standard no-slot{} default handler -- *** Can anyone help me? Regards Sajad m
Re: [ns] how to install ns 2.26
Hi Hi Mobi, I did some test on NS2 installation few months ago. Here is the result http://www.ns2ultimate.com/post/439346614/working-combination-ns-2-34-ubuntu-8-04-and-perhaps There is a problem with the current linux-like distribution. Here is the solution http://www.ns2ultimate.com/post/441093095/ns-2-35-works-on-cygwin I hope this will help. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear On 7/30/2010, mobi faizy faizyt...@gmail.com wrote: any boy has idea how to install Ns 2.26 on ubuntu or cygwin. I try but got error fromm gcc compiler. tell me how can i install gcc-3.2.2 on ubuntu 9.10 karmic. Regards.
Re: [ns] linkage Otcl/C++
Hi, If you would like to see how to invoke C++ function from the OTcl domain. Please visit the following website. http://www.ns2ultimate.com/post/801303612/c-and-otcl-linkage-otcl-commands-getting-started The second part of OTcl command will be up next week. Please stay tune! Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 7/8/2010, hend baklouti hend.baklo...@gmail.com wrote: hello, i'm a beginner in ns2 and i have a function void monitor(void) that i want to call it from the tcl script. Can any one help me ? thank you
Re: [ns] Fw: Re: Error 127
Hi I did some test on NS2 installation few months ago. Here is the result http://www.ns2ultimate.com/post/439346614/working-combination-ns-2-34-ubuntu-8-04-and-perhaps There is a problem with the current linux-like distribution. Here is the solution http://www.ns2ultimate.com/post/441093095/ns-2-35-works-on-cygwin I hope this will help. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear On 7/11/2010, ikenna ajere ajer...@yahoo.co.uk wrote: Hello Mike, Thanks for your response. I actually installed ns 2.34 on Ubuntu 9.10 using the ppa package by wouter. I did not use the ns allinone package. What happens is that I can run cbrgen and it generates a traffic file but running setdest always gives the error: bash: ./setdest: No such file or directory. That was the genesis of the problem. I have tried all the things I listed in the mail below but it still does not work.Actually confused and dont know what to do next as I have not even started the main thought process for my thesis which is due early next month. Pls I need ur advice. I paid soo muuch (through my nose) for this masters and failure is not an option. Thanks as I wait for your replies. Pls all ns users, help me out. I know there is a soln, I know some1 has encountered it b4, I know there's a soln. Pls can some1 render a positive help. I'm ready to call u if u give me ur no. Thanks me fany replies from anybody on the request belowr, It's urgent pls. Thanks --- On Wed, 7/7/10, ikenna ajere ajer...@yahoo.co.uk wrote: From: ikenna ajere ajer...@yahoo.co.uk Subject: [ns] Fw: Re: Error 127 To: rudraks...@gmail.com Cc: ns-users@ISI.EDU Date: Wednesday, 7 July, 2010, 0:38 --- On Tue, 6/7/10, ikenna ajere ajer...@yahoo.co.uk wrote: Hello, Pls can anybdy help me? Still encountering the error below, Pls it's very urgent Thanks From: ikenna ajere ajer...@yahoo.co.uk Subject: Re: [ns] Error 127 To: rudraksh shrivastava rudraks...@gmail.com Date: Tuesday, 6 July, 2010, 23:22 Hello, I installed the g++ compiler bt I got another error msg; g++ -c -Dstand_alone -dstl_namespa...@stl_namespace@ -DCPP_NAMESPACE=std -I../../.. -o rng.o ../../../tools/rng.cc g++: ../../../tools/rng.cc: No such file or directory g++: no input files make: *** [rng.o] Error 1 How do I resolve this. Pls I need ur urgent help Thanks --- On Tue, 6/7/10, rudraksh shrivastava rudraks...@gmail.com wrote: From: rudraksh shrivastava rudraks...@gmail.com Subject: Re: [ns] Error 127 To: ikenna ajere ajer...@yahoo.co.uk Date: Tuesday, 6 July, 2010, 14:31 apt-get install g++ run this... On Wed, Jul 7, 2010 at 1:00 AM, rudraksh shrivastava rudraks...@gmail.com wrote: Hii U have to install g++ compiler on ur pc...which OS are u using ?? On Wed, Jul 7, 2010 at 12:34 AM, ikenna ajere ajer...@yahoo.co.uk wrote: Hello, Encountered this error while trying to run ''make'' on setdest directory make: g++: command not found make: *** [setdest] Error 127 I have not been able to run setdest as it keeps on returning an invalid command. Pls I need an urgent help. i am using ubuntu 9.10 Ajere
Re: [ns] monitor-queue activation problem
Hi Ahmed, From what I see, the error is caused by $link_([$n1 id]:[$n2 id]) I think there is no link connecting nodes $n0 and $n1. You are asking NS2 to monitor the link which does not exist. Make sure that there is a link connecting $n0 and $n1 BEFORE invoking monitor-queue. If you would like to learn how to read OTcl error message, please read http://www.ns2ultimate.com/post/419191200/tcl-error-message-in-ns2 Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 7/9/2010, Ahmed Hesham ahes...@live.com wrote: Dear All I am having this error while trying to run monitor-queue can't read link_(5:6): no such variable while executing $link_([$n1 id]:[$n2 id]) init-monitor $self $qtrace $sampleInterval (procedure _o3 line 3) (Simulator monitor-queue line 3) invoked from within $ns_ monitor-queue $n0 $n1 stdout invoked from within set qmon [$ns_ monitor-queue $n0 $n1 stdout] (file ranWless.tcl line 165) this tcl script is set queue [open queue w] set qmon [$ns_ monitor-queue $n0 $n1 stdout]; [$ns_ link $n0 $n1] queue-sample-timeout; proc queueLength {} { global ns_ qmon queue set time 0.05 set length [$qmon set pkts_] set now [$ns_ now] puts $queue $now $length $ns_ at [expr $now+$time] queueLength } $ns_ at 0.0 queueLength Hotmail: Powerful Free email with security by Microsoft. Get it now. _ Hotmail: Powerful Free email with security by Microsoft. https://signup.live.com/signup.aspx?id=60969
Re: [ns] target on tcp implementation
Hi Pedro, TcpAgent uses function send(p,h) from within function TCPAgent::output(int seqno, int reason) rather than target_- recv(p,h) Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 6/29/2010, pedro chaparro pdr...@gmail.com wrote: hi everyone, i wonder my self why there is not a call to the target (target_-recv(p);) on the tcp implementation of tcp (tcp.cc) as there is in udp.cc ?? thanks -- Pedro Alonso Chaparro Valero RD Engineer Ciudad Politecnica de la Innovación iTEAM - Mobile Communications Group Polytechnic University of Valencia C\ Camino de Vera S/N, Edificio 8G 46022 Valencia, Spain
Re: [ns] the recv() in routing protocol process one packet at a time or multiple?
Hi, NS2 is a single-thread program. It processes one thing at the time. This is also true for function recv() which process one packet at a time. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 6/10/2010, tiongsquare tiongsqu...@hotmail.com wrote: the recv() does it process one packet at a time and the rest queuing up outside? or at one time multiple packets can access the recv()? hope someone can clear my doubts, thanks! -- View this message in context: http://old.nabble.com/the-recv%28%29-in-routing-protocol-process-one-packet-at-a-time-or-multiple--tp28844205p28844205.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] what is this error?
Hi Pedro, Perhaps, you might want to read the following post about no-slot error: http://www.ns2ultimate.com/post/520626807/classifier-no-slot-error Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 5/5/2010, pedro chaparro pdr...@gmail.com wrote: hi, i'm using a tcl proc where i received two parameters, inside the proc tcl file i wanna start a cbr traffic source, i can define it without problems, but when i included the lines to start it and stop it, i get this lines below. i think is something related with scheduler, im not really sure. if anyone knows hot to resolve this problem, i'll appreciate a lot you help --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o74: no target for slot 1023 _o74 type: Classifier/Addr content dump: classifier _o74 0 offset 22 shift 1023 mask 1 slots slot 1: _o75 (Classifier/Addr) -- Finished standard no-slot{} default handler -- -- Ing Pedro Alonso Chaparro Valero Ciudad Politecnica de la Innovación iTEAM - Mobile Communications Group Polytechnic University of Valencia C\ Camino de Vera S/N, Edificio 8G 46022 Valencia, Spain
Re: [ns] seeds in ns
Hi Manoj, You might want to read the following blog post. I just put it up today. http://www.ns2ultimate.com/post/550010284/introducing-randomness-into-ns2 Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 4/23/2010, Manoj srivatsav manoj.srivat...@gmail.com wrote: Hi all, Can anyone tell me how the seed in the random number generator work internally.. i.e i want to know the internal working for seeds in random generator..?
Re: [ns] ns use-newtrace question about new trace format
Hi Jin, Maybe you want to check out this page http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 4/14/2010, Jin Woo Kim kimj...@iit.edu wrote: In ns2 manual, page 158, it mentioned use-newtrace format. Is it available also to 802.15.4? I simulated 802.15.4 with error model using new trace format (use-newtrace format) Is it also availalbe trace format to 802.15.4?
Re: [ns] Installing problem
Hi Umang I did some test on NS2 installation few weeks ago. Here is the result http://www.ns2ultimate.com/post/439346614/working-combination-ns-2-34-ubuntu-8-04-and-perhaps There is a problem with the current linux-like distribution. Here is the solution http://www.ns2ultimate.com/post/441093095/ns-2-35-works-on-cygwin I hope this will help. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear On 4/15/2010, umang joshi umang_...@yahoo.com wrote: Sir, I have problem with installing ns-allinone-2.34 on ubuntu-10.04. my error code is copied below. anybody can help me? /home/dhananjay/ns-allinone-2.34/otcl-1.13/otcl.c:495: undefined reference to `__stack_chk_fail_local' otcl.o: In function `Otcl_Init': /home/dhananjay/ns-allinone-2.34/otcl-1.13/otcl.c:2284: undefined reference to `__stack_chk_fail_local' ld: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't defined ld: final link failed: Nonrepresentable section on output make: *** [libotcl.so] Error 1 otcl-1.13 make failed! Exiting ... See http://www.isi.edu/nsnam/ns/ns-problems.html for problems umang joshi sv-nit
Re: [ns] problem: Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl)
Hello Meriem, I just put up a no-slot error on the following link. http://www.ns2ultimate.com/post/520626807/classifier-no-slot-error It might solve your problem. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 4/13/2010, meriem bouzouita bouzouita_mer...@yahoo.fr wrote: Hello, My simulation generates the following error message: Simulation is running...please wait... --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o14: no target for slot -1 _o14 type: Classifier/Hash/Dest content dump: classifier _o14 0 offset 0 shift 2147483647 mask 1 slots slot 5: _o16 (Classifier/Port) -1 default -- Finished standard no-slot{} default handler -- I don't have any idea how to solve it, please can you help me, Thanks in advance Best regards.
Re: [ns] add a new protocol to ns
Hi, If you have a new module you would like to add to NS2, please go to http://www.ns2ultimate.com/post/454001969/including-new-modules-into-ns-2 I hope it will help. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 4/14/2010, lianxiaoxu lianxia...@126.com wrote:
Re: [ns] Error while running the tcl script while implementing a new protocol in ns2
Hi Learner, The error is due to the following line eval $node addr $args Class Node does not have instproc addr. Therefore the Tcl spit out the error. To fix it, define instproc addr for the class of $node If you would like to learn how to read OTcl error message, please read http://www.ns2ultimate.com/post/419191200/tcl-error-message-in-ns2 Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 4/13/2010, The Learner deeptisabnani.i...@pec.edu.in wrote: When I run my tcl script, I get the following error- (_o14 cmd line 1) invoked from within _o14 cmd addr 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 _o14 line 2) (SplitObject unknown line 2) invoked from within _o14 addr (eval body line 1) invoked from within eval $node addr $args (default arm line 2) invoked from within switch -exact $routingAgent_ { MSClusterHead { set ragent [$self create-msprotoch-agent $node] } MSDataDiscovery { set ragent [$self create-msprotodd... (procedure _o3 line 14) (Simulator create-wireless-node line 14) invoked from within _o3 create-wireless-node (eval body line 1) invoked from within eval $self create-wireless-node $args (procedure _o3 line 23) (Simulator node line 23) invoked from within $ns node (for body line 2) invoked from within for {set i 0} {$i $val(nn) } {incr i} { set node_($i) [$ns node] $node_($i) random-motion 0 ;# disable random motion } (file simulation.tcl line 60) What does this error mean? And how can I rectify this? Thanks and Regards, The Learner -- View this message in context: http://old.nabble.com/Error-while-running-the-tcl-script-while-implementing-a-new-protocol-in-ns2-tp28219216p28219216.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] How to call one function out of 2, using set nd [ns node] ???
HI Learner, Instproc Simulator::node is just a way to create a basic node. If you want a fancy node of your own, you can define another instproc Simulator::my_node. At the Tcl simulation script, you can do something like set mynode [$ns my_node] Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 4/13/2010, The Learner deeptisabnani.i...@pec.edu.in wrote: while creating a new node using the statement- Using this statement set nd [ns node], a function defined in ns-lib.tcl is called(particular to a protocol). In my case I have 2 agents, for different types of nodes and thus two functions in ns-lib.tcl, how shall I specify which function to be called while creating nodes using the statement set nd [ns node]...? Regards, The Learner -- View this message in context: http://old.nabble.com/How-to-call-one-function-out-of-2%2C-using-set-nd--ns-node--tp28219421p28219421.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] Error installing NS2 (tclcl make failed)
Hi Hassan, I did some test on NS2 installation few weeks ago. Here is the result http://www.ns2ultimate.com/post/439346614/working-combination-ns-2-34-ubuntu-8-04-and-perhaps There is a problem with the current linux-like distribution. Here is the solution http://www.ns2ultimate.com/post/441093095/ns-2-35-works-on-cygwin I get ns-2.34 working on Ubuntu 8.04. But I'm not sure about ns-2.29. I hope this will help. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear On 4/13/2010, Topgun007 hamid...@gmail.com wrote: Hi Katsaros, I am facing the same problem, trying to install ns2.29 on Ubuntu 8.04 but getting tcl compilation errors. Have you fixed the problem and able to install sucessfully. Can you please share your experience and patches/packages installed. Regards Hassan LeCost wrote: Hey there, I'm new in ns2. I tried to install it under Ubuntu 8.04, 9.10 and Fedora 12 (all of them running in VMware) but I always get the same error. tclcl does not compile. Tcl.cc: In member function âvoid Tcl::eval(char*)â: Tcl.cc:182: warning: deprecated conversion from string constant to âchar*â Tcl.cc: In member function âint TclObject::traceVar(const char*, TclObject*)â: Tcl.cc:421: warning: deprecated conversion from string constant to âchar*â Tcl.cc: In static member function âstatic int TclClass::create_shadow(void*, Tcl_Interp*, int, const char**)â: Tcl.cc:509: warning: deprecated conversion from string constant to âchar*â Tcl.cc:511: warning: deprecated conversion from string constant to âchar*â *Tcl.cc: In static member function âstatic int TclClass::dispatch_instvar(void*, Tcl_Interp*, int, const char**)â: Tcl.cc:566: error: invalid conversion from âconst char*â to âchar*â* Tcl.cc:571: warning: deprecated conversion from string constant to âchar*â Tcl.cc: In member function âvirtual void TclClass::bind()â: Tcl.cc:603: warning: deprecated conversion from string constant to âchar*â Tcl.cc:605: warning: deprecated conversion from string constant to âchar*â make: *** [Tcl.o] Error 1 tclcl-1.17 make failed! Exiting ... This was from the last attempt of ns2.29 under Fedora12 . same with 2.28 I found in NS2 webpage that there was a problem with gcc 3.4 and tclcl but it says that it has been fixed. I want to install ns2.28 in order to work with 802.11e MAC possible under linux 9.10 that I'm more used to. Thank you for your help, Marry X-Mas! -- Katsaros Konstantinos MSc Communications, Network and S/W Surrey University -- Katsaros Konstantinos -- View this message in context: http://old.nabble.com/Error-installing-NS2-%28tclcl-make-failed%29-tp26924643p28232180.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] how to find the no of packet drops
Hi Krishna, I would use single null agent for the simulation. Then I would go to modify the null agent to count packet every time it receives a packet. At the end of simulation, have it print out all received packets. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear On 4/13/2010, Krishna Balasa kbal...@gmail.com wrote: Hi, I am simulating a network traffic having 1000Mbps bandwidth having round trip of 80ms. The simulation runs for 100 seconds. I need to find the no of packet drops. For this I am generating the trace file. The problem I have is that the trace file generated is over 4GB and I believe linux has a limitation of 4GB file size. As a result complete trace file is not generated. My question is, is there another way of calculating no of packet drops. Any help is appreciated. Warm Regards, Krishna
Re: [ns] wireless tcl script true but the trace file hasn't the same format as for wireless script
Hi Emma, You are using a new trace format. Please refer to http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats for more information. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 4/12/2010, Emma Ch di.anni...@yahoo.fr wrote: I am trying to construt a wireless tcl script that generates voice traffic voip, i use this tcl script but the trace file hasn't the same contents as the trace file for simple-wireless.tcl. I explain more: I use this tcl script -tcl script-- set ns [new Simulator] # choix des couleurs: $ns color 0 blue $ns color 1 red $ns color 2 green $ns color 3 red $ns color 4 orange $ns color 5 blue $ns color 6 green $ns color 7 black $ns color 8 orange $ns color 9 blue # les dix noeuds: set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] set n4 [$ns node] set n5 [$ns node] set n6 [$ns node] set n7 [$ns node] set n8 [$ns node] set n9 [$ns node] # création des outputs trace et nam: set f [open emna.tr w] $ns trace-all $f set nf [open emna.nam w] $ns namtrace-all $nf # == # Define options # == set val(chan) Channel/WirelessChannel ;# channel type set val(prop) Propagation/TwoRayGround ;# radio-propagation model set val(netif) Phy/WirelessPhy ;# network interface type set val(mac) Mac/802_11 ;# MAC type set val(ifq) Queue/DropTail/PriQueue ;# interface queue type set val(ll) LL ;# link layer type set val(ant) Antenna/OmniAntenna ;# antenna model set val(rp) DumbAgent ;# routing protocol set val(start) 0.0 set val(ifqlen) 50 ;# max packet in ifq set val(nn) 10 set val(tr) trace set val(X) 500 set val(Y) 500 set val(CWmin) 16 set val(CWmax) 1024 set val(SlotTime) 0.09 set val(SIFS) 0.16 set val(basicRate) 2Mb set val(dataRate) 54Mb # # Codec: G.711 # #set val(ON) 1500ms #set val(OFF) 1500ms #set val(AppRate) 96Kb set val(pktsize) 160 set val(pktinterval) 0.020 set val(run) 50.0 # # MAC MIB # Mac/802_11 set basicRate $val(basicRate)Mb Mac/802_11 set dataRate $val(dataRate)Mb Mac/802_11 set CWMin $val(CWmin) Mac/802_11 set CWMax $val(CWmax) Mac/802_11 set SlotTime $val(SlotTime) Mac/802_11 set SIFS $val(SIFS) # set up topography object set topo [new Topography] #$topo load_flatgrid $val(X) $val(Y) # Create God create-god $val(nn) # configure node $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 OFF \ -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 } # connection des noeuds entre eux: # $ns simple-link (duplex-link) $n0 $n1 bandwidth delay queue_type $ns duplex-link $n0 $n1 2Mb 2ms DropTail $ns duplex-link $n0 $n2 2Mb 2ms DropTail $ns duplex-link $n0 $n3 2Mb 2ms DropTail $ns duplex-link $n0 $n4 2Mb 2ms DropTail $ns duplex-link $n0 $n5 2Mb 2ms DropTail $ns duplex-link $n0 $n6 2Mb 2ms DropTail $ns duplex-link $n0 $n7 2Mb 2ms DropTail $ns duplex-link $n0 $n8 2Mb 2ms DropTail $ns duplex-link $n0 $n9 2Mb 2ms DropTail # la création de l'agent / set ... [new Agent/type] set rtp0 [new Agent/RTP] # communication agent-network ($ns attach-agent $node $agent) $ns attach-agent $n0 $rtp0 # la création de l'application / set ... [new Application/type] set cbr0 [new Application/Traffic/CBR] $cbr0 attach-agent $rtp0 set rtp1 [new Agent/RTP] $ns attach-agent $n1 $rtp1 $rtp1 set class_ 1 set cbr1 [new
Re: [ns] ns2 installation problem....
Hi Sushma, I did some test on NS2 installation few weeks ago. Here is the result http://www.ns2ultimate.com/post/439346614/working-combination-ns-2-34-ubuntu-8-04-and-perhaps There is a problem with the current linux-like distribution. Here is the solution http://www.ns2ultimate.com/post/441093095/ns-2-35-works-on-cygwin I hope this will help. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear On 4/12/2010, Sushma M sushma@gmail.com wrote: hello... i want to install ns2.1b9 or ns2.1b8a. pls help me. which os will support these versions i tried ns2.2b9 on redhat 9... its giving error. ns2 make failed [trace/ trace.o] error is coming. so pls help me Thanks Sushma
Re: [ns] Graphs in ns2
Hi Nikitha, I've never use XGraph. I only use Matlab. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 4/10/2010, nikitha v v.niki...@gmail.com wrote: Hello everybody, I found that u need to install tracegraph if u want to plot graphs in ns2. But www.tracegraph.com is not working..can somebody forward me tracegraph installation files and procedure to install it?? Hoping for a quick reply Thanking you, Nikitha
Re: [ns] segment fault
Hi Stalin, Segmentation fault is usually due to memory access violation. A common example is as follows. int x[10]; x[20] = 0; where you create an array x with 10 slots, but try to access 20th slot of x. Hope this will help. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 4/9/2010, stalin babu stalin1...@gmail.com wrote: Hi all when i am running a simulation with 10 nodes it's working fine, when i am trying to run using 20 node , i got the Segmenatation fault error . pl help me it's urgent for my project
Re: [ns] ns-default.tcl ???
HI Pedro, There is only one role for ns-default.tcl: Setting the initial values for OTcl variables which are bound to C++. There is no other roles for this file. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 4/6/2010, pedro chaparro pdr...@gmail.com wrote: Hi everyone,i'm a bit confuse about this file is used for, i wanna know what's the rol of this file into ns2, when do i need to modify?, i know that here the Agents valriables are initialized with default values, but besides of this, have other important rol? thanks -- Ing Pedro Alonso Chaparro Valero Ciudad Politecnica de la Innovación iTEAM - Mobile Communications Group Polytechnic University of Valencia C\ Camino de Vera S/N, Edificio 8G 46022 Valencia, Spain
Re: [ns] Fwd: help...
Hi Sushma, These two versions are quite outdated. The latest one is 2.35. I installed in on Cygwin. It also works on Ubuntu as well. Here is the instruction: http://www.ns2ultimate.com/post/441093095/ns-2-35-works-on-cygwin Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 4/6/2010, Sushma M sushma@gmail.com wrote: hello... may i know ns2.1b9 or ns2.1b8a both of these versions can be installed on which os version? i tried on fedora 7 its not working. so on which os can i install ns2.1b9? Sushma
Re: [ns] Problem when i am using TCL with awk
Hi Umang, I find the following AWK website pretty useful. You might want to check it out. http://www.vectorsite.net/tsawk.html Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 4/7/2010, umang singh singh.um...@hotmail.com wrote: hi all, I am facing problem when i am using baodv.tcl using awl script.I am not able to understand about the error. please help me in this regard. [r...@localhost aodv]# ns baodv.tcl num_nodes is set 20 Creating nodes INITIALIZE THE LIST xListHead _o15 _o37 _o59 _o81 _o103 _o125 _o147 _o169 _o191 _o213 _o235 _o257 _o279 _o301 _o323 _o345 _o367 _o389 _o411 _o433 Loading random scenario pattern... Loading Connection Pattern... Starting Simulation SORTING LISTS ...DONE! channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 550.0 ns: finish: awk: packetloss.awk:23: END blocks must have an action part while executing exec awk -f packetloss.awk scripttr.tr (procedure finish line 6) invoked from within finish #This program is used to calculate the packet loss rate for CBR program BEGIN { # Initialization. Set two variables. fsDrops: packets drop. numFs: packets sent fsDrops = 0; numFs = 0; } { action = $1; time = $2; from = $3; to = $4; type = $5; pktsize = $6; flow_id = $8; src = $9; dst = $10; seq_no = $11; packet_id = $12; if (from==1 to==2 action == +) numFs++; if (flow_id==2 action == d) fsDrops++; } END { printf(number of packets sent:%d lost:%d\n, numFs, fsDrops); }it's very urgent for my work regards Umang BVICAM,ND-63 _ Bollywood This Decade http://entertainment.in.msn.com/bollywoodthisdecade/
Re: [ns] Installing ns-2.28, 2.29 under Gentoo or Ubuntu
Hi Cesar, I have to not tried Ubunto 2.6.27. But I did try Ubuntu 9.10. It doesn't work. I guess the problem is because of the gcc package in later Linux distribution. Please see the test result below: http://www.ns2ultimate.com/post/439346614/working-combination-ns-2-34-ubuntu-8-04-and-perhaps What you can do is to use NS-2.35 which fixed the gcc problem. Please find the instruction here: http://www.ns2ultimate.com/post/441093095/ns-2-35-works-on-cygwin Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 4/3/2010, Cesar Cardenas cardenas.ce...@gmail.com wrote: Dear all, I need to install ns-2.28 or ns.2.29 under Gentoo 2.6.30 r8 or under Ubuntu 2.6.27-7-server because I want to install WFQ for DiffServ: http://sergioandreozzi.com/research/network/diffserv4ns/ http://www.augustoneto.com/technical.html http://www.mail-archive.com/ns-users@isi.edu/msg01073.html I already have ns-2.30, 2.31 and 2.34 on both machines. When I try to install either ns-2.28 and ns-2.29 I got several errors, some of them related to: ./common/packet.h:173: warning: deprecated conversion from string constant to âchar*â ./sctp/sctp.h:253: warning: âtypedefâ was ignored in this declaration But finally they don't compile: make: *** [trace/trace.o] Error 1 Ns make failed! I tried to look at the following webpage http://www.isi.edu/nsnam/ns/ns-problems.html for problems But the patch does not work. http://www/isi.edu/nsnam/dist/solaris.patch Any points to solve this problem will be very appreciated. All the best, César Cárdenas
Re: [ns] Problem with using ./configure command in ns2 while recompiling ns2
Hi the learner, From what I can see, the error is due to class Agent/MyAgentOtcl is not define. If you are not familiar with how to read Tcl error message, please read http://www.ns2ultimate.com/post/419191200/tcl-error-message-in-ns2 Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 3/29/2010, The Learner deeptisabnani.i...@pec.edu.in wrote: Hi all. I had downloaded a file, ex-linkage.cc from http://nile.wpi.edu/NS/ (OTcl linkage) and placed it in /home/deepti/ns-allinone-2.34/ns-2.34/ I tried to run ./configure by being the super user and achieved the result. Here is the output, r...@deepti-laptop:/home/deepti/ns-allinone-2.34/ns-2.34# ./configure checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed http://old.nabble.com/file/p28067571/ex-linkage.cc ex-linkage.cc http://old.nabble.com/file/p28067571/ex-linkage.tcl ex-linkage.tcl checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes No .configure file found in current directory Continuing with default options... checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for ANSI C header files... (cached) yes checking for string.h... (cached) yes checking for main in -lXbsd... no checking for socket in -lsocket... no checking for gethostbyname in -lnsl... yes checking for dcgettext in -lintl... no checking for getnodebyname in -ldnet_stub... no checking that g++ can handle -O2... no checking if C++ libraries work without any namespace... no checking if C++ libraries work with namespace std... yes checking if STL works without any namespace... no checking if STL works with namespace std... yes checking should use STL... yes checking for tcl.h... -I../include checking for tclInt.h... -I../include checking for libtcl8.4... -L../lib -ltcl8.4 checking for init.tcl... ../lib/tcl8.4 checking for http.tcl... ../lib/tcl8.4/http1.0 checking Tcl http.tcl library... yes checking for tclsh8.4.18... no checking for tclsh8.4... ../bin/tclsh8.4 checking for tk.h... -I../include checking for libtk8.4... -L../lib -ltk8.4 checking for tk.tcl... ../lib/tk8.4 checking for otcl.h... -I../otcl-1.13 checking for libotcl1.13... -L../otcl-1.13 -lotcl checking for tclcl.h... -I../tclcl-1.19 checking for libtclcl... -L../tclcl-1.19 -ltclcl checking for tcl2c++... ../tclcl-1.19 checking for X11 header files checking for X11 library archive checking for XOpenDisplay in -lX11... yes checking for XShmAttach in -lXext... yes checking for libtcldbg... no checking dmalloc... not requested with --with-dmalloc checking for perl... /usr/bin checking for ANSI C header files... (cached) yes checking arpa/inet.h usability... yes checking arpa/inet.h presence... yes checking for arpa/inet.h... yes checking fenv.h usability... yes checking fenv.h presence... yes checking for fenv.h... yes checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking for string.h... (cached) yes checking for strings.h... (cached) yes checking time.h usability... yes checking time.h presence... yes checking for time.h... yes checking for unistd.h... (cached) yes checking net/ethernet.h usability... yes checking net/ethernet.h presence... yes checking for net/ethernet.h... yes checking for main in -lm... yes checking for bcopy... yes checking for bzero... yes checking for fesetprecision... no checking for feenableexcept... yes checking for getrusage... yes checking for sbrk... yes checking for snprintf... yes checking return type of random... long
Re: [ns] Fwd: SUB: Reg getting this NS2 code working
Hi Venkata, If you are new to NS2, I suggest you to read the following blog. http://www.ns2ultimate.com/post/434349586/for-ns2-newbies It provides the fundamental steps in learning NS2. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 3/28/2010, Venkata Ramana ramana.venkat...@gmail.com wrote: Hello Everyone, I am interested in knowing how to get this code working ... all it has are folders and each folder containing different .cc C++ Files and .h Header files. I want to know what procedure i should follow to get this code up and running ... i downloaded the code from the following link. http://www.matthewjmiller.net/files/cs497ig_paper_code.tar.gz It involves concepts on adding a protocol to the NS2 OCTL objects i guess. I'm not so knowledgeable. If any expert programmer can help me, i would appreciate it. Thank you. Regards, Venkata
Re: [ns] Reg Timer Handler Functions
Hi Jaya, It's hard to explain the concept of the timer without knowing what event scheduler is, and how it works. But I am going to give you quick answer. Timer is used when you want to delay something. An example is TCP retransmission timer, which will trigger TCP to retransmit the packet after a given delay. Timer has interfaces to set (schedule), reset (reschedule), and cancel. I will blog about the event scheduler soon at my blog www.ns2ultimate.com (The current blog topic is routing modules and classifiers) Anyway if you are in hurry you can have a look at chapters 4 and 12 in the following books. T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2009. Here is the link http://www.amazon.com/gp/product/0387717595?ie=UTF8amp;tag=ns2ultteeiss-20amp;linkCode=as2amp;camp=1789amp;creative=9325amp;creativeASIN=0387717595 You may also find lecture notes and other resource at the following website: http://www.ece.ubc.ca/~teerawat/NS2.htm Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat n 3/28/2010, jaya vignesh jayavignes...@yahoo.co.in wrote: Hi, I would like to know the functioning of timer handler functions like resched and handle?? What is use of these? Also, in my routing code, when i attach any traffic to my node like [cbr(0) start] in my tcl, automatically i should invoke a beaconing procedure function, where that particular node for which the cbr traffic is attached should send the beacon packet to find the satisfactory neighbor based on beacon reply. Any sample flow to explain how to obtain the node for which the cbr traffic is attached.? Thanks, Jayavignesh Your Mail works best with the New Yahoo Optimized IE8. Get it NOW!. Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/
Re: [ns] NS2.33 installation
HI Meriem, I posted the installation of NS-2.35 below: http://www.ns2ultimate.com/post/441093095/ns-2-35-works-on-cygwin You should move to the latest version of NS2. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 3/26/2010, meriem bouzouita bouzouita_mer...@yahoo.fr wrote: Hello, I'm trying to install NS2.33 under Windows XP. but when at the end of the simulation, I get: Creating library file: libns.dll.a g++ -DNSLIBNAME = \âlibns.dll\â -Wl, -export-dynamic -o ns common/mai-modular.cc -ldl /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../i686-pc-cygwin/bin/ld: cannot find ldl Collect2: ld returned 1 exit status Make: *** [ns] Error 1 Ns Make failed So please how can I solve this problem, Thanks a lot, Best regards.
Re: [ns] Is common header a must in a packet and address type defined in config.h
Hi The Learner, It is not a must. The header is just a place where you can store information. It's fine to create your own type. What you have to do is to tell the routing module to extract the address from your address variable. Best Wishes, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 3/25/2010, The Learner deeptisabnani.i...@pec.edu.in wrote: I want to know if using common header in packet is a must? If I create my own packet header and do not include common header in my packet, will it create any trouble? Since I am working on a routing protocol for wireless sensor networks, the addresses can't be of the type u_int32_t, so I created my own type(typedef u_int8_t msaddr_t) in the config.h file. Will it siuffice or I need to do some other things to make ns2 work with this type of address? Thank You, The Learner -- View this message in context: http://old.nabble.com/Is-common-header-a-must-in-a-packet-and-address-type-defined-in-config.h-tp28024535p28024535.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] Common header definition inside ns2 directory
Hi The Learner, Yes, in fact NS2 has various type of packets, common header, ip header, tcp header, and so on. But you need to be careful. Packet header and packet type (e.g., PT_TCP) are two different things. Packet type is just information embedded in packet header. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 3/23/2010, The Learner deeptisabnani.i...@pec.edu.in wrote: Hi. Can there be multiple packet headers for a protocol implementation in ns2? i.e, a packet header while sending broadcast in the network and another packet header while sending data, and another packet header for sending another type of broadcast...? If thats the case, then I just need to define various constants for each packet header,(PT_HDR1, PT_HDR2...etc). and use ch-ptype == PT_HDR1 to check the type of header in a packet. Please correct me if I am wrong. Thank You, The Learner. -- View this message in context: http://old.nabble.com/Common-header-definition-inside-ns2-directory-tp27985812p27996580.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] Common header definition inside ns2 directory
Hi, It's in the file ns-2.35/common/packet.h. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 3/22/2010, The Learner deeptisabnani.i...@pec.edu.in wrote: Hi. Which file in NS2 contains the definition of the common header (hdr_cmn)??? -- View this message in context: http://old.nabble.com/Common-header-definition-inside-ns2-directory-tp27985812p27985812.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] EXEC error????
Hi Pietro, Here is my suggestion. If you are sure that tcp_bt.tcl is correct, try to run the following ns tcp_bt.tcl 1 ns tcp_bt.tcl 2 ns tcp_bt.tcl 3 ... Keep changing the last number until it hits 15. Does it create any error? Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear On 3/21/2010, pietro.luig...@alice.it pietro.luig...@alice.it wrote: Hi, I try to execute this tcl script: set maxDist 15 set stepDist 2 set maxVel 20 set stepVel 2 set xDest 14 for { set i 1 } { $i $maxDist } { incr i } { #uso tcp_bt_df.tcl DISTANZATRAINODI puts TCP OVER BT DISTANZA FISSA: $i metri exec ns tcp_bt_df.tcl $i } and i have this error: (10720/8.00) 0.015 (10720.00/723200.00) d: 0.00 0.00 l: 0.00 0.00 0.00 Flow info: dateRate Delay DeliveryRaio -- 1: 21340.00 (170720/8.00) 0.033507 (5.361120/160) 1.00 (1 - 0/442) 0: 1340.00 (10720/8.00)0.001145 (0.183200/160) 1.00 (1 - 0/442) nsCmd:_o53 start Page time: 1.287225 2060 0 1340.00 (10720/8.00) 0.015 (10720.00/723200.00) d: 0.00 0.00 l: 0.00 0.00 0.00 1 21340.00 (170720/8.00) 0.236 (170720.00/723200.00) d: 0.03 0.03 l: 0.00 0.00 0.00 1 21340.00 (170720/8.00) 0.236 (170720.00/723200.00) d: 0.03 0.03 l: 0.00 0.00 0.00 0 1340.00 (10720/8.00) 0.015 (10720.00/723200.00) d: 0.00 0.00 l: 0.00 0.00 0.00 while executing exec ns tcp_bt_df.tcl $i (for body line 4) invoked from within for { set i 1 } { $i $maxDist } { incr i } { #uso tcp_bt_df.tcl DISTANZATRAINODI puts TCP OVER BT DISTANZA FISSA: $i metri exec ns tcp_bt_df.tc... (file tcp_bt.tcl line 10) Where's the error?? I'm sure script TCL tcp_bt... is correct! Thank u in advance, Pietro
Re: [ns] Make file
Hi Learner, The default make file is Makefile with no extension. If you would like to add a new protocol. You can find the instruction on the post below: http://www.ns2ultimate.com/post/454001969/including-new-modules-into-ns-2 Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 3/19/2010, The Learner deeptisabnani.i...@pec.edu.in wrote: Hi all While trying a new protocol, we need to make changes in the makefile. There are multiple makefiles( with extensions, .in, .vc), in which makefile am i suppose to add the object file list? and where? Also why should this be added? Thank You, The Learner -- View this message in context: http://old.nabble.com/Make-file-tp27950929p27950929.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] error when calling class $cls: $args
Hi Hitesh, I think the problem occurs from this line $agent if-queue [$self set ifq_(0)] The $agent (you have to check what class it is) does not have if-queue defined as its instproc. Therefore it invokes instproc unknown to create error message. This is the normal process of OTcl. My suggestion is 1. Check the class of $agent 2. See whether it has instproc if-queue, if not 2.1 change the class of the $agent 2.2 define instproc if-queue If you would like to know more about how to read tcl error message, please read the following blog post. http://www.ns2ultimate.com/post/419191200/tcl-error-message-in-ns2 Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear On 3/19/2010, hitesh sharma hitesh1987.i...@gmail.com wrote: I am simulating cluster based routing protocol in ns2.. but when i run my TCL code, I get the followin error : (_o17 cmd line 1) invoked from within _o17 cmd if-queue _o20 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 _o17 line 2) (SplitObject unknown line 2) invoked from within $agent if-queue [$self set ifq_(0)] (procedure _o14 line 23) (Node/MobileNode add-target line 23) invoked from within $self add-target $agent $port (procedure _o14 line 15) (Node attach line 15) invoked from within $node attach $ragent [Node set rtagent_port_] (procedure _o3 line 75) (Simulator create-wireless-node line 75) invoked from within _o3 create-wireless-node (eval body line 1) invoked from within eval $self create-wireless-node $args (procedure _o3 line 23) (Simulator node line 23) invoked from within $ns_ node (for body line 2) invoked from within for {set i 0} {$i $opt(nn)} {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0 ;#disable random motion } I checked ns-default.tcl and ns-lib.tcl but could not find the error.. Same code written for AODV and DSDV in ns-lib works ..Please help.. Thanks -- Hitesh Sharma Department of Electronics and Computer IIT Roorkee Roorkee - 247667 , Uttarakhand India
[ns] [ns: Adding new NS2 modules] Re: reg : Linking errors
Hi Gayathri, First of all, in NS2 (in linux), the extension of C++ file is .cc not .c++. So you have to change that first. Secondly, if you would like to incorporate new NS2 modules (i.e., files .cc, .h, .tcl). Please see http://www.ns2ultimate.com/post/454001969/including-new-modules-into-ns-2 I hope it'll help. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 3/15/2010, gayathri devi k.gayathrid...@yahoo.co.in wrote: Hai Everybody, Â Â Â Â Â Â Â Â Â Â Â Â Â Â For linking the c++ code with otcl script, I have included the C++ code and it's object file under the ns2 directory and used make command to re-compile it for the changes included. But it is producing the following errors ... So, Kindly suggest me some guidelines regarding this [r...@localhost ns-2.34]# g++ -c greedy4.c++ linkage.tcl:1: error: âsetâ does not name a type agent.h:37: error: expected class-name before â{â token greedy4.c++:35: error: extra qualification âGreedyBound::â on member âreadmatrixâ greedy4.c++:35: error: âvoid GreedyBound::readmatrix()â cannot be overloaded greedy4.c++:21: error: with âvoid GreedyBound::readmatrix()â greedy4.c++:56: error: extra qualification âGreedyBound::â on member âdistanceâ greedy4.c++:56: error: âvoid GreedyBound::distance()â cannot be overloaded greedy4.c++:19: error: with âvoid GreedyBound::distance()â greedy4.c++:69: error: extra qualification âGreedyBound::â on member âgreedyâ greedy4.c++:69: error: âvoid GreedyBound::greedy(int)â cannot be overloaded greedy4.c++:20: error: with âvoid GreedyBound::greedy(int)â greedy4.c++:108: error: extra qualification âGreedyBound::â on member âfindangleâ greedy4.c++:108: error: âvoid GreedyBound::findangle(double, double, double)â cannot be overloaded greedy4.c++:23: error: with âvoid GreedyBound::findangle(double, double, double)â greedy4.c++:159: error: extra qualification âGreedyBound::â on member âdisplayâ greedy4.c++:159: error: âvoid GreedyBound::display(int)â cannot be overloaded greedy4.c++:22: error: with âvoid GreedyBound::display(int)â greedy4.c++:184: error: expected class-name before â{â token greedy4.c++:192: error: cannot define member function âGreedyBound::BsrAgent::BsrAgentâ within âGreedyBoundâ greedy4.c++:201: error: cannot define member function âGreedyBound::BsrAgent::commandâ within âGreedyBoundâ greedy4.c++:210: error: cannot define member function âGreedyBound::BsrAgent::MyprivateFuncâ within âGreedyBoundâ greedy4.c++:216: error: expected `}' at end of input greedy4.c++: In member function âvoid GreedyBound::readmatrix()â: greedy4.c++:37: error: âTclâ was not declared in this scope greedy4.c++:37: error: âtclâ was not declared in this scope greedy4.c++:37: error: âTclâ is not a class or namespace greedy4.c++: In member function âvoid GreedyBound::distance()â: greedy4.c++:60: error: âTclâ was not declared in this scope greedy4.c++:60: error: âtclâ was not declared in this scope greedy4.c++:60: error: âTclâ is not a class or namespace greedy4.c++: In member function âvoid GreedyBound::greedy(int)â: greedy4.c++:72: error: âTclâ was not declared in this scope greedy4.c++:72: error: âtclâ was not declared in this scope greedy4.c++:72: error: âTclâ is not a class or namespace greedy4.c++:74: error: no matching function for call to âGreedyBound::GreedyBound()â greedy4.c++:11: note: candidates are: GreedyBound::GreedyBound(const GreedyBound) greedy4.c++: In member function âvoid GreedyBound::findangle(double, double, double)â: greedy4.c++:111: error: âTclâ was not declared in this scope greedy4.c++:111: error: âtclâ was not declared in this scope greedy4.c++:111: error: âTclâ is not a class or namespace greedy4.c++: In member function âvoid GreedyBound::display(int)â: greedy4.c++:161: error: âTclâ was not declared in this scope greedy4.c++:161: error: âtclâ was not declared in this scope greedy4.c++:161: error: âTclâ is not a class or namespace greedy4.c++: In constructor âGreedyBound::BsrAgentClass::BsrAgentClass()â: greedy4.c++:186: error: class âGreedyBound::BsrAgentClassâ does not have any field named âTclClassâ greedy4.c++: In static member function âstatic TclObject* GreedyBound::BsrAgentClass::create(int, const char* const*)â: greedy4.c++:188: error: cannot convert âGreedyBound::BsrAgent*â to âTclObject*â in return greedy4.c++: At global scope: greedy4.c++:189: error: expected unqualified-id at end of input [r...@localhost ns-2.34] Thanking You, Gayathri Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/
Re: [ns] ns-2.34 installation problem
Hi Tom, Thanks for your comments. I finally got to to work. NS-2.35 really works under cygwin!! I also publish the step-by-step installation at the following URL. http://www.ns2ultimate.com/post/441093095/ns-2-35-works-on-cygwin Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 3/11/2010, Tom Henderson t...@ponymail.com wrote: On 3/10/10 12:01 AM, Teerawat Issariyakul wrote: Hi Sidney, Thank you for your email. I have tried the followings and all of them does not work. - Window XP, Cygwin 1.7, ns-2.33 - Window XP, Cygwin 1.5, ns-2.33 - Window XP, Cygwin 1.7, ns-2.34 - Window XP, Cygwin 1.5, ns-2.34 - Window 7, Cygwin 1.7, ns-2.33 - Window 7, Cygwin 1.7, ns-2.34 - I guess the other version won't work too. - Ubuntu 9.10, ns-2.33 - Ubuntu 9.10, ns-2.34 I am guessing that the problem is with recent change in gcc package of all Linux distribution. The one that work is Ubuntu 8.04 with ns-2.34. Lupe, you might want to try the same thing. What I do is that I set up a Ubuntu box inside a VMware running on Windows 7. It's a bit of hassle but it works. I will put the instruction up on my blog soon. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com Teerawat, you should be able to take the ns-allinone-2.35-RC2 candidate and either use that as is on Cygwin 1.7, or swap out the ns-2.35 directory for another version that you want to use. As Sidney pointed out, these are posted here: http://nsnam.isi.edu/nsnam/index.php/Roadmap Please send testing results or bug reports or patches for this release candidate to the ns-developers mailing list. Thanks, Tom
Re: [ns] ns-2.34 installation problem
Hi Sidney, Thank you for your email. I have tried the followings and all of them does not work. - Window XP, Cygwin 1.7, ns-2.33 - Window XP, Cygwin 1.5, ns-2.33 - Window XP, Cygwin 1.7, ns-2.34 - Window XP, Cygwin 1.5, ns-2.34 - Window 7, Cygwin 1.7, ns-2.33 - Window 7, Cygwin 1.7, ns-2.34 - I guess the other version won't work too. - Ubuntu 9.10, ns-2.33 - Ubuntu 9.10, ns-2.34 I am guessing that the problem is with recent change in gcc package of all Linux distribution. The one that work is Ubuntu 8.04 with ns-2.34. Lupe, you might want to try the same thing. What I do is that I set up a Ubuntu box inside a VMware running on Windows 7. It's a bit of hassle but it works. I will put the instruction up on my blog soon. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com On 3/8/2010, Sidney Doria ssdo...@gmail.com wrote: Issariayakul, this problem has been reported by me and is already addressed by Tom in NS-2.35 RC, as you can see in the NS-2 roadmap: http://nsnam.isi.edu/nsnam/index.php/Roadmap You can use NS-2.33, NS-2.34 in Cygwin 1.5.25 (legacy-setup.exe), but to install It in Windows 7, you must use compatible mode (as win95). After the setup, recreate the icon in start menu (the original icon won't work), or use the cygwin.bat directly. Sidney Doria UFCG / BRAZIL 2010/3/6 Teerawat Issariyakul teera...@ece.ubc.ca: Hi Lupe, I am facing the similar problem. Both Ns 2.33 and NS 2.34 do not work with Cygwin 1.7. The suggestion is to go back and use Cygwin 1.5. As for you problem--an alert for gcc is not found, I guess you can ignore it by pressing 'n'. GCC is on your system but NS2 just can't find it. You can begin building it. The real problem, (according to my guess), is you cannot build Tcl/Tk on Cygwin 1.7. I am trying several options. I would like to share it with you. Please see below: 1. Cygwin 1.7 does not work for both 2.33 and 2.34. 2. Cygwin 1.5 MAY work with 2.33 and 2.34. I tried it long ago. And, it worked. The problem is I cannot find Cygwin 1.5 anywhere. I try to use setup-legacy.exe from Cygwin. But I have a feeling that it still install Cygwin v 1.7. 3. Cygwin 1.5 does not work with Windows 7. Even if you get it to work, you cannot run it on Windows 7. Here is my main question: Where do you get Cygwin 1.5.25. Thanks, Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com On 3/5/2010, Lupe Krops lupe...@yahoo.com wrote: Hi to everyone, I'm trying to install ns-allinone-2.34 on win xp. I have installed the full package of cygwin v. 1.7.1. When I tried to ./install the ns-2.34 it gave me the message the Package gcc is not present on your system (also cannot find xorg-x11-base and xfree86-base). I found a post saying that ns-2.34 best works with cygwin 1.5.25, so i removed the previous version of cygwin and installed v. 1.5.25. However, it gives me the same errors. I checked with gcc -v command and shows me that it runs gcc version 3.4.4 Also i compiled (without any problem) a .c file, just to see that the compiler is successfully installed. I really don't know what else to do or what to check. Any help is much appreciated. Regards, Lup -- Sidney Doria Redes ad hoc móveis Doutorado em Computação UFCG Brasil Nessa jornada, o conhecimento será o seu escudo... (Mestre dos Magos no episódio do grimoire de ouro)
[ns] ns-2.34 installation problem AND the working Solution
Hi Aslinda, Thanks for your comments. BTW, how do you uninstall/install gcc 4.3? Do you have any suggestion of website which gives instruction? Lupe, Aslinda gave a very good comment on gcc version. BTW, I just post a note on how to install NS2 on Ubuntu. Please see the following post. Problem: http://www.ns2ultimate.com/post/439346614/working-combination-ns-2-34-ubuntu-8-04-and-perhaps Solution: http://www.ns2ultimate.com/post/425358640/ns2-windows-7-and-cygwin-1-7-what-a-nightmare Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 3/10/2010, Aslinda Hassan aslinda.has...@mun.ca wrote: Hi.. Just to add, I have successfully install ns-2.34 in ubuntu 9.10. But you are right about the gcc distribution, since ubuntu 9.10 uses gcc-4.4. When I used the default version of gcc in ubuntu 9.10, I did encounter some problems. So, I downloaded gcc-4.3 and changed the gcc compiler in the makefile.in. Once I did that, everything went well. Regards Aslinda Hassan Computer Engineering Research Lab Faculty of Engineering and Applied Science Memorial University of Newfoundland -Original Message- From: ns-users-boun...@isi.edu [mailto:ns-users-boun...@isi.edu] On Behalf Of Teerawat Issariyakul Sent: Wednesday, March 10, 2010 4:31 AM To: ssdo...@gmail.com; ns-users@ISI.EDU; lupe...@yahoo.com Subject: Re: [ns] ns-2.34 installation problem Hi Sidney, Thank you for your email. I have tried the followings and all of them does not work. - Window XP, Cygwin 1.7, ns-2.33 - Window XP, Cygwin 1.5, ns-2.33 - Window XP, Cygwin 1.7, ns-2.34 - Window XP, Cygwin 1.5, ns-2.34 - Window 7, Cygwin 1.7, ns-2.33 - Window 7, Cygwin 1.7, ns-2.34 - I guess the other version won't work too. - Ubuntu 9.10, ns-2.33 - Ubuntu 9.10, ns-2.34 I am guessing that the problem is with recent change in gcc package of all Linux distribution. The one that work is Ubuntu 8.04 with ns-2.34. Lupe, you might want to try the same thing. What I do is that I set up a Ubuntu box inside a VMware running on Windows 7. It's a bit of hassle but it works. I will put the instruction up on my blog soon. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com On 3/8/2010, Sidney Doria ssdo...@gmail.com wrote: Issariayakul, this problem has been reported by me and is already addressed by Tom in NS-2.35 RC, as you can see in the NS-2 roadmap: http://nsnam.isi.edu/nsnam/index.php/Roadmap You can use NS-2.33, NS-2.34 in Cygwin 1.5.25 (legacy-setup.exe), but to install It in Windows 7, you must use compatible mode (as win95). After the setup, recreate the icon in start menu (the original icon won't work), or use the cygwin.bat directly. Sidney Doria UFCG / BRAZIL 2010/3/6 Teerawat Issariyakul teera...@ece.ubc.ca: Hi Lupe, I am facing the similar problem. Both Ns 2.33 and NS 2.34 do not work with Cygwin 1.7. The suggestion is to go back and use Cygwin 1.5. As for you problem--an alert for gcc is not found, I guess you can ignore it by pressing 'n'. GCC is on your system but NS2 just can't find it. You can begin building it. The real problem, (according to my guess), is you cannot build Tcl/Tk on Cygwin 1.7. I am trying several options. I would like to share it with you. Please see below: 1. Cygwin 1.7 does not work for both 2.33 and 2.34. 2. Cygwin 1.5 MAY work with 2.33 and 2.34. I tried it long ago. And, it worked. The problem is I cannot find Cygwin 1.5 anywhere. I try to use setup-legacy.exe from Cygwin. But I have a feeling that it still install Cygwin v 1.7. 3. Cygwin 1.5 does not work with Windows 7. Even if you get it to work, you cannot run it on Windows 7. Here is my main question: Where do you get Cygwin 1.5.25. Thanks, Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com On 3/5/2010, Lupe Krops lupe...@yahoo.com wrote: Hi to everyone, I'm trying to install ns-allinone-2.34 on win xp. I have installed the full package of cygwin v. 1.7.1. When I tried to ./install the ns-2.34 it gave me the message the Package gcc is not present on your system (also cannot find xorg-x11-base and xfree86-base). I found a post saying that ns-2.34 best works with cygwin 1.5.25, so i removed the previous version of cygwin and installed v. 1.5.25. However, it gives me the same errors. I checked with gcc -v command and shows me that it runs gcc version 3.4.4 Also i compiled (without any problem) a .c file, just to see that the compiler is successfully installed. I really don't know what else to do or what to check. Any help is much appreciated
[ns] For NS2 Newbies (Re: Implementing a new protocol in NS2)
Hi, A lot of us would have got a lot of questions like I am an NS2 Newbie. Please help me. Tell me how to start learning NS2. Well, most NS2 experts would know right off the bat that. It is very explain to newbies what to do. Newbies, you have a long laundry list to do. To help the newbies get started, I post a primer for newbie. For newbies, don't get me wrong. I do not reduce the workload for you guys. You still have the same amount of work to do. I just make it systematic. It would give you a piece of mind when you know the number of steps you have to go through, and know where you are now. Please visit the blog post: http://www.ns2ultimate.com/post/434349586/for-ns2-newbies I hope it will help. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com On 3/6/2010, Teerawat Issariyakul teera...@ece.ubc.ca wrote: Hi, I don't mean to discourage you. But I think learning NS2 within its scope is easy. But when you want to go beyond that, you've got a lot of work to do. If you really want to know NS2, here is the step that I would suggest you should learn. 1. Learn how NS2 pass packets from one object to another. The simplest one is from a Node to a SimpleLink. 2. Learn how to bind C++ and OTcl. This is a hard one. It will be easier when you understand the first step. 3. Learn the module you are interested in. Really, it's quite hard if you don't have the basic in NS2, and want to jump start to do your own work. It's like a baby trying to jump before learning how to crawl. 4. Modify, include, and build. This would be the final thing that you need to learn. In fact, this step is quite easy you can actually learn it first. You just have to change a few thing in the make file. If you are interested. Here is a book from springer: T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2009. http://www.amazon.com/gp/product/0387717595?ie=UTF8tag=ns2ultteeiss-20linkCode=as2camp=1789creative=9325creativeASIN=0387717595 You may also find lecture notes and other resource at the following website: http://www.ece.ubc.ca/~teerawat/NS2.htm Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com On 3/6/2010, The Learner deeptisabnani.i...@pec.edu.in wrote: Hi all. I am a newbie in NS2. I need your help in guiding me as to how should I implement my own protocol in Wireless sensor networks in NS2. How should I proceed ? What is it that I need to know priori implementation of new protocol. I know the scripting in tcl by reading the document - http://www.isi.edu/nsnam/ns/tutorial/ but I am not clear with the C code it uses to implement the new protocol in NS2. Kindly guide me with the same asap. Thank You. Regards, The Learner... -- View this message in context: http://old.nabble.com/Implementing-a-new-protocol-in-NS2-tp27803359p27803359.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] Implementing a new protocol in NS2
Hi, I don't mean to discourage you. But I think learning NS2 within its scope is easy. But when you want to go beyond that, you've got a lot of work to do. If you really want to know NS2, here is the step that I would suggest you should learn. 1. Learn how NS2 pass packets from one object to another. The simplest one is from a Node to a SimpleLink. 2. Learn how to bind C++ and OTcl. This is a hard one. It will be easier when you understand the first step. 3. Learn the module you are interested in. Really, it's quite hard if you don't have the basic in NS2, and want to jump start to do your own work. It's like a baby trying to jump before learning how to crawl. 4. Modify, include, and build. This would be the final thing that you need to learn. In fact, this step is quite easy you can actually learn it first. You just have to change a few thing in the make file. If you are interested. Here is a book from springer: T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2009. http://www.amazon.com/gp/product/0387717595?ie=UTF8amp;tag=ns2ultteeiss-20amp;linkCode=as2amp;camp=1789amp;creative=9325amp;creativeASIN=0387717595 You may also find lecture notes and other resource at the following website: http://www.ece.ubc.ca/~teerawat/NS2.htm Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com On 3/6/2010, The Learner deeptisabnani.i...@pec.edu.in wrote: Hi all. I am a newbie in NS2. I need your help in guiding me as to how should I implement my own protocol in Wireless sensor networks in NS2. How should I proceed ? What is it that I need to know priori implementation of new protocol. I know the scripting in tcl by reading the document - http://www.isi.edu/nsnam/ns/tutorial/ but I am not clear with the C code it uses to implement the new protocol in NS2. Kindly guide me with the same asap. Thank You. Regards, The Learner... -- View this message in context: http://old.nabble.com/Implementing-a-new-protocol-in-NS2-tp27803359p27803359.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] ns-2.34 installation problem
Hi Lupe, I am facing the similar problem. Both Ns 2.33 and NS 2.34 do not work with Cygwin 1.7. The suggestion is to go back and use Cygwin 1.5. As for you problem--an alert for gcc is not found, I guess you can ignore it by pressing 'n'. GCC is on your system but NS2 just can't find it. You can begin building it. The real problem, (according to my guess), is you cannot build Tcl/Tk on Cygwin 1.7. I am trying several options. I would like to share it with you. Please see below: 1. Cygwin 1.7 does not work for both 2.33 and 2.34. 2. Cygwin 1.5 MAY work with 2.33 and 2.34. I tried it long ago. And, it worked. The problem is I cannot find Cygwin 1.5 anywhere. I try to use setup-legacy.exe from Cygwin. But I have a feeling that it still install Cygwin v 1.7. 3. Cygwin 1.5 does not work with Windows 7. Even if you get it to work, you cannot run it on Windows 7. Here is my main question: Where do you get Cygwin 1.5.25. Thanks, Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.ece.ubc.ca/~teerawat http://www.t-issariyakul.blogspot.com On 3/5/2010, Lupe Krops lupe...@yahoo.com wrote: Hi to everyone, I'm trying to install ns-allinone-2.34 on win xp. I have installed the full package of cygwin v. 1.7.1. When I tried to ./install the ns-2.34 it gave me the message the Package gcc is not present on your system (also cannot find xorg-x11-base and xfree86-base). I found a post saying that ns-2.34 best works with cygwin 1.5.25, so i removed the previous version of cygwin and installed v. 1.5.25. However, it gives me the same errors. I checked with gcc -v command and shows me that it runs gcc version 3.4.4 Also i compiled (without any problem) a .c file, just to see that the compiler is successfully installed. I really don't know what else to do or what to check. Any help is much appreciated. Regards, Lup
Re: [ns] [Suggestion for your question]: help!!! Adding new protocol in NS2
Hello Manoop, I think here is the main error: ... invoked from within _o14 addr (eval body line 1) invoked from within eval $node addr $args ... The line eval $node addr $args tries to invoke the instproc addr of $node. So what you have to see is 1. The class of $node (whether it is Node, MobileNode, and so on). 2. Track down the instproc addr of that class. My guess is that the instproc addr does not exist for some reasons. You have to find out why. If you don't need it, then modify the Tcl code to remove it. But if you need it, then add instproc addr to the Tcl file. If you don't know about how to read the Tcl Error message, you can visit my blog at http://ns2ultimate.tumblr.com/post/419191200/tcl-error-message-in-ns2, or http://t-issariyakul.blogspot.com/2010/02/tcl-error-message-in-ns2_28.html Also, for more information about Tcl/OTcl, see Chapter 3 and Appendix A in the following book from Springer: T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You may also find the following website useful: http://www.ece.ubc.ca/~teerawat/NS2.htm BR, Best Regards, Teerawat Issariyakul http://www.ece.ubc.ca/~teerawat http://t-issariyakul.blogspot.com http://ns2ultimate.tumblr.com/ (Beta) Hello NS Users, I installed ns2.34 allinone in ubuntu 9.10. And first time, I am trying to add a new protocol in NS2. I followed the steps at: http://masimum.inf.um.es/nsrt-howto/pdf/nsrt-howto.pdf After applying changes, I did: $ make clean $ make When I run my tcl script then it gives below error. I thought NS2 is not identifying the new protocol that I added. The new protocol name that I added is LVRF and used the same name in TCL script. TCL script is attached. Please guide me to fix the issue. (_o14 cmd line 1) invoked from within _o14 cmd addr 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 _o14#8243; line 2) (SplitObject unknown line 2) invoked from within _o14 addr (eval body line 1) invoked from within eval $node addr $args (default arm line 2) invoked from within switch -exact $routingAgent_ { DSDV { set ragent [$self create-dsdv-agent $node] } DSR { $self at 0.0 $node start-dsr } AODV { set ragent [$self cre... (procedure _o3 line 14) (Simulator create-wireless-node line 14) invoked from within _o3 create-wireless-node (eval body line 1) invoked from within eval $self create-wireless-node $args (procedure _o3 line 23) (Simulator node line 23) invoked from within $ns_ node (for body line 2) invoked from within for {set i 0} {$i $val(nn) } {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0; } (file lvrf.tcl line 63) -- Regards, Manoop Talasila Ph.D. student CS Dept, NJIT Email: m...@njit.edu On 2/23/2010, manoop talasila m...@njit.edu wrote:
Re: [ns] randomizing runs
Hi Abu, By default, NS2 is deterministic. If you would like to run NS2 in randomized scenarios, you need to execute $defaultRNG seed n prior to $ns run, where n is an integer. If n is zero, NS2 will use the current time and counter as a seed for random number generator. By default, n is set to 1, meaning every run would generate the same result. You may manually change the seed (e.g., 2, 3, 4, and so on), or set it to zero. I also posted the details on my blog at http://t-issariyakul.blogspot.com/2009/09/ns2-deterministic-vs-random.html For more information about Random Number Generators, see Chapter 12 in the following book from Springer: T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You may also find the following website useful: http://www.ece.ubc.ca/~teerawat/NS2.htm Best Wishes, Teerawat On 9/18/2009, abu shahriar azmshahr...@gmail.com wrote: Hi all, I am in trouble with randomizing ns run by seeding defaultRNG or ns-random. Can anyone help me about how to randomize runs? I am using a wired network topology. Thanks. --Shahriar
Re: [ns] Please Help
Hi, You may run make again from NS2 directory. It will create ns.exe. Best Regards, Teerawat On 9/22/2009, Sula K ksul...@yahoo.com wrote: Daer my brothers, in ns 2 I did rm ns.exe instead rm nam.exe , after that when iexcuted the following problem come out on the screen? u...@user-cfab0b1f55 ~ $ ns.exe bash: ns.exe: command not found
Re: [ns] how to modify tcp
Dear Vaishali, NS2 has two versions of SACK: Agent/TCP/Sack1 and Agent/TCP/SackRH. Check out the details in files ~ns/tcp/tcp-sack1.* and tcp-sack-rh.* BR Teerawat On 6/4/2009, vaishali mandhare v_mandh...@yahoo.com wrote: hello all, I want to increase performance of tcp in maodv but I cant do, instead of traditional tcp want to use reno or sack tcp. I was make changes but getting same result. Bellow is my tcl script for tcp . If anyone has idea about it please inform me as early as possible. set tcp_(0) [new Agent/TCP/Reno] $tcp_(0) set dst_addr_ 0xE00 $tcp_(0) set window_ 32 $tcp_(0) set interval_ 1.0 $tcp_(0) set packetSize_ 256 $ns_ attach-agent $node_(0) $tcp_(0) set ftp_(0) [new Application/FTP] $ftp_(0) attach-agent $tcp_(0) $ftp_(0) set type_ FTP $ftp_(0) set maxpkts_ 1740 $ftp_(0) set dst_ 0xE00 $ns_ at 30.0 $ftp_(0) start for {set i 40} {$i 50} {incr i} { $ns_ at 0.01 $node_($i) aodv-join-group 0xE00 wating for replay! thanks! vaishu! Own a website.Get an unlimited package.Pay next to nothing.*Go to http://in.business.yahoo.com/
Re: [ns] TCP agent and sink
Dear Vishal, It won't. The reason is because you attach two TCP agents to two nodes. Each node attach to different link. But the packets generated by both TCP agents will go to the same place. When the packets reach the destination, it would simply be destroy. Of course, the contention would be at the link connecting into the sink node. But that is the nature of packets sharing the node. For more information about Links, Nodes, Agents and Applications, see the following book from Springer: T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You may also find the following website useful: http://www.ece.ubc.ca/~teerawat/NS2.htm On 5/27/2009, Vishal Agarwal vis...@gmail.com wrote: But would both the agents will fight for channel contention or packets from both the sources will go regardless of transmission from other end..?? On Wed, May 27, 2009 at 9:56 PM, Teerawat Issariyakul teera...@ece.ubc.cawrote: Dear Vishal, Only one sink is necessary. But you do need to connect both tcp agent to the same sink by using $ns connect $tcp1 $sink and $ns connect $tcp2 $sink. The result would be the same as when you have two sinks. Best, Teerawat On 5/27/2009, Vishal Agarwal vis...@gmail.com wrote: Hello users, I am attaching 2 tcp agents at one source so do i need to attach 2 sinks at destination also or only 1 is sufficient. And when the agent tries to access the channel will there be any difference if there are two sinks rather than one? Thanks, -- Vishal Agarwal -- Vishal Agarwal
Re: [ns] TCP agent and sink
Dear Vishal, Only one sink is necessary. But you do need to connect both tcp agent to the same sink by using $ns connect $tcp1 $sink and $ns connect $tcp2 $sink. The result would be the same as when you have two sinks. Best, Teerawat On 5/27/2009, Vishal Agarwal vis...@gmail.com wrote: Hello users, I am attaching 2 tcp agents at one source so do i need to attach 2 sinks at destination also or only 1 is sufficient. And when the agent tries to access the channel will there be any difference if there are two sinks rather than one? Thanks, -- Vishal Agarwal
Re: [ns] A problem about the length of a queue
Well, what you can do is to write a function, say lengthb()) in class PacketQueue (there is a variable pq_ of class Queue). In this function, determine the number of bytes of each packet from head_ to tail_ of a PacketQueue object and returns the total number of bytes. I posted how to determine the packet size at http://t-issariyakul.blogspot.com/2009/02/packet-size-in-ns2.html For more information about Packets, see Chapter 8 in the following book from Springer: T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You may also find the following website useful: http://www.ece.ubc.ca/~teerawat/NS2.htm Best, Teerawat hi everyone! In NS2, the length of a queue is always caculated as the number of packets in it.But we know that the size of a packet always differs from another's. In my opinion, in practice the length of a queue should be measured by the size, rather than the number, of all packets in it. In my simulation, i need to simulate the length of the Q as the total size in it,how can i achieve this? thanks in advance! Guisong Huang ´©Ô½µØÕð´ø ¼ÍÄîãë´¨µØÕðÒ»ÖÜÄê)
Re: [ns] Help on ns2 internal organization
Hi Qweq, I agree with you when you change C++ code you WILL NEED to recompile it. But, Udit, if you want to change topology, you will not need to modify C++ code. You can do it in Tcl. Defining your own topology in Tcl does not require recompilation. In fact, there is no Tcl compiler. Tcl is just an interpreter. Best, Teerawat On 5/10/2009, qweq adcsad nill_akaser_t...@yahoo.com wrote: Your proposition is not true. The modified code should be recompiled to take an effect. On Sun, 5/10/09, Udit Kumar udit.v...@gmail.com wrote: From: Udit Kumar udit.v...@gmail.com Subject: [ns] Help on ns2 internal organization To: ns-users@ISI.EDU Date: Sunday, May 10, 2009, 5:03 AM Hi Friends, We say that in ns2 is build using C++ and Tcl language that allow modifying the topology and simulating without compiling the model again. Can you please tell me how this is happening, Why there is no need to recomiple c++ again, Or how data structure is maintained inside ns2/c++ so that there is no need to recompile again. Please help on this ASAP, It is urgent for me. Thanks Regards, Udit Kumar
Re: [ns] to pass message class application to agent
Dear Gisane, NS2 defines applications in class Application (see ~ns/apps/app.h,cc). The derive classes of application are for example TrafficGenerator (e.g., CBR) or FTP. The application models user demand. Therefore it need to send message to an agent saying that a use needs to send data. Here is how. Class Application have a pointer to an Agent object, agent_. In order to send a message with size nbyte bytes to an associated agent. It executes agent-sendmsg(nbytes); where the function sendmsg(...) belongs to class Agent. There are several more ways that an Agent object can received a message. Those ways are defined in function of class Agent (see ~ns/common/agent.cc). (This message is posted in my blog at http://t-issariyakul.blogspot.com/2009/04/how-application-sends-message-to-agent.html) For more information about Agents and Applications, see Chapters 9-11 in the following book from Springer: T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You may also find the following website useful: http://www.ece.ubc.ca/~teerawat/NS2.htm Best Regards, Teerawat On 4/28/2009, Gisane Michelon gisan...@gmail.com wrote: Somebody has a example how to pass a message of class application to agent Ping? How I do this? thanks Ane
Re: [ns] ns problem1
You need to install XServer. Go to website of Cygwin or google to find out how. Best, Teerawat On 3/15/2009, ali bala mrbala...@yahoo.com wrote: hi i had problem with nam (i worke with ns-2 under cygwin) i did this steps for troubleshooting untill now : while running simple example programs, I get error, $ nam: no display name and no $DISPLAY environment variable. I tried set it with export DSIPLAY=:0.0 it gives error $ nam: couldn't connect to display 0.0 I also tried startx before running programs, it gives following error, $ nam: [code omitted because of length] : no event type or button # or keysym while executing bind Listbox MouseWheel { %W yview scroll [expr {- (%D / 120) * 4}] units } invoked from within if {[tk windowingsystem] eq classic || [tk windowingsystem] eq aqua} { bind Listbox MouseWheel { %W yview scroll [expr {- (%D)}] units } bind Li... this is my bashrc file : LD_LIBRARY_PATH=/home/ALI/ns-allinone-2.33/otcl-1.13:/home/ALI/ns-allinone-2.33//lib TCL_LIBRARY=/home/ALI/ns-allinone-2.33/tcl8.4.18/library export LD_LIBRARY_PATH export TCL_LIBRARY and my bash_profile file : PATH=${HOME}/ns-allinone-2.33/bin:${PATH} but i have problem with nam now and i see this error : $ nam: [code omitted because of length] : no event type or button # or keysym while executing bind Listbox MouseWheel { %W yview scroll [expr {- (%D / 120) * 4}] units } invoked from within if {[tk windowingsystem] eq classic || [tk windowingsystem] eq aqua} { bind Listbox MouseWheel { %W yview scroll [expr {- (%D)}] units } bind Li... can anybody figure out where the problem lies? (and methode for solve) thanks mr.ali.balador homepage:www.balador.org )
Re: [ns] How to Drop Packets From a Particular Sender
Hi Mats, I agree with you. In fact, function drop(p) will check whether the packet is in used before dropping it. But the function drop(p) only exists for an NsObject. Objects not derived from class NsObject may not define this function. If you guys would like to use Packet::free(p), you are responsible for consistency check. Failing to do so may result in errors like segmentation fault. Best, Teerawat On 3/13/2009, Mats Folke mats.fo...@ericsson.com wrote: Hi! Wouldn't it be kind of dangerous to drop the packet using the first method described? The packet would jsut disappear and the logs would not be consistent. I would recommend using the latter method drop(p) instead. This makes the logging consistent and almost all objects I've come across where I would like to drop packets have been Connector objects. Best regards, Mats Folke Teerawat Issariyakul wrote: Hi, Suppose you have a pointer p. You can drop the packet by executing Packet::free(p) Also the packet *p can be dropped from within the Connector object by invoking function drop as follows: drop(p); Note that drop(p) is a function of class Connector, and therefore must be invoked from within the scope of class Connector. I posted how to drop a a packet in the following blog: http://t-issariyakul.blogspot.com/2009/03/ns2-dropping-packet.html For more information about Connector and Packet, see Chapters 5 and 8, respectively, in the following book from Springer: T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You may also find the following website useful: http://www.ece.ubc.ca/~teerawat/NS2.htm On 3/13/2009, muralikrishna g muralikrishn...@gmail.com wrote: Hi to all.. i am using ns-2.33, here in my work i have to drop packets from a particular sender, i am planing to drop packets depending on the sender node_id please help me regarding this.. by Muralikrishna Gaddam (muralikrishn...@gmail.com) -- 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
Re: [ns] Classifier no slot.
On 3/12/2009, Mayank Daga dagamay...@gmail.com wrote: Hi, Basically, you are accessing the slot -1 which does not exist. I posted the details at http://t-issariyakul.blogspot.com/2009/03/no-slot-error-for-classifiers.html For more information about Classifiers, see Chapter 6 in the following book from Springer: T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You may also find the following website useful: http://www.ece.ubc.ca/~teerawat/NS2.htm Best, Teerawat Hey all, I have been trying to implement normal wireless scenario using DSDV protocol. The scenario has 49 equispaced nodes and there is some traffic applied. The problem is when I run the TCL script, i get the following output: linux-v1gr:~/tcl # ns test_soma.tcl num_nodes is set 49 warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl INITIALIZE THE LIST xListHead Starting Simulation... channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 550.0 SORTING LISTS ...DONE! --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o139: no target for slot -1 _o139 type: Classifier/Port content dump: classifier _o139 0 offset 0 shift 2147483647 mask 2 slots slot 0: _o875 (CMUTrace/Recv) slot 255: _o130 (Agent/DSDV) -- Finished standard no-slot{} default handler -- Please help. -- Regards, Mayank Daga Senior Undergraduate Student, Department of Information Technology, National Institute of Technology, Durgapur, India
Re: [ns] ns problem
Hi, Basically, you are accessing the slot -1 which does not exist. I posted the details at http://t-issariyakul.blogspot.com/2009/03/no-slot-error-for-classifiers.html For more information about Classifiers, see Chapter 6 in the following book from Springer: T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You may also find the following website useful: http://www.ece.ubc.ca/~teerawat/NS2.htm Best, Teerawat On 3/11/2009, ali bala mrbala...@yahoo.com wrote: hi i wrote a simple example and run at ns but i see this: --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o18: no target for slot -1 _o18 type: Classifier/Hash/Dest content dump: classifier _o18 0 offset 0 shift 2147483647 mask 1 slots slot 2: _o116 (Classifier/Port) -1 default -- Finished standard no-slot{} default handler -- i havent understanding about that i wanted to know about that thanks
Re: [ns] ARQ implementation for terrestrial links
Dear Ioanis, There is an example implementation of ARQ in the following book from Springer useful. T. Issariyakul and E. Hossain , Introduction to Network Simulator NS2, Springer, Oct. 2008, ISBN: 978-0-387-71759-3 http://www.springer.com/engineering/signals/book/978-0-387-71759-3?detailsPage=otherBooksCIPageCounter=CI_MORE_BOOKS_BY_AUTHOR0 You may also find the following slides useful http://www.ece.ubc.ca/~teerawat/NS2.htm Best Regards, Teerawat On 1/10/2009, Ioannis Komnios ikomn...@ee.duth.gr wrote: Dear ns-users, I am trying to conduct some experiments using TCP on transport layer and, at the same time, some reliable link layer protocol, like ARQ. I've been trying for days to find an ARQ implementation in ns and I have only found HDLC implementation for satellite links. Is there any ARQ implementation available for terrestrial links? Or any other reliable link layer protocol already implemented in ns2? I would be grateful if you could help me... Thank you in advance, Ioannis Komnios
Re: [ns] Packet Arrival rate -- Need Help*
Dear LiViAn, What do you mean by packet arrival rate? Arrive at the queue, or from the source? Does it need to pertain to a certain TCP flow? Best, Teerawat On 11/12/2008, LiViAn ZaH [EMAIL PROTECTED] wrote: if (typeof YAHOO == undefined) { var YAHOO = {}; } YAHOO.Shortcuts = YAHOO.Shortcuts || {}; YAHOO.Shortcuts.hasSensitiveText = false; YAHOO.Shortcuts.sensitivityType = []; YAHOO.Shortcuts.doUlt = false; YAHOO.Shortcuts.location = us; YAHOO.Shortcuts.document_id = 0; YAHOO.Shortcuts.document_type = ; YAHOO.Shortcuts.document_title = Packet Arrival rate -- Need Help; YAHOO.Shortcuts.document_publish_date = ; YAHOO.Shortcuts.document_author = [EMAIL PROTECTED]; YAHOO.Shortcuts.document_url = ; YAHOO.Shortcuts.document_tags = ; YAHOO.Shortcuts.document_language = english; YAHOO.Shortcuts.annotationSet = { lw_1226448661_0: { text: Kindest Regards, extended: 0, startchar: 395, endchar: 409, start: 395, end: 409, extendedFrom: , predictedCategory: , predictionProbability: 0, weight: 0.597372, relScore: 11.5289, type: [shortcuts:/concept], category: [CONCEPT], wikiId: , relatedWikiIds: [], relatedEntities: [], showOnClick: [], context: begin --- Can anyone suggest some steps? Thanks a lot.in advance. Kindest Regards LiViaN, metaData: { visible: true } } }; YAHOO.Shortcuts.headerID = 0ad8d09d3b285675fdce2fa1f4d88458; Hello I want to modify TCP westwood's scheme for packet arrival rate calculation. Do I need to modify the queue.cc file or i can do that same from westwood.cc ? I m not so sure from which step I can begin --- Can anyone suggest some steps? Thanks a lot.in advance. Kindest Regards LiViaN
Re: [ns] Packet Arrival rate -- Need Help*
Dear LiViAn, What do you mean by packet arrival rate? Arrive at the queue, or from the source? Does it need to pertain to a certain TCP flow? Best, Teerawat On 11/12/2008, LiViAn ZaH [EMAIL PROTECTED] wrote: if (typeof YAHOO == undefined) { var YAHOO = {}; } YAHOO.Shortcuts = YAHOO.Shortcuts || {}; YAHOO.Shortcuts.hasSensitiveText = false; YAHOO.Shortcuts.sensitivityType = []; YAHOO.Shortcuts.doUlt = false; YAHOO.Shortcuts.location = us; YAHOO.Shortcuts.document_id = 0; YAHOO.Shortcuts.document_type = ; YAHOO.Shortcuts.document_title = Packet Arrival rate -- Need Help; YAHOO.Shortcuts.document_publish_date = ; YAHOO.Shortcuts.document_author = [EMAIL PROTECTED]; YAHOO.Shortcuts.document_url = ; YAHOO.Shortcuts.document_tags = ; YAHOO.Shortcuts.document_language = english; YAHOO.Shortcuts.annotationSet = { lw_1226448661_0: { text: Kindest Regards, extended: 0, startchar: 395, endchar: 409, start: 395, end: 409, extendedFrom: , predictedCategory: , predictionProbability: 0, weight: 0.597372, relScore: 11.5289, type: [shortcuts:/concept], category: [CONCEPT], wikiId: , relatedWikiIds: [], relatedEntities: [], showOnClick: [], context: begin --- Can anyone suggest some steps? Thanks a lot.in advance. Kindest Regards LiViaN, metaData: { visible: true } } }; YAHOO.Shortcuts.headerID = 0ad8d09d3b285675fdce2fa1f4d88458; Hello I want to modify TCP westwood's scheme for packet arrival rate calculation. Do I need to modify the queue.cc file or i can do that same from westwood.cc ? I m not so sure from which step I can begin --- Can anyone suggest some steps? Thanks a lot.in advance. Kindest Regards LiViaN
Re: [ns] How to send a packet to previous node
Dear Howard, The easiest way to transmit from one NsObject (e.g. Nodes) to another is through a (C++ and Tcl) Connector object. A connector has two pointers to NsObjects: target_ and drop_. In the OTcl domain, it uses an OTcl commands target and drop (followed by the name of the NsObject) to specify its forwarding object and dropping object A Connector object recieves a Packet p through its funciton recv(p,h). Upon receiving a packet, the Connector object forwards the packet p to its forwarding object by executing target_-recv(p,h). To drop a packet, the function drop(p) of a Connector object is invoked. In this case, the packet is forwarded to the dropping object *drop_ which is responsible for destroying the packet. To find out more about Connector please refer to chapter 5 in the following book from Springers: If you are a beginning user, you may look at the following book from Springer. T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. Here is the link: http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You might also find the following slide useful: http://www.ece.ubc.ca/~teerawat/NS2.htmhttp://www.ece.ubc.ca/%7Eteerawat/NS2.htm On 11/11/2008, howardgod howardgod [EMAIL PROTECTED] wrote: -- Forwarded message -- From: howardgod howardgod [EMAIL PROTECTED] Date: 2008/11/8 Subject: How to send a packet to previous node To: ns-users@isi.edu I want to send a packet to previous node. And I don't know how to find previous node's ID and where to fill the ID. I found that in common header, there's a prev_hop and next_hop_. But the prev_hop_ is NOT the previous node. It's the source. So I want to fill previous node's ID to common header's next_hop_. And is there anything else I have to fill? btw I found a way to do so. Reverse the ip header's src and dst then send it. but It still do nothing at all. HELP ME!! PLZ thanks a lot. Howard.
Re: [ns] How to send a packet to previous node
Dear Howard, Say you have a topology like (n1)--(n2). Usually, packet will flow from (n1) to (n2). When you want to send a packet from (n2) back to (n1), you can do the following. 1. Define an instvar $conn (whose class Connector) of n2 2. Put the following in the Tcl simulation script [$n2 set conn] target $n1 3. I don't know when you want to send the packet back to n1, but when you want to do so, you can simply send the packet to $conn by using function recv(p,h) I hope this will help. Regards, Teerawat On 11/11/2008, howardgod howardgod [EMAIL PROTECTED] wrote: Deer Teerawat I already know how to transmit to node. 1.generate new packet 2.fill common header and destination address 3. target-recv(p,h) but my problem is that, I can't find out previous hop's address. My purpose is to send a packet to previous node in IFQ. But when packet received by queue's recv function. I can't find anything about previous hop's address in common header, ip header or mac-802_11 header. I also know that in routing object, it can find out the next hop's information in routing table. But unfortunately in IFQ can't access routing object's functions. any way, thanks a lot of ur reply. Howard 2008/11/11 Teerawat Issariyakul [EMAIL PROTECTED] Dear Howard, The easiest way to transmit from one NsObject (e.g. Nodes) to another is through a (C++ and Tcl) Connector object. A connector has two pointers to NsObjects: target_ and drop_. In the OTcl domain, it uses an OTcl commands target and drop (followed by the name of the NsObject) to specify its forwarding object and dropping object A Connector object recieves a Packet p through its funciton recv(p,h). Upon receiving a packet, the Connector object forwards the packet p to its forwarding object by executing target_-recv(p,h). To drop a packet, the function drop(p) of a Connector object is invoked. In this case, the packet is forwarded to the dropping object *drop_ which is responsible for destroying the packet. To find out more about Connector please refer to chapter 5 in the following book from Springers: If you are a beginning user, you may look at the following book from Springer. T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. Here is the link: http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You might also find the following slide useful: http://www.ece.ubc.ca/~teerawat/NS2.htm http://www.ece.ubc.ca/%7Eteerawat/NS2.htm On 11/11/2008, howardgod howardgod [EMAIL PROTECTED] wrote: -- Forwarded message -- From: howardgod howardgod [EMAIL PROTECTED] Date: 2008/11/8 Subject: How to send a packet to previous node To: ns-users@isi.edu I want to send a packet to previous node. And I don't know how to find previous node's ID and where to fill the ID. I found that in common header, there's a prev_hop and next_hop_. But the prev_hop_ is NOT the previous node. It's the source. So I want to fill previous node's ID to common header's next_hop_. And is there anything else I have to fill? btw I found a way to do so. Reverse the ip header's src and dst then send it. but It still do nothing at all. HELP ME!! PLZ thanks a lot. Howard.
Re: [ns] how to implement extension to NS2
You may look at the following book from Springer. T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. Here is the link: http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You might also find the following slide useful: http://www.ece.ubc.ca/~teerawat/NS2.htmhttp://www.ece.ubc.ca/%7Eteerawat/NS2.htm Best, Teerawat On 11/6/2008, Syed Md. Ashraful Karim [EMAIL PROTECTED] wrote: Hi I want implement a security extension to ad-hoc routing protocol in ns2.33. If anybody knows how to extend ns2, which core ns2.33 files are to be edited, or any tutorial on writing extension, please help me. Oh, I am a newbie in NS2 and C++ (not in C). Thanks, Ashraf Norwegian University of Science and Technology, Trondheim, Norway.
Re: [ns] where is the packet header offset set when a new packet is generated?
Packet construction is fairly subtle. In fact it consist of three phases: 1) At the compilation (when you type make): In this phase, NS2 allocate the memory for all TclClasses. PacketHeaderClass defined in file ~ns/common/packet.h,cc is one of them. In the constructor of this class, the sizeof() is used to determine space needed to store the packet header. The size is passed up the hierarchy and stored in the variable hdrlen_. 2) At the network configuration phase: Remember that we have just compute the size of each header. But the offset is the accumulation of the size. When you invokes $ns run, instproc create_packetformat() is invoked. Here the offset is computed by repeatedly added all the active header together. 3) During the simulation phase: You may invoke function allocpkt() of class Agent. Here the value of offset_ has already been set, and can be used at will. I suggest you to go through chapter 8 (specifically Section 8.3.8) in the following book from Springer. You will find everything you need about packets: T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. Here is the link: http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You might also find the following slide useful: http://www.ece.ubc.ca/~teerawat/NS2.htmhttp://www.ece.ubc.ca/%7Eteerawat/NS2.htm Best, Teerawat On 10/31/2008, matt Wood [EMAIL PROTECTED] wrote: Dear all, In NS2, the packet header must be accessed through its offset. But I can not find where the offset_ is initialized. Please look and see if my understanding of this issue is right or not: In the RTPAgent, it is directly use hdr_cmn::access(p) to access the header part. When the RTPAgent is configured in TCL, a binding is made to connect the RTP header's offset to the offset_ of struct hdr_cmn. Therefore, through the forced type conversion return (hdr_rtp*) p-access(offset_); (in ns/apps/rtp.cc, and p is a pointer to a new Packet instance), the offset_ in hdr_rtp (which is a child of hdr_cmn) is initialized to the value configured through TCL. Thank you.
Re: [ns] How to measure rate of the traffic
Hi, What UDP does is to create packets based on the application. Under your scenario, Pareto tells UDP when to create a packet, and UDP will create the packet accordingly. Therefore the rate of UDP is equal to the rate at which the Pareto traffic is generated. Best, Teerawat On 10/29/2008, J S [EMAIL PROTECTED] wrote: Hello - I am using pareto distribution to send UDP packets between two nodes. I am wondering how would I measure the rate of the UDP packets sent between the two nodes. Thanks
Re: [ns] Generating packets on queue events
Hi, In NS2, generating a new packet is not that complicated. Class Packet has a function alloc() which returns a pointer to the created packet. You may find the detail in file ~/ns/common/packet.h. At the receiving end, you may process the packet in the function recv(p,h), where p is a pointer to a packet. There is a detailed packets (Chapter 8) and function recv(p,h) (Chapter 5) can be found in the following book from Springer: T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. Here is the link: http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You might also find the following slide useful: http://www.ece.ubc.ca/~teerawat/NS2.htmhttp://www.ece.ubc.ca/%7Eteerawat/NS2.htm Best, Teerawat On 10/28/2008, Prajjwal Devkota [EMAIL PROTECTED] wrote: Hi everyone, I am thinking of generating packets on certain queue events. The packets would be: 1. generated by the link layer (in real life, but not necessarily in ns-2, an approximation would do) 2. processed by the link layer on the receiving end, and acted upon I am thinking of this as one possible implementation of a project I am trying to do, though I am looking at other approaches too. (Such as using global variables in conjunction for timers: where I have a problem of waking up intervals right now).
Re: [ns] are there any TCP traffic models or generators on ns2?
Hi, TCP itself cannot generated traffic. It receives a demand for data transmission from a user. For example, you may use FTP and indicate that a user has infinite demand to transfer data. TCP then takes that demand and keep transmitting packets (practically forever). If you want to create your own traffic. You are looking for application. I'm not sure which type of traffic you are looking for (e.g., CBR, exponential ON-OFF). I suggest you to go through chapters 9-11 (esp. ch11) in the following book from Springer: T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. Here is the link: http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You might also find the following slide useful: http://www.ece.ubc.ca/~teerawat/NS2.htmhttp://www.ece.ubc.ca/%7Eteerawat/NS2.htm Best, Teerawat On 10/29/2008, e f [EMAIL PROTECTED] wrote: Hello, my question is...Are there any TCP traffic models or generatos in ns2? How can i create my own traffic model ? ___ ΧÏηÏιμοÏοιείÏε Yahoo!; ÎαÏεθήκαÏε Ïα ενοÏληÏικά μηνÏμαÏα (spam); Το Yahoo! Mail διαθÎÏει Ïην καλÏÏεÏη Î´Ï Î½Î±Ïή ÏÏοÏÏαÏία καÏά ÏÏν ενοÏληÏικÏν Î¼Î·Î½Ï Î¼Î¬ÏÏν http://login.yahoo.com/config/mail?.intl=gr
Re: [ns] ns-2 simulation verification
Well, Most of the time, you will have to see if the results make senses. But for a good research, you will need analytical results as a comparison. Regards, Teerawat On 10/27/2008, Ghada Khoriba [EMAIL PROTECTED] wrote: Dear all, How can I verify that the simulation results is right? Is there any typical Scenario to use for testing? Thanks in advance Ghada
Re: [ns] What is Packet Interval !!
Hi, If you are talking about the time that you need to transmit packet, it is actually defined by two things 1) packet size and 2) link characteristics. There is a detailed explanation of the packets and the scheduling (and timers) in the book from Springer: T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. Here is the link: http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You might also find the following slide useful: http://www.ece.ubc.ca/~teerawat/NS2.htmhttp://www.ece.ubc.ca/%7Eteerawat/NS2.htm The following might be useful to you: You can see the default packet size in the file ns-default.tcl (chapter 3). The packet size is different from one protocol to another. For example, for TCP, Agent/TCP set packetSize_ 1000 The second part depends on what link layer you are using. In a wired network, the link layer delay is defined in a variable link_ of class SimpleLink (chapter 7). This variable is bound to C++ class LinkDelay. It schedule two events: 1) the packets leave one place, and 2) the packet arrive at another place. Class LinkDelay has variables bandwidth_ and delay_ (propagation delay). Based on these two variable as well as the packet size, you can compute the packet interval. Hope this would be helpful. Best, Teerawat On 10/27/2008, Mathiew Moussa [EMAIL PROTECTED] wrote: Hi Jianliang, Thanks for the prompt reply, i appreciate it. I was wondering .. ok i'm in the ns-default.tcl file ... but there's nothing called 'packet interval'. Does have a different name or terminology, where is it located in the file ? And what does it exactly 'packet interval' , is it like TTL ? and about adding it to the MY tcl as an alternative to the above, can you give me an example or how to add it. Excuse me but I'm new at NS2 and details are important :) Thanks Alot. Mathiew Quoting J GAO/Jianliang GAO [EMAIL PROTECTED]: Hi Mathiew, You can change Packet Interval value in the file ns-default.tcl in folder ns-2.xx\tcl\lib. However, it is not so convenient to change the value of interval by modifying ns-default.tcl every time you test your code in different interval time. There is an alternative way to change the value of interval. You can change the value in your own .tcl code in the corresponding part of code of traffic you use. Obviously, this way facilitates your test. To find out what exact reason causes the error, using ddd or gdb to debug and track the code is very helpful. Regards, J GAO/Jianliang GAO 2008-10-27 åä»¶äººï¼ Mathiew Moussa åéæ¶é´ï¼ 2008-10-27 16:34:13 æ¶ä»¶äººï¼ ns-users@ISI.EDU æéï¼ ä¸»é¢ï¼ [ns] What is Packet Interval !! Hi All ns-users, Does anyone know what Packet Interval in NS2 is and WHERE can when change it. you see im using the SMAC and it was giving me an error Couldn't Schedule Timer after i ran my TCL script .. I got an answer from one of the guys that it might possibly have to do with the packet interval. Thanks in Advance. Mathiew
Re: [ns] Problems with FEC, Poisson and Errmodel
Hi, I guess you may look at chapters 11-12 the following book from Springer: T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. Here is the link: http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You might also find the following slide useful: http://www.ece.ubc.ca/~teerawat/NS2.htmhttp://www.ece.ubc.ca/%7Eteerawat/NS2.htm Here is the details: (1) how to apply the errmodel to the incoming link with a random loss probability whose value is r; NS2 provides several built-in error model. If you are looking at a random (non-correlated) loss, you may look at class ErrorModel in file ~ns/queue/errmodel.cc,h (Chapter 12). Here you can simply specify a error probability and insert the error module into NS2. You will need to know the basic of NS2 to configure and insert such the error model. (2) how to implement the arrival process from the source is the Poisson with rate ¦Ë; One of the easiest ways to generate a Poisson traffic is to create arrivals whose inter-arrival time is exponentially distributed. NS2 provides built-in module to create exponentially distributed samples. You may look at class ExponentialRandomVariable in file ~ns/tools/ranvar.h,cc (chapter 12) for this purpose. Alternatively, you may see class Application/Traffic/Exponential in file ~ns/tools/expoo.cc for example implementation. (3) how to add FEC to the model I am a NS-begniner ,can anyone give some help ,thank you very much ! Well, FEC can be integrated into a random error. If you codes can correct at most n out of k bits. Then you can find a probability of having more than n bit error in a packet, and use that as an error probability. BTW, NS2 does have FEC module. You may refer to Chapter 12 on that regard. Best, Teerawat hello,all now,I am modelling random losses in the incoming link (uplink) and congestion losses at node, I consider an M/M/1 queue with a finite buffer of size K,and I assume that losses can caused either by a buffer overflow or randomly with probability r in the incoming link .The arrival process from the source is assumed to be Poisson with rate ¦Ë and the service times of packets is exponentially distributed with rate ¦Ì.My scene for the model is as follows: I use three mobile nodes,node(0),node(1) and node(2). node(1) forwards the packets from node(0) to node(2).and now I have two problems: (1) how to apply the errmodel to the incoming link with a random loss probability whose value is r; (2) how to implement the arrival process from the source is the Poisson with rate ¦Ë; (3) how to add FEC to the model I am a NS-begniner ,can anyone give some help ,thank you very much !
Re: [ns] How to access mac layer in c++ of ns2
Hi Basim, The connection from a node to a TCP agent is fairly subtle. Basically, a Node has an instvar dmux_ which is a classifier. It install a TcpAgent and TcpSink in the slot of the classifier dmux_. This occurs when you invoke commands like $ns attach-agent $n0 $udp0 You may find the details in the book (chs 4 and 6) from Springer: T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. Here is the link: http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You might also find the following slide useful: http://www.ece.ubc.ca/~teerawat/NS2.htmhttp://www.ece.ubc.ca/%7Eteerawat/NS2.htm Best Regards, Teerawat
Re: [ns] Gettig error in simulation (ABORTING...)
Hi Sayed, There must be something wrong in your program. NS2 has a bunch of integrity checks. If there is something wrong (e.g., deallocating a packet that does not exit), it will abort the program by invoking function abort(). BR, Teerawat On 1/27/2008, Seyed Amin Hosseini Seno [EMAIL PROTECTED] wrote: Dear all, Hi, After running simulation and just after completed through 6 secs Im getting the below error in ns2. void _ABORT(...) --- ABORTING... Aborted (core dumped) Would you please Advise me about this error. I m waiting for your reply. Best Regards Amin -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
Re: [ns] target_ -recv ()
Well, It is if you just implement the codes like that. In most cases, however, you will not instantiate an object from class Connector. You will implement a class derived from class Connector. In the derived class, you will also have to override function recv. For example, you can invoke function send(p,h) of a Queue object. In class Queue, there is function recv. NS2 will invoke function Queue::recv, rather than Connector::recv. Cheers, Teerawat On 11/13/2007, Amin Hosseini [EMAIL PROTECTED] wrote: Hi Dear All, I am using NS2. In sendpkt() method of CBR_Agent, it calls target_-recv(); As target_ is defined in Connector class as pointer to NsObject class. I follow NSobject and Connector classes . I found : Connector::recv(...){ send(p,h); } and Connector::send(...){ target_-recv(p,h); } If I am right, It shows some kind of infinite recursion. I am confused to find any answer. It is kind of you if help me to find the right scenario if I am wrong. best regard Amin Seyed Amin Hosseini, Computer PhD student, Network Research Group (NRG) (http://nrg.cs.usm.my), School of Computer Sciences (http://www.cs.usm.my), University Science Malaysia (http://www.usm.my), Penang - Malaysia, Mobile: +60 16 438 9352 - Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it now.
Re: [ns] access to TCL instance variables
Nabila, To print the value, you may do something like puts [$myagent set myvar_] Cheers, Teerawat On 11/6/2007, Nabila khedimi [EMAIL PROTECTED] wrote: This is what I did, we can set a value to the variable like you did but how to get its value, for printing for example To: [EMAIL PROTECTED]; ns-users@ISI.EDU Subject: Re: [ns] access to TCL instance variables From: [EMAIL PROTECTED] Date: Tue, 6 Nov 2007 08:13:30 -0800 Hi Nabila, First of all, you need to bind your OTcl class Agent/MyAgentOtcl to, for example, MyAgent. Secondly, suppose you need to access variable my_var_ of class MyAgent. You need to bind this variable to the OTcl domain. This can be done in the constructor: MyAgent:MyAgent() { bind(my_var_, my_var_); } Then you will be able to access varaible my_var_ from the OTcl domain: set myagent [new Agent/MyAgentOtcl] $myagent set my_var_ 10 Good Luck Teerawat On 11/6/2007, Nabila khedimi [EMAIL PROTECTED] wrote:Hi,How do we access instance variables of a c++ class in tcl code I tried thefolowing: set myagent [new Agent/MyAgentOtcl]# Set configurable parameters of MyAgent$myagent set my_var1_otcl 4$myagent set my_var2_otcl 3.14$myagent call-my-priv-funcset intvar 0set intvar [Agent/MyAgentOtcl my_var1_otcl] puts my_var1_otcl = $intvar I have had this:my_var1_otcl= my_var1_otclthe name instead of th value, what's the problem, neither set intvar $myagent my_var1_otcl works Thanks for helpnabila _ Windows Live Hotmail and Microsoft Office Outlook together at last. Get it now. http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033 _ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews
Re: [ns] How to recompile and run tcl files?
Say you want to include myfile.cc into NS2 code, you have to incorporate myfile.o in file Makefile Open Makefile and look how an object file (myfile.o) can be incorporate into the Makefile. Finally, run make at ns2 directory, and you're done!! Best, Teerawat On 9/13/2007, Kavuluri, Mallesh (IE10) [EMAIL PROTECTED] wrote: In SUMMARY, what is the normal way to recompile .cc files that .tcl file requires and run the .tcl files? How shall we make necessary changes in Makefile? I have tried make clean, make depend, ./configure, make. Even I tried ./install in ns-allinone-2.28 folder and then tried the above Make clean, ./configure, make clean, make depend and make commands. But still, I am getting the same old output. The changes that I have made are not getting reflected in output. When I keep some error in .cc file, when using make, it is giving me error. When I correct it, make is compiling successfully. Any help or suggestion is greatly appreciated. -Thanks and regards, Mallesh
Re: [ns] printing the ackno
Hi, A one-way TCP does not use field ackno_. Instead, the TCP Sink creates an ACK packet by placing ACKNO in the field seqno_ of the ACK packet. So you just need to print out field seqno_ but you have to make sure that the corresponding packet is an ACK number. Cheers, Teerawat On 9/4/2007, Sebastian Harko [EMAIL PROTECTED] wrote: Hello, I want to print the acknowledgment number of every ACK in the terminal... So I went to tcp.cc ( newack method ) and I did this: cout ACK number is: tcph-ackno_ endl; but all the ACK numbers it prints for a simple simulation are equal to zero... note that i was able to print the correct sequence numbers using the exact same approach. what am i doing wrong ? regards
Re: [ns] warning:no class variable Trafficfile::debug_
Hi, I think your problem may be caused by 1. You did not bind variable debug_ to the OTcl domain. Go to the Class TrafficFile and see whether the variable debug_ is bound properly. 2. Class TrafficFile does not have the variable debug_ at all. In this case, you have to declare it in Class TrafficFile. Cheers, Teerawat On 8/31/2007, Candace Phelps [EMAIL PROTECTED] wrote: Hello, warning:no class variable Trafficfile::debug_ see tcl-object.tcl in tclcl for info about this warning I was having a similar problem, and I found the solution here, as I posted a few days ago to this list: http://nile.wpi.edu/NS/ Click on Otcl linkage, and search for 'warning' on the page and read about that. Basically, you need to set this variable (debug_) in ns-default.tcl (located here in my case: cphelps/ns-allinone-2.31/ns-2.31/tcl/lib/ns-default.tcl). The format of how to set the variable is as shown in the file: SuperClass/Class set _variable_name_ # eg Trafficfile set debug_ 1.0 Hope that helps. 8-) I tried adding Trafficfile set debug_ false in ./tcl/lib/ns-default.tcl as mentioned in very old posts but unfortunetly it doesnt work in my case. I think this solution was a work-around to ignore the problem. -- Sincerely, Candace Phelps 3rd Yr Honors CS Student Quoting Francesco Trebbi [EMAIL PROTECTED]: Hi, I am trying to use some trace files to generate traffic but When I run the simulation I get the warning message: warning:no class variable Trafficfile::debug_ see tcl-object.tcl in tclcl for info about this warning I tried adding Trafficfile set debug_ false in ./tcl/lib/ns-default.tcl as mentioned in very old posts but unfortunetly it doesnt work in my case. Does anyone has any ideas to solve this problem? Thanks, I appreciate. Francesco
Re: [ns] throughput calculation
Hi, There are several ways to compute throughput. If you use TCP, the simplest way is to measure the sequence number and divide it by simulation time. You add the following into your simulation script ... $ns at 10.0 $ftp stop $ns at 10.1 puts puts \The final TCP sequence number is [$tcp set $t_seqno_]\ $ns at 10.2 $ns halt Then, you can compute the number of transmitted packets in 10.0 second simulation time. Cheers, Teerawat On 8/31/2007, JEHD MAHDI [EMAIL PROTECTED] wrote: Hi there, is there any universal way to calculate packets throughput and delay with or without use of certain scripts, i've tried a couple of scripts for this purpose but they don't seem to work!! J Mahdi Newcastle Upon Tyne ** _ Get free emoticon packs and customisation from Windows Live. http://www.pimpmylive.co.uk
Re: [ns] Ns2 problem in tclsh
Hi Does ns start at all? From my understanding, its like ns works properly. But the variable ns is not used properly. Try to replace ns with $ns if you ever define set ns [new Simulator]. The former one is just a string while the latter one is the simulator object. cheers, Teerawat On 8/30/2007, AZHAR MOHD ARIS [EMAIL PROTECTED] wrote: I read yr comment in the website http://mailman.isi.edu/pipermail/ns-users/1997-May.txt ..just want to asking u .what u mean by tclsh7.6? i'm using ns2-31. because i get an error like below too. is it need to delete 'everything' in gen and make all again for ns2-31 folder? rom [EMAIL PROTECTED] Mon May 5 17:04:03 1997 From: [EMAIL PROTECTED] (Mark Handley) Date: Mon, 05 May 1997 12:04:03 -0400 Subject: NS2 compiles, but doesn't run In-Reply-To: Your message of Mon, 05 May 1997 11:42:54 EDT. [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] we just installed ns-2.0a16, and I tried ns test-suite.tcl tahoe1 but I got the following error message: invalid command name ns while executing ns node Probably ns didn't build correctly because it couldn't find tclsh which is needed to build ns-lib.tcl in the gen subdirectory. The build will have failed to build ns-lib.tcl properly, and so nothing works. Check whether this is in fact what's happening, by removing everything in gen and re-making. If this is the case, edit the Makefile so it looks for tclsh7.6 or whetever it's installed as on your platform. ANY BODY CAN X-PLAIN TO ME?? -- AZHAR MOHD ARIS (GS16917) Master in Computer Science Candidate (Distributed Computing) University Putra of Malaysia +^019.613.742.2 YM: azuan76
Re: [ns] tcl script
Hi, I suggest you to go thru NS2 FAQ http://www.isi.edu/nsnam/ns/ns-faq.html and NS2 tutorial (e.g., http://www.isi.edu/nsnam/ns/tutorial/index.html) before posting your question in the mailing list. BR, Teerawat On 8/22/2007, wathig dawelbait [EMAIL PROTECTED] wrote: hi I am new in using ns-2 and I am using ns-2.31 realy I need help in biulding tcl script my project in (impact of udp on tcp in the internet) I have to have from 1-100 mixed user pls help me
[ns] Replying Etiquette
Hi All, I am just wondering about this mailing list. There are a lot of questions in this list. Suppose that some of us know the solution and would like to help out. Do we suppose to REPLY to the sender only or REPLY ALL so that others who have similar problems will know the answer too ? Cheers, Teerawat
[ns] Traffic Trace
Hi All, Is anybody familiar with a traffic trace? It is a traffic generator (of class Application/Traffic/Trace). I would like to know how would I create a traffic trace file to attach to the application. Thanks a lot, Teerawat
Re: [ns] error with agent!!!
Class Agent/SP is not a built-in NS2 class. You have to create an access to OTcl by using Tclclass. Then you will be able to access use it in OTcl. for example, static class TcpClass : public TclClass { public: TcpClass() : TclClass(Agent/TCP) {} TclObject* create(int , const char*const*) { return (new TcpAgent()); } } class_tcp; BR, Teerawat On 8/1/2007, hossein fotouhi [EMAIL PROTECTED] wrote: Hi, I received this error when running my file. does anyone know where is the problem? thank you --- [EMAIL PROTECTED] bin]# ./ns wireless-spr.tcl 10 20 num_nodes is set 100 invalid command name Agent/SP while executing Agent/SP set sport_0 (file ./spr.tcl line 3) invoked from within source.orig ./spr.tcl (uplevel body line 1) invoked from within uplevel source.orig [list $fileName] invoked from within if [$instance_ is_http_url $fileName] { set buffer [$instance_ read_url $fileName] uplevel eval $buffer } else { uplevel source.orig [list $fileName] ... (procedure source line 8) invoked from within source ./spr.tcl (file wireless-spr.tcl line 259)
Re: [ns] Error whit ns
At the end of the installation, there are three things you need to do (shown on the screen). You have to set library variables and path into your running environment. BR, Teerawat On 8/1/2007, oscar andres [EMAIL PROTECTED] wrote: I was successful in installation, but I can't run the example script in in tutorial simple.tcl. When i tried to run it gives few errors like: bash: ns : command not found What can i do _ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us
Re: [ns] Simulation error
Dear Leonard, $ns trace-all generally generates complete information in the trace file. Unfortunately, you usually don't need most of it. A better way is not to use it. If you are interested in for example if you are interested in how seq. no. of TCP changes, you may use $tcp trace t_seqno_ Another way is to print out your own text by modifying C++ source code (e.g., using cout). Cheers, Teerawat On 7/30/2007, Leonard Tracy [EMAIL PROTECTED] wrote: Hi, I am new to this mailing list and to NS 2. I am trying to use NS 2 to research new MAC protocols for sensor networks. The majority of my simulations run without error, but sometimes the simulation locks and the trace file grows to many gigabytes. When I look in the trace file it is full of: D 125.0 _2_ IFQ END 0 tcp 0 [0 0 0 0] --- [0:0 0:0 0 0] [0 0] 0 0 The simulation I'm currently running has four nodes total. Three of them use CBR via UDP to send data to the 4th node. I'm wondering if anyone else has had a similar problem or a may know a solution. Thanks for any help, Leonard
Re: [ns] tcp sending rate
TCP does not have sending rate. It control transmission rate based on window size. The initial window size is 1, and it is increases as ACK packets are received. So you can't compute the sending rate in pkts/sec. BR, Teerawat On 6/30/2007, Zahraa Taki Al-Lawati [EMAIL PROTECTED] wrote: hi; what is the defult sending rate in tcp agent when starting any conncection. how can i change it ? and what is the unit of sending rate ( packet/sec or b/sec )? advise please _ Don't just search. Find. Check out the new MSN Search! http://search.msn.com/
Re: [ns] Mobility Models
In my opinion, a beginner usually takes only few days to learn to use NS2 at TCL level. However, it will talk few months (or sometiem years) to learn the structure of NS2 and how to modify it. On 6/29/2007, salouhouni [EMAIL PROTECTED] wrote: Hello everybody.I am a new user in NS2 and I will try to implement some mobility models in NS2 and implement.As I have searched around I think that it is quite difficult in a short period to implement one on my own so I will try to test some already built ones.Cause I am a new user I would like to ask how difficult it will be to get familiar with NS2 in order to use some mobility models?Is it easy to use the existing ones and experiment on them?How complicated is the code of such models and how easy it is to test on different senarios?Thanks for the post and I hope that I will be able to help somebody else when I get used to the program.Please If anybody know I would be grateful to help me even if the questions look sily.Thanks again!:) -- View this message in context: http://www.nabble.com/Mobility-Models-tf4001829.html#a11366754 Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] Call function of an agent
You have to declare your agent as a variable of another class. Initiate the agent variable at the constructor of that class. Then you can call public function of your Agent class through that variable. See class Timer for example. BR, Teerawat On 6/28/2007, Alexandre Malhão [EMAIL PROTECTED] wrote: Hi, I have my own agent class in ns. Is there any way for me to call a function inside this agent class from another class?? Best regards, Alexandre Malhão
[ns] Need Help for TCPAgent::rtt_update()
Hi, I have a question in regards to function rtt_update of class TcpAgent. Here is the code: = BEGIN CODE = void TcpAgent::rtt_update(double tao) { ... double sendtime = now - tao; sendtime += boot_time_; double tickoff = fmod(sendtime, tcp_tick_); printf(sendtime = %2.4f, boot_time_ = %2.4f, tickoff = %2.4f\n,sendtime,boot_time_,tickoff); t_rtt_ = int((tao + tickoff) / tcp_tick_); } ... } = END CODE = Why can't we use 'tao' as an RTT sample? Why do we have to consider boot_time_ ? It seems like tickoff is the offset which helps line up tao to the end of tcp_tick after boot_time_ is considered. But why do we need to consider boot_time_. Thanks a lot. Teerawat