Lab 2 : Using Wireless module in NS

This part of the lab will consist of creating wireless simulations in ns.

  1. Create a simple 3 node wireless topology. The nodes use DSDV (an ad-hoc routing protocol) to route packets among themselves. They also use

  2. Now turn on mac tracing. Run yr simulation and then look at the trace output. Can you see RTS/CTS transmissions at the MAC layer?

  3. Next add incoming packet loss model to the nodes. Run sim and look at trace outputs again. Can you see MAC re-transmissions for lost packets?
    Use "-IncomingErrProc UniformErrorProc" to add the error model.

  4. Remove the error model and now add energy model to the mobilenodes. Use the following values:
    * attach an energy model          -energyModel EnergyModel
    * Initial energy of 0.455 joules. -initialEnergy $opt(IE)
    * Rx power of 0.3                 -rxPower $opt(rp)
    * Tx power of 0.6                 -txPower $opt(tp)
    And run simulations. What do you see? Why? [hint:energy-efficiency of MAC]

  5. Replace the 802.11 mac with Mac/SMAC (sensor MAC). Run simulation and view in nam. What happens now?

    Optional: Use nam editor to create the wireless scenario in (1) above.