Bug in spectrum-wifi-phy ?

139 views
Skip to first unread message

Mahesh

unread,
Sep 29, 2017, 4:06:04 AM9/29/17
to ns-3-users
Hi ns-3 community,

So I have a simple topology where I use spectrum-wifi-phy with MultiModelSpectrumChannel. I get a huge unfairness in TCP throughput among various flows. 

On the other hand, when I use yans-wifi-phy, there is no unfairness as such. Is there anything wrong with spectrum-wifi-phy in ns-3.26 ?

I am attaching the topology and the 2 simulation scripts - one uses spectrum-wifi-phy while the other uses yans-wifi-phy. There is no other difference in the 2 scripts. Also, I am attaching an image of the difference in throughput stats using the 2 PHYs.

Kindly help me out with this issue.

Thanks,
Mahesh
omni_topology.png
wifi_olsr_omni_directional_antenna_spectrum_phy.cc
wifi_olsr_omni_directional_antenna_yans_phy.cc
throughput_difference.png

Mahesh

unread,
Sep 29, 2017, 3:06:14 PM9/29/17
to ns-3-...@googlegroups.com
Can someone from the ns-3 developers team look into this issue ? It seems to be a bug. I really can't comprehend such unfairness in the TCP throughput.

ns-3 community, please help.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/h6roORws_oY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Mahesh

unread,
Sep 30, 2017, 5:21:06 AM9/30/17
to ns-3-users
Hi all,

I solved the issue. Apparently, a bug resolution was raised on ns-3 (https://www.nsnam.org/bugzilla/show_bug.cgi?id=2460) in which the "CCAMode1Threshold" had to be set to around -62 dBm when using spectrum-wifi-phy. The default values are different.

So if anyone is using spectrum-wifi-phy with ns-3.26, make sure that CCAMode1Threshold is -62 dBm.

//Bug 2460: CcaMode1Threshold default should be set to -62 dBm when using Spectrum
Config::SetDefault ("ns3::WifiPhy::CcaMode1Threshold", DoubleValue (-62.0));

- Mahesh

Varun Reddy

unread,
Oct 3, 2017, 6:21:28 PM10/3/17
to ns-3-users
Hi Mahesh,

What if you want the CCA threshold value to be something else, say -80dBm? Wouldn't setting the default value to -62dBm change the results totally?

Thanks,
Varun


On Saturday, 30 September 2017 05:21:06 UTC-4, Mahesh wrote:
Hi all,

I solved the issue. Apparently, a bug resolution was raised on ns-3 (https://www.nsnam.org/bugzilla/show_bug.cgi?id=2460) in which the "CCAMode1Threshold" had to be set to around -62 dBm when using spectrum-wifi-phy. The default values are different.

So if anyone is using spectrum-wifi-phy with ns-3.26, make sure that CCAMode1Threshold is -62 dBm.

//Bug 2460: CcaMode1Threshold default should be set to -62 dBm when using Spectrum
Config::SetDefault ("ns3::WifiPhy::CcaMode1Threshold", DoubleValue (-62.0));

- Mahesh

On Saturday, 30 September 2017 00:36:14 UTC+5:30, Mahesh wrote:
Can someone from the ns-3 developers team look into this issue ? It seems to be a bug. I really can't comprehend such unfairness in the TCP throughput.

ns-3 community, please help.
On 29 September 2017 at 13:36, Mahesh <mahes...@gmail.com> wrote:
Hi ns-3 community,

So I have a simple topology where I use spectrum-wifi-phy with MultiModelSpectrumChannel. I get a huge unfairness in TCP throughput among various flows. 

On the other hand, when I use yans-wifi-phy, there is no unfairness as such. Is there anything wrong with spectrum-wifi-phy in ns-3.26 ?

I am attaching the topology and the 2 simulation scripts - one uses spectrum-wifi-phy while the other uses yans-wifi-phy. There is no other difference in the 2 scripts. Also, I am attaching an image of the difference in throughput stats using the 2 PHYs.

Kindly help me out with this issue.

Thanks,
Mahesh

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/h6roORws_oY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.

Mahesh

unread,
Oct 4, 2017, 6:23:32 AM10/4/17
to ns-3-users
Hi Varun,

I tried setting the CCA threshold to other values. But they don't seem to work. -62 dBm worked. I stumbled upon this value by looking at spectrum examples in examples/wireless.

- Mahesh

Rediet

unread,
Oct 6, 2017, 7:35:19 AM10/6/17
to ns-3-users
Hello Mahesh,

I'm surprised that the Cca1Theshold made any difference because it is used for ED only (i.e. when the incoming frame hasn't been identified as Wi-Fi). Considering that you have Wi-Fi stations only they should be using the preamble detection threshold.
As for the difference in the obtained throughput between YansWifi and SpectrumWifi, it might be due to the fact that you're not using the same pathloss and propagation delay models between your two scenarios. YansWifiChannel has been configured using the helper (Default) whereas MultiModelSpectrumChannel doesn't have any parameters set. Please refer to wifi-spectrum-per-example that shows how to configure things in a symmetric manner, noting that the results of this example show that both models should be equivalent for non-frequency dependent scenarios (which is your case here).

BR,

Rediet

Yiannis

unread,
Oct 9, 2017, 1:45:14 PM10/9/17
to ns-3-users
>>I'm surprised that the Cca1Theshold made any difference because it is used for ED only (i.e. when the incoming frame hasn't been identified as Wi-Fi). Considering that you have Wi-Fi stations only they should be using the preamble detection threshold.
Just to mention that even in the case of Wi-Fi only, if preamble missed, then CCA_ED is used.

Cheers,
yiannis









saumil shah

unread,
Feb 7, 2018, 9:40:02 AM2/7/18
to ns-3-users
Hi Rediet,

In above post you have mentioned that if there are WiFi stations only it will not use Cca1Theshold and it will use preamble detection threshold.

Can you  please explain which is preamble detection threshold in spectrum-wifi-phy ? I am working on LBT module which uses spectrum-wifi-phy only and i am not able to find the condition for channel busy when we have wifi stations only.

As i know wifi will differ to other technologies as per Cca1Theshold which has default value of -62 dbm. Also as per my understanding wifi will sense channel busy in presence of another wifi if received signal power is more than -82 dbm. Is my understanding correct?

I am asking this because i found some strange result as i have mentioned in below thread.
https://groups.google.com/forum/#!topic/ns-3-users/4NnukKcBd-M

Kindly help me to understand or any hint will be useful to me.

Best Regards
Saumil

Rediet

unread,
Feb 8, 2018, 5:08:04 AM2/8/18
to ns-3-users
Just for reference, I've replied in the mentioned thread.
Reply all
Reply to author
Forward
0 new messages