Re: [ns] HOW [EMAIL PROTECTED] - a new/custom (routing) agent - Who knowssomething?
Claus, Great effort! Please, we need more volunteers for this effort, especially the users which are just starting NS2 (as documenting NS2 is an excellent way to learn it!) Regarding the agent creating, please check this info: http://tagus.inesc-id.pt/~pestrela/ns2/ns2_beginners.html#_Toc128325750 5: The above, but modifying the NS2 simulator yourself. When you are doing cutting edge research, that nobody did before, the only solution is to model your own additions to NS2. The first thing you should do is to locate a similar module that does something that you want to do also. perhaps another ad-hoc routing protocol, another QoS queue discipline, etc etc. Then you should clone the code, and change ALL names of variables, TCL bindings (*), C++ classes, packet headers, etc etc, to YOUR component name. When you do this you'll get a working component that you can start to SLOWLY modify to make YOUR algorithms and operations. If you do this way, instead of simply start coding from scratch, you'll be able to work with a working component, step by step, that you are able to validate every day. The alternative way, you spend months, or even more, before the component worked for the first time. Regarding packet sending, I've updated this page with agent-send() http://nsnam.isi.edu/nsnam/index.php/Sending_Packets - Also 1: I'm planning to revamp the mark greis NS2 tutorial, by retesting, and updating it. At first I'll do it in html; later I'll port it to the wiki. If anyone wants to help, please step in. Also 2: I've got a lot of useful info that should be ported to the wiki. Namely my debugging tutorials, http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging2.html http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging3.html and for instance this web page: http://tagus.inesc-id.pt/~pestrela/ns2/ns2_tips.html Index: How to modify existing procedures from the standard TCL library (/tcl/lib/) without having to recompile NS2 at each step. 1 How to know values at run-time which are easy to store at configuration time. 2 How to trigger procedures in other modules at run-time. 3 How to call oTCL code from C++ counterpart an illustrated example. 3 How to known which Agents are implemented in NS2 / which protocols are implemented in NS2 5 What info options are available in otcl classes and objects?. 5 How to check the syntax of .tcl files. 7 How to get a trace of the oTcl procedures: 8 Which linux distro NOT to use: 8 And my beginners tips: http://tagus.inesc-id.pt/~pestrela/ns2/ns2_beginners.html I'm severely time-limited at this very moment because my phd defense, but I can help others porting it. Pedro Estrela http://tagus.inesc-id.pt/~pestrela/ns2 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Claus Christmann Sent: quarta-feira, 21 de Novembro de 2007 21:26 To: ns users Subject: [ns] HOW [EMAIL PROTECTED] - a new/custom (routing) agent - Who knowssomething? Hi List, I have been trying to get my own routing algorithm working in ns2 for quite some time now and still haven't gotten as far as I hoped... I received a lot of support from the ns-users list so far, but still need some more insight into ns2. In order to collect all that knowledge out there and to make it easier to find/read/change/update, I started a small effort on the ns2 wiki on *How to Write Your Own Agent* http://nsnam.isi.edu/nsnam/index.php/Writing_an_Agent *How to Send Packets* http://nsnam.isi.edu/nsnam/index.php/Sending_Packets *The OSI layers and ns2* http://nsnam.isi.edu/nsnam/index.php/OSI_Reference_Model PLEASE, if YOU have ever struggled on one of these issues or maybe even on the issue of writing your own _routing_agent_ , PLEASE go to the wiki and write your knowledge down. (Or email me, then I will write it down) I am looking forward to tackle this big issue with the help off you all. *THANK YOU* Claus -- Claus Christmann Graduate Research Assistant Georgia Institute of Technology 270 Ferst Drive Atlanta, GA 30332-0150 http://uav.ae.gatech.edu
Re: [ns] regarding xgraph and gnuplot
Gnuplot is very powerfull, but has a complex interface. That's why I've made a gnuplot frontend: http://tagus.inesc-id.pt/~pestrela/ns2/contributed_code.html#_Toc147652227 that's my recommendation! -- Xgraph is more basic, but with a simpler interface. Pedro Vale Estrela http://tagus.inesc-id.pt/~pestrela/ns2/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Basim Javed Sent: domingo, 18 de Novembro de 2007 1:31 To: ns-users@ISI.EDU Subject: [ns] regarding xgraph and gnuplot hi all I am new to NS2 world, and just recently installed NS 2.31. I would really appreciate help regarding comparison of xgraph and gnuplot, regarding their strengths and weaknesses. Thank you in advance. regard B
Re: [ns] oTcl debugging: MASH inspector causes segmentation fault
Good question. I've not used this patch, so I can't offer much help (also, while I've put mashinspector to work, I've not entered its details too much also). Pedro Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Claus Christmann Sent: quinta-feira, 15 de Novembro de 2007 14:15 To: ns users Subject: [ns] oTcl debugging: MASH inspector causes segmentation fault Hi list, I am trying to debug the mw-node patch for ns2 (http://www.q2s.ntnu.no/~paquerea/ns.html) using Pedro's guide to get oTcl debugging capabilities (http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging2.html). One of the apparently very useful tools is the MashInspector, which unfortunately crashes when inspecting objects introduced be the mw-node patch. *Has anybody experience/hints/links on oTcl debugging with the mw-node patch?* Thanks for any feedback. Claus -- Claus Christmann Graduate Research Assistant Georgia Institute of Technology 270 Ferst Drive Atlanta, GA 30332-0150 http://uav.ae.gatech.edu
Re: [ns] Visualization of data pkt movements in nam for wirelessscenarios
a) I've put a patch very recently on this list to enable packet coloring in wireless scnenarios. b) for nam to show drops, they must be logged in the .nam file. Try to change the amount of L2 and L3 logging that is being performed. Pedro Estrela http://tagus.inesc-id.pt/~pestrela/ns2/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Karena Stannett Sent: quinta-feira, 15 de Novembro de 2007 14:06 To: ns-users@ISI.EDU Subject: [ns] Visualization of data pkt movements in nam for wirelessscenarios -- Forwarded message -- From: Karena Stannett [EMAIL PROTECTED] Date: 15 Nov 2007 13:10 Subject: Visualization of data pkt movements in nam for wireless scenarios To: Ns-users@isi.edu Hi all, I am a newbie to NS2 and need to clarify something in respect of the visualisation of data pkt movements in nam in wireless networks. I've worked my way through Marc Gries' Tutorials which state visualisation of pkt movement is not possible. However my research concerns DCCP and as such I am using the dccp-ns2.29.patch. I have also tried the dccp-wireless.tcl example that is available from the same location as the patch. When I run the namtrace file it clearly shows pkts being sent and dropped between 2 nodes over a wireless network. Is this visualisation unique to the DCCP or is it now supported generally in NS2. And if it is now generally supported how is this done? I've looked at the differences between the code of a tcp agent wireless example very similar to the dccp-wireless.tcl and tried commenting out / adding bits to see if I can create visualisation in other wireless networks, read the wireless trace chapters of the manual and tried to see if there is anything relevant in the archives posts but I'm still no closer to knowing how this is being acheived. Any help appreciated Karena -- Respect -the ability to see a person as he is, to be aware of his unique individuality. ROOT(Respicere - to look at) -- Respect -the ability to see a person as he is, to be aware of his unique individuality. ROOT(Respicere - to look at)
Re: [ns] Visualization of data pkt movements in nam forwirelessscenarios
Pedro Your comments are much appreciated but unfortunately have left me, as a newcomer to NS2 (as well as C++ and Tcl), as unclear as I was. If I see. But please be aware that NS2 requires a lot of effort to be able to do anything. In my case, I've even spend a lot of weeks for even putting the contributed software to compile. you have added a patch (which I have located) recently to enable pkt colouring in wireless scenarios it would suggest that visualisation of pkt movement within wireless networks is now supported in NS2 and that this is not just an aspect of the DCCP patch. Is this correct? Exactly. Can you direct me to an example of a reasonably simple sample code that implements nam visualisation of pkt movements drops or, if you are familiar with Marc Gries' tutorials tell me what is missing from them or needs to be added to them to be able to see pkt movements in nam. I've volunteered to upgrade the NS2 tutorial, but cannot do this in the very short term. You can trust that such will be the first thing I'll look, when I can. You can send me the .tcl file for TCP and DCCP, and I'll look into it faster. Regretably I have knowledge of what L2 and L3 logging you are referring to, I'm still operating at a higher level at the moment! I'm talking of dumping more trace information to the file, of application layer and other layers also. Such is selectable in the NS2 tracing facilities.
[ns] [ANNOUNCE] [NS2] Announcing IST-CIMS IP micro-mobility suite for NS2-2.31
Dear NS2 Researchers, This is to announce the posting of the IST-CIMS IP micro-mobility suite package, upgraded and tested for NS2.31. This package includes the eTIMIP and TIMIP protocols, and upgraded v2.31 versions of the CIP, HMIP and HAWAII protocols from the original CIMS code (from ns2-1b5). This package also features NOAH for v2.31, and a common test framework for all protocols in multiple scenarios. Any comments and fixes regarding this software, or the associated eTIMIP research work, are very welcome!! Best Regards Pedro Vale Estrela --- Download link: http://tagus.inesc-id.pt/~pestrela/ns2/?g=ist-cims.html NS2 IP mobility info page: http://tagus.inesc-id.pt/~pestrela/ns2/?g=mobility.html Associated eTIMIP Scientific Papers: http://tagus.inesc-id.pt/~pestrela/timip Design and Evaluation of eTIMIP - Overlay Micro-Mobility Architecture based on TIMIP, P. Estrela, T. Vazão, M. Nunes, International Conference on Wireless and Mobile Communications (ICWMC 2006), July 2006
Re: [ns] a loop or a start and stop methods
You need to schedule a tcl proc which: a) does ping send b) reschedule itself for 1 second later this is a simple 4 line TCL proc! you can also do this in c++ only by using a timer object, for the same purpose. This will require recompilation and c++ debugging. Pedro Estrela http://tagus.inesc-id.pt/~pestrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nabila khedimi Sent: quinta-feira, 8 de Novembro de 2007 18:16 To: ns-users@ISI.EDU Subject: [ns] a loop or a start and stop methods Hi, I want to execute a ping agent continuously during the simulation, regarding the schedular object in NS, is there any the difference between making a infinite loop inside the tcl code or define a start and a stop method inside the ping agent code(which is a c++ program) Thanks for help Nabila
Re: [ns] How to colour nam simulations??
I've just posted the solution to the dev list also. Apply these 2 patches, and set the packet color for wireless exactly as you do in wired links. http://tagus.inesc-id.pt/~pestrela/ns2/files/namtrace_precision_time.patch http://tagus.inesc-id.pt/~pestrela/ns2/files/namtrace_wireless_colors.patch Regards, Pedro Estrela http://tagus.inesc-id.pt/~pestrela/ns2 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jamal Toutouh Sent: quarta-feira, 7 de Novembro de 2007 15:51 To: NS-users list Subject: [ns] How to colour nam simulations?? Dear all, How are you? I want to show some simulations using NAM, but the problem is that I want to show the different packets that are created by diferent nodes with different colours. I am simulating mobil nodes that uses wifi connections. Thank you... Jamal Toutouh El Alamin NEO Group - Networking and Emerging Optimization University of Malaga Phone: (+34) 952 13 33 03 Addres: E.T.S Ingenieria Informatica Complejo Tecnologico, Lab. 3.3.4b Campus de Teatinos 29071 Malaga, Spain - __ Pregunta, Responde, Descubre. Comparte tus consejos y opiniones con los usuarios de Yahoo! Respuestas http://es.answers.yahoo.com/info/welcome
Re: [ns] need tcl script showing voice codec implementation
Hi Can you please explain in a single email which topics are you asking for help, instead of sending countless seperated messages?? Pedro Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brenda Lindsay Williams Sent: terça-feira, 18 de Setembro de 2007 16:57 To: ns-users@ISI.EDU Subject: [ns] need tcl script showing voice codec implementation Can someone pls give me a script showing voice codec implementation in NS2? I'm working with G.711, but any available one based on the H.323 standard will be greatly appreciated. Thanks. regards, Brenda
[ns] FW: gdb debugger
Its almost impossible to do it at the same time. Read all my debugging tips then feel free to ask questions. Also, use DDD! http://tagus.inesc-id.pt/~pestrela/ns2/ Pedro Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Elahe Alipour Sent: segunda-feira, 17 de Setembro de 2007 11:23 To: ns-users@ISI.EDU Subject: [ns] gdb debugger ** ** Hi all I installed gdb debugger and it ran commands like list, break. but i can't use it properly. i want to cross debug TCL and c++ and step through each line of C++ and TCL code. but i don't know how do this. i searched in ns mailing list but i didn't find a suitable solution. can anybody help me? thanks best regards elahe ** - Don't let your dream ride pass you by.Make it a reality with Yahoo! Autos.
Re: [ns] installation problem
http://www.google.pt/search?source=ighl=pt-PTq=bash%3A+ns+command+not+foun dmeta= -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of sparsh attre Sent: segunda-feira, 10 de Setembro de 2007 13:25 To: ns-users@ISI.EDU Subject: [ns] installation problem hi i m facing a little problen in the installation of ns2.31 on fedora 5 it is installing properly but when i validate it thn it takes approx 45 - 50 mins and says that all tests have been passed but whn i type ns on the command prompt it reflects an error saying bash: ns command not found can u get me out of this particulr problem?
Re: [ns] Movement of nodes should be modifiable during runtime of an ns-2 simulation
Yes, looked at this issue, and the only way to do it in run-time is to use emulation! If the movement customization did not require run-time, it would be a simple problem - the first program would just generate a movement file according to some parameters. Pedro Estrela http://tagus.inesc-id.pt/~pestrela/ns2 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Mahrenholz Sent: quarta-feira, 22 de Agosto de 2007 15:46 To: Schuenemann, Bjoern Cc: ns-users@ISI.EDU Subject: Re: [ns] Movement of nodes should be modifiable during runtime of an ns-2 simulation Hi Bjoern, Schuenemann, Bjoern schrieb: I'd like to make a simulation with ns-2 where the movement of the nodes is modifiable by another program during the runtime of the ns-2 simulation. How could I realize this? It seems that modifications of trace and movement files are ignored by ns-2 after the files are read in by the TCL script I think the problem is that after reading the movement files all events that actually control the movement are already in the event queue. One of my students implemented an external movement control some years ago for the emulation mode. Basically he adds a listening socket that takes simulator control commands from an external program, converts them to TCL code and evaluates them. Then he ran the simulation for an infinite time (and send a stop command from the external controller to exit) and could move the nodes around as he liked. But, this only works in emulation mode. The reason is, if you are in the normal simulation mode, time will jump from event to event. And if there is the last movement event in the queue, the simulator possibly will jump to the final stop event and quit. So, only emulation ensures that your simulation time does not runs too fast. I took a quick look but could not find the diploma thesis / code of the student. I will spend more time searching if you like. Title of the thesis was Eine dynamische WLAN-Emulationsumgebung auf Basis des NS-2, Thomas Kiebel, Diplomarbeit, 2005. Daniel. -- Dr.-Ing. Daniel Mahrenholz rt-solutions.de GmbH Oberländer Ufer 190a D-50968 Köln Web: www.rt-solutions.de rt-solutions.de networks you can trust.
Re: [ns] hierarchical addressing and number of nodes
I have a proc in my page that does this in a very easy way! http://tagus.inesc-id.pt/~pestrela/ns2/ns2_haddr_tips.html Pedro vale estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sérgio Alexandre Sent: quinta-feira, 7 de Junho de 2007 11:16 To: pankaj kumar Cc: ns-users@ISI.EDU Subject: Re: [ns] hierarchical addressing and number of nodes if you : # Set NS Addressing AddrParams set domain_num_ 9 AddrParams set cluster_num_ {9 9 9 9 9 9 9 9 9} AddrParams set nodes_num_ {9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 etc..} p. example you will have no problema running your simulation. Just raise the numbers. pankaj kumar wrote: Hi All i have following hierarchical addressing # Set NS Addressing AddrParams set domain_num_ 2 AddrParams set cluster_num_ {1 5} AddrParams set nodes_num_ {1 1 3 1 1 1} when i am trying to add new a node to the topology its giving segmentation fault without changing above NS addressing. How i can overcome by this this problem ( or i have to change into #Set NS Addressing??? ) thanks and regards, pankaj
Re: [ns] tcl-debugger cannot use command 'w' to watch call stack
The tcl-debugger has some bugs. In pratice, I only use the debugger to stop the code somewhere and inspect some variables, and NEVER to step trough the code (because the debugger lacks object TCL capabilities.) For that, check http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging2.html Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of landrew Sent: segunda-feira, 21 de Maio de 2007 2:45 To: ns-users Subject: [ns] tcl-debugger cannot use command 'w' to watch call stack hi,everybody i'am using ns2.31,and i use tcl-debugger2 for debugging. all things in debugging are ok except that after i use 'w' command to watch call stack, then when i use the next command , most of the time i'll get a core dump. messages are following : dbg11.5 s 10: if [catch $self cmd $args ret] { set cls [$self info class] global err... dbg10.6 w 0: application 1: _o17 {_o17} {MobileNode/ResourceAwareNode} {start-app} 2: _o26 {_o26} {Application/LEACH} {start} 3: _o26 {_o26} {Application/LEACH} {mac} 4: _o26 {_o26} {Application/LEACH} {node} *5: _o26 {_o26} {SplitObject} {unknown} {agent} 10: if {0} { set cls [$self info class] global errorInfo set savedInfo $erro... dbg10.7 s ./leach_test: line 51: 1048 Aborted (core dumped) ns tcl/ex/wir eless_leach.tcl -sc mit/uAMPS/sims/nodescen -rp $alg -x $x -y $y -nn $nn -stop $ stop -eq_energy $eq_energy -init_energy $init_energy -filename $filename -dirnam e $dirname -topo $topology_file -num_clusters $num_clusters -bs_x $bs_x -bs_y $b s_y 2$dirname/$filename.err i've installed ns2 and tcl-debugger in cygwin and fc6, I found the same error. thanks!
[ns] NOAH: wrong node routing agent!
My upgraded version of FMIP for ns2.31 includes the NOAH agent as well. http://tagus.inesc-id.pt/~pestrela/ns2/mobility.html#_Toc147660119 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Akhilesh Kumar Sent: segunda-feira, 9 de Abril de 2007 4:42 To: ns-users@ISI.EDU Subject: [ns] NOAH: wrong node routing agent! I configured the NOAH protocol in my NS2.31 according to given code. but is still giving error wrong node routing agent! Makefile.inadd noah/noah.o \ to OBJ_CC and tcl/mobility/noah.tcl \ to NS_TCL_LIB noah/noah.{h,cc} add noah.h and noah.cc to a new subdirectory noah/ tcl/mobility/noah.tcl add noah.tcl to tcl/mobility/ tcl/lib/ns-lib.tclline 191 (for v2.29 line 197): add source ../mobility/noah.tcl line 603ff (for v2.29 line 649ff): add NOAH { set ragent [$self create-noah-agent $node] } line 768ff (for v2.29 line 839ff): add Simulator instproc create-noah-agent { node } { # Create a noah routing agent for this node set ragent [new Agent/NOAH] ## setup address (supports hier-addr) for noah agent ## and mobilenode set addr [$node node-addr] $ragent addr $addr $ragent node $node if [Simulator set mobile_ip_] { $ragent port-dmux [$node demux] } $node addr $addr $node set ragent_ $ragent return $ragent } _ Voice your questions and our experts will answer them http://content.msn.co.in/Lifestyle/AskExpert/Default01.htm
Re: [ns] compilation of .cc file
Since people constantly fail to report in a useful manner, I've written a little howto post the user's mailing-list entry in the ns-wiki. good work. Added links to my otcl and c++ debugging, and How To Ask Questions The Smart Way
Re: [ns] problem with Scheduler(please see this code and tell memistake)
$ns at 0.2 global k; set k 4 $ns at 0.3 glonal k; puts \k=$k\ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Amin Irandoost Sent: quinta-feira, 22 de Março de 2007 15:18 To: ns-users@ISI.EDU Subject: [ns] problem with Scheduler(please see this code and tell memistake) hi all what is problem this code? set k 0 $ns at 0.2 set k 4 $ns at 0.3 puts \k=$k\print 0 lieu 4 on screen !!! Thanks in advance -- Amin Irandoost
Re: [ns] FHMIP - anyone got the FHMIP extension to work? (coded by Robert Hsieh)
Im not sure, but I think this error can be corrected by applying this patch that Ive described here: http://mailman.isi.edu/pipermail/ns-users/2004-September/044531.html (also see my nest post about FHMIP for ns2.31) Pedro Vale Estrela -Original Message- From: shayma sinan [mailto:[EMAIL PROTECTED] Sent: quinta-feira, 22 de Março de 2007 2:05 To: [EMAIL PROTECTED] Subject: Re: FHMIP - anyone got the FHMIP extension to work? (coded by Robert Hsieh) Hi, I am also facing a problem in running FHMIP package under ns2.28 i got the same error mentioned here http://mailman.isi.edu/pipermail/ns-users/2005-August/051595.html without modifying (simula.tcl) hope you can find somebody to help... good luck! regards, Shayma Pedro Vale Estrela [EMAIL PROTECTED] wrote: Hi all, Previously, I've asked in the NS2 list if anyone had a copy of Robert Hsieh's FHMIP NS2 extension for NS2.1b7; with the reply, I've updated my NS2 mobility page with the available source code: http://tagus.inesc-id.pt/~pestrela/ns2/mobility.html#_Toc147660119 Currently, I'm trying to upgrade and put this extension to work. I've already got it compiling in NS2.31, but when I run the __unmodified__ example (simula.tcl), I got this failed assertion: BS Setting up encapsulate mechanism [1.0.1]-[2.0.0] 7.093759 HA 1.0.0 updated (FA 2.0.0), packet 32 7.150404 BS 3.1.0 received reply from BS 1.0.0, packet 32 mipmh-coa_ 2.0.0 nodeaddr 3.1.0 ns: mobile/mip-reg.cc:261: virtual void MIPBSAgent::recv(Packet*, Handler*): Assertion `miph-coa_ == nodeaddr' failed. Aborted (core dumped) This happens in this part of the code: case MIPT_REG_REPLY: { #ifndef MIP_QUIET printf(%f BS %s received reply from BS %s, packet %i\n, Scheduler::instance().clock(), Address::instance().print_nodeaddr(addr()), Address::instance().print_nodeaddr(iph-saddr()), ch-uid()); // JCW #endif assert(miph-coa_ == nodeaddr); // crashes here tcl.evalf(%s get-link %d %d, name_, nodeaddr, miph-haddr_); // // XXX hacking mobileip. all this should go away // when mobileIP for sun-wired model is no longer reqd. // ... Thus, my questions are: a) has somebody got an working FHMIP extension? b) Is it necessary to modify simula.tcl or mip-reg.cc use another simulation scenario, as to avoid this bug? If yes, please send me the modified code and I'll upgrade it to ns2.31, and give credit to the person in my NS2 mobility page. Pedro Vale Estrela _ Web email has come of age. Don't settle for less than the All http://us.rd.yahoo.com/mail/uk/taglines/gmail_com/nowyoucan/web_mail/*http: /us.rd.yahoo.com/evt=40566/*http:/uk.docs.yahoo.com/nowyoucan.html New Yahoo! Mail.
Re: [ns] Protocol
Have you asked of for the BCMP NS2 code to the authors of this paper? http://comet.columbia.edu/~zoltan/ist_brain.pdf one of them is from the same university as you... Pedro Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kok-Seng A. Hew Sent: quarta-feira, 21 de Março de 2007 19:28 To: ns-users@ISI.EDU Subject: Re: [ns] Protocol Hi All, I was wondering if anyone had the simulation code for the BCMP protocol or similar protocol of sorts. Network Domain 1 Domain 2 Access Network 1 AN2 AN3 AN4 Each access network has two access points (AP) The mobile host moves fro AP1 to AP2 to AP3 and so forth. Kok-Seng A. Hew Undergraduate B.Eng Electrical Engineering King's College London Strand, London WC2R 2LS England United Kingdom Mobile: +44(0) 7775 755232 E-mail: mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
[ns] PRELIMINARY FHMIP upgraded for ns2.31
PRELIMINARY FHMIP upgraded for ns2.31 I've upgraded the Robert Hsieh's FHMIP code in order to compile in latest ns2.31. I've also added to it the modifications detailed in appendix B of this report (Handover Blackout Duration of Layer 3 Mobility Management Schemes, http://www.tkn.tu-berlin.de/publications/papers/Handover_Blackout_Duration_o f_L3_Mobility_Management_Schemes1.pdf) However, when I've tried the HMIP part of the extension (the MAP), the simulation continues to crash in a failed assert; however, I've tried the FMIP part alone, and it seems to run OK. __Please note that I did not test this extension any further__ To install: first, install NS-allinone-2.31; then, uncompress and apply the patch (http://tagus.inesc-id.pt/~pestrela/ns2/files/ns2.31_fhmip.patch.gz) , then reconfigure and recompile ns2 again. The original FHMIP example is located in /tcl/ex/fhmip ns2.31 cat ns2.31_fhmip.patch | patch -p1 ns2.31 ./configure --enable-debug ns2.31 make ns2.31/tcl/ex/fhmip ../../../ns fhmip_simula.tcl __again, Please note that I did not test this extension any further__ Pedro Vale Estrela http://tagus.inesc-id.pt/~pestrela/ns2/mobility.html#_Toc147660119 Pedro Vale Estrela schrieb: Hi all, Previously, I've asked in the NS2 list if anyone had a copy of Robert Hsieh's FHMIP NS2 extension for NS2.1b7; with the reply, I've updated my NS2 mobility page with the available source code: http://tagus.inesc-id.pt/~pestrela/ns2/mobility.html#_Toc147660119 Currently, I'm trying to upgrade and put this extension to work. I've already got it compiling in NS2.31, but when I run the __unmodified__ example (simula.tcl), I got this failed assertion: BS Setting up encapsulate mechanism [1.0.1]-[2.0.0] 7.093759 HA 1.0.0 updated (FA 2.0.0), packet 32 7.150404 BS 3.1.0 received reply from BS 1.0.0, packet 32 mipmh-coa_ 2.0.0 nodeaddr 3.1.0 ns: mobile/mip-reg.cc:261: virtual void MIPBSAgent::recv(Packet*, Handler*): Assertion `miph-coa_ == nodeaddr' failed. Aborted (core dumped) This happens in this part of the code: case MIPT_REG_REPLY: { #ifndef MIP_QUIET printf(%f BS %s received reply from BS %s, packet %i\n, Scheduler::instance().clock(), Address::instance().print_nodeaddr(addr()), Address::instance().print_nodeaddr(iph-saddr()), ch-uid()); // JCW #endif assert(miph-coa_ == nodeaddr); // crashes here tcl.evalf(%s get-link %d %d, name_, nodeaddr, miph-haddr_); // // XXX hacking mobileip. all this should go away // when mobileIP for sun-wired model is no longer reqd. // ... Thus, my questions are: a) has somebody got an working FHMIP extension? b) Is it necessary to modify simula.tcl or mip-reg.cc use another simulation scenario, as to avoid this bug? If yes, please send me the modified code and I'll upgrade it to ns2.31, and give credit to the person in my NS2 mobility page. Pedro Vale Estrela
Re: [ns] Error in Object!!
You must either a) define the int hdr_akisprotocol_pkt::offset_ global variable in your code. Check /common/packet.h for more details or b) use the #define OFFSET(type, field) macro to do the same trick this must be explained in the ns2 manual in the part of creating new headers also check: http://www.isi.edu/nsnam/ns/tutorial/nsnew.html#first in this part: The int 'off_ping_' will be used to access a packet's ping header. Pedro Vale Estrela -Original Message- From: Ioakeim Samaras [mailto:[EMAIL PROTECTED] Sent: quarta-feira, 21 de Março de 2007 11:02 To: Pedro Estrela Subject: Error in Object!! Hello. I would like to thank you for your help. I read carefully the pdf file from the location : http://masimum.dif.um.es/nsrt-howto/pdf/nsrt-howto.pdf I followed all the steps described there for making my own protocol. I named the protocol instead of protoname, akisprotocol. I tried to compile it, and the compiler could not continue because of some small errors in the C++ code. I correct all that errors and I compile it again in both ns-2.27 and ns-2.30. But now the compiler says that there exist errors in object files. More specific, in both ns-2.27 and ns-2.30, after executing : touch common/packet.cc , make , I receive the following message : trace/cmu- trace.o(.gnu.linkonce.t._ZN20hdr_akisprotocol_pkt6accessEPK6Packet+0xb): In function `hdr_akisprotocol_pkt::access(Packet const*)':: undefined reference to `hdr_akisprotocol_pkt::offset_' akisprotocol/akisprotocol.o(.gnu.linkonce.t._ZN23akisprotocolHeaderClassC1 Ev+0x28): In function `akisprotocolHeaderClass::akisprotocolHeaderClass[in-charge]()':: undefined reference to `hdr_akisprotocol_pkt::offset_' collect2: ld returned 1 exit status make: *** [ns] Error 1 I also executed : configure, make clean, make , but still it finds the same errors. I don't know how to solve this problem. Previously the compiler found errors in .cc and .h files which I corrected them all. But now it finds errors in object files(.o). I am quite disappointed. Can you help me please? Any help would be appreciated. Thank you. -- Need cash? Apply now for a credit loan with fast approval http://tags.bluebottle.com/fc/CAaCMPJkvYIjBVjuielxhxyKD5MUIXe4/
Re: [ns] No data transmission at all! Can you help me?
Hi I've done this kind of stuff many times in the past http://tagus.inesc-id.pt/~pestrela/ns2/ns2_beginners.html#_Toc128325750 I guess that you did not cloned ALL references from RED to MY_RED. Do this to find all references to red: ns grep -d recurse -I red failing that, add breakpoints in DDD to check what parts of the code are actually being executed in the simulation; you'll be surprised if packets are dropped before your code, before your red classifier is invoked. Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of karen.yunqiu lee Sent: quarta-feira, 21 de Março de 2007 12:09 To: ns-users@ISI.EDU Subject: [ns] No data transmission at all! Can you help me? Dear all, I've copied and modified red.h/.cc and added myred.h/.cc to NS. Other necessary changes have been done to the ns-default.tcl, etc. When making the files, there was no error at all. But during tcl simulation, the network was completely silent. There was no even one packet transferd. After I changed the queue management method in the router node in tcl from myred to RED, the network was alive and kicking again. I would like to be sure that this is only because of myred.cc/.h not any other modifications I've done, right? And why couldn't I get any notice when making files? And, usually, what error will cause this 0 packet transmission during simulation? :( Kind regards, KL _ Get Hotmail, News, Sport and Entertainment from MSN on your mobile. http://www.msn.txt4content.com/
Re: [ns] ns/nam: respresentation problem when definingposition-fixed nodes (NEW question)
I' tried to add XY coordinates for wired nodes, but nam doesn't support this facility. Instead, I achieve the same result by setting the length of the wired links via their delay Pedro Vale Estrela http://tagus.inesc-id.pt/~pestrela/ns2 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Javier Chicote Sent: quarta-feira, 21 de Março de 2007 17:00 To: ns-users@ISI.EDU Subject: Re: [ns] ns/nam: respresentation problem when definingposition- fixed nodes (NEW question) Hi ns-users, I learnt that the previous problem can be solved by using 'orient' method at the link definition. However, this solution is not enough when defining more complex structures. The next figure shows 4 nodes standing in the imaginary vertexes of a square, which are all of them connected to a master node like it is shown in the next picture: node(1,0)node(1,1) (0,100) (100,100)__ \___\__ \___ \_ \___ master _/(200,50) _/ _/ / / (0,0) (0,100) node(0,0) node(100,0) --- What I would like to know is if it is possible (or not) to define the geographic position of the nodes when the coordinates of them are known in a wired scenario, or other ideas to solve the problem. This is the code of the file: # Network configuration (x,y):## node(1,0)node(1,1)# (0,100) (100,100)__# \___\__ # \___ \_# \___ master# _/(200,50)# _/ _/#/ / #(0,0) (0,100)# node(0,0) node(100,0)# # Create a simulator instanceset ns [new Simulator] # Open the NAM trace fileset namfile [open position-out.nam w]$ns namtrace-all $namfile set rows2 ;# number of rowsset cols2 ;# number of nodes per row # Define nodesfor {set i 0} {$i $rows} {incr i} {for {set j 0} {$j $cols} { incr j } {set node($i,$j) [$ns node] }}set master [$ns node] # Provide initial (X,Y,Z) co-ordinates for nodesfor {set i 0} {$i $rows} {incr i} {set xj 0.0for {set j 0} {$j $cols} { incr j } {$node($i,$j) set X_ $xjif {$i == 0} then { $node($i,$j) set Y_ 0.0} elseif {$i == 1} then { $node($i,$j) set Y_ 100.0 } $node($i,$j) set Z_ 0.0 set xj [expr $xj + 200]}}$master set X_ 200.0$master set Y_ 50.0$master set Z_ 0.0 # Define links between nodes$ns duplex-link $node(0,0) $master 1Mb 100ms DropTail$ns duplex-link $node(0,1) $master 1Mb 100ms DropTail$ns duplex- link $node(1,0) $master 1Mb 100ms DropTail$ns duplex-link $node(1,1) $master 1Mb 100ms DropTail # Define link orientation$ns duplex-link-op $node(0,0) $master orient rigth-up$ns duplex-link-op $node(0,1) $master orient rigth$ns duplex-link- op $node(1,0) $master orient rigth$ns duplex-link-op $node(1,1) $master orient rigth-down # Define a 'finish' procedureproc finish {} {global ns tracefile namfile$ns flush-traceclose $namfile exec nam position-out.nam exit 0} # Stop the simulation$ns at [expr 5.0 - 0.01] puts \Stopping Simulation...\ $ns at 5.0 finish ; $ns halt # Start the simulationputs Starting Simulation...$ns run - Mensaje original De: Javier Chicote [EMAIL PROTECTED] Para: ns-users@isi.edu Enviado: miércoles, 21 de marzo, 2007 11:36:06 Asunto: ns/nam: respresentation problem when defining position-fixed nodes Hi ns-users, I would like to simulate a position-fixed wired network with 2 lines and 3 nodes per line, like it is shown above. The distance between the nodes should be 100 units (for example), so the first node of the matrix will be in (x=0,y=0) and the last node in (x=100, y=200). node(1,1) node(1,2)node(1,3) (100,0)__(100,100)(100,200) ||| ||| ||| ||| (0,0)(0,100)__(0,200) node(0,1) node(0,2)node(0,3) When I do not define the links, the nodes are shown correctly in NAM (without lines between them), but when I make some of the link definitions (lines 46-48 of the above code), the structure of the network changes, and it is shown as a straight line. I know that I could manually edit the position of the nodes by clicking on the Edit/View button in NAM, but I would like to build the structure of the network automatically for future bigger structures, where it is not affordable to edit them manually. How could I solve the problem?? Many thanks in advance, Regards, Javi # Network configuration (x,y):## node(1,1
[ns] FHMIP - anyone got the FHMIP extension to work? (coded by Robert Hsieh)
Hi all, Previously, I've asked in the NS2 list if anyone had a copy of Robert Hsieh's FHMIP NS2 extension for NS2.1b7; with the reply, I've updated my NS2 mobility page with the available source code: http://tagus.inesc-id.pt/~pestrela/ns2/mobility.html#_Toc147660119 Currently, I'm trying to upgrade and put this extension to work. I've already got it compiling in NS2.31, but when I run the __unmodified__ example (simula.tcl), I got this failed assertion: BS Setting up encapsulate mechanism [1.0.1]-[2.0.0] 7.093759 HA 1.0.0 updated (FA 2.0.0), packet 32 7.150404 BS 3.1.0 received reply from BS 1.0.0, packet 32 mipmh-coa_ 2.0.0 nodeaddr 3.1.0 ns: mobile/mip-reg.cc:261: virtual void MIPBSAgent::recv(Packet*, Handler*): Assertion `miph-coa_ == nodeaddr' failed. Aborted (core dumped) This happens in this part of the code: case MIPT_REG_REPLY: { #ifndef MIP_QUIET printf(%f BS %s received reply from BS %s, packet %i\n, Scheduler::instance().clock(), Address::instance().print_nodeaddr(addr()), Address::instance().print_nodeaddr(iph-saddr()), ch-uid()); // JCW #endif assert(miph-coa_ == nodeaddr); // crashes here tcl.evalf(%s get-link %d %d, name_, nodeaddr, miph-haddr_); // // XXX hacking mobileip. all this should go away // when mobileIP for sun-wired model is no longer reqd. // ... Thus, my questions are: a) has somebody got an working FHMIP extension? b) Is it necessary to modify simula.tcl or mip-reg.cc use another simulation scenario, as to avoid this bug? If yes, please send me the modified code and I'll upgrade it to ns2.31, and give credit to the person in my NS2 mobility page. Pedro Vale Estrela
Re: [ns] Please help me
Normally you want to do the opposite: cal otcl in c++ and get the returned string. For that you should use the macros in my file ns_utils.cc http://tagus.inesc-id.pt/~pestrela/ns2/contributed_code.html#_Toc147652229 eg: TCL_EVALF(%s some_instproc %d, name(), MH_iaddr); assert( *TCL_RESULT ); etimip_RO_id = atoi(TCL_RESULT); -- for your particular problem, you should use the Command() interface that all c++ objects have -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Amin Irandoost Sent: terça-feira, 20 de Março de 2007 22:14 To: ns-users@ISI.EDU Subject: [ns] Please help me hi all in general how to capture return value of c++ function in tcl? -- Amin Irandoost
Re: [ns] Disable ARP
I've got the same problem, and using this code does not solve the problem for all cases (in my particular simulation) Instead, I'm using this with great success: In C++, at the top of ARPTable::arpresolve , insert this code that requires #include utils_ns.h (see http://tagus.inesc-id.pt/~pestrela/ns2/contributed_code.html#_Toc147652229) --- cut here --- TCL_EVALFr(ARP_find_mobile_iaddr2mac %d, dst); LL *ll = (LL *)TclObject::lookup(Tcl::instance().result()); if(!ll){ dprintf(Error: LL empty\n); exit(-1); } int mac = ll-mac_-addr(); mac_-hdr_dst((char*) HDR_MAC(p), mac); return 0; --- cut here --- then, add this tcl code to your script or /tcl/lib/ns-lib.tcl. I'm not sure, but this code MIGHT require the NOAH extension because that for {set i 0} { $i [Node set nn_] loop. --- cut here --- # Given the node handle, return the haddr, iaddr or ID proc NOAH_handle2iaddr { handle } { if { $handle == -1 } { return -1 } set iaddr [$handle address?] return $iaddr } # # Given the node's address in haddr, iaddr or ID, search and return the handle # (TODO:) create an array at creation to store these pairs for faster lookup # proc NOAH_iaddr2handle { node_iaddr } { if { $node_iaddr == -1 } { return -1 } set ns_ [Simulator instance] for {set i 0} { $i [Node set nn_]} {incr i} { set node_handle [$ns_ set Node_($i)] if {[string compare [NOAH_handle2iaddr $node_handle] $node_iaddr] == 0} { return $node_handle } } return -1 } ## ## PROC: returns the handle of a given NODE, by its iaddress ## ## FIXME: assume itf(0), codigo C++ devolve mac dessa interface ## ## this code is used by the disabled ARP (option 2) proc ARP_find_mobile_iaddr2mac { iaddr } { set ns_ [Simulator instance] set MH_node_handle [NOAH_iaddr2handle $iaddr] set ll [$MH_node_handle set ll_(0)] #puts found: $MH_node_handle $ll return $ll } --- cut here --- - Re: [ns] Disable ARP Ahmad Khayyat Wed, 28 Feb 2007 02:27:15 -0800 Never mind. The two lines work perfectly. They just happened to trigger another problem, which is taken care of now :) On Tue, 27 Feb 2007 18:27:37 -0500 Ahmad Khayyat [EMAIL PROTECTED] wrote: What is the easiest way to disable the use of the ARP protocol? I guess the IP address corresponds to the MAC address in ns-2, doesn't it? So how do I make the LL/ARP modules use it immediately without using ARP? I tried adding the following two lines at the top of ARPTable::arpresolve(nsaddr_t dst, Packet *p, LL *ll) mac_-hdr_dst((char*) HDR_MAC(p), dst); return 0; but that caused strange behaviour on rare occasions, where a packet suddenly would appear in another far node. Playing with ARP doesn't explain the problem for me, but somehow removing those two lines gets rid of the strange behaviour. So, what is a proper way of disabling ARP? Thanks.. Ahmad
Re: [ns] [NS-2] The most recent tcl-debug manual
Hi, I've checked your installation manual. It looks great! Many thanks for the effort of contributing to the ns2 community documentation; of course that I'll mention your work in my debugging pages! Pedro Vale Estrela http://tagus.inesc-id.pt/~pestrela/ns2 http://tagus.inesc-id.pt/~pestrela/ns2 This semester I updated the tcl-debug installation manual. .. This manual is written BOTH Linux and cygwin in mind. This should work both for 2.30, 2.29, and 2.28. The link is given below. 2.30 http://web.umr.edu/~tk424/CpE_EE401_1A_Spring_2007/Handouts/Programs/tclDeb ugger/tcl-debug_installation_manual.pdf http://web.umr.edu/~tk424/CpE_EE401_1A_Spring_2007/Handouts/Programs/tclDebu gger/tcl-debug_installation_manual.pdf For your convenience, I have included the same manual with previous versions. These links are included in the above manual. 2.29 http://mailman.isi.edu/pipermail/ns-users/2006-January/053760.html http://mailman.isi.edu/pipermail/ns-users/2006-January/053760.html 2.28 http://mailman.isi.edu/pipermail/ns-users/2005-June/050495.html http://mailman.isi.edu/pipermail/ns-users/2005-June/050495.html Tae-Hyung Kim Ph.D. candidate Dept. of Electrical Computer Engineering University of Missouri, Rolla Applied Computational Intelligence Laboratory G11 Emerson Electric Co. Hall 1870 Miner Circle Rolla, MO 65409-0040
Re: [ns] help for implementation of the DCCP in NS
Have you tried this code? http://lifc.univ-fcomte.fr/~dedu/ns2/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of zhang victor Sent: quarta-feira, 7 de Março de 2007 3:39 To: ns-users@ISI.EDU Subject: [ns] help for implementation of the DCCP in NS Hi,guys: I am trying to implement the DCCP in NS, does anyone have implemented it? and willing to share the source code and the detail implementation method. all the bests victor zhang
Re: [ns] flooding.tcl (hierarchical network)
Check my page http://tagus.inesc-id.pt/~pestrela/ns2/ns2_haddr_tips.html about my address conversion functions Pedro Vale Estrela Type of Addresses that a node can have in NS2 (hAddr, ID, iAddr, Handle) In NS2, a node can be uniquely identified by several forms the handle is the otcl name; it refers to an object of the form _oXXX, and because of this, it is the only form can be used to directly call internal instprocs and variables. the haddr is the Hierarchical address, on the form X.Y.Z the iaddr is the INTEGER hierarchical address, where the haddr string is simply ENCODED in a 32 bit integer. the id is the sequential Node ID of the simulator. The proposed variable names and contents are outlined in the following table. For unknown nodes or in error conditions, the value -1 is generally used. http://tagus.inesc-id.pt/~pestrela/ns2/ns2_haddr_tips.html In my ns2_shared_procs.tcl utils tcl file, I introduce procs for all possible conversions of each form, using the procs handle2iaddr, handle2haddr, handle2id, etc. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of feel2chat Sent: quinta-feira, 8 de Março de 2007 20:52 To: ns-users@ISI.EDU Subject: Re: [ns] flooding.tcl (hierarchical network) Will the problem was in a hierarchical network the addresses are represented as doted string (i.e. 0.8.1) so you need to convert the address to int in the script. to convert the address use something like this: set addressObj [[$ns get-AllocAddrBits ] get-Address] set ip [$addressObj str2addr $addr] cheers, Z On 2/25/07, feel2chat [EMAIL PROTECTED] wrote: I have been trying to run the flooding.tcl example but using a hierarchical network (created using sgb2hierns), yet it didn't work. It seems the code does not find the right neighbour nodes, I wonder what I'm missing? The example work perfect on a flat network. Cheers, Z
Re: [ns] MASH Inspector (nstk?) problems
Hi Regarding the nstk, what I've done is to clone the wish.c file from a very recent TCL distribution (I guess the one that came with NS2.29 all in one), and merged it with the NS2 code (tclappinit.cc). a) Can you run the TKcon console? http://tagus.inesc-id.pt/~pestrela/ns2/step3.PNG b) find any simple TK command that works in your wish version, and try it in nstk. Does it work? (I've made nstk in a linux PC, running debian distribution and NS_all_in_one 2.29) Other users that have successfully installed nstk, please comment on this topic! Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrés Emilio Arcia Moret Sent: quarta-feira, 7 de Fevereiro de 2007 17:22 To: ns-users@ISI.EDU Subject: [ns] MASH Inspector (nstk?) problems Hi everyone, I just did all the steps nicely explained in the Pedro Estrela's homepage to work with the debugger. All installation steps work well (show no error messages). However, when testing the MASH Inspector as indicated, the MASH window starts trembling at the right border and couple of seconds later nstk hangs. I am using a MacBook Pro/OS X and ns-2.30. I guess is the wish version that the nstk takes by default, which is not using plain X11 windows. So, I don't know how to generate an nstk with the X11 wish version. This is, at least, to see if the tk version is the one with the problem. Any help would be appreciated. -- Andrés Arcia
Re: [ns] MASH Inspector (nstk?) problems
This is very strange :) Actually, the screenshot of step 4 is what happens after clicking in one of the classes; This is the first thing that happens, and is exactly like yours http://tagus.inesc-id.pt/~pestrela/ns2/step4_very_start.PNG I can only think of you to upgrade your TK version (I'm using 8.4.11, and the guide was made in linux using 8.4.5). You are currently using 8.4.7. test b) showed that nstk is processing the TK commands well. So, this should be a problem of some command contained in Mash inspector itself. The problem is that MashInspector doesnt run in wish because it lacks otcl. (you could try to compile Mash itself, but it will not be easy). Its probably faster to get a linux machine, patch it according to my guide, and try the inspector; after that, you can evaluate the inspector's capabilities for yourself, and decide if it is worth the effort to try to find the bug. Pedro Estrela -Original Message- From: Andrés Emilio Arcia Moret [mailto:[EMAIL PROTECTED] Sent: quarta-feira, 7 de Fevereiro de 2007 21:36 To: [EMAIL PROTECTED] Cc: ns-users@isi.edu Subject: Re: [ns] MASH Inspector (nstk?) problems Hello, So far I have done both tests that you requested and both have executed neatly. Answer for question a): yes it works. http://webdelprofesor.ula.ve/ingenieria/amoret/question_a.png Answer for question b): yes it works for both. http://webdelprofesor.ula.ve/ingenieria/amoret/question_b.png However, I get this weird behavior for the MASH inspector. The inspector shows up when called but once I try to roll down the scrollbar, the whole thing hangs. Also, from the very beginning the inspector is not showing what it should (at least what you show at: http://tagus.inesc-id.pt/~pestrela/ns2/step4.PNG). By the way, I tried one script for testing scrollbars in nstk and worked well. The result is at: http://webdelprofesor.ula.ve/ingenieria/amoret/smashed_mash.png Thanks for your help. On 2/7/07, Pedro Vale Estrela [EMAIL PROTECTED] wrote: Hi Regarding the nstk, what I've done is to clone the wish.c file from a very recent TCL distribution (I guess the one that came with NS2.29 all in one), and merged it with the NS2 code (tclappinit.cc ). a) Can you run the TKcon console? http://tagus.inesc-id.pt/~pestrela/ns2/step3.PNG b) find any simple TK command that works in your wish version, and try it in nstk. Does it work? (I've made nstk in a linux PC, running debian distribution and NS_all_in_one 2.29) Other users that have successfully installed nstk, please comment on this topic! Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ] On Behalf Of Andrés Emilio Arcia Moret Sent: quarta-feira, 7 de Fevereiro de 2007 17:22 To: ns-users@ISI.EDU Subject: [ns] MASH Inspector (nstk?) problems Hi everyone, I just did all the steps nicely explained in the Pedro Estrela's homepage to work with the debugger. All installation steps work well (show no error messages). However, when testing the MASH Inspector as indicated, the MASH window starts trembling at the right border and couple of seconds later nstk hangs. I am using a MacBook Pro/OS X and ns-2.30. I guess is the wish version that the nstk takes by default, which is not using plain X11 windows. So, I don't know how to generate an nstk with the X11 wish version. This is, at least, to see if the tk version is the one with the problem. Any help would be appreciated. -- Andrés Arcia -- -- Andrés Arcia
Re: [ns] What is error CBK?
Do: grep CBK */* result: doc/mobility.tex:\item[CBK] DROP\_RTR\_MAC\_CALLBACK ... trace/cmu-trace.h:#define DROP_RTR_MAC_CALLBACK CBK // MAC callback then: [EMAIL PROTECTED]:C:[cims]$ grep DROP_RTR_MAC_CALLBACK */* aodv/aodv.cc: drop(p, DROP_RTR_MAC_CALLBACK); aodv/aodv.cc:drop(p, DROP_RTR_MAC_CALLBACK); aodv/aodv.cc:drop(p, DROP_RTR_MAC_CALLBACK); aodv/aodv.cc:drop(p, DROP_RTR_MAC_CALLBACK); aodv/aodv.cc: drop(p, DROP_RTR_MAC_CALLBACK); aodv/aodv.cc: dr Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vijay Ghorpade Sent: quarta-feira, 31 de Janeiro de 2007 5:39 To: ns_users Subject: [ns] What is error CBK? Hi, I am using ns-2.28 mobile nodes and generating a trace file with new- trace. In the trace file i found that some packets are getting dropped and the reason is CBK. What is correct meaning of CBK? How to avoid CBK errors in a network? Why such type of errors occur? Regards Vijay
Re: [ns] (hier-rtg-100.tcl) doesnt run!?
If that script is not in /tcl/test, it is not part of the standard test suites, and thus it can be outdated. Try to find the equivalent script (for hierarchial tests) in this directory that is guaranteed to run Also, check http://tagus.inesc-id.pt/~pestrela/ns2/ns2_haddr_tips.html Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of feel2chat Sent: quarta-feira, 31 de Janeiro de 2007 16:36 To: ns-users@ISI.EDU Subject: [ns] (hier-rtg-100.tcl) doesnt run!? Hi, Each time I run the script hier-rtg-100.tcl (which comes with ns-allinone) it gives me the following error, I wonder whats the problem?? = Sim.: utime/stime: 147 9stack/heap: -6976 1892352 Creating hierarchical nodes.. 0...Creating links 0... (_o3 cmd line 1) invoked from within _o3 cmd duplex-link-of-interfaces _o14 _o614 5Mb 410ms DropTail invoked from within catch $self cmd $args ret invoked from within if [catch $self cmd $args ret] { set cls [$self info class] global errorInfo set savedInfo $errorInfo error error when calling class $cls: $args $... (procedure _o3 line 2) (SplitObject unknown line 2) invoked from within $ns duplex-link-of-interfaces $n(0) $n(75) $linkBW 410ms DropTail (procedure create-hier-topology line 126) invoked from within create-hier-topology $linkBW (file hier-rtg-100.tcl line 15) = Any hints or ideas in solving this annoying problem will be appreciated.. Thank you, Zee
Re: [ns] HMIPv6 extension
The page containing the FHMIP extension is long gone. However, recently, a NS2 user has sent me one snapshot of it (check below) Besides fHMIP, another HMIP extension is also present in the original CIMS package from Columbia university. http://tagus.inesc-id.pt/~pestrela/ns2/mobility.html I'm building and maintaining a full mirror of all NS2 mobility code that I'm aware of. If anyone has comments on this, or more recent versions, please contact me! Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of - bagioris - Sent: segunda-feira, 29 de Janeiro de 2007 18:25 To: ns-users@ISI.EDU Subject: [ns] HMIPv6 extension hi all,i'm looking for the HMIPv6, FMIPv6 ns-2 extensions.I've seen a lot of posts also asking, but no real result...Everyone is mentioning Hsieh's implementation, but there's no active linkIf anyone has something, please share it...bagioris _ Turn searches into helpful donations. Make your search count. http://click4thecause.live.com/search/charity/default.aspx?source=wlmemtag line_donation
Re: [ns] node entry?
You can use my otcl debugger facilities to check the state of the internal otcl variables after this code http://tagus.inesc-id.pt/~pestrela/ns2 Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of daft Sent: segunda-feira, 29 de Janeiro de 2007 20:16 To: ns-users@ISI.EDU Subject: [ns] node entry? Hi I'm trying to swap out the default classifier in a node for my own agent. The following code inserts my agent into the entry point of the node... # Create CSG set agt [new Agent/MyAgent] puts Node entry: [$n1 entry] agt entry: [$agt target] $ns attach-agent $n1 $agt $n1 insert-entry [new RtModule] $agt target puts Node entry: [$n1 entry] agt entry: [$agt target] The final puts statement shows that the entry point of $n1 is correctly assigned to $agt, and the agents target is set to the original classifier (which is the behaviour I'm after). However when I send a packet to $n1 the original classifier is invoked first, and if I send a packet through $n1 the original classifer is used and my agent is never invoked. Any ideas what's going wrong/on? Thanks Tim -- View this message in context: http://www.nabble.com/node-entry-- tf3138100.html#a8696964 Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] How to disable all the trace outputs
a) Don't call ns trace-all or a similar lines b) write the trace to /dev/null -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of babak Sent: quinta-feira, 18 de Janeiro de 2007 10:47 To: ns-users@ISI.EDU Subject: [ns] How to disable all the trace outputs Dear All, I'm simulating a wireless network with 500 nodes. I have turned off all the trace options in my tcl file. However, still lines are appending to the output file and after a while the file gets huge. It really make the simulation slow. Does anybody know how can I turn off tracing completely? Thanks for your attention Babak.
Re: [ns] Multi-interface support howto
Hi ramon Thanks for this great contribution. This is exactly the kind of useful documentation contributions that the NS2 simulator community needs. Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ramon Aguero Sent: segunda-feira, 15 de Janeiro de 2007 10:12 To: ns-users@ISI.EDU Cc: [EMAIL PROTECTED] Subject: [ns] Multi-interface support howto Dear all, We have seen a lot of requests about the possibility to extend the NS-2 framework to support multiple interfaces. Although there is some information available, according to the messages that have been sent to this list, it seems that a more thorough description may be required. In this sense, after performing an analysis about existing activities in this topic, we have created a document that tries to summarize which are the required changes to be performed within the different pieces of the simulator (tcl, c++) as well as how routing protocols can be adapted to make use of the new feature. The howto is entitled Adding Multiple Interface Support in NS-2 and it has been written by my colleague Jesús Pérez and myself. Ive uploaded the document, which can be retrieved from the following url: http://personales.unican.es/aguerocrhttp://personales.unican.es/aguerocr We will be happy to receive any feedback, comments, so as to improve the howto, since we would like to have it like a living document, adding new features as they are available. Best regards, Ramón Ramón Agüero Calvo Dept. of Communications Engineering Network Planning Mobile Communications Laboratory University of Cantabria Avda Castros s/n 39005 - Santander SPAIN [EMAIL PROTECTED] Tel: +34 942 201 392 (Ext 14) Fax: +34 942 201 488
Re: [ns] NS tutorial update proposal
To Joachim: Many thanks for your documentation efforts To all other NS2 users, especially for the recent ex-beginners: __Please contribute to the NS2 Wiki__ with your experiences and conclusions. More info: http://mailman.isi.edu/pipermail/ns-users/2006-June/056015.html (Comments are inline) -Original Message- From: Joachim Fabini [mailto:[EMAIL PROTECTED] Sent: sexta-feira, 12 de Janeiro de 2007 11:00 To: 'Pedro Estrela' Cc: ns-users@isi.edu; 'Joachim Fabini' Subject: RE: [ns] NS tutorial update proposal Hi Pedro, You are, of course, 100% correct - the tutorial is outdated and its very confusing to first time users. One problem is that, in general, NS2 users ask much, but contribute little when they have their questions solved - either by the help of somebody, or by their own. Your statements match very close my first impression as NS2 newbie. Reading through the mailing list archive helps, but I also noticed that - compared to other groups - there are very, very few people (won't mention names ;) who regularily answer :-) questions - thanks to you and to the other members for their help and time. :-) As about the reason for the rather low feedback on the mailing list I can only speculate: on one hand, the plain NS is pretty complex, and people new to NS seem to try the minimum effort approach - instead of searching through the archive they immediately send their question to the list. This yields a high ratio of noise traffic. As soon as users become familiar with NS they focus on their specific task and many of them no longer actively participate in the list. On the other hand exactly! the high number of patches, releases, and variants (moreover the incompatibility of some of these patches with each other) make answering questions on NS more difficult. Also true In addition it seems to me that NS is used mainly in the academic field, where people usually leave after having completed their project (paper, thesis, etc.) - sadly enough sometimes without leaving behind any usable documentation of their patches/modules. So it's up to us (academics, be it students or supervisors) to make sure that we contribute something back to the community - and prepare students for real life by forcing them to document what they have done and giving this back to the community. 100% agreed Only as an example, regarding chapter VII of Marc's tutorial - in half an hour the person who changed the ping sources and included the sources into the NS distribution could also have updated the related web pages. If someone else is expected to do this, it takes him definitely longer to find out what exactly was changed and why... I tried to include all details that I have noticed into my posting but I'm almost sure that I skipped some. Regarding this particular case, I think that first this useful info should be stored on the NS2 wiki ASAP. At that time, I'll have no problems asking on the NS-Developers Mailing list for someone with write access to put a link informing where the updates and changes are located in the NS2 wiki. Besides that, I think that the best way to maintain this and other parts of the documentation, would be to port the whole tutorial to the NS2 wiki and automatically redirect the existing page at http://www.isi.edu/nsnam/ns/tutorial/ Again, I can ask on the developers mailing list for it, when the information is ready at the wiki. Some examples from my personal experience: http://mailman.isi.edu/pipermail/ns-users/2006-June/056015.html http://mailman.isi.edu/pipermail/ns-users/2006-January/053560.html Yes, it's sad - but I repeat myself: the problem is that those who have gained a medium level of experience in NS and who have used the work of all previous NS developers are the target group for these contributions - having spent two days on NS does not give me the experience to find out all changes (and the reason for these changes). Naturally. Regarding this particular topic, what I suggest is to: - create a page about NS2 tutorials in the NS2 wiki, which could be used to detail the important changes for recent versions of NS2 of this, and possibly other tutorials. Good idea, but I see the tutorial maintenance as an orthogonal task to what you have proposed. The tutorial pages have such a high rating in search engines (like Google) that users will find the initial tutorial first. So imho the only way how to solve true the problem is to keep synchronized the text and sources of these tutorials first - or take them offline, which is also not the solution that I'd like to go. (please see response above) However, in my opinion, major improvements in problems like this will only be possible if more users take the action to contribute. I completly agree with your point of view. Thanks anyhow, best regards --Joachim
Re: [ns] error interpretation
Ahh, that's the ugliness of TCL... That error is derived from the object-oriented capabilities of NS2 (oTCL) being built on top of regular TCL code. Thus, _o19 is an object name with is also a procedure. Before the error do Puts [_o19 info class] And start searching from the returning class. Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ramzi Tka Sent: segunda-feira, 8 de Janeiro de 2007 9:50 To: ns-users@ISI.EDU Subject: [ns] error interpretation Hi, let consider the followinf error : (procedure _o19 line 2) (SplitObject unknown line 2) What is the significance of procedure _o19 . What is the tcl file that corresponds to _o19 so we can find line 2? Best regards Ramzi
Re: [ns] CIMS/NS-2
http://tagus.inesc-id.pt/~pestrela/ns2/mobility.html#_Toc147660119 http://www.infotech.tu-chemnitz.de/~knoll/NS2/Installing_old_NS2_version_ns- allinone-2_1b6a_on_RedHat_8_0.php The problem is the GCC compiler, which should be at least 2.95 or older. When you can install the original ns2.1b6 without errors, then you'll know that you are on the right track. Pedro Vale Estrela -Original Message- From: Ameera AL-Durazi [mailto:[EMAIL PROTECTED] Sent: quarta-feira, 10 de Janeiro de 2007 10:19 To: [EMAIL PROTECTED] Subject: CIMS/NS-2 Dear Sir, I am doing a project on CIMS ns-2 , but I have seen that the one of the requirment of the CIMS software is linux RedHat 8.0 , but I dont that version so is it ok if I use RedHat 9 to add this patch to my ns-2 ??? Thanks, Ame _ Express yourself instantly with MSN Messenger! MSN Messenger http://g.msn.com/8HMAEN/2737??PS=47575 Download today it's FREE!
Re: [ns] Doubt regarding running cc program and NAM
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Swalaxmi Pandit Sent: sexta-feira, 5 de Janeiro de 2007 22:05 To: ns-users@ISI.EDU Subject: [ns] Doubt regarding running cc program and NAM Hi, I am trying to run a sample TCL program(example.tcl) in ns2. The program is running smoothly but I am unable to see the output in nam and xgraph. For NAM,it is showing couldn't execute nam: no such file or directory. For xgraph,it is showing couldn't execute xgraph: no such file or directory. I have included the paths for both NAM and xgraph in bashrc file. This is a path problem. In the meantime, put the absolute path to those executables in the tcl script I have one more doubt. Can you just give me the procedure to link C++ program and TCL scripts and run them succesfully? add whichever C++ code to the makefile, and source whichever tcl code in the /tcl/lib/ns-lib.tcl file (or source it in your script at run-time) I want to run mac-802_11.cc program from mac folder in ns-2.30. and want to see the output. I am using fedora 5 and ns2.30. Will you just tell me the step by step procedure to simulate the output? This is my university project. Please try to clarify the doubts. Thanks Regards, Swalaxmi
Re: [ns] Fwd: segmentation fault in wired cum wireless scenario usingaodv+ help
Ive colored and clustered the nodes myself, by hand, just for that picture in my site. For setting the wired nodes in NAM, the best way is to specify the wired link latency and orientation. There are lots of examples on the /tcl/ex directory on how to do it. Pedro Vale Estrela -Original Message- From: subramani [mailto:[EMAIL PROTECTED] Sent: sábado, 6 de Janeiro de 2007 10:02 To: [EMAIL PROTECTED] Subject: RE: [ns] Fwd: segmentation fault in wired cum wireless scenario usingaodv+ help hi thanks for the info .. i rectified the fault by commenting some section and re running and as you had pointed out i had done a mistake in assigning hier-address to the wired nodes . one more doubt in wired cum wireless scenarios as shown by nam the wired nodes are seen clustered together. specifying node positions for wired nodes has no effect. is there any method to specify where each node should be located exactly in the nam window? Pedro Vale Estrela [EMAIL PROTECTED] wrote: http://tagus.inesc-id.pt/~pestrela/ns2/ns2_haddr_tips.html#_Toc121548870 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of subramani Sent: quinta-feira, 4 de Janeiro de 2007 18:09 To: ns list Subject: [ns] Fwd: segmentation fault in wired cum wireless scenario usingaodv+ help hi all, i have installed aodv+ for gateway discovery on ns-2.28 (redhat 9) aodv+ was in ns2 contributed code section it worked everything fine for all the example scripts provided.. but when i changed the number of nodes in the given example wired_wireless_ex.tcl i received a segmentation fault i don't know wheres the fault .please atleast help me how to debug ns2 scripts containing segmentation faults * here is the complete code ** #try.tcl set opt(namfile) out.nam set opt(tracefile) out.tr set opt(x) 500; #x dimension of the topography set opt(y) 500; #y dimension of the topography set opt(wirelessNodes) 6; #mobile nodes set opt(wiredNodes) 8; #hosts and routers set opt(gatewayNodes) 2; #gateways set val(stop) 60.0; #simulation time set val(start-src) 1 set val(stop-src) 50 set opt(gw_discovery) reactive; #gateway discovery method # == #--- #Initialize Global Variables #--- #create a simulator object set ns [new Simulator] $ns color 0 Brown # #Define The Hierachial Topology Structure # $ns node-config -addressType hierarchical #Nbr of domains AddrParams set domain_num_ 3 #Nbr of clusters (=subdomains) in each domain lappend clusterNbr 2 2 1 AddrParams set cluster_num_ $clusterNbr #Nbr of nodes in each cluster lappend eilastlevel 3 2 4 4 3 AddrParams set nodes_num_ $eilastlevel ## #create trace objects for ns and nam $ns use-newtrace set nstrace [open $opt(tracefile) w] $ns trace-all $nstrace set namtrace [open $opt(namfile) w] $ns namtrace-all-wireless $namtrace $opt(x) $opt(y) #create a topology object and define topology (500mx500m) set topo [new Topography] $topo load_flatgrid $opt(x) $opt(y) #Choose method for gateway discovery if {$opt(gw_discovery) == proactive} { Agent/AODV set gw_discovery 0 } if {$opt(gw_discovery) == hybrid} { Agent/AODV set gw_discovery 1 } if {$opt(gw_discovery) == reactive} { Agent/AODV set gw_discovery 2 } #create wired nodes set temp {2.0.0 2.0.1 2.0.2 2.0.3 2.1.4 2.1.5 2.1.6 2.1.7} for {set i 0} {$i $opt(wiredNodes)} {incr i} { set host($i) [$ns node [lindex $temp $i]] } #create God (General Operations Director) create-god [expr $opt(wirelessNodes)+$opt(gatewayNodes)]] #-- #Configure for Gateway and Mobile Nodes #-- #Use hierarchical addresses for GWs and MNs #configure for mobile nodes and gateways $ns node-config -adhocRouting AODV $ns node-config -llType LL $ns node-config -macType Mac/802_11 $ns node-config -ifqType Queue/DropTail/PriQueue $ns node-config -ifqLen 50 $ns node-config -antType Antenna/OmniAntenna $ns node-config -propType Propagation/TwoRayGround $ns node-config -phyType Phy/WirelessPhy $ns node-config -topoInstance $topo $ns node-config -channel [new Channel/WirelessChannel] $ns node-config -agentTrace ON $ns node-config -routerTrace ON $ns node-config -macTrace ON $ns node-config -movementTrace OFF #3 #configure for gateways $ns node-config -wiredRouting ON #create gateway set gw(0) [$ns node 0.0.0] #set initial coordinates $gw(0) set X_ 100.0 $gw(0) set Y_ 250.0 $gw(0) set Z_ 0.0 $ns at 0.00 $gw(0) setdest 100 250 20 try set gw(1) [$ns node 1.0.0] #set initial coordinates $gw(1) set X_ 500.0 $gw(1) set Y_ 250.0
Re: [ns] Fwd: segmentation fault in wired cum wireless scenario usingaodv+ help
http://tagus.inesc-id.pt/~pestrela/ns2/ns2_haddr_tips.html#_Toc121548870 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of subramani Sent: quinta-feira, 4 de Janeiro de 2007 18:09 To: ns list Subject: [ns] Fwd: segmentation fault in wired cum wireless scenario usingaodv+ help hi all, i have installed aodv+ for gateway discovery on ns-2.28 (redhat 9) aodv+ was in ns2 contributed code section it worked everything fine for all the example scripts provided.. but when i changed the number of nodes in the given example wired_wireless_ex.tcl i received a segmentation fault i don't know wheres the fault .please atleast help me how to debug ns2 scripts containing segmentation faults * here is the complete code ** #try.tcl set opt(namfile) out.nam set opt(tracefile) out.tr set opt(x)500;#x dimension of the topography set opt(y) 500;#y dimension of the topography set opt(wirelessNodes) 6; #mobile nodes set opt(wiredNodes) 8; #hosts and routers set opt(gatewayNodes)2; #gateways set val(stop) 60.0; #simulation time set val(start-src) 1 set val(stop-src)50 set opt(gw_discovery)reactive; #gateway discovery method # == #--- #Initialize Global Variables #--- #create a simulator object set ns [new Simulator] $ns color 0 Brown # #Define The Hierachial Topology Structure # $ns node-config -addressType hierarchical #Nbr of domains AddrParams set domain_num_ 3 #Nbr of clusters (=subdomains) in each domain lappend clusterNbr 2 2 1 AddrParams set cluster_num_ $clusterNbr #Nbr of nodes in each cluster lappend eilastlevel 3 2 4 4 3 AddrParams set nodes_num_ $eilastlevel ## #create trace objects for ns and nam $ns use-newtrace set nstrace [open $opt(tracefile) w] $ns trace-all $nstrace set namtrace [open $opt(namfile) w] $ns namtrace-all-wireless $namtrace $opt(x) $opt(y) #create a topology object and define topology (500mx500m) set topo [new Topography] $topo load_flatgrid $opt(x) $opt(y) #Choose method for gateway discovery if {$opt(gw_discovery) == proactive} { Agent/AODV set gw_discovery 0 } if {$opt(gw_discovery) == hybrid} { Agent/AODV set gw_discovery 1 } if {$opt(gw_discovery) == reactive} { Agent/AODV set gw_discovery 2 } #create wired nodes set temp {2.0.0 2.0.1 2.0.2 2.0.3 2.1.4 2.1.5 2.1.6 2.1.7} for {set i 0} {$i $opt(wiredNodes)} {incr i} { set host($i) [$ns node [lindex $temp $i]] } #create God (General Operations Director) create-god [expr $opt(wirelessNodes)+$opt(gatewayNodes)]] #-- #Configure for Gateway and Mobile Nodes #-- #Use hierarchical addresses for GWs and MNs #configure for mobile nodes and gateways $ns node-config -adhocRouting AODV $ns node-config -llType LL $ns node-config -macType Mac/802_11 $ns node-config -ifqType Queue/DropTail/PriQueue $ns node-config -ifqLen 50 $ns node-config -antType Antenna/OmniAntenna $ns node-config -propType Propagation/TwoRayGround $ns node-config -phyType Phy/WirelessPhy $ns node-config -topoInstance $topo $ns node-config -channel [new Channel/WirelessChannel] $ns node-config -agentTrace ON $ns node-config -routerTrace ON $ns node-config -macTrace ON $ns node-config -movementTrace OFF #3 #configure for gateways $ns node-config -wiredRouting ON #create gateway set gw(0) [$ns node 0.0.0] #set initial coordinates $gw(0) set X_ 100.0 $gw(0) set Y_ 250.0 $gw(0) set Z_ 0.0 $ns at 0.00 $gw(0) setdest 100 250 20 try set gw(1) [$ns node 1.0.0] #set initial coordinates $gw(1) set X_ 500.0 $gw(1) set Y_ 250.0 $gw(1) set Z_ 0.0 $ns at 0.00 $gw(1) setdest 500 250 20 #Define node initial position in nam #configure for mobile nodes $ns node-config -wiredRouting OFF #create mobile nodes in the same domain as gw(0) set temp {0.0.1 0.0.2 0.1.0 0.1.1 1.0.1 1.0.2} for {set i 0} {$i $opt(wirelessNodes)} {incr i} { set mobile($i) [$ns node [lindex $temp [expr $i]]] if {$i4} { $mobile($i) base-station [AddrParams addr2id [$gw(0) node-addr]] } else { $mobile($i) base-station [AddrParams addr2id [$gw(1) node-addr]] } } $mobile(0) set X_ 10 $mobile(0) set Y_ 200 $mobile(0) set Z_ 0.0 $mobile(1) set X_ 60 $mobile(1) set Y_ 320 $mobile(1) set Z_ 0.0 $mobile(2) set X_ 50 $mobile(2) set Y_ 250 $mobile(2) set Z_ 0.0 $mobile(3) set X_ 100
Re: [ns] debugger install
This guide has been used successfully many times. Try Make nstk Nstk -Original Message- From: sandesh shenoy [mailto:[EMAIL PROTECTED] Sent: quinta-feira, 21 de Dezembro de 2006 10:41 To: nsusers Cc: [EMAIL PROTECTED] Subject: [ns] debugger install Hello, I went through ns2 otcl+Mash+Tkcon+Tcl-debug debugging page and tried to follow the procedures.After adding Tk support,I tried to run nstk,but it is giving nstk command not found.Any problem with the patching?One patcing in common and other under ns-2.28 directory right?I am not able to get what went wrong.Any other initializations to be done?Please do help me in this regard. Thanks in advance. Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php
Re: [ns] a simple question
The first free the memory and doesn't log the drop in the trace file, the second does both (please confirm if it frees the memory) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of juan manuel gomez garcia Sent: segunda-feira, 18 de Dezembro de 2006 17:11 To: Ns-users@ISI.EDU Subject: [ns] a simple question Hi ns-users: I don't know what is the difference between Packet::free(p) anddrop(p). Thank you for your help. _ Descarga gratis la Barra de Herramientas de MSN http://www.msn.es/usuario/busqueda/barra?XAPID=2031DI=1055SU=http%3A//ww w.hotmail.comHL=LINKTAG1OPENINGTEXT_MSNBH
Re: [ns] CBR packet size on 802.11b link
Good question. You'll get confusing and sometimes conflicting packets sizes when setting it at the agent, transport or application level, but this is at the same layer. Maybe the send is L2 packet size, with l2 headers, and recv is L4 pakcet size without headers Try enabling the RTR and AGT traces Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lars Lars Sent: segunda-feira, 18 de Dezembro de 2006 21:46 To: ns-users@ISI.EDU Subject: [ns] CBR packet size on 802.11b link Hi, I'm sending 1004 Byte CBR packets using a UDP agent with a packet size of 1024. After the RTS/CTS handshaking is complete I can see the packet sending and receiving. Tracefile extract is below. Why is the cbr packet size 1076 when sending and 1024 when arriving?? L s 1.213410777 _0_ MAC --- 0 RTS 44 r 1.213763444 _1_ MAC --- 0 RTS 44 s 1.213773444 _1_ MAC --- 0 CTS 38 r 1.21407811 _0_ MAC --- 0 CTS 38 s 1.21408811 _0_ MAC --- 267 cbr 1076 r 1.215045868 _1_ MAC --- 267 cbr 1024 _ Discover the magic of RSS feeds at MSN Ireland! http://ie.msn.com/
Re: [ns] ns-allinone-2.26 installation
Use older version of your distribution -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anjali Arora Sent: quinta-feira, 14 de Dezembro de 2006 13:35 To: ns-users@ISI.EDU Subject: [ns] ns-allinone-2.26 installation hello everyone i have ns-allinone-2.26 and mns-for-2.26.i want to install it on linux red-hat enterprise edition.but its not working,giving error tk 8.3.2 make failed.what is the solution or whats another option? please help me out anjali - Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
Re: [ns] compile problem
Sems like a bug in the makefile. Try: rm ns2/gen/ns_tcl.o ; make -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of sandesh shenoy Sent: quinta-feira, 14 de Dezembro de 2006 14:09 To: ns-users@ISI.EDU Subject: [ns] compile problem Hello, Could anyone tell me how to reflect the log statements written in file-ns-lib.tcl,Simulator instproc init args body.If i make under ns-2.28,no changes are brought about.Is there any additional procedure to be followed?Any suggestions will be helpful for me. Thanks in advance. - Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
Re: [ns] accessing queue length in 802.11 MAC
Use: If( ((LL *)uptarget_)-ifq()){ //code if non-null } else { // code if null } note that a null queue é a node without a queue, NOT an empty queue! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of M. Shen Sent: quarta-feira, 6 de Dezembro de 2006 14:56 To: ghada; ns-users@ISI.EDU Subject: Re: [ns] accessing queue length in 802.11 MAC Dear ghada, Thank you very much for your reply. But how to check if the queue is null or not? Should I do it in the queue.cc peoriodically and transfer the state to mac? Or check it in the MAC? If it's the latter, we still need to access ifq() in the mac.cc, right? thanks, Min On Wed, 6 Dec 2006 14:03:15 +0900 ghada [EMAIL PROTECTED] wrote: I think you can solve this problem if you check first if the queue is null or not before using length() function. - Original Message - From: M. Shen [EMAIL PROTECTED] To: ns-users@ISI.EDU Sent: Wednesday, December 06, 2006 12:10 PM Subject: Re: [ns] accessing queue length in 802.11 MAC Dear guys, I tried to access queue length in MAC. So I wrote int pkt_num = ((LL *)uptarget_)-ifq()-length(); When I run the simulation us gdb, segmentation fault occurs. I shows that Program received signal SIGSEGV, Segmentation fault. 0x080c3ad4 in Queue::length() (this=0x0) at queue/queue.h:136 136 int length() { return pq_-length(); } /* number of pkts currently in Does any one know how to deal with this problem? Thank you very much, Min
Re: [ns] How to measure overhead with ns2?
Count the number of sent packets at the agent or router layer Cat trace.tr | grep ^s | grep AGT | grep source node Use awk ' { if ($6 == ) print } ' to filter based on certain fields Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Schuenemann Bjoern Sent: quarta-feira, 6 de Dezembro de 2006 15:58 To: ns-users@ISI.EDU Cc: Blueher Andreas Subject: [ns] How to measure overhead with ns2? Hello, I'm trying to figure out how i can measure the created overhead which occured in a network simulation. Actually we are trying to compare a new idea of detecting malicious nodes with other old-fashion ways. One of our metrics is the created overhead. Assume we have a network with 100 nodes and 20 of them behave unnormally like dropping all data packets. How many packets have to be resended, until every packet reaches the destination at least once. How can we measure how many packets had to be transmitted overall to find out how much overhead occured? Thank you very much for your help! Best Regards, Björn - Dipl.-Inform. Björn Schünemann Hasso-Plattner-Institut für Softwaresystemtechnik GmbH Institut an der Universität Potsdam Postfach 900460, D-14440 Potsdam, Germany http://www.hpi.uni-potsdam.de http://www.hpi.uni-potsdam.de/ Phone: +49(0)331 5509 520 WWW: http://www.schuenemann.name/ http://www.schuenemann.name/ -
Re: [ns] recall a procedure every time that a packet arrives
Create your own queue object (derive from exiting queue/droptail) and redefine the recv() function Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Dekst Sent: quinta-feira, 30 de Novembro de 2006 3:02 To: ns-users@ISI.EDU Subject: Re: [ns] recall a procedure every time that a packet arrives
Re: [ns] HMIPv6 extentions
check http://tagus.inesc-id.pt/~pestrela/ns2/mobility.html I've also asked for the code, but without success. Please email the authors requesting the code, and if you get a response, please post it on the list. Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: quarta-feira, 29 de Novembro de 2006 19:46 To: ns-users@ISI.EDU Subject: [ns] HMIPv6 extentions Hi, i am a university student and i'm working on MIPv6, HMIPv6 and fast handovers. I've heard about R. Hsieh's impementation of HMIPv6, i've found a couple of links but there are all down. Is there anyone who already has this extention, or something similar (FHMIPv6)? thanks
[ns] FW: How does the control comes back from C++ to OTcl ?
--=_Part_9264_2857892.1165332047369 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline things dont work as simply as that. befeore the simualtion starts, you schedule a packet generation to occur at 0.01 then, still before the simulation starts, you schedule a link failure at 0.02 then you start the simulation, where control is given to the scheduler. the scheduler only processes messages that are exanged between the NS2 components (agents / links / queues / packets). After some hundreds of events, teh scheduler will eventually call your code at time 0.01 then it calls some more hundreds of events, before it call your second piece o code at time 0.02 what exactly are you trying to do? Pedro Vale Estrela PS: this is a fine material for the NS2 wiki - please contribute !!! On 12/5/06, G.Chandramowli [EMAIL PROTECTED] wrote: Hi everybody ... Can anyone tell me when the control from C++ comes back to OTcl ? To be more specific , let me explain a specific example here . Assume that I have written a script line to generate packets at 0.01second. Second script line to make the link failure at 0.02 second . Please tell me when the control , that goes to c++ from the script line 1, comes back to execute the script line 2 ? I am ready to explain further if my above example is difficult to understand . Thanks in advance . G.Chandramowli. --=_Part_9264_2857892.1165332047369 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline divthings dont work as simply as that./div divnbsp;/div divbefeore the simualtion starts, you schedule a packet generation to occur at 0.01/div divthen, still before the simulation starts, you schedule a link failure at 0.02/div divthen you start the simulation, where control is given to the scheduler./div divnbsp;/div divthe scheduler only processes messages that are exanged between the NS2 components (agents / links / queues / packets)./div divAfter some hundreds of events, teh scheduler will eventually call your code at time 0.01/div divthen it calls some more hundreds of events, before it call your second piece o code at time 0.02/div divnbsp;/div divwhat exactly are you trying to do?/div divPedro Vale Estrela/div divnbsp;/div divPS: this is a fine material for the NS2 wikinbsp; - please contribute !!!/div divnbsp;/div divnbsp;/div divnbsp;/div divnbsp;/div divnbsp;/div divspan class=gmail_quoteOn 12/5/06, b class=gmail_sendernameG.Chandramowli/b lt;a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/agt; wrote:/span blockquote class=gmail_quote style=PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solidbrHi everybody ...brbrCan anyone tell me when the control from C++ comes back to OTcl ?brbrnbsp;nbsp;To be more specific , let me explain a specific example here . brbrnbsp;nbsp; Assume that I have written a script line to generate packets at 0.01 second.brnbsp;nbsp; Second script line to make the link failure at 0.02 second .brbrnbsp;nbsp;Please tell me when the control , that goes to c++ from the script line 1, comes back to execute the script line 2 ? brbrI am ready to explain further if my above example is difficult to understand .brbrnbsp;nbsp;Thanks in advance .brnbsp;nbsp;G.Chandramowli.brbr/blockquote/divbr --=_Part_9264_2857892.1165332047369--
Re: [ns] TCP or transport layer Tunneling
The MIP (mobile IP) code in Ns2 has this already implemented using IP-in-IP tunneling Pedro Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peyman Behbahani Sent: quarta-feira, 15 de Novembro de 2006 11:09 To: ns-users@ISI.EDU Subject: [ns] TCP or transport layer Tunneling Dear Ns-Users, I am wandering is there any implementation for TCP-over-TCP tunnelling or alternatively any idea about implementing such a scenario? The topology can be as follow: 0-0=0-0 Sender router1 TCP router2 receiver (TCP) tunnel Router 1 is working as a TCP-encapsulator and router 2 is a decapsulator. Thanks in advance, bests Peyman
Re: [ns] Simulating channel Hopping in ns2
I cannot help with the channel hopping. But to find problems with linked lists etc. in the C++ part of the code it is always a very good idea to good tip run ns-2 using valgrind. Simulations will use a lot more time to run, but every strange or wrong memory access will be recognized. As I explain here, http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging3.html Step 1 - Choosing a simpler scenario that is known to be correct, etc the first step should be to simplify the scenario to make the debug simulations run faster. A common tip that I use extensively is to generate a lot less traffic (lower the rate for UDP; use lower link speeds for TCP). For handling the parameters in the command line, I suggest this http://tagus.inesc-id.pt/~pestrela/ns2/contributed_code.html#_Toc147652228 Pedro Vale Estrela
Re: [ns] Script for parsing output trace file
http://www.isi.edu/nsnam/archive/ns-users/webarch/1999/msg02093.html http://tagus.inesc-id.pt/~pestrela/ns2/ns2_beginners.html http://www.geocities.com/tracegraph/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of vitz399 Sent: quarta-feira, 1 de Novembro de 2006 11:19 To: ns-users@ISI.EDU Subject: [ns] Script for parsing output trace file Hello everyone, I have a task which is about to evaluate the performance of AODV mobile ad hoc routing protocol. I have created a simulation environment and I have gathered data into a trace file. However, I would like to performing data mining on the trace file. Such as mining data for metrics of packet delivery fraction and end to end delay. Could anyone please provide me some scripts example or possibly the source code for the script on parsing the output trace file. Thank you in advance regards, vitz -- View this message in context: http://www.nabble.com/Script-for-parsing- output-trace-file-tf2551509.html#a7111531 Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] reserved node addresses
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matthias Budde I am wondering which addresses are reserved in ns-2. I know that -1 is IP_BROADCAST but what else? I use an Agent that sends packets to daddr -2. Does anyone know what that stands for? Are other adresses also reserved and is there a complete list somewhere? A very good question indeed. I've put some info about addresses here: http://tagus.inesc-id.pt/~pestrela/ns2/ns2_haddr_tips.html#_Toc121548871 -1 is commonly used for IP_BROADCAST, but also for unk, and also for error (in different parts of the code) -2: normally stands for unk when -1 is already error, eg: [EMAIL PROTECTED]:[ns2]$ grep -d recurse IP_BROCAST * common/ip.h:#define IP_BROADCAST((u_int32_t) 0x) common/packet.h:(HDR_CMN(p))-next_hop_ = -2; // -1 reserved for IP_BROADCAST common/packet.h:(HDR_CMN(p))-last_hop_ = -2; // -1 reserved for IP_BROADCAST [EMAIL PROTECTED]:[ns2]$ grep -d recurse \-1 * | grep define cims/timip.h:#define ID_UNK -1 diffserv/dsPolicy.h:#define ANY_HOST -1 // Add to enable point to diffserv/ew.h:#define EW_UNCHANGE -1 diffusion3/apps/gear/geo-tools.hh:#define FAIL -1 diffusion3/apps/gear/geo-tools.hh:#define INITIAL_HEURISTIC_VALUE -1 diffusion3/apps/sysfilters/gradient.hh:#define OLD_MESSAGE -1 diffusion3/lib/dr.hh:#define WAIT_FOREVER -1 diffusion3/lib/main/header.hh:#define BROADCAST_ADDR -1 diffusion3/lib/nr/nr.hh:#define FAIL -1 mac/mac-802_3.h:#define INVALID_UID -1 // Used for mac level traces mac/mac-802_3.h:#define INVALID_TIME-1 mac/mac-tdma.h:#define FIRST_ROUND -1 mac/mac.h:#define BCAST_ADDR -1 mcast/lms.h:#define LMS_NOADDR -1 mcast/lms.h:#define LMS_NOPORT -1 mcast/srm-topo.h:#define SRM_NOIF -1 [EMAIL PROTECTED]:[ns2]$ grep -d recurse \-2 * | grep define mac/mac-tdma.h:#define NOTHING_TO_SEND -2 (this is a partial list of all places that use -1 or -2 as addresses)
Re: [ns] Xgraph basic question
Check this http://tagus.inesc-id.pt/~pestrela/ns2/contributed_code.html#_Toc147652227 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Loreno Oliveira Sent: terça-feira, 17 de Outubro de 2006 14:40 To: Aco Cc: NS-Users Subject: Re: [ns] Xgraph basic question If using xgraph is not a need, you may try gnuplot for ploting your graphs... Regards, Loreno On 10/17/06, Aco [EMAIL PROTECTED] wrote: I am trying to visualize test results using Xgraph. Everything is OK, but I have problem with something that should not be a problem. I cannot find a way how to output graph I got to JPG file. I can make PS, and OBJ file but I need clear JPG picture witout gray background. Anybody can help ?
Re: [ns] How do you Debug your Codes?
Check http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Filippos Kolovos Sent: sábado, 14 de Outubro de 2006 8:18 To: ns-users@ISI.EDU Subject: Re: [ns] How do you Debug your Codes? - For TCL-level debugging you can use tcl-debug. You have to download it and install it in addition with ns and also when you ./configure your ns code you have to put it as a parameter, i.e. (--with-tcl-debug). For C-level debugging you can install a graphical debugger such as DDD (frontend for GNUDB), but at first you have to configure the compilation of ns to be prepared for debugging. You can do this by giving the parameter --enable-debug while you are configuring ns. In total, if you want both TCL-level and C-level debugging you must put both parameters when you execute ./configure and also install separately both debuggers (tcl-debug and ddd). Regards, -Fk -- Forwarded message -- From: hamid reza [EMAIL PROTECTED] To: ns-users@ISI.EDU Date: Fri, 13 Oct 2006 06:31:06 -0700 (PDT) Subject: [ns] How do you Debug your Codes? Dear All, How do you Debug your codes? What is the best tool for this issue? Best Regards Hamid reza -- Filippos N Kolovos Software Systems Analyst Engineer M.Sc. (Eng.) in Data Communications Automation Networking Department University of Macedonia Library Egnatia 156, P.O.Box 1591 540 06 Thessaloniki, Greece E-Mail: [EMAIL PROTECTED], [EMAIL PROTECTED] -
Re: [ns] how can we echange variable between layer???
If you pass these between c++ modules by calling TCL procedures, this is very easy (but slow) Start by checking this page http://tagus.inesc-id.pt/~pestrela/ns2/ns2_tips.html#_Toc124667331 Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bilel Romdhani Sent: terça-feira, 10 de Outubro de 2006 11:47 To: Ns-users@ISI.EDU Subject: [ns] how can we echange variable between layer??? hi everybody, i m using ns2.27 to simulate wireless scenario and i want to know how can we echange variable between layer, ie, i want to use the cw_ variable on the droptail.cc file how can i do that if it's possible of course! thanks a lot
Re: [ns] reproducing the graphical results of EDCA model
Have you asked the original authors for their code? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of wajid mehmood Sent: quinta-feira, 12 de Outubro de 2006 14:09 To: ns-users@ISI.EDU Subject: [ns] reproducing the graphical results of EDCA model hi all, I want to test the EDCF simulation of the guy from tu berlin,I want to reproduce the graph of his simulation mentioned in the paper Design and Verification of an IEEE 802.11e EDCF Simulation Model in ns- 2.26, Telecommunication Networks Group, Technische Universität Berlin, November 2003.I wrote the scenerio with one end station and one access point with no. of wireless nodes as a command line parameter.I got the throughput results w.r.t. time ,but i need to see the throughput with increasing no. of stations as shown on the page 28 of the paper.If somebody has already done this or any idea about it ,please do write. many thanks wajid Send instant messages to your online friends http://uk.messenger.yahoo.com
Re: [ns] Mobile IP
Hi, I don't know if in the implementation of mobile ip of ns-2 the router advertisements arrive to nodes of one hop or two hops or more, but i want to send the routers advertisements to all the network, the variable that i the ads are propagated by the basetstions and are received exactly 1 hop way by mobile nmodes. need to change is ads_lifetime and other question this variable is measurement in seconds or hops? Ads_lifetime represents the amount of time, in seconds I believe, that the beacon is valid. It has nothing to do with multi hops. Pedro Vale Estrela http://tagus.inesc-id.pt/~pestrela/ns2/
Re: [ns] Multiple source files
Exactly, that's the way to do it. I might add that this function makes your life easier http://tagus.inesc-id.pt/~pestrela/ns2/contributed_code.html#_Toc147652228 Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Mahrenholz Sent: quarta-feira, 11 de Outubro de 2006 10:32 To: Keita Rose Cc: ns-users@ISI.EDU Subject: Re: [ns] Multiple source files Keita Rose schrieb: I am trying to run a mobile scenario using multiple source files, how do I go about implementing that is NS-2 if it is at all possible. I'm not sure, I got you right. But I did the following in order to simulate different topologies with the same set of applications. I first build a core simulation script, e.g. one that creates the simulator objects, configures everything, etc. Then I include the script that creates the topology (given by a command line parameter) into this core script. The remaining part of the core script configures the applications and runs the simulation. Now, in order to investigate different topologies, I wrote a control script, that iterates over the list of available toplogies and calls the simulation script with the name of the topology script as a parameter. You should be able to do something similar. Daniel.
Re: [ns] no reply yet: CBQ for wireless nodes
Hi this is sixth time i am emailing about how to use CBQ in wireless nodes as interface queue, but still waiting for reply. Then maybe a) no one has tried it before b) or the persons how may have tried it before probably aren't registrated on this mailing list, IMO probably because of messages like this one! (Which the current one is certainly not of the worst kind!) You've mentioned that you are waiting; FYI, I'm waiting since January for a single reply to this email: http://mailman.isi.edu/pipermail/ns-users/2006-January/053560.html with the follow up in June: http://mailman.isi.edu/pipermail/ns-users/2006-June/056015.html how can i use cbq as interface queue of wireless node. Back to your question, the best bet is to find a paper in which the authors have tried this combination in NS2, and ask them how to do it; failing that, then its time to hack to the NS2 code, find why that particular combination is not working, and contribute your patches to the ns-developers mailing list! Pedro Vale Estrela http://tagus.inesc-id.pt/~pestrela/ns2/index_.html
Re: [ns] IPv6 support in NS-2
Check how this is done in mobiwan - these nice guys have implemented IPv6 and Mobile IPv6 http://tagus.inesc-id.pt/~pestrela/ns2/mobility.html Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tubtim Sanguanwongthong Sent: sábado, 7 de Outubro de 2006 14:17 To: ns-users@ISI.EDU Subject: [ns] IPv6 support in NS-2 I've tried to modify NS-2 to support IPv6 beginning with ip.h. In ip.h, struct hdr_ip { _/* common to IPv{4,6} */ ns_addr_t src_; ns_addr_t dst_; int ttl_; } I'd like to know whether I have to change type of src_ and dst_ to support 128 bits. ns_addr_t src_; and ns_addr_t dst_; can be used in both IPv4 and IPv6. I'm really appreciated in this help (very important). Thank you in advance. Tubtim - Want to be your own boss? Learn how on Yahoo! Small Business.
Re: [ns] what is the meaning of $self next
http://www.openmash.org/developers/docs/otcl-doc/doc/class.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Guillermo Biot Sent: segunda-feira, 9 de Outubro de 2006 11:43 To: Ns Users Subject: [ns] what is the meaning of $self next Hi, I'm using some test scripts and I found the following code in one of them: $self next What does it mean? It is part of an instproc. There is no function called next in the script. Thank you. Regards, Guillermo
Re: [ns] How to change the parameters during the simulation to save thetime
Use this proc: http://tagus.inesc-id.pt/~pestrela/ns2/contributed_code.html#_Toc147652228 sample code: global opt set opt(opt_conv) { { d my_delay_ms } ... } set opt(my_delay_ms) 100;# default: 100 ms delay my_getopt $argv set opt(my_delay_s) [expr $opt(my_delay_ms) * 0.001 ] ;# convert to seconds ... $ns make-lan $TCP_BS $TCPr 2mb $opt(my_delay_s) LL Queue/DropTail Mac ... change the trace name to include the current delay parameter, to create different trace files Calling format in bash: --- for i in 1 10 100 1000; do ns my_script.tcl -- -d $i done Pedro Vale Estrela http://tagus.inesc-id.pt/~pestrela/ns2/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bilal AbuQadous Sent: sábado, 7 de Outubro de 2006 23:05 To: ns-users@ISI.EDU Subject: [ns] How to change the parameters during the simulation to save thetime Dear ns users, would you please tell me how I can change the parameters without stopping the simulation. as eg. how I can change the delay in the following command without stopping the simulation and make that automatic until the end. $ns make-lan $TCP_BS $TCPr 2mb 0.001ms LL Queue/DropTail Mac if I will make a test with different delay starting from 0.001, 0.01, 0.01,1, 10, 100, 150 ms, how I could make these changes automatically without entering new delay parameter by stop the simulation. I need this thing To save the time and the effort. thank you in advance -- AbuQadous, Bilal Alamiah Electronics (Systems Engineer) Mobile:+966507174541 Office:+96638610044 ext:772 P.O. Box 9912 Dammam 31423 KSA
Re: [ns] sending packets
Inside my recv() function I do like this without problems: // clone the current packet and change some fields Packet* new_p = clone_pkt(p); hdr_ip*new_iph = hdr_ip::access(new_p); new_iph-daddr() = ...; new_iph-saddr() = addr(); // change fields on the current packet iph-daddr() = id2iaddr(th-b_id); iph-saddr() = addr(); // send original packet somewhere send(p, 0); // send cloned packet elsewhere send(new_p, 0); ... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Larry Brigman Sent: segunda-feira, 9 de Outubro de 2006 19:14 To: ns-users@ISI.EDU Subject: [ns] sending packets I am working on a queuing model. There are times that I need to send more than one packet in the recv function. Because of the way NS models things it looks like after a single send or target-recv(p,h) I cannot send again without an error. Is there a way to write a recv function that is allowed to send more than once? Also when I am rescheduling my class to deque packets, about the time I need to deque two or more packets NS detects that time has gone backwards! I am running this on FC4 using 2.29 version of NS. Thanks for any help provided. Larry
Re: [ns] REGEDING TO INSTALLATION OF NS-2.29 ON FEDORACORE-4
Re-download the .tar.gz -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of khushali shah Sent: quarta-feira, 4 de Outubro de 2006 12:11 To: ns-users@ISI.EDU Subject: [ns] REGEDING TO INSTALLATION OF NS-2.29 ON FEDORACORE-4 hi i am trying to install ns-2.29 on fedora core-4, i found the error with untar file that mentioned below. gzip:stdin:unexpected end of file tar: unexpected EOF in archieve tar: unexpected EOF in archieve tar:Error is not recoverable. if u have any idea to solve this problem then please reply me. any answer from ur side is appreciated . thanks khushali __ Yahoo! India Answers: Share what you know. Learn something new http://in.answers.yahoo.com/
Re: [ns] Urgent reply needed
Check Why can I not place unmatched braces in Tcl comments? http://wiki.tcl.tk/462 And http://phaseit.net/claird/comp.lang.tcl/fmm.html And http://mini.net/tcl/1669.html If this helps you, contribute and put this info in the ns2 wiki Regards Pedro Vale etsrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bhoi Maheshbhai Mohanbhai Sent: sexta-feira, 29 de Setembro de 2006 9:23 To: ns-users@ISI.EDU Subject: [ns] Urgent reply needed I run my protocol of spbm, which uses greedy perimeter routing, I can compile my code,but got the error missing close-brace: possible unbalanced brace in comment while executing proc create-spbm-mobile-node { id args } { global ns ns_ chan prop topo tracefd opt node_ set ns_ [Simulator instance] #if {[Simulator s...(file tcl/mobility/spbm.tcl line 87) and the Tcl script is as shown below: Agent/SPBMAgent set sport_0 Agent/SPBMAgent set dport_0 Agent/SPBMAgent set bint_ 0.5 ;# beacon interval Agent/SPBMAgent set bdesync_ 0.5 ;# beacon desync random component Agent/SPBMAgent set bexp_ [expr 3*([Agent/SPBMAgent set bint_]+[Agent/SPBMAgent set bdesync_]*[Agent/SPBMAgent set bint_])] ;# beacon timeout interval Agent/SPBMAgent set pint_ 1.5 ;# peri probe interval Agent/SPBMAgent set pdesync_ 0.5 ;# peri probe desync random component Agent/SPBMAgent set lpexp_8.0 ;# peris unused timeout interval Agent/SPBMAgent set use_mac_ 0;# use link breakage feedback from MAC Agent/SPBMAgent set use_peri_ 0 ;# probe and use perimeters Agent/SPBMAgent set verbose_ 0;# Agent/SPBMAgent set peri_proact_ 1 ;# proactively generate peri probes Agent/SPBMAgent set use_implicit_beacon_ 0 ;# all packets act as beacons; promisc. Agent/SPBMAgent set use_planar_ 0;# planarize graph Agent/SPBMAgent set use_loop_detect_ 0 ;# look for unexpected loops in peris Agent/SPBMAgent set use_timed_plnrz_ 0 ;# replanarize periodically set opt(ragent) Agent/SPBMAgent set opt(pos) NONE ;# Box or NONE if { $opt(pos) == Box } { puts *** SPBM using Box configuration... } Agent instproc init args { eval $self next $args } Agent/SPBMAgent instproc init args { eval $self next $args } proc create-spbm-routing-agent { node id } { global ns_ ragent_ tracefd opt# Create the Routing Agent and attach it to port 255. # set ragent_($id) [new $opt(ragent)] set ragent $ragent_($id) ## setup address (supports hier-addr) for spbm agent ## and mobilenode set addr [$node node-addr] $ragent node $node if [Simulator set mobile_ip_] { $ragent port-dmux [$node set dmux_] } $node addr $addr $node set ragent_ $ragent #$node attach $ragent 255 $node attach $ragent [Node set rtagent_port_] $ns_ at 0.0 $ragent_($id) start-spbm ; # Drop Target (always on regardless of other tracing) # set drpT [cmu-trace Drop RTR $node] $ragent drop-target $drpT # Log Target set T [new Trace/Generic] $T target [$ns_ set nullAgent_] $T attach $tracefd $T set src_ $id $ragent tracetarget $T # ifq $ragent add-ifq [$node set ifq_(0)] } proc create-spbm-mobile-node { id args } { global ns ns_ chan prop topo tracefd opt node_ set ns_ [Simulator instance] #if {[Simulator set EnableHierRt_]} { if [Simulator hier-addr?] { if [Simulator set mobile_ip_] { set node_($id) [new MobileNode/MIPMH $args] } #else { #set node_($id) [new Node/MobileNode/BaseStationNode $args] } } else { set node_($id) [new Node/MobileNode] } set node $node_($id) $node random-motion 0 ;# disable random motion $node topography $topo # XXX Activate energy model so that we can use sleep, etc. But put on # a very large initial energy so it'll never run out of it. if [info exists opt(energy)]{ $node addenergymodel [new $opt(energy) $node 1000 0.5 0.2] } # This Trace Target is used to log changes in direction # and velocity for the mobile node. # set T [new Trace/Generic] $T target [$ns_ set nullAgent_] $T attach $tracefd $T set src_ $id $node log-target $T if ![info exist opt(err)] { set opt(err) } if ![info exist opt(outerr)] { set opt(outerr) } if ![info exist opt(fec)] { set opt(fec) } $node add-interface $chan $prop $opt(ll) $opt(mac) \ $opt(ifq) $opt(ifqlen) $opt(netif) $opt(ant) $topo $opt(err) $opt(outerr) $opt(fec) # Create a Routing Agent for the Node # create-$opt(rp)-routing-agent $node $id if { $opt(pos) == Box } { # Box Configuration #set spacing 200 set maxrow 7 set col [expr ($id - 1) % $maxrow] set row [expr ($id - 1) / $maxrow] $node set X_ [expr $col * $spacing]
Re: [ns] A router (gateway) between two ad hoc networks
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: quinta-feira, 28 de Setembro de 2006 9:44 To: ns-users@ISI.EDU Subject: [ns] A router (gateway) between two ad hoc networks Hello, I am trying to implement a router (gateway) between two ad hoc networks using hierarchical addressing and in two different domains. As an example: MANET 1: 1.0.1 1.0.2 MANET 2: 2.0.1 2.0.2 2.0.3 A shortcut solution is to use two BaseStationNodes, i.e.: BSNode1: 1.0.0 BSNode2: 2.0.0 And linking them with a full duplex link. Since the characteristics of the wired link will interfere with the simulation, I do not like this solution. This is a good point To minimize it, i suggest you to make a simple wired link with 0.1 delay and infinite bandwidth The better solution is to manipulate the ns-bsnode.tcl implementation for supporting two wireless interfaces in different domains. This requires a manet protocol which is hierarchical-aware, which I don't think the implemented Ns2 protocols support. The other solution has the benefit of not requiring MANET protocols any changes. Could you provide me a solution for this, if anyone has a better one, or implemented one? Regards, Majid *** Majid Ghader Research Officer Centre for Communication Systems Research University of Surrey, Guildford, United Kingdom http://www.ee.surrey.ac.uk/showstaff?M.Ghader ***
Re: [ns] Filtering Columns from output trace file
Try cat trace.tr | awk ' { print $2 $6 $8 } ' PS: Good subjects, as in this case, will get you the answers! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aleksandar Smolovic Sent: sexta-feira, 29 de Setembro de 2006 16:11 To: NS-Users Subject: [ns] Filtering Columns from output trace file Hi all, I have a basic NS2 question. After executing tcl script, I have result files on my HDD. I have output trace file, let's say out.tr. Now I want to draw some graphics. My out.tr files have 12 columns and I need only 2. How to do it ? I saw that in documentation people mention column.pl perl script fajl, for this purpose, but I cannot find how to use it. Can somebody help me with filtering 2 columns from trace file? Thanks.
Re: [ns] Filtering Columns from output trace file
cat trace.tr | awk ' { print $2\t\t$8 } ' hint: check this small doc and associated tools to answer a lot of questions ns-2 for the impatient: http://icapeople.epfl.ch/aad/teaching/ns/ -Original Message- From: Aleksandar Smolovic [mailto:[EMAIL PROTECTED] Sent: sexta-feira, 29 de Setembro de 2006 16:50 To: [EMAIL PROTECTED] Subject: Re: [ns] Filtering Columns from output trace file Thank you. How to make delimiter between columns in new file. It should be done during creation of new file? - Original Message - From: Pedro Vale Estrela [EMAIL PROTECTED] To: 'Aleksandar Smolovic' [EMAIL PROTECTED]; 'NS-Users' ns-users@ISI.EDU Sent: Friday, September 29, 2006 5:42 PM Subject: RE: [ns] Filtering Columns from output trace file Try cat trace.tr | awk ' { print $2 $6 $8 } ' PS: Good subjects, as in this case, will get you the answers! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aleksandar Smolovic Sent: sexta-feira, 29 de Setembro de 2006 16:11 To: NS-Users Subject: [ns] Filtering Columns from output trace file Hi all, I have a basic NS2 question. After executing tcl script, I have result files on my HDD. I have output trace file, let's say out.tr. Now I want to draw some graphics. My out.tr files have 12 columns and I need only 2. How to do it ? I saw that in documentation people mention column.pl perl script fajl, for this purpose, but I cannot find how to use it. Can somebody help me with filtering 2 columns from trace file? Thanks.
Re: [ns] LossMonitor - can't read, no such variable
Ahh, the ever challenging TCL syntax... a) Check Frequently Made Mistakes in Tcl http://phaseit.net/claird/comp.lang.tcl/fmm.html b) try like this: proc record {} { puts stderr recording global sink f0 ;# changed line set ns [Simulator instance] set time 0.5 set bw0 [$sink(1) set bytes_] set now [$ns now] puts $f0 $now [expr $bw0] $ns at [expr $now+$time] record } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Renata Vidal Sent: sexta-feira, 29 de Setembro de 2006 19:54 To: ns-users Subject: [ns] LossMonitor - can't read, no such variable Why I can't set a variable like this: SinkCBR($i) ? Its got me crazy! If I set each variable like SinkCBR0, SinkCBR1 and so on, its be OK, but if I try SinkCBR($i) or SinkCBR$i I see the message no such variable. Whats is wrong? -- Forwarded message -- From: Renata Vidal [EMAIL PROTECTED] Date: Sep 28, 2006 2:47 PM Subject: LossMonitor - can't read, no such variable To: ns-users ns-users@isi.edu Hi, I was trying to use the LossMonitor, but I see the message: ns: record: can't read sink(1): no such variable while executing $sink(1) set bytes_ (procedure record line 12) invoked from within record This a peace of my code, I don't know whats is wrong: (..) set sink($i) [new Agent/LossMonitor] $ns attach-agent $s($i) $tcp($i) $ns attach-agent $r($i) $sink($i) $ns connect $tcp($i) $sink($i) (..) proc record {} { puts stderr recording global sink(1) f0 set ns [Simulator instance] set time 0.5 set bw0 [$sink(1) set bytes_] set now [$ns now] puts $f0 $now [expr $bw0] $ns at [expr $now+$time] record } Any Clue? -- Renata Vidal Triste é o destino de quem tenta vencer as batalhas e ter sucesso nos ataques sem cultivar o espírito da iniciativa (A Arte da Guerra SUN TSU pg 102) -- Renata Vidal Triste é o destino de quem tenta vencer as batalhas e ter sucesso nos ataques sem cultivar o espírito da iniciativa (A Arte da Guerra SUN TSU pg 102)
Re: [ns] trouble with error model over wired links
Hi there, This is another fine post to the ns-users mailing list. Good subject, good question overall == totally in line with http://www.catb.org/~esr/faqs/smart-questions.html the problem is that you are putting the loss-model in all 3 links; I report exactly the same tracea and NAM problems. Instead, Try this: #$ns link-lossmodel $em $n(0) $n(1) $ns link-lossmodel $em $n(1) $n(2) #$ns link-lossmodel $em $n(2) $n(3) pedro vale estrela http://tagus.inesc-id.pt/~pestrela/ns2/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Abdul Jabbar Sent: sexta-feira, 29 de Setembro de 2006 17:45 To: ns-users@ISI.EDU Subject: [ns] trouble with error model over wired links Hello, I am having unusual trouble getting a simple error model to work over wired links in ns2.29. I have checked the mailing list archives and could not find a similar problem/solution. Below is my tcl script which represents a simple network topology of 3 nodes connected in a chain using duplex-links. I have a CBR/UDP flow between the nodes 0 and 3. The flow path is 0-1-2-3. If I don't use any error on the links, everything works fine as is confirmed by the trace file and the nam visualization. However, if I include a simple error model and attach it to each of the three links, the whole simulation goes awry. In the trace file I see packets going from node 0 to node 1. There is no data flow between node 2 and node 3 and there is a data flow between nodes 2 and 3. Basically the packets disappear on node 1 and magically reappear at node 2. In nam visualization, it is even worse...there is just one flow between nodes 0 and 1thats it.no other data flows. Changing the error rate does not help. When I have a more complex topology ( like a mesh topology of 8x8 nodes) the whole simulation goes so bizarre, that it is even hard to trace what is going wrong. That's why I am using this simple 3 node topology to illustrate the problem. I am hoping that there is some fundamental mistake on my part. Please point in the right direction. Thanks, Abdul. Here's the TCL script -- set ns [new Simulator] set tf [open simout.tr w] $ns trace-all $tf set nf [open simout.nam w] $ns namtrace-all $nf proc finish {} { global ns nf tf $ns flush-trace close $nf close $tf exec nam simout.nam exit 0 } for {set i 0} {$i 4} {incr i} { set n($i) [$ns node] } $ns duplex-link $n(0) $n(1) 500Mb 10ms DropTail $ns duplex-link $n(1) $n(2) 500Mb 10ms DropTail $ns duplex-link $n(2) $n(3) 500Mb 10ms DropTail set em [new ErrorModel] $em unit pkt $em set rate_ 0.01 $em ranvar [new RandomVariable/Uniform] $em drop-target [new Agent/Null] $ns link-lossmodel $em $n(0) $n(1) $ns link-lossmodel $em $n(1) $n(2) $ns link-lossmodel $em $n(2) $n(3) set udp0 [new Agent/UDP] $ns attach-agent $n(0) $udp0 set cbr0 [new Application/Traffic/CBR] $cbr0 set packetSize_ 1000 $cbr0 set interval_ 0.005 $cbr0 attach-agent $udp0 set null0 [new Agent/Null] $ns attach-agent $n(3) $null0 $ns connect $udp0 $null0 $ns at 0.5 $cbr0 start $ns at 4.5 $cbr0 stop $ns at 5.0 finish $ns run
Re: [ns] LossMonitor - can't read, no such variable
Instead of that, define the sink as an array variable and use it as normal http://wiki.tcl.tk/1032 set sink(1) [new Agent/TCPSink] ... Proc something { } { global sink ... set bw0 [$sink(1) set bytes_] } -Original Message- From: Renata Vidal [mailto:[EMAIL PROTECTED] Sent: sexta-feira, 29 de Setembro de 2006 20:48 To: [EMAIL PROTECTED] Cc: ns-users Subject: Re: [ns] LossMonitor - can't read, no such variable My variables are called sink($i), the () is in the name of them. I tried scape it but it not solve the problem. If I change for something like sink$i I have errors on attach-agent command. This example below don't works for me... Any clue? On 9/29/06, Pedro Vale Estrela [EMAIL PROTECTED] wrote: Ahh, the ever challenging TCL syntax... a) Check Frequently Made Mistakes in Tcl http://phaseit.net/claird/comp.lang.tcl/fmm.html b) try like this: proc record {} { puts stderr recording global sink f0 ;# changed line set ns [Simulator instance] set time 0.5 set bw0 [$sink(1) set bytes_] set now [$ns now] puts $f0 $now [expr $bw0] $ns at [expr $now+$time] record } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Renata Vidal Sent: sexta-feira, 29 de Setembro de 2006 19:54 To: ns-users Subject: [ns] LossMonitor - can't read, no such variable Why I can't set a variable like this: SinkCBR($i) ? Its got me crazy! If I set each variable like SinkCBR0, SinkCBR1 and so on, its be OK, but if I try SinkCBR($i) or SinkCBR$i I see the message no such variable. Whats is wrong? -- Forwarded message -- From: Renata Vidal [EMAIL PROTECTED] Date: Sep 28, 2006 2:47 PM Subject: LossMonitor - can't read, no such variable To: ns-users ns-users@isi.edu Hi, I was trying to use the LossMonitor, but I see the message: ns: record: can't read sink(1): no such variable while executing $sink(1) set bytes_ (procedure record line 12) invoked from within record This a peace of my code, I don't know whats is wrong: (..) set sink($i) [new Agent/LossMonitor] $ns attach-agent $s($i) $tcp($i) $ns attach-agent $r($i) $sink($i) $ns connect $tcp($i) $sink($i) (..) proc record {} { puts stderr recording global sink(1) f0 set ns [Simulator instance] set time 0.5 set bw0 [$sink(1) set bytes_] set now [$ns now] puts $f0 $now [expr $bw0] $ns at [expr $now+$time] record } Any Clue? -- Renata Vidal Triste é o destino de quem tenta vencer as batalhas e ter sucesso nos ataques sem cultivar o espírito da iniciativa (A Arte da Guerra SUN TSU pg 102) -- Renata Vidal Triste é o destino de quem tenta vencer as batalhas e ter sucesso nos ataques sem cultivar o espírito da iniciativa (A Arte da Guerra SUN TSU pg 102) -- Renata Vidal Triste é o destino de quem tenta vencer as batalhas e ter sucesso nos ataques sem cultivar o espírito da iniciativa (A Arte da Guerra SUN TSU pg 102)
[ns] FW: NS-2 2.29.3 and otcl debugger page
Until I take the time to re-test the installation procedure of my own debugger utilities in lastest ns2.29, here are some detailed tips by paul craven (thanks to him): -Original Message- From: paul [mailto:[EMAIL PROTECTED] Sent: terça-feira, 23 de Maio de 2006 20:03 To: [EMAIL PROTECTED] Subject: NS-2 2.29.3 and your debugger page I tried your TCL debugging page: http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging2.html I couldn't use ns2.28 because my compiler version was too new. So I tried what you wrote on 2.29.3. Here is my experience on getting it running: First, it failed on the build: g++ -c -Wall -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_11 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. -I. -I/home/ubuntu/ns-allinone-2.29/tclcl-1.17 -I/home/ubuntu/ns-allinone-2.29/otcl-1.11 -I/home/ubuntu/ns-allinone-2.29/include -I/home/ubuntu/ns-allinone-2.29/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -o emulate/net-pcap.o emulate/net-pcap.cc emulate/net-pcap.cc:60:18: error: pcap.h: No such file or directory ... I included libpcap package on my ubuntu installation. That changed the error to a link error: emulate/net-pcap.o: In function `PcapNetwork::close()': net-pcap.cc:(.text+0x9f): undefined reference to `pcap_close' emulate/net-pcap.o: In function `PcapNetwork::filter(char const*)': net-pcap.cc:(.text+0xea): undefined reference to `pcap_compile' So then I added -lpcap to the makefile and it linked ok. Then things worked ok until hooking up the mash thing with the patch. Had to do that manually: [EMAIL PROTECTED]:~/ns-allinone-2.29/ns-2.29/tcl/lib$ patch ns-lib.tcl.add_MASH.patch patching file ns-lib.tcl Hunk #1 FAILED at 32. 1 out of 2 hunks FAILED -- saving rejects to file ns-lib.tcl.rej No big deal, that is easy. I got a bit confused with which ns2 directory you meant with: We're now going to add the tcl-debug-2.0-pmsrve that already contains alterations made by me to the debugger. simply decompress the file parallel to the ns2 directory, and configure / compile it (at the tcl-debug directory). ...but I could figure it out by looking at the context of the other lines. In your step 5 image, I have no idea what this line does or what you are typing or how to make it work for me: dbg2.2 [EMAIL PROTECTED] I was ok up until then. I think it is your console prompt, but I don't know what it is doing after the debug prompt. I'm kind of thinking if you included 'wget' of the patch files in your script, you could semi-automate the process. Step 6 forgot to tell you the tk patch should be applied in the common subdirectory, and the 'I' is not capitalized like the file name is. I got the following after compiling: utils_ns.cc:28:19: error: timip.h: No such file or directory I was able to comment out the line with no ill effects. I tried doing the test for step 6 and got: loading history file ... 3 events added Main console display active (Tcl8.4.11 / Tk8.4.11) (ns-2.29) 4 % debug 1 warning: Script debugging disabled. Reconfigure with --with-tcldebug, and recompile. 1 So I did as it suggested, and still got the same thing. Then I remembered I was to configure like step 5 showed. And now it seems to be ok.
Re: [ns] RTP under NS2
a) in tcl/lib/ns-delfault.tcl, add Session/RTP::debug_ set 0 then recompile ns2 then, in your script, use Session/RTP::debug_ set 1 ;# can also be ON to enable debugging b) you need to upgrade your script in the part that you define the UDP port in use of the agents pedro estrela -- Mensagem Original -- De: Sofiane [EMAIL PROTECTED] Para: ns-users@ISI.EDU Enviar: 06/09/2006 Assunto: [ns] RTP under NS2 Dear Collagues when simulating the simple-rtp.tcl i have get the message bellow any help are welcome Thanks [EMAIL PROTECTED] ~/ns-allinone-2.29/ns-2.29/tcl/ex $ ns simple-rtp.tcl warning: no class variable Session/RTP::debug_ see tcl-object.tcl in tclcl for info about this warning. warning: no class variable Session/RTP::debug_ see tcl-object.tcl in tclcl for info about this warning. warning: no class variable Session/RTP::debug_ see tcl-object.tcl in tclcl for info about this warning. warning: no class variable Session/RTP::debug_ see tcl-object.tcl in tclcl for info about this warning. Warning dst_ is no longer being supported in NS. dst_ -2147483648 Use dst_addr_ and dst_port_ instead Warning dst_ is no longer being supported in NS. dst_ -2147483647 Use dst_addr_ and dst_port_ instead Warning dst_ is no longer being supported in NS. dst_ -2147483648 Use dst_addr_ and dst_port_ instead Warning dst_ is no longer being supported in NS. dst_ -2147483647 Use dst_addr_ and dst_port_ instead Warning dst_ is no longer being supported in NS. dst_ -2147483648 Use dst_addr_ and dst_port_ instead Warning dst_ is no longer being supported in NS. dst_ -2147483647 Use dst_addr_ and dst_port_ instead Warning dst_ is no longer being supported in NS. dst_ -2147483648 Use dst_addr_ and dst_port_ instead Warning dst_ is no longer being supported in NS. dst_ -2147483647 Use dst_addr_ and dst_port_ instead -- AL Al Bayt University Prince Hussein bin Abdullah Information Technology College ( http://www.aabu.edu.jo/it/index.htm ) Jordan - Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail.
Re: [ns] Problem with the queue command
Use set link12 [$ns simplex-link $n1 $n2 512Kb 0ms DropTail] (it has a missing space char nect to [) Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of fafou Sent: terça-feira, 5 de Setembro de 2006 16:24 To: ns-users@ISI.EDU Subject: [ns] Problem with the queue command Hi everybody, I have written these two lines of tcl code: -- set link01 [$ns simplex-link $n0 $n1 512Kb 0ms DropTail] set queue01 [$link01 queue] set link12[$ns simplex-link $n1 $n2 512Kb 0ms DropTail] set queue12 [$link12 queue] -- when launching the execution this error message is shown -- --- unknown command _o47 _o57 when executing $link12 queue -- This means that the first command $link01 queue worked well but not the second one. The more funny is that when I delete the first two lines, there isn't any problem. Can anybody help to solve this problem? Ah, this problem appears with both ns-2.27 and ns-2.28 versions Thanks a lot! -- View this message in context: http://www.nabble.com/Problem-with-the- %22queue%22-command-tf2221427.html#a6154133 Sent from the ns-users forum at Nabble.com.
Re: [ns] Issues debugginf ns-2.29
a) It hasn't the function names for the NS proc (as it has for tcl procs) Is ns2 stuff compiled for debugging? (-g gcc option)? b) use DDD and valgrind http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging.html#_Toc122255042 Pedro Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Raghu-kisore Neelisetti Sent: quarta-feira, 6 de Setembro de 2006 18:49 To: ns-users@ISI.EDU Subject: [ns] Issues debugginf ns-2.29 Hello Every one, I made some modification to the ns-2.29 and was running my new version. But after running for some time it crashes leaving the following information. I was wondering if any one has suggestion about to make use of the following information to debug ns-2.29. *** glibc detected *** ../ns: corrupted double-linked list: 0x00c1d8b8 *** === Backtrace: = /lib/libc.so.6[0xb59b71] /lib/libc.so.6[0xb5ad8d] /lib/libc.so.6(malloc+0x74)[0xb5c492] /usr//lib/libstdc++.so.6(_Znwj+0x26)[0x220f56] /usr//lib/libstdc++.so.6(_Znaj+0x1d)[0x22106d] ../ns[0x8064762] ../ns[0x8064822] ../ns[0x8118778] ../ns[0x811788e] ../ns[0x8141936] ../ns[0x813f54d] ../ns[0x811e937] ../ns[0x811e9d7] ../ns[0x814853f] ../ns[0x8053927] ../ns[0x8053952] ../ns[0x8053b6e] ../ns[0x8274032] ../ns[0x8277cbe] ../ns(TclInvokeStringCommand+0x45)[0x827c155] ../ns[0x827d7d1] ../ns[0x82a23da] ../ns[0x82a8390] ../ns[0x82a24c4] ../ns[0x82a8390] ../ns(TclObjInterpProc+0x222)[0x82cd4a2] ../ns(TclProcInterpProc+0x51)[0x82cd835] ../ns[0x8277de2] ../ns(TclInvokeStringCommand+0x45)[0x827c155] ../ns[0x827d7d1] ../ns[0x82a23da] ../ns[0x82a8390] ../ns(TclObjInterpProc+0x222)[0x82cd4a2] ../ns(TclProcInterpProc+0x51)[0x82cd835] ../ns[0x8277cbe] ../ns(TclInvokeStringCommand+0x45)[0x827c155] ../ns[0x827d7d1] ../ns[0x827ee5d] ../ns[0x82be363] ../ns[0x82c1315] ../ns(__gxx_personality_v0+0x1d3)[0x804d097] /lib/libc.so.6(__libc_start_main+0xdf)[0xb0bd5f] ../ns(sinh+0x71)[0x804cfe5] === Memory map: 0016b000-0024b000 r-xp fd:00 2716753 /usr/lib/libstdc++.so.6.0.5 0024b000-0025 rw-p 000df000 fd:00 2716753 /usr/lib/libstdc++.so.6.0.5 0025-00256000 rw-p 0025 00:00 0 004c1000-004c2000 r-xp 004c1000 00:00 0 [vdso] 00ab2000-00ac4000 r-xp fd:00 2455315/lib/libnsl-2.3.5.so 00ac4000-00ac5000 r--p 00011000 fd:00 2455315/lib/libnsl-2.3.5.so 00ac5000-00ac6000 rw-p 00012000 fd:00 2455315/lib/libnsl-2.3.5.so 00ac6000-00ac8000 rw-p 00ac6000 00:00 0 00ad5000-00aef000 r-xp fd:00 2455217/lib/ld-2.3.5.so 00aef000-00af r--p 00019000 fd:00 2455217/lib/ld-2.3.5.so 00af-00af1000 rw-p 0001a000 fd:00 2455217/lib/ld-2.3.5.so 00af7000-00c1a000 r-xp fd:00 2455226/lib/libc-2.3.5.so 00c1a000-00c1c000 r--p 00123000 fd:00 2455226/lib/libc-2.3.5.so 00c1c000-00c1e000 rw-p 00125000 fd:00 2455226/lib/libc-2.3.5.so 00c1e000-00c2 rw-p 00c1e000 00:00 0 00c22000-00c45000 r-xp fd:00 2455230/lib/libm-2.3.5.so 00c45000-00c46000 r--p 00022000 fd:00 2455230/lib/libm-2.3.5.so 00c46000-00c47000 rw-p 00023000 fd:00 2455230/lib/libm-2.3.5.so 00c49000-00c4b000 r-xp fd:00 2455232/lib/libdl-2.3.5.so 00c4b000-00c4c000 r--p 1000 fd:00 2455232/lib/libdl-2.3.5.so 00c4c000-00c4d000 rw-p 2000 fd:00 2455232/lib/libdl-2.3.5.so 00d9c000-00dc r-xp fd:00 2704035 /usr/lib/libpcap.so.0.8.3 00dc-00dc1000 rw-p 00024000 fd:00 2704035 /usr/lib/libpcap.so.0.8.3 00dd3000-00ddc000 r-xp fd:00 2455236 /lib/libgcc_s-4.0.1-20050727.so.1 00ddc000-00ddd000 rw-p 9000 fd:00 2455236 /lib/libgcc_s-4.0.1-20050727.so.1 08048000-083b1000 r-xp fd:00 4917311 /root/TENS/ns-allinone-2.29/ns-2.29/ns 083b1000-0844c000 rw-p 00368000 fd:00 4917311 /root/TENS/ns-allinone-2.29/ns-2.29/ns 0844c000-08454000 rw-p 0844c000 00:00 0 0928-0a954000 rw-p 0928 00:00 0 [heap] b7c0-b7c21000 rw-p b7c0 00:00 0 b7c21000-b7d0 ---p b7c21000 00:00 0 b7db5000-b7fb5000 r--p Aborted Thanks a lot. Raghu.
Re: [ns] Problem with the queue command
Use the mash inspector to check the classes of _o47 etc http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging2.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of fafou Sent: quarta-feira, 6 de Setembro de 2006 19:57 To: ns-users@ISI.EDU Subject: Re: [ns] Problem with the queue command Thank you for repliying but the space char before [ is only missing in the mail I wrote and not in the source file. So, the problem persists. Thanks Pedro Vale Estrela wrote: Use set link12 [$ns simplex-link $n1 $n2 512Kb 0ms DropTail] (it has a missing space char nect to [) Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of fafou Sent: terça-feira, 5 de Setembro de 2006 16:24 To: ns-users@ISI.EDU Subject: [ns] Problem with the queue command Hi everybody, I have written these two lines of tcl code: --- --- set link01 [$ns simplex-link $n0 $n1 512Kb 0ms DropTail] set queue01 [$link01 queue] set link12[$ns simplex-link $n1 $n2 512Kb 0ms DropTail] set queue12 [$link12 queue] --- --- when launching the execution this error message is shown --- --- --- unknown command _o47 _o57 when executing $link12 queue --- --- This means that the first command $link01 queue worked well but not the second one. The more funny is that when I delete the first two lines, there isn't any problem. Can anybody help to solve this problem? Ah, this problem appears with both ns-2.27 and ns-2.28 versions Thanks a lot! -- View this message in context: http://www.nabble.com/Problem-with-the- %22queue%22-command-tf2221427.html#a6154133 Sent from the ns-users forum at Nabble.com. -- View this message in context: http://www.nabble.com/Problem-with-the- %22queue%22-command-tf2221427.html#a6177635 Sent from the ns-users forum at Nabble.com.
Re: [ns] [bug] tcl-debugger segfaults when printing stack ('w') FIXED
Hi! Patch looks, sounds and runs good; similar (correct) code is already in char **Dbg_ArgcArgv(argc,argv,copy) ... main_argv = alloc = (char **)ckalloc((argc+1)*sizeof(char *)); From my initial tests, this has corrected a nasty segmentation fault that occurred sometimes inside the debugger. If you don't already know, I have a modification to enable debugging inside the TKCon console http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging2.html I'm forwarding this patch to the ns-developers list Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Walter Sent: terça-feira, 5 de Setembro de 2006 17:35 To: ns-users@ISI.EDU Subject: [ns] [bug] tcl-debugger segfaults when printing stack ('w') [Bug Report] - Category: Run Time - Segmentation Fault Package: other tcl-debug-2.0 OS:RHEL4/OTHERS Environment Variables: - Description: Description of Problem: The tcl debugger tcl-debug 2.0 from Don Libes contains a bug in the function print_objc (Dbg.c:445) where not enough memory is allocated. The variable argv[] should hold an array of char * pointers. The call to malloc misses parentheses around objc + 1 and allocates insufficient memory. A recent GLIBC as well as valgrind detect the error and aborts program execution. As a consequence the simulator execution is aborted by the system environment. How Easily Reproducible: every time Steps to Reproduce: 1. Start ns2 2. Enter 'debug 1' 3. Hit s until the stack has at least two elements. starting ns and using 's' three or more time is sufficient. 3. Simply execute some commands where you should use 'w' multiple times. valgrind will immediately detect it. glibc runtime checks sometimes. Requirements: Ns compiled with --with-debug and tcl-debug. In addition the following system components/libraries are of interest: Linux: CentOS release 4.4 GLIBC: glibc-2.3.4-2.25 valgrind: valgrind-3.1.1-1.EL4 Actual Results: GLIBC: dbg2.7 w 0: application *1: history {add} {s } 2: llength {add {s }} dbg2.8 w *** glibc detected *** malloc(): memory corruption (fast): 0x08629bf8 *** Aborted VALGRIND: dbg2.6 s 2: set len [llength $args] dbg2.7 w 0: application ==12203== Invalid write of size 4 ==12203==at 0x8242DFB: print_objv (Dbg.c:445) ==12203==by 0x8242EB5: PrintStackBelow (Dbg.c:469) ==12203==by 0x8242EED: PrintStack (Dbg.c:488) ==12203==by 0x82432E5: debugger_trap (Dbg.c:696) Expected Results: No output Additional Information: Patch is supplied below: --- Dbg.c.orig 2000-08-16 00:09:30.0 +0200 +++ Dbg.c 2006-09-05 17:05:43.0 +0200 @@ -440,7 +440,7 @@ char **argv; int argc; int len; -argv = (char **)ckalloc(objc+1 * sizeof(char *)); +argv = (char **)ckalloc((objc + 1) * sizeof(char *)); for (argc=0 ; argcobjc ; argc++) { argv[argc] = Tcl_GetStringFromObj(objv[argc],len); } Kind regards, Christian Walter
Re: [ns] idle/sleep state
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Julian Monteiro Sent: segunda-feira, 4 de Setembro de 2006 15:40 To: Alex Triffitt Cc: ns-users@ISI.EDU Subject: Re: [ns] idle/sleep state Hello Alex, I'm not sure if this is the best solution, but you can use the 'on' and 'off' commands in the mobile node to put it to sleep. Unfortunately these commands doesn't work.in NS2 off the box (as of version 2.29.3) To do so, you need comment out a call to a unexistent tcl function in the line 202 of ns-2.29/common/mobilenode.cc : // Remove this line. I didn't found this function anywhere!. // tcl.evalf(%s reset-state, str); ns2 grep reset-state */*.cc this function is defined in diffusion/diffusion.cc , flodding.cc and omni-cast.cc After that, to put a node to sleep, mix the commands 'on' and 'off' in the scenery model, e.g: $ns_ at 3.0 $node_(0) off $ns_ at 10.0 $node_(0) on Also, the Energy Model must be enabled to use that, i.e, put above line in node configuration: -energyModel EnergyModel Best Regards, Julian p.s. How do I submit this patch to the NS2 tree? An excellent question indeed. Short answer: diff -C3 original file modified file idle.patch persons are able to apply your patch using cat idle.patch | patch longer answer: check step 7 of http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging3.html if you have more questions please ask; however, please submit your patch only after you are sure what is that reset-state code about! Pedro Vale Estrela Alex Triffitt wrote: I am wanting to put a node into a idle/sleeping state where it will not listen for transmitted packets and to all intense and purposes is not participating in the MANET i've created. Could someone possiblely tell me how this is done or point out where I can find out how to do this Kindest regardsAlex
Re: [ns] why does the code below doesn't work as expected
use $udapp set rate_ 1Mb pedro Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sandeep Sent: quarta-feira, 30 de Agosto de 2006 7:47 To: ns-users@ISI.EDU Subject: [ns] why does the code below doesn't work as expected Hi In the below code whatever Mac/802_11 parameters I set are not taking effect. For instance eventhough I set _dataRate 11mbps, throughput is coming around 400kbps, which is the default rate for udp. If I change _dataRate, basicRate_ or PLCPDataRate_ , there is absolutely no effect. Please if anyone can help, because I require them in my work. Thanks in advance, regards, Sandeep. 1 set val(chan) Channel/WirelessChannel;# channel type 2 set val(prop) Propagation/TwoRayGround ;# radio-propagation model 3 set val(netif) Phy/WirelessPhy;# network interface type 4 set val(mac) Mac/802_11 ;# MAC type 5 set val(ifq) Queue/DropTail/PriQueue;# interface queue type 6 set val(ll)LL ;# link layer type 7 set val(ant) Antenna/OmniAntenna;# antenna model 8 set val(ifqlen)50 ;# max packet in ifq 9 set val(nn)2 ;# number of mobilenodes 10 set val(rp)DSDV ;# routing protocol 11 set val(x) 800 12 set val(y) 800 13 14 Phy/WirelessPhy set bandwidth_ 11Mb 15 16 Mac/802_11 set SlotTime_ 0.20;# 20us 17 Mac/802_11 set SIFS_ 0.10;# 10us 18 Mac/802_11 set PreambleLength_144 ;# 144 bit 19 Mac/802_11 set PLCPHeaderLength_ 48 ;# 48 bits 20 Mac/802_11 set PLCPDataRate_ 1.0 ;# 1Mbps 21 Mac/802_11 set dataRate_ 11.0 ;# 11Mbps 22 Mac/802_11 set basicRate_ 1.0 ;# 1Mbps 23 24 set ns [new Simulator] 25 set tr [open trace.tr w] 26 $ns trace-all $tr 27 set na [open trace.nam w] 28 $ns namtrace-all-wireless $na $val(x) $val(y) 29 set chan1 [new $val(chan)] 30 set topo [new Topography] 31 $topo load_flatgrid 500 500 32 create-god 2 33 34 proc finish {} { 35global ns tr na 36$ns flush-trace 37$ns nam-end-wireless [$ns now] 38close $tr 39close $na 40exec nam trace.nam 41exit 0; 42 } 43 44 $ns node-config -adhocRouting $val(rp)\ 45 -llType $val(ll) \ 46 -macType $val(mac) \ 47 -antType $val(ant) \ 48 -propType $val(prop) \ 49 -phyType $val(netif) \ 50 -channel $chan1 \ 51 -topoInstance $topo \ 52 -agentTrace ON \ 53 -routerTrace ON \ 54 -macTrace ON \ 55 -movementTrace OFF\ 56 -ifqType $val(ifq) \ 57 -ifqLen $val(ifqlen) 58 59 for {set i 0} {$i 2} {incr i} { 60 set node_($i) [$ns node] 61 $node_($i) random-motion 0 62 } 63 64 $node_(0) set X_ 0 65 $node_(0) set Y_ 0 66 $node_(0) set Z_ 0 67 $node_(1) set X_ 10 68 $node_(1) set Y_ 0 69 $node_(1) set Z_ 0 70 71 $node_(0) color green 72 $node_(1) color green 73 74 set udp [new Agent/UDP] 75 set des [new Agent/Null] 76 $ns attach-agent $node_(0) $udp 77 $ns attach-agent $node_(1) $des 78 $ns connect $udp $des 79 80 set udapp [new Application/Traffic/CBR] 81 $udapp attach-agent $udp 82 $udapp set fid_ 1 83 $udapp set packetSize_ 400 84 85 $ns at 1.0 $udapp start 86 $ns at 30.0 $udapp stop 87 $ns at 30.0 $ns halt 88 ns at 30.0 finish 89 $ns run
Re: [ns] change the CBR bit rate
You just: a) get a pointer to the generator and modify its rate_ variable; b) modify it in TCL as normal, and call this code with tcl.eval(...) as explained here: http://tagus.inesc-id.pt/~pestrela/ns2/ns2_tips.html#_Toc124667333 If you find this useful, please contribute to the ns2 wiki with the solution Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Albalas F (AT) Sent: terça-feira, 29 de Agosto de 2006 22:48 To: ns-users@ISI.EDU Subject: [ns] change the CBR bit rate Hi all, How can I change (increase or decrease ) the Traffic bit rate during the simulation, I mean at the c++ programme. Thanks Firas
[ns] Application/Traffic/CBR set interval + setpacketsize - undocumented behaviour explained
Hi all, I've found, in the hard way, that interval_ is a special pseudo-variable of Application/Traffic/CBR and has unexpecded and undocumented behaviour. If the users sets the interval, followed by the packetsize, the specified interval is changed to make the __rate__ constant, which is not probably the user is trying to achieve. This is exemplified by this test script; note that the difference is the order of the lines setting interval and packetsize # set ns [new Simulator] set opt(CBR_interval) 0.1 ;# 100 packets per second set opt(packet_size) 1000 ;# 1000 bytes per packet set generator1 [new Application/Traffic/CBR] $generator1 set packetSize_ $opt(packet_size) $generator1 set interval_ $opt(CBR_interval) puts Actual interval for generator 1: [$generator1 set interval_ ] Desired interval: $opt(CBR_interval) set generator2 [new Application/Traffic/CBR] $generator2 set interval_ $opt(CBR_interval) $generator2 set packetSize_ $opt(packet_size) puts Actual interval for generator 2: [$generator2 set interval_ ] Desired interval: $opt(CBR_interval) exit # Which results, in ns2.29: Actual interval for generator 1: 0.10001 Desired interval: 0.1 Actual interval for generator 2: 0.4761904761616 Desired interval: 0.1 The documentation is ambiguous: http://www.isi.edu/nsnam/ns/doc/node498.html The setting of a CBR object's rate_ and interval_ are mutually exclusive ... In a simulation, either a rate or an interval (but not both) should be specified for a CBR object. ## To solve this, either: a) make sure you specify the interval AFTER the packetsize; b) use my patch that solves this problem http://mailman.isi.edu/pipermail/ns-developers/2006-August/002375.html http://mailman.isi.edu/pipermail/ns-developers/2006-August/002377.html Pedro Vale Estrela
Re: [ns] rtmodel-at down seems to do nothing
A quick test showed that the problem is that is not possible to make a link go down __at runtime__. Eg, at configuration time this works: ... $ns rtmodel-at 7.0 down $node_a $node_b but the functionally equivalent at run-time will not work, and no error will be produced: proc my_test { op a b } { set ns [Simulator instance] set now [$ns now] puts Current time $now; trying to make link down... $ns rtmodel-at [expr $now + 0.01] $op $a $b } configuration time $ns at 7.0 my_test down $node_a $node_b - this bug is probably related to this manual type of routing, as used below (see /tcl/lib/rtglib/dynamics.tcl) Simulator instproc rtmodel-at {at op args} { set parms [list $op $at] eval $self rtmodel Manual [list $parms] $args } if you need otcl debugging capabilities, check my page http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging2.html) When you find the bug, please make a patch and report in the ns-developers mailing list Regards Pedro Vale Estrela Hello, The Link Failure code from Marc Greis' Tutorial works fine for me. However, when I use almost the exact same code from my app, the code doesn't seem to do anything. There are no corresponding entries in the network trace or nam files, despite the fact that the code executes. I'm calling the code from C++ via: Tcl tcl = Tcl::instance(); tcl.evalf( $ns rtmodel-at %f down $n(%d) $n(%d), Scheduler::instance().clock() + 0.0001, ip1, ip2 ); This invocation is just fine; I know the code is executing, but nothing seems to happen. Same symptoms here! There are a few posts on the ns2 listserv archive (e.g., rtmodel-at doesn't work inside a procedure), but unfortunately these posts don't have replies. Probably these tried to do the same thing, eg at run-time Also, I'm not really running rtmodel-at from within a procedure, unless tcl.evalf counts. Yes, it counts as an TCL procedure A few other helpful notes: I'm not using $ns rtproto DV because I don't want dynamic routing. I don't call $ns rtproto at all. Links using session routing, it had the same problem are created using $ns duplex-link. No problem there
Re: [ns] Transmission and Interference Range
Check this code that I'm using to set the power based on the circular distance in meters: Usage: set coverage [CellCoverage 1 1 $MAX_X $MAX_Y $OVERLAP] set power [SetPt $coverage] Phy/WirelessPhy set Pt_ $power $ns node-config -rxPower $power -txPower $power - ### ### ### generic POWER functions # # Given overlaping area, calculate the desired coverage # expects a BOUNDING BOX for the cell, with the mobile in the center # proc CellCoverage { x1 y1 x2 y2 overlap} { set d2 [expr ($x2-$x1)*($x2-$x1) + ($y2-$y1)*($y2-$y1)] set d [expr sqrt($d2)] ;# Hipotenusa set ret [expr ($overlap + $d) / 2] puts D2: $d2 D: $d RET: $ret return $ret } # # Given overlaping area, calculate the desired coverage # expects a QUARTER BOUNDING BOX for the cell, with the mobile in the 0,0 position (lower left corner) # proc HalfCellCoverage { x1 y1 x2 y2 overlap } { return [expr [CellCoverage $x1 $y1 $x2 $y2 $overlap] * 2] } # # Calculate Necessary Transmission Power Pt for given coverage # # See /mobile/tworayground.cc # proc SetPt { coverage } { set Gt [Antenna/OmniAntenna set Gt_] set Gr [Antenna/OmniAntenna set Gr_] set ht [Antenna/OmniAntenna set Z_] set hr [Antenna/OmniAntenna set Z_] set RXThresh [Phy/WirelessPhy set RXThresh_] set L [Phy/WirelessPhy set L_] set Pt_ [Phy/WirelessPhy set Pt_] set freq_ [Phy/WirelessPhy set freq_] set lambda [expr 3 / $freq_] set crossover_dist [expr (4 * 3.1415926535897 * $ht * $hr) / $lambda ]; puts old pt: $Pt_ RXThresh: $RXThresh lambda: $lambda \t\t crosshover: $crossover_dist coverage: $coverage if { [expr $coverage $crossover_dist] } { puts Using Friis formula set M [expr $lambda / (4.0 * 3.1415926535897 * $coverage)] set Pt [expr $RXThresh * ($L / ($Gt*$Gr*$M*$M))] puts RET: $Pt } else { puts Using TwoRay formula #Calculate input power necessary to have, at dist $coverage, output power = $RXThresh set d4 [expr pow($coverage,4)] set Pt [expr $RXThresh * (($L*$d4) / ($Gt*$Gr*$ht*$ht*$hr*$hr))] puts D4: $d4 RET: $Pt } #debug 1 return $Pt } #/* # * Friis free space equation: # * # * Pt * Gt * Gr * (lambda^2) # * P = -- # * (4 * pi * d)^2 * L # */ # from /mobile/tworayground.cc: # # TwoRayGround formula # power = Pt * Gt * Gr * (hr * hr * ht * ht) / (d * d * d * d * L); # # -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ashish Sangwan Sent: quinta-feira, 13 de Julho de 2006 14:59 To: Q. R. Iqbal Cc: ns-users@ISI.EDU Subject: Re: [ns] Transmission and Interference Range Hi , I didnot know about these three transmit power levels. Thanks Iqbal for that. I wanted to have Interference Range(Carrier Sense Range) to be twice the Communication Range. So I achieved by calculating CSThresh_ value by following formula Pt * Gt * Gr * (hr * hr * ht * ht) / {(Required interference range) ^ 4} --Ashish On 7/13/06, Q.R.Iqbal [EMAIL PROTECTED] wrote: Hi there I think there is no other cleaner or easiar way to do that unless you modify the code. One thing you have to be aware of is that by modifying the transmission range, you are only changing the receiver threshold, A distance from which a receiver can receive. Again there are three different transmit power levels that are given for the wavelan Modem 40m 8.5872e-4 100m 7.214e-3 250m 02818 Maybe you need to use one of these parameters, the closest to your required transmission range and then calculate the RXthreshold values, to get a better result. Also you need to be aware of CSthreshold,. If you are limiting the node's transmission range to 40m or 100m or any value, the CSthreshold value, will still be very large, about 550m by default, you might also want to tweak that parameter to see if this improves your results I hope this helps Hi, Can you tell me a clean way to change transmission and interference ranges in ns-2? I tried the threshold program given ~ns/indep-utils/propagation/ but that somehow is not giving correct values. Regards, -- Ashish Sangwan B.Tech, Computer Science Engineering IIT Delhi -- I do know everything, just not all at once. It's a virtual memory problem. Kind regards Qasim Raza Iqbal PhD Candidate, ACNRG
Re: [ns] Finding Node ID
http://tagus.inesc-id.pt/~pestrela/ns2/ns2_haddr_tips.html Type of Addresses that a node can have in NS2 (hAddr, ID, iAddr, Handle)? In NS2, a node can be uniquely identified by several forms the handle is the otcl name; it refers to an object of the form _oXXX, and because of this, it is the only form can be used to directly call internal instprocs and variables. the haddr is the Hierarchical address, on the form X.Y.Z the iaddr is the INTEGER hierarchical address, where the haddr string is simply ENCODED in a 32 bit integer. the id is the sequential Node ID of the simulator. ... In my ns2_shared_procs.tcl utils tcl file, I introduce procs for all possible conversions of each form, using the procs handle2iaddr, handle2haddr, handle2id, etc. http://tagus.inesc-id.pt/~pestrela/ns2/files/ns2_shared_procs.tcl Feel free to ask further questions if necessary Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nicholas Loulloudes Sent: segunda-feira, 3 de Julho de 2006 10:55 To: ns-users@ISI.EDU Subject: [ns] Finding Node ID Hello, I am currently implementing a routing algorithm in NS2. I have utilized the command [$node neighbors] for discovering the neighbors of a specific node. This command returns a list with the following three elements (_o13, _o16, _019). Is is possible in TCL to retrieve dynamically the ID of each node using this elements in the list. For example: _o19 = n(1) _o13 = n (0) _o16 = n(2) Regards, -- Nicholas Loulloudes Postgraduate at Communication Networks and Software. BSc in Computer Science.
Re: [ns] Multiple connections to a single agent
The problem is that the packets that you are sending to A3 have an incorrect port address. When you use $ns connect $a1 $a2 then automatically all normal control packets sent by a1 have the destination port of a2; as a1 is not connected to a3 in TCL, you must set the port by hand in C++, as NS will not do this for you, eg: void myAgent::recv(Packet* p, Handler *h) { hdr_ip*iph = hdr_ip::access(p); hdr_cmn *ch = hdr_cmn::access(p); ... iph-saddr() = addr(); // (set my IP address) iph-sport() = port(); // (set my source port) iph-daddr() = nextHop_iaddr; // iaddr of n3 iph-dport() = nextHop_iaddr; // port of a3 regarding the iaddr comment: check http://tagus.inesc-id.pt/~pestrela/ns2/ns2_haddr_tips.html In my ns2_shared_procs.tcl utils tcl file, I introduce procs for all possible conversions of each form, using the procs handle2iaddr, handle2haddr, handle2id, etc. you could also have debug this problem by: - redefining the no-slot handler to invoke the run-time TCL debugger; - use the mash inspector to find exactly who are _o153, _o158, etc (http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging2.html) If this helps you, please contribute the description of the problem and the solution, in your own words, to the NS2 wiki. Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brad Montgomery Sent: segunda-feira, 3 de Julho de 2006 19:25 To: ns-users@isi.edu Subject: Re: [ns] Multiple connections to a single agent I'm not sure I understand, and perhaps I've not adequately described what I'm trying to do, so I'll try again using a semi-hypothetical scenario: (Please keep in mind I'm new to ns!) Suppose I've got the following topology: N1 - N2 - N3 And three different agents, (A1,A2,A3) which have all been implemented differently in C++. The basic idea is that I want these agents to automatically communicate with each other... In C++ I've written an A1::command() function that will 'send' sends an IP packet to the A2 agent. When the A2 agent receives this packet, it then sends a packet back to A1, which then gets returned to A2 (basically a 3- way handshake). A2 should then automatically send another packet to the A3 agent by creating a packet, and inserting N3's address in the IP header. (I'm assuming all of my agents and nodes know about the topology) In TCL I've done this: set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] set a1 [new Agent/A1] set a2 [new Agent/A2] set a3 [new Agent/A3] $ns attach-agent $n1 $a1 $ns attach-agent $n2 $a2 $ns attach-agent $n3 $a3 $ns connect $a1 $a2 #$ns connect $a2 $a3 ;# if I do this, the handshake doesn't work $ns at 0.0 $a1 send When I run this, ns gives me this error: --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o158: no target for slot 3 _o158 type: Classifier/Port content dump: classifier _o158 0 offset 0 shift 2147483647 mask 1 slots slot 0: _o153 (Agent/A3) -- Finished standard no-slot{} default handler -- Basically I want A3 to look at any or all packets send to N3. How can I force this? I'm using ns-2.29 on Mac OS X 10.4.7. Thanks in advance! Brad On 7/2/06 6:10 PM, Mark Shifrin [EMAIL PROTECTED] wrote: no problem with tcp you can do attach agent as many time as you want to a single node. you must first define it as tcp-source. and then to choose the application which runs over this tcp, for example i did it with FTP. moreover you can do it for n, within a loop --- Brad Montgomery [EMAIL PROTECTED] wrote: Hello All, I'm wondering if it's possible to have a single Agent connected to 2 or more other Agents. I have a topology similar to this: N2 | N0 -- N1 -- N3 -- N4 I have an agents A0, A2, A3 connected to N0, N2, N3 respectively, and I would like A0 to send a packet to A2, which would then in turn send a packet to A3. Is this possible? From reading the mailing list archives, it seems like this may not be possible, so my second question would be this: Is it possible to attach an agent to a Node, and force that agent's recv function to get executed for every packet that passes through that node? For example: Could N2 send a packet to N4, so that A3's recv function processes that packet before sending it onward. Any help is GREATLY appreciated! Brad enjoy the life - Mark __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [ns] Help on obtaining the location info of a mobile node within inC++ code of routing protocol
http://mailman.isi.edu/pipermail/ns-users/2006-January/053450.html http://tagus.inesc-id.pt/~pestrela/ns2/ns2_tips.html#_Toc124667331 http://www.cse.msu.edu/~wangbo1/ns2/nshowto5.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Xiaolin Cheng Sent: domingo, 2 de Julho de 2006 8:07 To: ns-users@ISI.EDU; ns-users@ISI.EDU Subject: [ns] Help on obtaining the location info of a mobile node within inC++ code of routing protocol Dear all, I am working on an extension to AODV. I need the location information (x, y, z) of current node to which AODV routing protocol is attached. However, the location information is set in tcl script. How can I obtain this information in C++ code of AODV's implementation? Can I get it from some packet header? Thanks much for yoru attention and help. Xiaolin
Re: [ns] Multiple connections to a single agent
Wiki Information: http://en.wikipedia.org/wiki/Wiki http://en.wikipedia.org/wiki/Wikipedia:Introduction -Original Message- From: Brad Montgomery [mailto:[EMAIL PROTECTED] Sent: segunda-feira, 3 de Julho de 2006 23:14 To: [EMAIL PROTECTED] Subject: Re: [ns] Multiple connections to a single agent Thank You! I'll be sure to post my description on the Wiki site... By the way, are there any guidelines for posting to the Wiki? AFAIK Not yet; the point is the users starting introduce useful informations, to create a better distributed documentation Brad On 7/3/06 2:07 PM, Pedro Vale Estrela [EMAIL PROTECTED] wrote: The problem is that the packets that you are sending to A3 have an incorrect port address. When you use $ns connect $a1 $a2 then automatically all normal control packets sent by a1 have the destination port of a2; as a1 is not connected to a3 in TCL, you must set the port by hand in C++, as NS will not do this for you, eg: void myAgent::recv(Packet* p, Handler *h) { hdr_ip*iph = hdr_ip::access(p); hdr_cmn *ch = hdr_cmn::access(p); ... iph-saddr() = addr(); // (set my IP address) iph-sport() = port(); // (set my source port) iph-daddr() = nextHop_iaddr; // iaddr of n3 iph-dport() = nextHop_iaddr; // port of a3 regarding the iaddr comment: check http://tagus.inesc-id.pt/~pestrela/ns2/ns2_haddr_tips.html In my ns2_shared_procs.tcl utils tcl file, I introduce procs for all possible conversions of each form, using the procs handle2iaddr, handle2haddr, handle2id, etc. you could also have debug this problem by: - redefining the no-slot handler to invoke the run-time TCL debugger; - use the mash inspector to find exactly who are _o153, _o158, etc (http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging2.html) If this helps you, please contribute the description of the problem and the solution, in your own words, to the NS2 wiki. Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brad Montgomery Sent: segunda-feira, 3 de Julho de 2006 19:25 To: ns-users@isi.edu Subject: Re: [ns] Multiple connections to a single agent I'm not sure I understand, and perhaps I've not adequately described what I'm trying to do, so I'll try again using a semi-hypothetical scenario: (Please keep in mind I'm new to ns!) Suppose I've got the following topology: N1 - N2 - N3 And three different agents, (A1,A2,A3) which have all been implemented differently in C++. The basic idea is that I want these agents to automatically communicate with each other... In C++ I've written an A1::command() function that will 'send' sends an IP packet to the A2 agent. When the A2 agent receives this packet, it then sends a packet back to A1, which then gets returned to A2 (basically a 3- way handshake). A2 should then automatically send another packet to the A3 agent by creating a packet, and inserting N3's address in the IP header. (I'm assuming all of my agents and nodes know about the topology) In TCL I've done this: set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] set a1 [new Agent/A1] set a2 [new Agent/A2] set a3 [new Agent/A3] $ns attach-agent $n1 $a1 $ns attach-agent $n2 $a2 $ns attach-agent $n3 $a3 $ns connect $a1 $a2 #$ns connect $a2 $a3 ;# if I do this, the handshake doesn't work $ns at 0.0 $a1 send When I run this, ns gives me this error: --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o158: no target for slot 3 _o158 type: Classifier/Port content dump: classifier _o158 0 offset 0 shift 2147483647 mask 1 slots slot 0: _o153 (Agent/A3) -- Finished standard no-slot{} default handler -- Basically I want A3 to look at any or all packets send to N3. How can I force this? I'm using ns-2.29 on Mac OS X 10.4.7. Thanks in advance! Brad On 7/2/06 6:10 PM, Mark Shifrin [EMAIL PROTECTED] wrote: no problem with tcp you can do attach agent as many time as you want to a single node. you must first define it as tcp-source. and then to choose the application which runs over this tcp, for example i did it with FTP. moreover you can do it for n, within a loop --- Brad Montgomery [EMAIL PROTECTED] wrote: Hello All, I'm wondering if it's possible to have a single Agent connected to 2 or more other Agents. I have a topology similar to this: N2 | N0 -- N1 -- N3 -- N4 I have an agents A0, A2, A3 connected to N0, N2, N3 respectively, and I would like A0 to send a packet to A2, which would then in turn send a packet to A3. Is this possible? From
Re: [ns] [help] error: input line too long
This seems to be a Makefile problem that manifests itself in windows (and which in linux would compile fine) I such is the case, i suggest you make your working NS2 tree in c:\ns2, instead of something like C:\documentes and settigs\user\my documents\etc etc etc\ns2 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of balraj karthikeyan Sent: quinta-feira, 22 de Junho de 2006 5:53 To: ns-users@ISI.EDU Subject: [ns] [help] error: input line too long Hi ns users I got a code for watchdog and pathrater protocol I am trying to validate it. I rectified numerous errors and finally I am getting a single error as follows The input line is too long. make.exe: *** [Watchdog.exe] Error 255 Execution terminated help me to debug the above errorits urgent thanks in advance cheers, Cartic
Re: [ns] Bus error
This looks to be equivalent to a segmentation fault Run NS2 inside a debugger like DDD to debug it -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brad Montgomery Sent: quarta-feira, 21 de Junho de 2006 23:46 To: ns-users@ISI.EDU Subject: [ns] Bus error Hello ns-users, I'm new to ns, and I'm using ns-allinone-2.29. I've recently created an Agent that is very similar to Ping agent included in the source. However, when I set up and run a simulation, I get this: Bus error The first 3 lines of my simulation look like this: set ns [new Simulator] set tracefile [open test1.tr w] set namfile [open test1.nam w] However, both files are empty after running the simulation. I've searched the manual, and I've grepped my entire ns directory for 'Bus error' to no avail! Any info on this message is GREATLY appreaciated. Thanks, Brad
Re: [ns] Getting data from wireless base station to cross to wiredstation FIXED
Congratulations Paul! I believe that after fixing your first major bug, your next NS2 hacking experiences will be done a lot faster. One very important helper for beating the NS2 learning curve is to study the other NS2 success stories, to try to grasp all the details and lessons learnt. These could be right the thing that one will need either tomorrow... or in a year's time. Now that you have the protocol working, you might want to combine and parametize the test script so that it is able to run both protocols in the exact same scenarios. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Vincent Craven A while back I asked about getting data to move from my wireless base station node to my wired node. I finally figured out the issue. Key to getting this to work was: 1.) Telling my node that is wired to the base station that such a route exists: $W(0) add-route $BS(0) $W(0) This is very strange. The fixed routing protocol should have done it for you, on the fixed part of the network. Try other fixed routing protocols without your fix, to check what's happening: # http://www.isi.edu/nsnam/ns/doc/node304.html # types of protocols: Algorithmic / Direct / Dummy / DV / LS / Manual # Session / Static In this process you may find that the bug was your's, which is strange because your hierarchal addresses are OK, eg: 0.0.0 (W(0)) wired link 1.0.0 (BS) wireless link 1.0.1 (MH) your you might find a bug on the NS2 (step 7 of http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging3.html) 2.) And in my forward_data() member of my custom routing protocol, I needed to pick the right target: Scheduler::instance().schedule(p-handler_, p, 0.0); Key in this was not to use target_ with just went back to my handler I was already in, but instead reset back to use the packet's original handler. I've compared your code to DSDV's and NOAH's, and I can't understand why you couldn't use the same method: NOAH_Agent::forwardPacket (Packet * p) ... target_-recv(p, (Handler *)0); //line 985 ... DSDV_Agent::forwardPacket (Packet * p) ... target_-recv(p, (Handler *)0); //line 168 ... Particular thanks to Pedro Vale Estrela, who's help was invaluable. Paul Vincent Craven
Re: [ns] simple-wireless.tcl is not running on ns2.28
Search for the /mobility/scene direcotories in your NS2 tree, and put the example alosnside it, eg: Snenario files in /ns2/tcl/ex/mobility/scene Put the script in /ns2/tcl/ex/mydir/ Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Srirupa Dasgupta Sent: quarta-feira, 14 de Junho de 2006 8:23 To: ns-users@ISI.EDU Subject: [ns] simple-wireless.tcl is not running on ns2.28 Dear friend, please help me to run wireless scripts on ns2 . i am typing the following command: ns simple-wireless.tcl the error messafe that i am getting is as follows: num_nodes is set 3 warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl INITIALIZE THE LIST xListHead Loading connection pattern... couldn't read file ../mobility/scene/cbr-3-test: no such file or directory while executing source.orig ../mobility/scene/cbr-3-test (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 $val(cp) (file wireless1.tcl line 121) what is this? please help
Re: [ns] Clearing a queue at a node in ns-2
But this doesn't work. Uptarget_ gives me an NsObject instead of a LL object... try casting it to an c++ LL object. Mind that this will only be a quick fix to see if it works - its terrible programming ! Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: sexta-feira, 9 de Junho de 2006 23:33 To: Pedro Vale Estrela Cc: ns-users@ISI.EDU Subject: RE: [ns] Clearing a queue at a node in ns-2 Whoah, that is too complicated for me. I don't know ns-2 very well. What do you mean by: make a pointer to the ITF -- doesn't it have a pointer (uptarget_)? According to the diagram on pg 145 I should do uptarget_ -downtarget_- reset() since uptarget will take me to the LL, downtarget will take me to the IFq, and reset will reset the queue for that node. But this doesn't work. Uptarget_ gives me an NsObject instead of a LL object... On Fri, 9 Jun 2006, Pedro Vale Estrela wrote: Yes, http://www.isi.edu/nsnam/ns/doc/ns_doc.pdf pag 145, - at your C++ MAC module, make a pointer to the ITF; - either search the C++ NODE methods for getting the pointer reference you need (you want the reverse of the downtarget_ on the ITF; for making this, search the code that sets the downtarget_ variable in C++ in the ITF; (tip: use DDD, put a breakpoint somewhere in mobilenode.cc) in that moment, set something like: downtarget_-my_ITF_ = this; - then at the appropriate time, call reset() of it. my_ITF-reset(); Of course that this is not good C++ Object-Orientation practices, but use it to simply try your ideia; if it works nice, then make the same thing with provte variables and public set/get methods. You can also perform the same trick by: Calling TCL / searching the ITF object you want based on the current MAC object / call reset of it. The benefit is that you can fine tune this method without recompiling NS2 each time. If this works, please put this on the NS2 WIKI! Pedro Vale Estrela Hi ns, I'd like to clear a node's queue from the mac-layer in my simulation after I've received a certain packet. Can I call a PacketQueue function like reset() from the mac layer? If not, how would I clear the queue? Thanks! Kathy
Re: [ns] two equal UDP CBR flows in droptail queue get different bandwidths?
This is an EXCELENT description of what happens in a non-randomized simulation, and from my experience, I fully agree on that. It is exactly this kind of material that would be very useful for the NS2 Wiki, to store this information permanently! As such, somebody on this list please contribute it to the NS2 wiki pages! Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tyler Ross Sent: quinta-feira, 8 de Junho de 2006 16:43 To: Eduardo J. Ortega Cc: ns-users@ISI.EDU Subject: Re: [ns] two equal UDP CBR flows in droptail queue get different bandwidths? In reality, sure. What's happening with the simulation though, is that the packets are being sent at the same time. Even though you start the flows sending at t=0 and t=10, when they're both sending, they're sending at the exact same instant. Since internally, everything is handled in a fixed order and nothing is random unless you explicitly make it so, it will always drop the packets from the same source at the same time. Not because it picked the packets from that source to drop, but because that's just the order of things. And once you see how it works for one packet being dropped, the same thing will repeat itself over and over, since no variables are changing. I don't know if that makes sense. Think on the level of one packet (from each source). As you pointed out, the two flows have EXACTLY the same characteristics. So they leave the source at the same time, they take the same amount of time to travel down their respective links, and they arrive at the relay node at the EXACT same time. Problem is, only one packet can actually ride the next link. Yes, they will queue up until the queue is full. Then what? Which one is accepted into queue? Which is dropped? You know that DropTail has no fairness. So it's NOT going to pick the packet from the flow that was dropped last time. It's NOT going to pick one at random. So how will the simulator decide? If you have an array with all the packets and you loop over them, then the first one it comes across gets to join the queue. So which one gets to join the queue is determined by its internal order. Since nothing in the simulation is being changed in your simulation... you can do the same thing 1000 times, and the same thing will happen. So the next time a packet comes along, the same packet will be let through. The only way to change this result is to introduce some randomness to the sending order or to modify the how packets are queued. An even better idea is to prevent packets from being lost in the first place. :) Eduardo J. Ortega wrote: I understand that Droptail knows nothing about fairness. But, on the average, and given the fact that both flows have exactly the same characteristics, shouldn't they experience the same average behaviour? thanks. On Wednesday 07 June 2006 08:35, Tyler Ross wrote: This phenomenon is explained in the tutorial in Marc Greis's tutorial on the ns-2 website (see http://www.isi.edu/nsnam/ns/tutorial/nsscript2.html ). The queue that you're probably using is a DropTail. The DropTail queue has no concept of fairness, so it's going to drop whatever packet happens to be there. If you want some kind of fairness, you can do as the tutorial suggests, and replace DropTail with SFQ in your simulation. You will then get a fairer split of the bandwidth. If you monitor the queue and the dropped packets, you will indeed see that they are queued and dropped in a much more equal way. Eduardo J. Ortega wrote: Hi there: I've set up this experiment. I have two source nodes S1 and S2 directly connected to a node R1 and two destination nodes D1 and D2 also directly connected to a node R2. Nodes R1 and R2 are connected. All links are 1 Mb/s Full duplex with DropTail. Now, here's the thing. I set up two flows, one going from S1 to D1 and the other one form S2 to D2. Both flows are UDP CBR 1 Mb/s. Flow 1 starts at t=0 and finishes at t=20. flow 2 starts at t=10 and stops at t=15. Sim runs from t=0 to t=25. I'd expect that at t=10 (when flow 2 starts), both flows would experience the same amount of packet losses, so that each one would use about 0.5Mb/s of the link between R1 and R2. But what really happens is that from t=10 to t=15, flow 2 uses all bandwidth while flow 1 loses all packets. Since both flows have the same parameters, shouldn't they receive the same share of bandwidth during that period? Or am i missing something here? Thanks in advance.
Re: [ns] C++ debug in NS2
How need to take the time to learn a real debugger like DDD. Make a small test program yourself in C, 10 lines are sufficient, then debug in inside DDD to learn the debugerr http://heather.cs.ucdavis.edu/~matloff/ddd.html http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging.html#_Toc122255042 Only then move to NS2. DDD is a very important investment to do in NS2 programming -Original Message- From: Hai Nam [mailto:[EMAIL PROTECTED] Sent: terça-feira, 6 de Junho de 2006 15:45 To: [EMAIL PROTECTED]; NS-List Subject: C++ debug in NS2 Hello Pedro and the list, I'm modifying NS-2 C++ code. Sometimes I get the incident de segmentation error. By commenting out some code, I can know from which function goes this error, but it'll take more time to filter the right code block... Could you propose a debugger for me (I don't have much experience in this programming language) ? Besides commenting out some code, or put some printf, I don't know where to start (even I debugged in some small files, I know how to put breakpoints...). In Eclipse there's tool for debug, but I reallly really don't know how to use. After a modification in code, I run NS by make clean;make then I run ns example.tcl. Thanks in advance, -- Hai-Nam NGUYEN http://www.jcisio.com
[ns] CONTRIBUTING TO NS2 WIKI (was: RE: C++ debug in NS2)
100% agreed on the kdbg and insight topics; Concerning the -g flag, one can also configure ns2 with debugging support, eg: ns2 ./configure --help ns2 ./configure --enabled-debug (for c++ debug) ns2 ./configure --enabled-debug --with-tcldebug=../tcl-debug-2.0 (for c++ and tcl debug) Incidentally, this is exactly the kind of ns-users aids that would be most useful for NS2 newcomers. For this, the NS2 wiki is the perfect place for NS2 beginner users to post their success stories / detailed HOW-TOs / tried-but-failed experiments __based on their own learning experiences and lerning curve. As such, and this is not the first time I make this call for volunteers, ___PLEASE CONTRIBUTE TO THE NS2 WIKI___. For instance, check http://mailman.isi.edu/pipermail/ns-users/2006-January/053560.html; I've had exactly __0__ responses for this call for volunteers! However, I've spent a lot of time doing my own help pages for only the benefit of the NS2 community, and I'm sure that I've already helped a lot of persons already. http://tagus.inesc-id.pt/~pestrela/ns2/ Thus: - Have you seen any good tip in the ns2 mailing list? Did it worked? Then put your detailed guide in the wiki. No need to be very formal, just give all the important details! - What, it didn't worked? Start by putting the things that worked on the wiki, search a bit, ask for help in the mailing list, then when its solved put the whole story in the wiki. - Etc etc etc. To conclude, I sincerely fail to see why the NS2 community is so different from other programming communities, which are probably as hard to get into as ns2. Of course that we have our TCL/C++/bindings problems, but they probably have their problems as well that we don't even imagine of. I sincerely think that is users contribute, someday we'll be able to have something similar to this wiki, for example: http://developer.valvesoftware.com/wiki/Category:Programming http://developer.valvesoftware.com/wiki/Compiling_under_Linux Comments? Pedro Vale Estrela -Original Message- From: Ilyes Gouta [mailto:[EMAIL PROTECTED] Sent: terça-feira, 6 de Junho de 2006 16:49 To: [EMAIL PROTECTED] Cc: Hai Nam; [EMAIL PROTECTED]; NS-List Subject: Re: [ns] C++ debug in NS2 Hi, There also insight which can be found on http://sources.redhat.com/insight/ and several other GUI frontends for GDB like KDbg (http://www.kdbg.org/) which is a clean and easy to learn debugger based on QT. Please notice that debugging on Linux means pretty much interacting with GDB whatever the tool you're using. So getting more experience with it is really an added value. Please note, in order to debug NS, you have to build it in O0 -g mode to respectively disable any optimization done by the compiler and to generate debugging symbols and source code references in the final executable. You can do this by manipulating CFLAGS within ns-2.29/Makefile. Best regards, Ilyes Gouta. On 6/6/06, Pedro Vale Estrela [EMAIL PROTECTED] wrote: How need to take the time to learn a real debugger like DDD. Make a small test program yourself in C, 10 lines are sufficient, then debug in inside DDD to learn the debugerr http://heather.cs.ucdavis.edu/~matloff/ddd.html http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging.html#_Toc122255042 Only then move to NS2. DDD is a very important investment to do in NS2 programming -Original Message- From: Hai Nam [mailto:[EMAIL PROTECTED] Sent: terça-feira, 6 de Junho de 2006 15:45 To: [EMAIL PROTECTED]; NS-List Subject: C++ debug in NS2 Hello Pedro and the list, I'm modifying NS-2 C++ code. Sometimes I get the incident de segmentation error. By commenting out some code, I can know from which function goes this error, but it'll take more time to filter the right code block... Could you propose a debugger for me (I don't have much experience in this programming language) ? Besides commenting out some code, or put some printf, I don't know where to start (even I debugged in some small files, I know how to put breakpoints...). In Eclipse there's tool for debug, but I reallly really don't know how to use. After a modification in code, I run NS by make clean;make then I run ns example.tcl. Thanks in advance, -- Hai-Nam NGUYEN http://www.jcisio.com