Bugzilla – Bug 1030
MANET simulation doesn't work in ns-3.9, looks like WiFi is broken
Last modified: 2010-11-17 03:15:44 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.
At the same time all test pass in ns-3.9. A bug in the example code?
reassigning to the aodv module
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 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.
^^(Didn't see Kirill's comment before posting)
(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) {
Fixed, I have missed that changes (shame on me). Thank you all for help.