Showing posts with label ns2. Show all posts
Showing posts with label ns2. Show all posts

Modifying transmission range values in ns-2

Tuesday, October 5, 2010 2:15 AM Posted by naz
Labels: ,

4

In my final year project, I have to vary the transmission range value in order to study the protocol behaviour using simulation with NS-2.

This can be done using a separate C program that is provided at ~ns/indep-utils/propagation/threshold.cc to compute the receiving threshold. It can be used for all the propagation models as discussed in ns-manual 18.4.


In some applications, a user may want to specify the communication range of wireless nodes. This can be done by set an appropriate value of the receiving threshold in the network interface, 
  • Phy/WirelessPhy set RXThresh_ \


Compile threshold.cc using this command:
  • g++ threshold.cc -o threshold

Assume you have compiled it and get the excutable named as threshold. You can use it to compute the threshold as follows:
  • threshold -m \ [other-options] distance
    • where propagation-model is either FreeSpaceTwoRayGround or Shadowing, and the distance is the communication range in meter.
    • [other-options] are used to specify parameters other than their default values. For the shadowing model there is a necessary parameter, -r receive-rate, which specifies the rate of correct reception at thedistance.
    • Because the communication range in the shadowing model is not an ideal circle, an inverse Q-function [29] is used to calculate the receiving threshold. For example, if you want 95% of packets can be correctly received at the distance of 50m, you can compute the threshold by
  • threshold -m Shadowing -r 0.95 50
    • Other available values of [other-options] are shown below
    • -pl \ -std \ -Pt \ -fr \ -Gt \ -Gr \ -L \ -ht \ -hr \ -d0 \
Include new value in TCL file, example:

How to generate graph in wireless scenario

Wednesday, September 15, 2010 1:58 AM Posted by naz
Labels: ,

0

Question: I wanted to know the procedure to get Xgraph or Gnuplot from trace file.
Answer (by Mubashir Husain Rehmani, Paris, France):

As far as gnuplot is concerned, its very easy and there is no need of any
language to learn it. what you have to do is:
1. Install gnuplot in your linux (ubuntu) distribution.
2. Once you are in the directory of gnuplot, just write gnuplot at the command prompt
3. Then once you are in gnuplot command prompt then write load "Graph.p"
4. and see the graph.
====================
Code for file Graph.p
====================
set title "Relationship between Two functions"
set xlabel "First function"
set ylabel "Second function"

set xrange [0.0:100]
set yrange [0.00:10]

set grid
set boxwidth 15

plot "Graph.tr"  using 1:2 with lines lt 1 lw 2 title ''; replot

set term post eps enhan color
set out "Graph.eps"; replot
=====================
Data present in Graph.tr
=====================
0    0
10    3.16
20    4.47
30    5.48
40    6.32
50    7.07
60    7.75
70    8.37
80    8.94
90    9.49
100    10

Source

NS-2 Installation Error: tcl 8.4.18 configuration failed!

Monday, July 5, 2010 11:51 PM Posted by naz
Labels:

0

I came across this error during NS 2.34 installation on a machine with Centos 5.2. After several tries, I managed to solve this issue by running this commands.

  • yum install g-c++
it seems that the compiler is not installed in the machine.

Error : Node::RandomSpeed()

Wednesday, April 14, 2010 9:56 PM Posted by naz
Labels:

0

Error when creating node movement for wireless scenario in ns2 using setdest tool.

Example:
  • ./setdest -n 20 -p 2.0 -s 10.0 -t 200 -x 500 -y 500 > scen-20-test
  • setdest: setdest.cc:595: void Node::RandomSpeed(): Assertion `speed!= 0.0' failed.
Solution:
  • Try to use -M instead of -s for speed

setdest very slow?

Saturday, March 27, 2010 3:27 AM Posted by naz
Labels:

0


Question: 
I am using the setdest tool in ns-2 to generate a mobility scenario that has 200 users and lasts 1 hour. I used version 2. It took seven to eight hours to generate only800 seconds. Is this normal? I hope some people more experienced with this can give me help.

Solution:
Check the source code setdest.cc under indep-utils/cmu-scen-gen, you can comment out parts that display routing tables. This will dramatically reduce the time needed to generate the scenario.

olsr_example.tcl

Sunday, March 7, 2010 7:23 PM Posted by naz
Labels: ,

0

Can also be downloaded from here : Download olsr_example.tcl
olsr_example.tcl

UM-OLSR patch for ns-allinone-2.34

Tuesday, March 2, 2010 12:10 AM Posted by naz
Labels: ,

11

Download :





% tar zxvf um-olsr-0.8.8
% mv um-olsr-0.8.8 olsr
% mv olsr /usr/local/bin/ns-allineone-2.34/ns-2.34/
% mv um-olsr-2.34_v0.8.8.patch /usr/local/bin/ns-allinone-2.34/ns-2.34/olsr/
% cd /usr/local/bin/ns-allinone-2.34/ns-2.34
% patch -p1 < olsr/um-olsr-2.34_v0.8.8.patch
% make 

Best of luck!

NS-2 Installation Errors

Monday, March 1, 2010 6:38 PM Posted by naz
Labels:

0

Embedded below is my personal compilation of NS-2 installation error. Some are my own, while some are other's.
If anyone encountered any other error in different linux distro perhaps, plz email me.

Feel free to download.

Love.

Ns2 Installation Errors

Installing Tracegraph in Centos 5.2

Wednesday, August 19, 2009 11:48 AM Posted by naz
Labels:

0

Trace graph is a free network trace files analyser developed for network simulator ns-2 trace processing. Trace graph can support any trace format if converted to its own or ns-2 trace format. Trace graph runs under Windows, Linux, UNIX and MAC OS systems. Trace converter processes traces over 80x faster.


1. Download Tracegraph from tracegraph.com

2. Select Linux version and download two files :
mglinstaller.gz, tracegraph202linux.tar.gz

3. Copy both files to your home directory i.e /home/user

4. Untar the file tracegraph202linux.tar.gz using this command :
tar zxvf tracegraph202linux.tar.gz

5. Once done, you will have a folder called tracegraph202.

6. Now copy the mglinstaller.gz in /home/user to /home/user/tracegraph202

7. Next, unzip the mglinstaller.gz by using this command :
gzip -d mglinstaller.gz

8. the above command will create a folder within the bin folder and set the
following lines to the LD_LIBRARY_PATH variable

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user
/tracegraph202/bin/glnx86

9. Now copy the lines to your .bashrc file by using either of this command
gedit /home/user/.bashrc
vi /home/user/.bashrc
For root : gedit /root/.bash_profile

10. Now save the file and back to tracegraph202 folder and run tracegraph
using this command :
./trgraph

Error you might encountered :

./trgraph: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory

Solution: yum install libXp.so.6