Bug 1030 - MANET simulation doesn't work in ns-3.9, looks like WiFi is broken
MANET simulation doesn't work in ns-3.9, looks like WiFi is broken
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: aodv
ns-3.9
All All
: P1 normal
Assigned To: Elena Buchatskaya
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-16 08:38 UTC by Pavel Boyko
Modified: 2010-11-17 03:15 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Boyko 2010-11-16 08:38:31 UTC
examples/routing/aodv example doesn't work in ns-3.9 and does work in ns-3.8. Changing AODV -> OLSR shows the sample problem with OLSR. 

How to reproduce:

$ cd ns-3.8/
$ ./waf --run aodv
Waf: Entering directory `ns-3.8/build'
Waf: Leaving directory `ns-3.8/build'
'build' finished successfully (0.303s)
Creating 10 nodes 120 m apart.
Starting simulation for 10 s ...
PING  10.0.0.10 56(84) bytes of data.
64 bytes from 10.0.0.10: icmp_seq=0 ttl=56 time=23 ms
64 bytes from 10.0.0.10: icmp_seq=1 ttl=56 time=7 ms
64 bytes from 10.0.0.10: icmp_seq=2 ttl=56 time=7 ms
64 bytes from 10.0.0.10: icmp_seq=3 ttl=56 time=7 ms
--- 10.0.0.10 ping statistics ---
10 packets transmitted, 4 received, 60% packet loss, time 9999ms
rtt min/avg/max/mdev = 7/11/23/8 ms
$

This is correct output.

$ cd ns-3.9/
$ ./waf --run aodv
Waf: Entering directory `ns-3.9/build'
Waf: Leaving directory `ns-3.9/build'
'build' finished successfully (0.350s)
Creating 10 nodes 120 m apart.
Starting simulation for 10 s ...
PING  10.0.0.10 56(84) bytes of data.
--- 10.0.0.10 ping statistics ---
10 packets transmitted, 0 received, 100% packet loss, time 9998ms
$

This is not correct.
Comment 1 Pavel Boyko 2010-11-16 08:43:40 UTC
At the same time all test pass in ns-3.9. A bug in the example code?
Comment 2 Nicola Baldo 2010-11-16 10:14:04 UTC
reassigning to the aodv module
Comment 3 Kirill Andreev 2010-11-16 10:40:38 UTC
It seems that WifiMode classes were changed, that has caused a change in RX-ranges, so frames are not delivered with probability equal to 1 at 120 meters default distance.
Comment 4 Lalith Suresh 2010-11-16 10:42:42 UTC
I haven't ran the ns-3.8 version yet, but seems like it's a matter of range. Reducing the step size from the default of '120', we get:

$: ./waf --run "aodv --step=100"

Creating 10 nodes 100 m apart.
Starting simulation for 10 s ...
PING  10.0.0.10 56(84) bytes of data.
64 bytes from 10.0.0.10: icmp_seq=0 ttl=56 time=22 ms
64 bytes from 10.0.0.10: icmp_seq=1 ttl=56 time=7 ms
64 bytes from 10.0.0.10: icmp_seq=2 ttl=56 time=7 ms
64 bytes from 10.0.0.10: icmp_seq=3 ttl=56 time=7 ms
--- 10.0.0.10 ping statistics ---
10 packets transmitted, 4 received, 60% packet loss, time 9999ms
rtt min/avg/max/mdev = 7/10.75/22/7.5 ms


A consequence of some changes in the Wifi code maybe?

Anyways, if it's ok with everyone, I can update the example.
Comment 5 Lalith Suresh 2010-11-16 10:43:36 UTC
^^(Didn't see Kirill's comment before posting)
Comment 6 Tom Henderson 2010-11-16 12:29:55 UTC
(In reply to comment #3)
> It seems that WifiMode classes were changed, that has caused a change in
> RX-ranges, so frames are not delivered with probability equal to 1 at 120
> meters default distance.

I believe it is not the WifiMode class changes but instead the change in Ofdm error model; from CHANGES.html

<li><b>Changed default WiFi error rate model for OFDM modulation types:</b>
Adopted more conservative ErrorRateModel for OFDM modulation types (a/g).
This will require 4 to 5 more dB of received power to get similar results
as before, so users may observe a reduced WiFi range when using the defaults.
See tracker issue 944 for more details.
</ul>

So I agree with the proposed solution to decrease the step size.  A value of between 70-100 produces the desired result, so I would go with 100 for simplicity.

--- a/examples/routing/aodv.cc	Tue Nov 09 20:27:55 2010 -0800
+++ b/examples/routing/aodv.cc	Tue Nov 16 09:29:38 2010 -0800
@@ -95,7 +95,7 @@
 //-----------------------------------------------------------------------------
 AodvExample::AodvExample () :
   size (10),
-  step (120),
+  step (100),
   totalTime (10),
   pcap (true)
 {
Comment 7 Pavel Boyko 2010-11-17 03:15:44 UTC
Fixed, I have missed that changes (shame on me). Thank you all for help.