Dr. Hasan Farooq: Network Simulator NS-2 Tutorials

You might also like

You are on page 1of 1

NS-2 http://www.hasanfarooq.com/ns-2.

html

Dr. Hasan Faroo


HOME RESUME RESEARCH

Network Simulator NS-2 Tutorials

For new learners of NS-2, the book "Introduction to Network Simulator NS2" by Teerawat Issar
read. Along with that, NS-2 Manual is also very handy and useful.

Setting Communication Range in NS-2


To set communication range in NS-2, find RXThresh_ value for desired communication range
file.

To get RXThresh_ value, first you have to compile threshold.cc file found at:

ns-xx/ns.xx/indep-utils/propagation/threshold.cc

using command:

g++ -lm threshold.cc -o threshold

After compiling successfully, run this utility and specify options (such as Propagation model, Tr
and desired communication range and it will return RXThresh_value. Use this value in your tc

Phy/WirelessPhy set RXThresh_ xxxxxxxx

where xxxxxxxx is the value returned from threshold utility

For specifying CSThresh_ value, commonly CSRange:TXRange ratio used is 2.2 . So If your T
threshold utility again to compute value for 2.2 * 250m = 550m and use the returned value for

Phy/WirelessPhy set CSThresh_ xxxxxxxx

1 of 1 7/5/19, 7:54 AM

You might also like