Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
ns-3 for WiFi
Venkatesh RamaiyanDepartment of Electrical Engineering
IIT Madras, Chennai
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 1 / 21
Outline
Simulators for WiFi
ns-3 for WiFi
An example program
ns-3 for WiFi research
References
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 2 / 21
WiFi Networks
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 3 / 21
WiFi Networks
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 3 / 21
WiFi Networks
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 3 / 21
Network Design, Operation and Management
Does your WiFi work?
coverage (AP placement, transmit power, etc)dynamic interference (co-channel interference, hidden nodes, non-WiFiinterference, etc)unfair channel access (random access, asymmetric traffic, etc)client/AP software and hardware (user association, processor, etc)
Good practices
planned deployment of access points (user density, coverage, etc)adaptive RRM (channel selection, transmit power control, userassociation, etc)bandwidth manager (based on traffic, client, QoS, fairness, etc)robust and learning algorithms
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 4 / 21
Network Design, Operation and Management
Does your WiFi work?
coverage (AP placement, transmit power, etc)dynamic interference (co-channel interference, hidden nodes, non-WiFiinterference, etc)unfair channel access (random access, asymmetric traffic, etc)client/AP software and hardware (user association, processor, etc)
Good practices
planned deployment of access points (user density, coverage, etc)adaptive RRM (channel selection, transmit power control, userassociation, etc)bandwidth manager (based on traffic, client, QoS, fairness, etc)robust and learning algorithms
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 4 / 21
Network Design, Operation and Management
Design parameters
number and location of APschannel of operationtransmit powertraffic and client load balancingscheduler and QoS provisioning
Challenges
interference from other networksheterogeneous support for standardsdynamic client and traffic profileheterogeneous algorithmsminimise cost of deployment, operation and maintenance
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 5 / 21
Network Design, Operation and Management
Design parameters
number and location of APschannel of operationtransmit powertraffic and client load balancingscheduler and QoS provisioning
Challenges
interference from other networksheterogeneous support for standardsdynamic client and traffic profileheterogeneous algorithmsminimise cost of deployment, operation and maintenance
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 5 / 21
Experiments, Analysis and Simulations
Experiments
specific viewcostlydifficult to replicateeasy to interpret
Analysis
generic viewcosts lesseasy to replicatedifficult to interpretation
Simulations
intermediate viewcosts lesseasy to replicateeasy to interpret
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 6 / 21
Experiments, Analysis and Simulations
Experiments
specific viewcostlydifficult to replicateeasy to interpret
Analysis
generic viewcosts lesseasy to replicatedifficult to interpretation
Simulations
intermediate viewcosts lesseasy to replicateeasy to interpret
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 6 / 21
Experiments, Analysis and Simulations
Experiments
specific viewcostlydifficult to replicateeasy to interpret
Analysis
generic viewcosts lesseasy to replicatedifficult to interpretation
Simulations
intermediate viewcosts lesseasy to replicateeasy to interpret
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 6 / 21
What simulators can do?
Validate network deployment
coverage and capacity in various zones
Performance evaluation for real-life scenarios
with thousands of devicessupport for heterogeneous standards and algorithmsfor dynamic traffic and mobility conditions
Test bed for new standards, applications and algorithms
Replicate deployment scenarios
an effective tool to debug errors and monitor network conditions
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 7 / 21
Network Simulator ns-3
ns-31 is a discrete event network simulator
C++ libraries with Python bindings
ns-3 is an open, extensible network simulation platform
free software licensed under the GNU GPLv2 licenseavailable for research, development and use
Supports WiFi among other protocols
application, transport, network, MAC/PHYpopular modules are FTP, TCP/UDP, IP, WiFi, LTE, LR-WPAN etcsupport for mobility, channel, real-time scheduling, etc
ns-3 supported by a large community of users and developers
1https://www.nsnam.orgVenkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 8 / 21
WiFi in ns-3
Basic DCF with infrastructure and ad hoc modes
Support for 802.11a, 802.11b, 802.11g, 802.11n and 802.11ac
both 2.4GHz and 5GHz
MSDU and MPDU aggregation
QoS based EDCA and queueing extensions of 802.11e
Support for different channel models
Rate control algorithms such as Aarf, Arf, Minstrel, etc
Support for mesh and WAVE
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 9 / 21
WiFi Network Device Architecture in ns-3
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 10 / 21
An example program - a-simple-infrastructure-wlan.cc (1)
Include librariesinclude ”ns3/core-module.h”include ”ns3/network-module.h”include ”ns3/olsr-helper.h”include ”ns3/wifi-module.h”include ”ns3/applications-module.h”include ”ns3/mobility-module.h”
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 11 / 21
An example program - a-simple-infrastructure-wlan.cc (2)
Configuration: Server —–(p2p link)—– AP —–(11n link)—– Wifi Clients//Create nodesNodeContainer ServerNode;ServerNode.Create(1);NodeContainer wifiApNode;wifiApNode.Create(1);
//Create p2p linksNodeContainer n0n1 = NodeContainer (ServerNode.Get(0),wifiApNode.Get(0));PointToPointHelper p2p;p2p.SetDeviceAttribute (”DataRate”, StringValue (”1Gbps”));p2p.SetChannelAttribute (”Delay”, StringValue (”1ms”));NetDeviceContainer d0d1 = p2p.Install (n0n1);
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 12 / 21
An example program - a-simple-infrastructure-wlan.cc (2)
Configuration: Server —–(p2p link)—– AP —–(11n link)—– Wifi Clients//Create nodesNodeContainer ServerNode;ServerNode.Create(1);NodeContainer wifiApNode;wifiApNode.Create(1);
//Create p2p linksNodeContainer n0n1 = NodeContainer (ServerNode.Get(0),wifiApNode.Get(0));PointToPointHelper p2p;p2p.SetDeviceAttribute (”DataRate”, StringValue (”1Gbps”));p2p.SetChannelAttribute (”Delay”, StringValue (”1ms”));NetDeviceContainer d0d1 = p2p.Install (n0n1);
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 12 / 21
An example program - a-simple-infrastructure-wlan.cc (3)
To set the standard as 80211nwifi.SetStandard (WIFI PHY STANDARD 80211n 5GHZ);
YansWifiChannelHelper channel;channel.SetPropagationDelay(”ns3::ConstantSpeedPropagationDelayModel”);channel.AddPropagationLoss (”ns3::FriisPropagationLossModel”);
phy.Set(”CcaMode1Threshold”,DoubleValue(-82));phy.Set(”TxPowerEnd”,DoubleValue(18));phy.Set(”TxPowerStart”,DoubleValue(18));
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 13 / 21
An example program - a-simple-infrastructure-wlan.cc (4)
//Install net device containers in the AP and station wifi nodesmac.SetType (”ns3::StaWifiMac”, ”ActiveProbing”, BooleanValue (false),”QosSupported”, BooleanValue(true));NetDeviceContainer staDevice;staDevice = wifi.Install (phy, mac, wifiStaNode);
mac.SetType (”ns3::ApWifiMac”, ”BeaconInterval”, TimeValue(MicroSeconds(102400)), ”BeaconGeneration”, BooleanValue (true),”QosSupported”, BooleanValue(true));NetDeviceContainer apDevice;apDevice = wifi.Install (phy, mac, wifiApNode);
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 14 / 21
An example program - a-simple-infrastructure-wlan.cc (5)
ON-OFF applicationonoff.SetAttribute (”OnTime”, StringValue(”ns3::ConstantRandomVariable[Constant=1]”));
onoff.SetAttribute (”OffTime”, StringValue(”ns3::ConstantRandomVariable[Constant=0]”));
onoff.SetConstantRate (ns3::DataRate (”33Mb/s”));onoff.SetAttribute (”PacketSize”, UintegerValue (payloadSize));source.Add(onoff.Install(ServerNode.Get(0)));
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 15 / 21
Scenario 1: Local and Internet Traffic
0
2
4
6
8
10
12
5 10 15 20 25
Thro
ug
hp
ut(
Mb
ps)
Time
Internet Server's client 1Internet Server's client 2
Local Server's client 1Local Server's client 2
TCP downlinks from local and Internet servertraffic from the Internet starvesWi-Fi is the bottleneck and MAC buffer overflowsTCP with better access dominates
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 16 / 21
Scenario 1: Local and Internet Traffic
0
2
4
6
8
10
12
5 10 15 20 25
Thro
ug
hp
ut(
Mb
ps)
Time
Internet Server's client 1Internet Server's client 2
Local Server's client 1Local Server's client 2
2.2
2.4
2.6
2.8
5 10 15 20 25
Thro
ug
hp
ut(
Mb
ps)
Time
Local Server's client 1Local Server's client 2
Internet Server's client 1Internet Server's client 2
TCP downlinks from local and Internet server
WFQ with equal weight shares bandwidth equally
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 17 / 21
Scenario 2: Asymmetry with Direction of Flow
0
1
2
3
4
5
6
7
8
5 10 15 20 25
Thro
ug
hp
ut(
Mb
ps)
Time
Downlink client 1Downlink client 2
Uplink client 1Uplink client 2
TCP downlinks and uplinks (identical large file transfers)aggregate throughput of downlink flows is almost zeroWi-Fi is the bottleneck and MAC buffer overflowsthroughput is unfair due to asymmetric response of TCP
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 18 / 21
Scenario 2: Asymmetry with Direction of Flow
0
1
2
3
4
5
6
7
8
5 10 15 20 25
Thro
ug
hp
ut(
Mb
ps)
Time
Downlink client 1Downlink client 2
Uplink client 1Uplink client 2
0
1
2
3
4
5
6
5 10 15 20 25
Thro
ug
hp
ut(
Mb
ps)
Time
Downlink client 1Downlink client 2
Uplink client 1Uplink client 2
TCP downlinks and uplinks (identical large file transfers)
WFQ with adjusted weights provide equal share of bandwidth!
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 19 / 21
Scenario 3: Device Limitations
0
2
4
6
8
10
12
5 10 15 20 25
Thro
ug
hp
ut(
Mb
ps)
Time
TCP Max Advertised Window Size=8000BytesTCP Max Advertised Window Size=8000Bytes
TCP Max Advertised Window Size=65536BytesTCP Max Advertised Window Size=65536Bytes
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
5 10 15 20 25
Thro
ug
hp
ut(
Mb
ps)
Time
TCP Max Advertised Window Size=8000BytesTCP Max Advertised Window Size=8000Bytes
TCP Max Advertised Window Size=65536BytesTCP Max Advertised Window Size=65536Bytes
TCP downlinks (identical large file transfers)
average throughput is limited by the TCP max advertised windowWFQ with equal weights ensures fair channel access
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 20 / 21
Opportunities
Performance evaluation for network scenarios of interest
Contribute latest standards and algorithms to ns-3
Develop novel algorithms (or) identify critical scenarios
Develop new use cases
Prakash Agrawal and Mythili Vutukuru, “Trace based application layermodelling in ns-3”, NCC 2016, available from ns-3.26LTE/WiFi networks
Venkatesh RamaiyanDepartment of Electrical EngineeringIIT Madras, Chennai (IIT Madras, Chennai)ns-3 for WiFi 27 August 2016 21 / 21