20/40 MHz BSS coexistence in 802.11n

700 views
Skip to first unread message

Le Tian

unread,
Aug 23, 2017, 7:10:09 AM8/23/17
to ns-3-users
Dear all, 

Is the 20/40 MHz BSS coexistence  feature supported by default in ns3.26? 

I have done a test, in which a single AP connects to 4 stations,  while 2 stations use channel width 20 MHz and another 2 stations use 40 MHz. All the stations and AP use same wifimode "HtMcs0".
No matter the channelwidth of AP is 20 MHz or 40 MHz, AP can always successfully receive packets from all the 4 stations. While more packets can be received by AP when the AP use channelwith 40 MHz than 20 MHz.

While in ns3.23, i get zero throughput with the same configuration except  the wifimode is different, as "HtMcs0" is not supposed in ns3.23.

I check the yans-wifi-phy.cc of ns3.26, https://www.nsnam.org/docs/release/3.26/doxygen/yans-wifi-phy_8cc_source.html, in line 436, it only check the Mcs by using "IsMcsSupproted (tx mode)", and 20 and 40 MHz share the same Mcs.

While in yans-wifi-phy.cc of ns3.23, https://www.nsnam.org/docs/release/3.23/doxygen/yans-wifi-phy_8cc_source.html, in line 694, it also use  "IsMcsSupproted (tx mode)", but with different functionality, Mcs and channel width are both checked.

So my question is,  is this a new feature in ns3.26, like "20/40 MHz BSS coexistence"? If yes, should we set the channel width of AP to 40 MHz? or  both 20 MHz and 40 MHz are fine.

Kind regards,
Le

Sebastien Deronne

unread,
Aug 23, 2017, 7:12:46 AM8/23/17
to ns-3-users
Can you provide a test script?
I want to see what is happening and eventually open a bug if there is an issue somewhere.

--
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 the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, 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.

le tian

unread,
Aug 23, 2017, 7:24:48 AM8/23/17
to ns-3-...@googlegroups.com
Hi Sebastien,

Thanks very much for your help. Attached is the script from ns3.26 and ns3.23, they re copied from /examples/wireless/ht-wifi-network.cc with some changes.
For the ht-wifi-network-ns3.26.cc,  the related code is in line  117-141, you can manually change the channelwidth.
The command to run the code:
./waf  --run ht-wifi-network-ns3.26
For the ht-wifi-network-ns3.23.cc,   the related  code is in line 274-304. you can manually change the channelwidth.
The command to run the code:
./waf  --run ht-wifi-network-ns3.23

ht-wifi-network-ns3.26.cc
ht-wifi-network-ns3.23.cc

Sebastien Deronne

unread,
Aug 23, 2017, 5:05:42 PM8/23/17
to ns-3-users
What do you think is wrong?
We indeed assume that when you select 40 MHz, AP also support 20MHz (which is actually mandatory).

le tian

unread,
Aug 24, 2017, 4:26:37 AM8/24/17
to ns-3-...@googlegroups.com
Hi Sebastien,

I do not know it’s wrong or not. My question is:

1, How to set the channewidth? is 
   Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/ChannelWidth", UintegerValue (40));
the correct way? 
2, If yes, when a station (not AP) is set to 40 MHz channel width, does that station also support 20 MHz channel width, which channel width it will  use?  
3, In a network consisting of some stations with 20 MHz  and others with 40 MHz channel width, how to set the channel width of AP? From my simulation with “ht-wifi-network-ns3.23.cc” script, the channel width of AP affect the throughput a lot.

Kind regards,
Le
On 23 Aug 2017, at 11:05 PM, Sebastien Deronne <sebastie...@gmail.com> wrote:

What do you think is wrong?
We indeed assume that when you select 40 MHz, AP also support 20MHz (which is actually mandatory).

--
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/GW6AOiMlX08/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.

Sebastien Deronne

unread,
Aug 24, 2017, 5:42:23 AM8/24/17
to ns-3-users
1. Yes, it should works fine, you can check in traces if this is well configured.

2. Yes it will, 20 MHz support is mandatory. If both AP and STA support 40 MHz, it should use 40 MHz for data frames.

3. It depends on the scenario you want to simulate :-)

le tian

unread,
Aug 24, 2017, 6:55:52 AM8/24/17
to ns-3-...@googlegroups.com
Hi Sebastien,

For the third question: Do you mean, if the AP is set to 20 MHz,  the AP  will use 20 MHz for data frame, and all the stations will use 20 MHz as well?
If the AP is set to 40 MHz, the AP will use 40 MHz  for communicating with stations which is set to 40 MHz, and use 20 MHz for  communicating with stations which is set to 20 MHz.

Another question, can the stations or AP change the channel width during the simulation? or the channel width can only be configured beforehand?

Kind regards,
Le

Sebastien Deronne

unread,
Aug 24, 2017, 8:45:57 AM8/24/17
to ns-3-users
Yes, in infrastructure mode, if your AP is only capable of 20 MHz, it will never used 40 MHz even if some stations are capable of 40 MHw (if not the case in the simulation, a bug needs to be open, but I normally made some tests already to validate our implementation).

I assume it should be possible to change that at run-time, but I never really tested it so I would not be surprised if you encounter a bug. Can you please give a try?

le tian

unread,
Aug 24, 2017, 9:06:29 AM8/24/17
to ns-3-...@googlegroups.com
Hi Sebastien,

Thanks a lot for your help. I will try and let you know if there is a bug. 

Kind regards,
Le
On 24 Aug 2017, at 2:45 PM, Sebastien Deronne <sebastie...@gmail.com> wrote:

Yes, in infrastructure mode, if your AP is only capable of 20 MHz, it will never used 40 MHz even if some stations are capable of 40 MHw (if not the case in the simulation, a bug needs to be open, but I normally made some tests already to validate our implementation).

I assume it should be possible to change that at run-time, but I never really tested it so I would not be surprised if you encounter a bug. Can you please give a try?

Tom De Schepper

unread,
Aug 24, 2017, 10:07:01 AM8/24/17
to ns-3-users
Hi Sebastien, Le
 
I have a small follow-up question on this discussion.
 
Assume the following topology: an AP that supports both 20 and 40 MHz and two stations: station 1 only supports 20 MHz, while station 2 supports also 20 and 40 MHz. 
I wonder what will happen in this case as I would expect that the AP chooses 20 MHz to serve both clients, as one of them does not support 40 MHz. I believe it is not possible for an AP with a single chip to use both bandwidths at the same time.
 
However, from one of the above comments of Le, it sounds like the AP would serve station 1 with 20 MHz and station 2 with 40 MHz at the same time. Did I misunderstood or is this indeed supported in the simulator? If this is indeed supported, would you say that this correspond with the actual behaviour in a real-life setting? 
 
Thanks in advance! 
Kind regards

Op woensdag 23 augustus 2017 13:10:09 UTC+2 schreef Le Tian:

Sebastien Deronne

unread,
Aug 24, 2017, 1:42:20 PM8/24/17
to ns-3-users
AP will select 20 MHz primary channel to transmit to the 20 MHz STA, and will use channel bonding (40 MHz) to transmit to the 40 MHz capable STA.
A single chip can support it without any issue, it can even support multiple streams. I think you are confusing with RF chains, where one chain is needed per MIMO stream.
Reply all
Reply to author
Forward
0 new messages