Bug 725 - L-2 fragmentation and RTS cannot be used at the same time
L-2 fragmentation and RTS cannot be used at the same time
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wifi
ns-3-dev
PC Linux
: P4 normal
Assigned To: Mathieu Lacage
http://pastebin.com/m738f9349
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-19 10:03 UTC by Christian
Modified: 2010-01-08 11:41 UTC (History)
2 users (show)

See Also:


Attachments
Frag threshold set at 800, RTS threshold set at 100. Still RTS handshake is not triggered. (4.94 KB, text/plain)
2009-10-19 10:03 UTC, Christian
Details
(Very simple) patch proposed to overcome this issue (257 bytes, patch)
2009-10-19 12:13 UTC, Christian
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian 2009-10-19 10:03:10 UTC
Created attachment 633 [details]
Frag threshold set at 800, RTS threshold set at 100. Still RTS handshake is not triggered.

It seems that MAC-layer fragmentation and RTS handshake cannot be used at the same time.
In particular, when turning on both mechanisms only fragmentation gets
actually turned on.
According to the standard, it should be possible to use both mechanisms jointly.

To reproduce this bug, just set FragmentationThreshold and RtsCtsThreshold accordingly.
As an example, they could be set this way:
  Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("800"));
  Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("100"));
Comment 1 Christian 2009-10-19 12:13:51 UTC
Created attachment 634 [details]
(Very simple) patch proposed to overcome this issue

As correctly pointed out here:
http://groups.google.com/group/ns-3-users/browse_thread/thread/b96cfbe60458bbf1

the problem seems due to the instruction params.DisableRts() in function DcaTxop::NotifyAccessGranted (in src/devices/wifi/dca-txop.cc).

The patched code simply calls params.EnableRts() after checking RTS is actually needed.

As a result, the RTS handshake is called only for the first fragment and the duration field is properly set to cover up to the first ACK (as stated in the standard).
Comment 2 Mathieu Lacage 2010-01-07 10:29:09 UTC
I believe that this patch enables RTS if the size of the packet is higher than RtsThreshold but the correct expected behavior is to enable it only if the size of the first fragment is higher than RtsThreshold. Right ?
Comment 3 Christian 2010-01-07 12:24:05 UTC
(In reply to comment #2)
> the correct expected behavior is to enable it only if the size
> of the first fragment is higher than RtsThreshold. Right ?

I reviewed the std 802.11-2007 and i think you are right.
Section 9.2.6 states that "a STA shall use RTS/CTS [...] only when the length of the MPDU is greater than [...] dot11RTSThreshold".
So this step comes after a possible fragmentation.

Hence the station should instead check the length of 'fragment' against the RtsThreshold but should do it only in the case 'fragment' is the first fragment.
Comment 4 Mathieu Lacage 2010-01-08 11:41:37 UTC
changeset: c4b8a337fc29