This faq is provided "as is", I take no responsibility for anything
anyone does using information contained here. Use of any information is
at your own risk. The accuracy of the assertions made here is not
guaranteed, why, it might all well be fictional. USE AT YOUR OWN RISK
3. What are the languages I need to know for using ns2 1. For using existing network elements implemented in ns2 and run simulations you need to know OTCL 2. For adding new network elements / new protocols you need to know C++ 3. For analyzing trace files you may use perl/awk/sed
5. What are the programming methodologies I need to know for using ns2 As a beginner you may not need to know any special methodology . But if you are into implementing more serious stuff (like adding new protocols) it is always better to know Object Oriented Programming (Ooops !)
6. how do I debug C++ source code of ns2 This question is already answered in ns2 home page. Adding my comment:- Ns2 is a software written in C++ and OTCL. Like any other C++ program you can use gdb. Alternatively you may use GUI versions of gdb like Kdebug
7. I don't know gdb how do I get info about gdb? Ask this question to ur linux system :)
$info gdb
8. how do I debug OTCL code of ns2 This question is already answered in ns2 home page. But I still uses puts " " :-)
9. I got a problem which is not there in tutorials/manuals and no one answers in mailing list. How do I solve it?
The best way to study any software is not solely depending on any documentation. Have a "do it yourself " approach and start understanding source code and help yourself with the answer.
It is difficult but it is the only and best way many times...
One good tool available for help is "grep"
10. How do I know which c++ files implements the code for "xyz" feature.
Read answer to previous question.
11. I am unable to install ns2/related package. I got "xyz" error, what shall I do?
If you are newbie to ns2 I recommend to install "ns-allinone" version in Linux. It will be very easy to install
If you are an experienced programmer in unix environment you know how to fix it :-)
12. can any one please tell me how can i assign IP address to the nodes
There is nothing like ip addresses in ns2. ns2 nodes have hirearchichal addressing scheme which is similar to ip adderss but it is not the same.
General Programming
Questions
1. I would like to know Why does no slot error occur?
No slot error happens for 2 reasons 1. There is no way to reach a particular node. Means route entry (in ns2 terms it is classifier ) for a particulat node is not found 2. There is no agent available. This means a packet reached addrezsed node but while port demultiplexing classifier could not find the corresponding agent. Eg : If I send a ping packet to a node which doesnot have ping agent in it. 2. How to correct no slot error ? Make sure your the nodes which you want to reach are reachable.
1. If you are using a wired scenrio make sure topology is ccorrect 2. If you are using wired cum wireless scenario make sure in addition to topology make sure about node addresses and numbers of domains,clusters,number of nodes etc 3. Make sure that route entries are available in case of hirearchichal routing 4. Make sure that agnets are avaiable.
2. Why segmentation faults occur?
The first question indicates you are not familiar with C/C++ programming. C/C++ programming experience are mandatory to do something serious with ns2
3. Is there any method to avoid segmentation faults ? Debug the code.
4. How do I add multiple interfaces for a mobile node. As far as I know multiple interfaces are not supported by ns2. But I found one implemeantion for same here
Some Specific
Questions
I was wondering if you could tell me if I could implement soft handover for 2G in NS2 simulator.
My immediate answer is yes you can implement.Any simulation is nothing
but a peace of software. As far as you know
programming and if you know how to model the stuff ,you can simulate.
But next question pops up is how difficult it is?
For some experiments the basic infrastructure to try to do an
experiment is already there. E.g. : writing a new adhoc protocol
writing a new queuing mechanism etc. For some others basic
infrastructure you need to build.
I guess 2G handover case fist better in second category. You can look
at the example of mobile ip implementation.
Take that example as a reference model and go ahead with your
implementation