From f50ba3169c0f1a17dc61dff5884152b2936cd7e3 Mon Sep 17 00:00:00 2001
From: Tom Henderson
Date: Mon, 31 Jan 2022 10:00:36 -0800
Subject: [PATCH] wifi: (fixes #470) Update default Wi-Fi standard to 802.11ax
---
CHANGES.html | 1 +
RELEASE_NOTES.md | 3 ++
doc/tutorial/source/building-topologies.rst | 54 +++++++++++--------
examples/tutorial/third.cc | 12 ++---
examples/tutorial/third.py | 5 +-
examples/wireless/mixed-wired-wireless.cc | 1 -
examples/wireless/mixed-wired-wireless.py | 1 -
examples/wireless/wifi-80211e-txop.cc | 3 +-
examples/wireless/wifi-ap.cc | 1 -
examples/wireless/wifi-ap.py | 1 -
examples/wireless/wifi-blockack.cc | 5 +-
src/aodv/test/aodv-regression.cc | 1 +
src/aodv/test/bug-772.cc | 1 +
src/aodv/test/loopback.cc | 1 +
.../examples/wifi-olsr-flowmon.py | 1 -
src/netanim/examples/wireless-animation.cc | 1 -
.../ns3wifi/wifi-ac-mapping-test-suite.cc | 1 -
src/wifi/doc/source/wifi-design.rst | 4 +-
src/wifi/doc/source/wifi-user.rst | 2 +-
src/wifi/examples/wifi-phy-configuration.cc | 3 +-
src/wifi/helper/wifi-helper.cc | 4 +-
src/wifi/test/wifi-test.cc | 7 ++-
22 files changed, 60 insertions(+), 53 deletions(-)
diff --git a/CHANGES.html b/CHANGES.html
index 1fa7fa16e..7c3f8fc55 100644
--- a/CHANGES.html
+++ b/CHANGES.html
@@ -74,6 +74,7 @@ us a note on ns-developers mailing list.
Changed behavior:
+- Wi-Fi: The default Wi-Fi standard is changed from 802.11a to 802.11ax, and the default rate control is changed from ArfWifiManager to IdealWifiManager.
- Wi-Fi: EDCAFs (QosTxop objects) are no longer installed on non-QoS STAs and DCF (Txop object) is no longer installed on QoS STAs.
- Wi-Fi: Management frames (Probe Request/Response, Association Request/Response) are sent by QoS STAs according to the 802.11 specs.
- The Frequency, ChannelNumber, ChannelWidth and Primary20MHzIndex
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 0426f9e1b..9a4349b88 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -27,6 +27,9 @@ requirements (Note: not all ns-3 features are available on all systems):
### New user-visible features
- (spectrum) ThreeGppSpectrumPropagationLossModel and ThreeGppChannelModel now support multiple PhasedArrayModel instances per device. This feature can be used to implement MIMO.
+- (wifi) The default Wi-Fi standard has been upgraded from 802.11a to 802.11ax.
+- (wifi) The default Wi-Fi rate control has been changed from ArfWifiManager to IdealWifiManager.
+
### Bugs fixed
- (spectrum) Fix condition for channel matrix update in ThreeGppChannelModel (left and right operand were pointing to the same object)
diff --git a/doc/tutorial/source/building-topologies.rst b/doc/tutorial/source/building-topologies.rst
index 73e3cb835..770bdf5ba 100644
--- a/doc/tutorial/source/building-topologies.rst
+++ b/doc/tutorial/source/building-topologies.rst
@@ -958,41 +958,51 @@ wireless medium and can communicate and interfere:
phy.SetChannel (channel.Create ());
-Once the PHY helper is configured, we can focus on the MAC layer. Here we choose to
-work with non-Qos MACs. WifiMacHelper object is used to set MAC parameters.
+Once the PHY helper is configured, we can focus on the MAC layer. The
+WifiMacHelper object is used to set MAC parameters.
+The second statement below creates an 802.11 service set identifier (SSID)
+object that will be used to set the value of the "Ssid" ``Attribute`` of
+the MAC layer implementation.
+
+
+::
+
+ WifiMacHelper mac;
+ Ssid ssid = Ssid ("ns-3-ssid");
+
+WifiHelper will, by default, configure
+the standard in use to be 802.11ax (known commercially as Wi-Fi 6) and configure
+a compatible rate control algorithm (IdealWifiManager).
::
WifiHelper wifi;
- wifi.SetRemoteStationManager ("ns3::AarfWifiManager");
- WifiMacHelper mac;
-
-The ``SetRemoteStationManager`` method tells the helper the type of
-rate control algorithm to use. Here, it is asking the helper to use the AARF
-algorithm --- details are, of course, available in Doxygen.
-
-Next, we configure the type of MAC, the SSID of the infrastructure network we
-want to setup and make sure that our stations don't perform active probing:
+We are now ready to install Wi-Fi models on the nodes, using these four
+helper objects (YansWifiChannelHelper, YansWifiPhyHelper, WifiMacHelper,
+WifiHelper) and the Ssid object created above. These helpers have
+encapsulated a lot of default configuration,
+and can be further tailored using additional attribute configuration if
+desired. We also will create NetDevice containers to store pointers to
+the WifiNetDevice objects that the helper create.
::
- Ssid ssid = Ssid ("ns-3-ssid");
+ NetDeviceContainer staDevices
mac.SetType ("ns3::StaWifiMac",
"Ssid", SsidValue (ssid),
"ActiveProbing", BooleanValue (false));
-This code first creates an 802.11 service set identifier (SSID) object
-that will be used to set the value of the "Ssid" ``Attribute`` of
-the MAC layer implementation. The particular kind of MAC layer that
-will be created by the helper is specified by ``Attribute`` as
-being of the "ns3::StaWifiMac" type. "QosSupported" ``Attribute`` is
-set to false by default for ``WifiMacHelper`` objects. The combination
+In the above code, the specific kind of MAC layer that
+will be created by the helper is specified by the TypeId value
+of `ns3::StaWifiMac` type. The "QosSupported" attribute is
+set to true by default for ``WifiMacHelper`` objects when the standard
+is at least 802.11n or newer. The combination
of these two configurations means that the MAC instance next created
-will be a non-QoS non-AP station (STA) in an infrastructure BSS (i.e.,
+will be a QoS-aware, non-AP station (STA) in an infrastructure BSS (i.e.,
a BSS with an AP). Finally, the "ActiveProbing" ``Attribute`` is
set to false. This means that probe requests will not be sent by MACs
-created by this helper.
+created by this helper, and stations will listen for AP beacons.
Once all the station-specific parameters are fully configured, both at the
MAC and PHY layers, we can invoke our now-familiar ``Install`` method to
@@ -1015,9 +1025,7 @@ requirements of the AP.
In this case, the ``WifiMacHelper`` is going to create MAC
layers of the "ns3::ApWifiMac", the latter specifying that a MAC
-instance configured as an AP should be created. We do not change
-the default setting of "QosSupported" ``Attribute``, so it remains
-false - disabling 802.11e/WMM-style QoS support at created APs.
+instance configured as an AP should be created.
The next lines create the single AP which shares the same set of PHY-level
``Attributes`` (and channel) as the stations:
diff --git a/examples/tutorial/third.cc b/examples/tutorial/third.cc
index 75eb3e7db..1f3a1fd6e 100644
--- a/examples/tutorial/third.cc
+++ b/examples/tutorial/third.cc
@@ -99,22 +99,20 @@ main (int argc, char *argv[])
YansWifiPhyHelper phy;
phy.SetChannel (channel.Create ());
- WifiHelper wifi;
- wifi.SetRemoteStationManager ("ns3::AarfWifiManager");
-
WifiMacHelper mac;
Ssid ssid = Ssid ("ns-3-ssid");
+
+ WifiHelper wifi;
+
+ NetDeviceContainer staDevices;
mac.SetType ("ns3::StaWifiMac",
"Ssid", SsidValue (ssid),
"ActiveProbing", BooleanValue (false));
-
- NetDeviceContainer staDevices;
staDevices = wifi.Install (phy, mac, wifiStaNodes);
+ NetDeviceContainer apDevices;
mac.SetType ("ns3::ApWifiMac",
"Ssid", SsidValue (ssid));
-
- NetDeviceContainer apDevices;
apDevices = wifi.Install (phy, mac, wifiApNode);
MobilityHelper mobility;
diff --git a/examples/tutorial/third.py b/examples/tutorial/third.py
index 77bae2e0a..eba206bd7 100644
--- a/examples/tutorial/third.py
+++ b/examples/tutorial/third.py
@@ -93,12 +93,11 @@ channel = ns.wifi.YansWifiChannelHelper.Default()
phy = ns.wifi.YansWifiPhyHelper()
phy.SetChannel(channel.Create())
-wifi = ns.wifi.WifiHelper()
-wifi.SetRemoteStationManager("ns3::AarfWifiManager")
-
mac = ns.wifi.WifiMacHelper()
ssid = ns.wifi.Ssid ("ns-3-ssid")
+wifi = ns.wifi.WifiHelper()
+
mac.SetType ("ns3::StaWifiMac", "Ssid", ns.wifi.SsidValue(ssid), "ActiveProbing", ns.core.BooleanValue(False))
staDevices = wifi.Install(phy, mac, wifiStaNodes)
diff --git a/examples/wireless/mixed-wired-wireless.cc b/examples/wireless/mixed-wired-wireless.cc
index 866a6273b..daba0be13 100644
--- a/examples/wireless/mixed-wired-wireless.cc
+++ b/examples/wireless/mixed-wired-wireless.cc
@@ -295,7 +295,6 @@ main (int argc, char *argv[])
ss << i;
ssidString += ss.str ();
Ssid ssid = Ssid (ssidString);
- wifiInfra.SetRemoteStationManager ("ns3::ArfWifiManager");
// setup stas
macInfra.SetType ("ns3::StaWifiMac",
"Ssid", SsidValue (ssid));
diff --git a/examples/wireless/mixed-wired-wireless.py b/examples/wireless/mixed-wired-wireless.py
index dc902c20e..cffe740f8 100644
--- a/examples/wireless/mixed-wired-wireless.py
+++ b/examples/wireless/mixed-wired-wireless.py
@@ -260,7 +260,6 @@ def main(argv):
ssid = ns.wifi.Ssid('wifi-infra' + str(i))
wifiInfra = ns.wifi.WifiHelper()
wifiPhy.SetChannel(wifiChannel.Create())
- wifiInfra.SetRemoteStationManager('ns3::ArfWifiManager')
macInfra = ns.wifi.WifiMacHelper();
macInfra.SetType("ns3::StaWifiMac",
"Ssid", ns.wifi.SsidValue(ssid))
diff --git a/examples/wireless/wifi-80211e-txop.cc b/examples/wireless/wifi-80211e-txop.cc
index 498b6e925..e4c4d2262 100644
--- a/examples/wireless/wifi-80211e-txop.cc
+++ b/examples/wireless/wifi-80211e-txop.cc
@@ -115,7 +115,8 @@ int main (int argc, char *argv[])
phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
phy.SetChannel (channel.Create ());
- WifiHelper wifi; //the default standard of 802.11a will be selected by this helper since the program doesn't specify another one
+ WifiHelper wifi;
+ wifi.SetStandard (WIFI_STANDARD_80211a);
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
WifiMacHelper mac;
diff --git a/examples/wireless/wifi-ap.cc b/examples/wireless/wifi-ap.cc
index 3df8538f8..4cf0a7f28 100644
--- a/examples/wireless/wifi-ap.cc
+++ b/examples/wireless/wifi-ap.cc
@@ -140,7 +140,6 @@ int main (int argc, char *argv[])
YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
wifiPhy.SetChannel (wifiChannel.Create ());
Ssid ssid = Ssid ("wifi-default");
- wifi.SetRemoteStationManager ("ns3::ArfWifiManager");
// setup stas.
wifiMac.SetType ("ns3::StaWifiMac",
"ActiveProbing", BooleanValue (true),
diff --git a/examples/wireless/wifi-ap.py b/examples/wireless/wifi-ap.py
index 17d37af10..d2fc7f662 100644
--- a/examples/wireless/wifi-ap.py
+++ b/examples/wireless/wifi-ap.py
@@ -118,7 +118,6 @@ def main(argv):
wifiPhy.SetChannel(wifiChannel.Create())
ssid = ns.wifi.Ssid("wifi-default")
- wifi.SetRemoteStationManager("ns3::ArfWifiManager")
wifiMac = ns.wifi.WifiMacHelper()
# setup stas.
diff --git a/examples/wireless/wifi-blockack.cc b/examples/wireless/wifi-blockack.cc
index 4cc9153ab..9cffb5011 100644
--- a/examples/wireless/wifi-blockack.cc
+++ b/examples/wireless/wifi-blockack.cc
@@ -19,7 +19,7 @@
*/
/**
- * This is a simple example in order to show how 802.11e compressed block ack mechanism could be used.
+ * This is a simple example in order to show how 802.11n compressed block ack mechanism could be used.
*
* Network topology:
*
@@ -78,9 +78,10 @@ int main (int argc, char * argv[])
phy.SetChannel (channel.Create ());
WifiHelper wifi;
+ wifi.SetStandard (WIFI_STANDARD_80211n);
WifiMacHelper mac;
/* disable fragmentation */
- wifi.SetRemoteStationManager ("ns3::AarfWifiManager", "FragmentationThreshold", UintegerValue (2500));
+ wifi.SetRemoteStationManager ("ns3::IdealWifiManager", "FragmentationThreshold", UintegerValue (2500));
Ssid ssid ("My-network");
diff --git a/src/aodv/test/aodv-regression.cc b/src/aodv/test/aodv-regression.cc
index 130ffba89..3e50ebc8d 100644
--- a/src/aodv/test/aodv-regression.cc
+++ b/src/aodv/test/aodv-regression.cc
@@ -173,6 +173,7 @@ ChainRegressionTest::CreateDevices ()
// This test suite output was originally based on YansErrorRateModel
wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel");
WifiHelper wifi;
+ wifi.SetStandard (WIFI_STANDARD_80211a);
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode", StringValue ("OfdmRate6Mbps"), "RtsCtsThreshold", StringValue ("2200"));
NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, *m_nodes);
diff --git a/src/aodv/test/bug-772.cc b/src/aodv/test/bug-772.cc
index 72ee3c994..27a18d30f 100644
--- a/src/aodv/test/bug-772.cc
+++ b/src/aodv/test/bug-772.cc
@@ -136,6 +136,7 @@ Bug772ChainTest::CreateDevices ()
wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
wifiPhy.Set ("RxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
WifiHelper wifi;
+ wifi.SetStandard (WIFI_STANDARD_80211a);
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode", StringValue ("OfdmRate6Mbps"), "RtsCtsThreshold", StringValue ("2200"), "MaxSlrc", UintegerValue (7));
NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, *m_nodes);
diff --git a/src/aodv/test/loopback.cc b/src/aodv/test/loopback.cc
index 3182274e7..096ba4f8c 100644
--- a/src/aodv/test/loopback.cc
+++ b/src/aodv/test/loopback.cc
@@ -134,6 +134,7 @@ LoopbackTestCase::DoRun ()
YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
wifiPhy.SetChannel (wifiChannel.Create ());
WifiHelper wifi;
+ wifi.SetStandard (WIFI_STANDARD_80211a);
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode", StringValue ("OfdmRate6Mbps"), "RtsCtsThreshold", StringValue ("2200"));
NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, nodes);
diff --git a/src/flow-monitor/examples/wifi-olsr-flowmon.py b/src/flow-monitor/examples/wifi-olsr-flowmon.py
index 743cb4831..e3a6102c0 100644
--- a/src/flow-monitor/examples/wifi-olsr-flowmon.py
+++ b/src/flow-monitor/examples/wifi-olsr-flowmon.py
@@ -56,7 +56,6 @@ def main(argv):
wifiChannel = ns.wifi.YansWifiChannelHelper.Default()
wifiPhy.SetChannel(wifiChannel.Create())
ssid = ns.wifi.Ssid("wifi-default")
- wifi.SetRemoteStationManager("ns3::ArfWifiManager")
wifiMac.SetType ("ns3::AdhocWifiMac",
"Ssid", ns.wifi.SsidValue(ssid))
diff --git a/src/netanim/examples/wireless-animation.cc b/src/netanim/examples/wireless-animation.cc
index b54b02e54..ef015bb64 100644
--- a/src/netanim/examples/wireless-animation.cc
+++ b/src/netanim/examples/wireless-animation.cc
@@ -55,7 +55,6 @@ main (int argc, char *argv[])
phy.SetChannel (channel.Create ());
WifiHelper wifi;
- wifi.SetRemoteStationManager ("ns3::AarfWifiManager");
WifiMacHelper mac;
Ssid ssid = Ssid ("ns-3-ssid");
diff --git a/src/test/ns3wifi/wifi-ac-mapping-test-suite.cc b/src/test/ns3wifi/wifi-ac-mapping-test-suite.cc
index b94fd94e1..5495172c5 100644
--- a/src/test/ns3wifi/wifi-ac-mapping-test-suite.cc
+++ b/src/test/ns3wifi/wifi-ac-mapping-test-suite.cc
@@ -136,7 +136,6 @@ WifiAcMappingTest::DoRun (void)
wifiPhy.SetChannel (wifiChannel.Create ());
Ssid ssid = Ssid ("wifi-ac-mapping");
- wifi.SetRemoteStationManager ("ns3::ArfWifiManager");
// Setup the AP, which will be the source of traffic for this test
NodeContainer ap;
diff --git a/src/wifi/doc/source/wifi-design.rst b/src/wifi/doc/source/wifi-design.rst
index ee1db0582..555134c86 100644
--- a/src/wifi/doc/source/wifi-design.rst
+++ b/src/wifi/doc/source/wifi-design.rst
@@ -1026,7 +1026,7 @@ The following rate control algorithms can be used by the MAC low layer:
Algorithms found in real devices:
-* ``ArfWifiManager`` (default for ``WifiHelper``)
+* ``ArfWifiManager``
* ``OnoeWifiManager``
* ``ConstantRateWifiManager``
* ``MinstrelWifiManager``
@@ -1034,7 +1034,7 @@ Algorithms found in real devices:
Algorithms in literature:
-* ``IdealWifiManager``
+* ``IdealWifiManager`` (default for ``WifiHelper``)
* ``AarfWifiManager`` [lacage2004aarfamrr]_
* ``AmrrWifiManager`` [lacage2004aarfamrr]_
* ``CaraWifiManager`` [kim2006cara]_
diff --git a/src/wifi/doc/source/wifi-user.rst b/src/wifi/doc/source/wifi-user.rst
index d4147bee1..58e6f906d 100644
--- a/src/wifi/doc/source/wifi-user.rst
+++ b/src/wifi/doc/source/wifi-user.rst
@@ -274,7 +274,7 @@ The following values for WifiStandard are defined in
WIFI_STANDARD_80211ax
By default, the WifiHelper (the typical use case for WifiPhy creation) will
-configure the WIFI_STANDARD_80211a standard by default. Other values
+configure the WIFI_STANDARD_80211ax standard by default. Other values
for standards should be passed explicitly to the WifiHelper object.
If user has not already configured ChannelSettings when SetStandard is called,
diff --git a/src/wifi/examples/wifi-phy-configuration.cc b/src/wifi/examples/wifi-phy-configuration.cc
index 472cd039d..930e5e3ed 100644
--- a/src/wifi/examples/wifi-phy-configuration.cc
+++ b/src/wifi/examples/wifi-phy-configuration.cc
@@ -112,7 +112,7 @@ int main (int argc, char *argv[])
// i.e. without further channel number/width/frequency configuration
case 1:
- // By default, WifiHelper will use WIFI_STANDARD_80211a
+ wifi.SetStandard (WIFI_STANDARD_80211a);
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
phySta = GetYansWifiPhyPtr (staDevice);
@@ -179,6 +179,7 @@ int main (int argc, char *argv[])
PrintAttributesIfEnabled (printAttributes);
break;
case 7:
+ // By default, WifiHelper will use WIFI_STANDARD_80211ax
wifi.SetStandard (WIFI_STANDARD_80211ax);
phy.Set ("ChannelSettings", StringValue ("{0, 0, BAND_2_4GHZ, 0}"));
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
diff --git a/src/wifi/helper/wifi-helper.cc b/src/wifi/helper/wifi-helper.cc
index 1a0f42bca..5ab8148e8 100644
--- a/src/wifi/helper/wifi-helper.cc
+++ b/src/wifi/helper/wifi-helper.cc
@@ -712,11 +712,11 @@ WifiHelper::~WifiHelper ()
}
WifiHelper::WifiHelper ()
- : m_standard (WIFI_STANDARD_80211a),
+ : m_standard (WIFI_STANDARD_80211ax),
m_selectQueueCallback (&SelectQueueByDSField),
m_enableFlowControl (true)
{
- SetRemoteStationManager ("ns3::ArfWifiManager");
+ SetRemoteStationManager ("ns3::IdealWifiManager");
}
void
diff --git a/src/wifi/test/wifi-test.cc b/src/wifi/test/wifi-test.cc
index 9f9d21629..0a38ca92d 100644
--- a/src/wifi/test/wifi-test.cc
+++ b/src/wifi/test/wifi-test.cc
@@ -954,7 +954,8 @@ SetChannelFrequencyTest::DoRun ()
{
// case 1:
WifiHelper wifi;
- // By default, WifiHelper will use WIFI_PHY_STANDARD_80211a
+ wifi.SetStandard (WIFI_STANDARD_80211a);
+ wifi.SetRemoteStationManager ("ns3::ArfWifiManager");
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
phySta = GetYansWifiPhyPtr (staDevice);
// We expect channel 36, width 20, frequency 5180
@@ -1021,9 +1022,9 @@ SetChannelFrequencyTest::DoRun ()
}
{
// case 7:
+ // By default, WifiHelper will use WIFI_PHY_STANDARD_80211ax
WifiHelper wifi;
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
- wifi.SetStandard (WIFI_STANDARD_80211ax);
phy.Set ("ChannelSettings", StringValue ("{0, 0, BAND_2_4GHZ, 0}"));
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
phySta = GetYansWifiPhyPtr (staDevice);
@@ -1036,7 +1037,6 @@ SetChannelFrequencyTest::DoRun ()
// case 8:
WifiHelper wifi;
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
- wifi.SetStandard (WIFI_STANDARD_80211ax);
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
phySta = GetYansWifiPhyPtr (staDevice);
NS_TEST_ASSERT_MSG_EQ (phySta->GetChannelNumber (), 42, "802.11ax-5GHz configuration");
@@ -1047,7 +1047,6 @@ SetChannelFrequencyTest::DoRun ()
// case 9:
WifiHelper wifi;
wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
- wifi.SetStandard (WIFI_STANDARD_80211ax);
phy.Set ("ChannelSettings", StringValue ("{0, 0, BAND_6GHZ, 0}"));
staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
phySta = GetYansWifiPhyPtr (staDevice);