The step-by-step procedure for building a simple wireless LAN
In this section, we are going to learn how to set up a simple wireless LAN with 1 Wi-Fi AP and 20 Wi-Fi STAs by doing the following:
- Set the Wi-Fi standard as 802.11ac.
- Set up a Wi-Fi AP with the SSID
Packt
. - Set up 20 Wi-Fi STAs.
- Randomly place the 20 Wi-Fi STAs around the AP within a radius of 30 meters.
- Allow all STAs to move around the AP.
- Test the connectivity between all STAs and the AP.
- Test the link speed between an STA and the AP.
Let’s write the following code snippets in simple_wifi_lan.cc
to simulate a simple wireless LAN.
First import all the necessary ns-3 packages:
#include "ns3/core-module.h" #include "ns3/yans-wifi-helper.h" #include "ns3/yans-wifi-channel.h" #include "ns3/ssid.h" #include "ns3/mobility-helper.h" #include "ns3/internet-module.h" #include "ns3/internet-apps-module.h" #include...