NS-3 simulator useful settings

For doing research in my academic career, I began to learn ns32 recently. I found some thing useful for most of researchers:


1. How to configure the different communication range (radio Range) manually.

To set the Transmission range, the PHY configuration has to be set properly that are used by many the propagation model in NS-3. Easy way for setting radio range as per your choice is given beow for all nodes. For using different communication range for different nodes, we can use receiver sensitivity attirubute. For all nodes, one time setting communication range, use the ranage propagation model (ns3::RangePropagationLossModel) as follows: Add the following lines before set channel (wifiChannel.Create ());


wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");

wifiChannel.AddPropagationLoss("ns3::RangePropagationLossModel", "MaxRange",

DoubleValue(190.0));


wifiPhy.SetChannel (wifiChannel.Create ());


In above example, radio range is 190 meter.