Look here: http://blog.karthiksankar.com/ns2-eclipse/
Filed under: ns-2
Tuesday, December 15, 2009 • 13:21 0
Look here: http://blog.karthiksankar.com/ns2-eclipse/
Filed under: ns-2
Thursday, December 10, 2009 • 11:08 0
When changing the main ns-2 folder, there is a problem doing a reinstall using the ./install command. The tk directory is not updated with regards to the correct folder name. To make this right, dive into the tk8.x.x/unix subdirectory and edit the directory entries in the “Makefile” file.
Then jump back to the main ns-2 directory and run the ./install command again. Good luck!
Monday, November 16, 2009 • 14:28 0
This has been copied from the ns-2 ubuntu installation guide
For Ubuntu 9.10 (karmic), you may encounter this error in the linking of otcl:
otcl.o: In function `OTclDispatch':
/home/ns/ns-allinone-2.34/otcl/otcl.c:495: undefined reference to `__stack_chk_fail_local'
otcl.o: In function `Otcl_Init':
/home/ns/ns-allinone-2.34/otcl/otcl.c:2284: undefined reference to `__stack_chk_fail_local'
ld: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't defined
ld: final link failed: Nonrepresentable section on output
make: *** [libotcl.so] Error 1
This error is because the linker being used is “ld -shared” instead of “gcc -shared”. If you edit one line in otcl-1.13/configure, and rerun install, it should work:
--- configure.orig 2009-11-02 12:14:52.556167945 -0800
+++ configure 2009-11-02 12:17:28.966706099 -0800
@@ -6301,7 +6301,7 @@
;;
Linux*)
SHLIB_CFLAGS="-fpic"
- SHLIB_LD="ld -shared"
+ SHLIB_LD="gcc -shared"
SHLIB_SUFFIX=".so"
DL_LIBS="-ldl"
SHLD_FLAGS=""
Monday, August 10, 2009 • 16:28 0
Wednesday, July 29, 2009 • 11:19 0
I came across Van Jacobson’s talk at Google Tech Talks, where he presents “A new way to look at networking“. Quite an interesting perspective!
Filed under: General, Sensor Networks
Tuesday, July 28, 2009 • 10:26 0
Searching gmail the advanced way: http://mail.google.com/support/bin/answer.py?hl=en&answer=7190
Filed under: General
Monday, July 27, 2009 • 16:27 0
The implementation of OLSR (v0.8.8) by Francisco J. Ros at the University of Murcia, Spain works very good for simulations with OLSR. However, if you want to adjust the intervals of HELLO and TC, especially with decimals, note that the hello_ival, tc_ival_ and mid_ival_ variables are declared as integers in OLSR.h, so any alterations to these variables in the script file will be converted to an integer value. Change these and the inline methods hello_ival() etc. to doubles. Also, the defined macros OLSR_REFRESH_INTERVAL, OLSR_HELLO_INTERVAL and OLSR_TC_INTERVAL in OLSR.h must be updated to match the tcl script file’s definitions.
Filed under: ns-2
• 10:49 0
To fetch lines that are a subset of the lines in the file, with known, but different, starting characters, write this:
more <filename.txt> | grep "^1 \|^101 \|^251 "
where 1, 101 and 251 followed by a space represent the start of the lines we are interested in. In other words, the operator OR “|” must be escaped using the “\”.
Filed under: linux
Friday, July 24, 2009 • 0:48 0

The Nam ns2 topology investigation tool with lots of nodes
My experience is with the code in the palm_rw directory, where the file rwall.c can be compiled by simply running make.
A fast way to generate for example 10 different topologies with 30 nodes in a 1500 x 300 m^2 using random walk with reflection for a simulation lasting 700 seconds where the nodes have a set velocity of 5 m/s and changes direction every 10 s plus-minus 5 s in a linux bash shell (command line), do this:
i=0; while [ $i -lt 10 ]; do sleep 1; ./rwall 3 30 1500 300 700 5 0 0 0 10 5 > $i.top; let i=i+1; done
The sleep command has to be run to ensure that the rwall code generates 10 randomly different topologies. Without it, the program uses the same random seed for all 10 topologies, and you end up with 10 identical .top files.
To generate 10 static random topologies, I set the simulation time to 1, and the node velocity to 1 (they cannot be set to zero), and leave the rest of the parameters as above.
On a side note, I would like to warn people that not all topology generator tools do what is expected, so I would urge you to throroughly investigate the behavior of the generated topologies, especially when the topologies include mobility.
Filed under: ns-2
Tuesday, July 21, 2009 • 11:32 0
threshold.cc is a program to calculate the thresholds for transmission receipt using the relation between various physical parameters (distance, effect, propagation model etc.) related to transmissions in ns-2. It has to be compiled by the user. This is not a difficult task, but could pose some challenges as the compiler over time is updated and no longer accepts the outdated c-code of outdated versions of ns-2.
Trying to do g++ threshold.cc will break if trying this with a reasonably updated version of Ubuntu and the g++ compiler (v4.3.3) in combination with ns-2.33. Thus, to make it work, delete the line that reads
#include <iostream.h>
and write these three lines there instead:
#include <iostream>
#include <cstring>
using namespace std;
Then try to compile with g++ again:
g++ threshold.cc -o threshold
Filed under: ns-2