dccn 2016 - tutorial 2 - 4g for smartgrid ecosystem
TRANSCRIPT
Introduction NS-3 Tutorial C4 Conclusion
DCCN Tutorial C4: Implementation of 4Gcellular communication within the SmartGrid
ecosystem
Pavel Masek, Jiri Hosek
Brno University of Technology,Faculty of Electrical Engineering and Communication,
Department of Telecommunication.
[email protected], [email protected]
November 24, 2016
Introduction NS-3 Tutorial C4 Conclusion
WISLAB Research Group – http://www.wislab.cz
WISLAB - Wireless System Laboratory of Brno
Coordinated by Dr. HosekExperienced researchers and MSc. / Ph.D.students
Working with the up-to-date equipment
Nowadays, focused mainly on the IoT domainCommunication in 4G / 5G mobile networks
Intel US, Huawei, AT&T, TUT, IITIS, PFUR, SUAI
SmartHome Gateway
Telekom Austria Group
Wearables
Augmented reality, smart glasses
MTC Communication in NS-3
Member of well-known alliances AllSeen Alliance or HGi
Contributor to 3GPP standards and recommendations
Introduction NS-3 Tutorial C4 Conclusion
DCCN Tutorials: Agenda
Tutorial #1 [Wed 23.11.16] - Communication betweendevices within LAN/WLAN networks
Tutorial #2 [Thu 24.11.16] - Implementation of 4Gcellular communication within the SmartGridecosystem
Tutorial #3 [Fri 24.11.16] - Implementation of QoSmechanisms for Device-to-Device (D2D) communicationbetween mobile devices
Main goal
From basic network topology to advanced communicationmechanisms used in today’s IoT/M2M scenarios – utilizingNetwork Simulator 3 (NS-3) tool for timely use-cases
Introduction NS-3 Tutorial C4 Conclusion
Network Simulator 3 (NS-3) – https://www.nsnam.org
NS-3 is written in C++, with bindings available forPython
Simulation programs are C++ executables or Pythonprograms
NS-3 is a GNU GPLv2 licensed project
Mainly supported fro Linux/Unix, MacOS, and FreeBSD
Currently, port to Visual Studio is available
No backwards compatibility with NS-2
In comparison with other network simulators, oriented tocommand-line and Unix (no IDE provided instandard NS-3 framework)
Introduction NS-3 Tutorial C4 Conclusion
NS-3 Simulation Basics
Simulation time advances in discrete jumps from eventto event
C++ functions schedule events to occur at specificsimulation times
Several supporting libraries, not system-installed, can be inparallel to NS-3 (netAnim, pybindgen, etc.)
A simulation scheduler orders the event execution
Simulation::Run() gets it all started
Simulation stops at specific time or when events end
Introduction NS-3 Tutorial C4 Conclusion
Motivation – Why to Use NS-3?
You want to study network performance or protocoloperation in a controllable or scalable environment
You are comfortable writing C++ or Python code, andcombining NS-3 with other code
You like the idea of working on an active open sourceproject
NS-3 has the models you are looking for, or you canprovide / integrate what is missing
Well-known projects
LENA (LTE-EPC Network Simulator)DCE (Direct Code Execution)
Introduction NS-3 Tutorial C4 Conclusion
Created Virtual Machine for Development
Created as a VMware virtual machine (possible to runvia VMware Workstation/Player or VirtualBox)
Based on Ubuntu 14.04 LTS 32bit (Long Term Support)Possible to make ”Snapshoots”
Already pre-configured
Eclipse environment bounded with NS-3 (no need todevelop straightforward from the command line; possible touse advanced debugger)Visualization tools: NetAnim, FlowMonitor, PythonvisualizerTracing: Wireshark, trace files in NS-3, routing tables, etc.
As the utilized version, NS-3.23 was chosen – verifiedfunctionality, stable, already contains new syntax
Introduction NS-3 Tutorial C4 Conclusion
Created Virtual Machine for Development
Created as a VMware virtual machine (possible to runvia VMware Workstation/Player or VirtualBox)
Based on Ubuntu 14.04 LTS 32bit (Long Term Support)Possible to make ”Snapshoots”
Already pre-configured
Eclipse environment bounded with NS-3 (no need todevelop straightforward from the command line; possible touse advanced debugger)Visualization tools: NetAnim, FlowMonitor, PythonvisualizerTracing: Wireshark, trace files in NS-3, routing tables, etc.
As the utilized version, NS-3.23 was chosen – verifiedfunctionality, stable, already contains new syntax
Introduction NS-3 Tutorial C4 Conclusion
Network Scenario
MME
SGW/PGWeNodeB
Remote host
UEs
Sensors
EPC model
LTE model
Devices using the IEEE 802.11g/ah
Devices using the Wireless M-Bus
MTCG
LTE Channel
1.0.0.0/247.0.0.0/24WN(1)
* **
MTCG
Wi-Fi 10.3.0.0/24
WN(0) WN(9)
*
xWiFi devices
SGW/PGW
remoteHost
Internet
Introduction NS-3 Tutorial C4 Conclusion
LENA
An open source LTE/EPC Network Simulator:
DL & UL Schedulers
Radio Resource Management Algorithms
Inter-cell interference coordination solutions
Load Balancing and Mobility Management
Heterogeneous Network (HetNets)solutions
End-to-end QoE provisioning
Multi-RAT network solutions
Cognitive LTE systems
Introduction NS-3 Tutorial C4 Conclusion
Tasks
1 Check structure of given code, understand to topologyhelpers, containers, nodes, etc.
2 Run the prepared simulation scenario
3 View *.xml output files via netAnim, explore tracing*.pcap files using Wireshark
4 Try to change provided code (rebuild the scenario) andcheck the output files (e.g., change positions of creatednodes, update data flows, etc.)
Introduction NS-3 Tutorial C4 Conclusion
T1: LTE + EPC Implementation
LTE-A implementation of both the User Equipment (UE)and the enhanced NodeB (eNB) devices
RRC entities for both the UE and the eNB
Ptr <LteHelper > lteHelper = CreateObject <LteHelper > ();
// ------------------------------
Ptr <PointToPointEpcHelper > epcHelper = CreateObject <
PointToPointEpcHelper > ();
lteHelper ->SetEpcHelper (epcHelper);
// ------------------------------
ConfigStore inputConfig;
inputConfig.ConfigureDefaults ();
// ------------------------------
Ptr <Node > pgw = epcHelper ->GetPgwNode ();
AnimationInterface :: SetConstantPosition (pgw , 20, 10);
Introduction NS-3 Tutorial C4 Conclusion
T1: Remote Host Declaration 1/2
End node within the communication structure (databaseserver, data analysis, etc.)
Data from PGW to RemoteHost sent via the publicnetwork (Internet)
NodeContainer remoteHostContainer;
remoteHostContainer.Create (1);
// ------------------------------
Ptr <Node > remoteHost = remoteHostContainer.Get (0);
AnimationInterface :: SetConstantPosition (remoteHost ,
20, 20);
// ------------------------------
InternetStackHelper internet;
internet.Install (remoteHostContainer);
Introduction NS-3 Tutorial C4 Conclusion
T1: Remote Host Declaration 2/2
PointToPointHelper p2ph;
p2ph.SetDeviceAttribute ("DataRate", DataRateValue (
DataRate ("100Gb/s")));
p2ph.SetDeviceAttribute ("Mtu", UintegerValue (1500));
p2ph.SetChannelAttribute ("Delay", TimeValue (Seconds
(0.010)));
NetDeviceContainer internetDevices = p2ph.Install (pgw
, remoteHost);
Ipv4AddressHelper ipv4h;
ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign
(internetDevices);
// interface 0 is localhost , 1 is the p2p device
Ipv4Address remoteHostAddr = internetIpIfaces.
GetAddress (1);
Introduction NS-3 Tutorial C4 Conclusion
T1: On/Off Application 1/2
Traffic generator follows an On/Off pattern. The durationof each of these states is determined with the onTime andthe offTime random variables.During the ”Off” state, no traffic is generated. During the”On” state, CBR traffic is generated. This CBR trafficis characterized by the specified ”data rate” and ”packetsize”.
OnOffHelper WIFIClientSta1 ("ns3:: UdpSocketFactory",
Address(InetSocketAddress(remoteHostAddr , 8)));
WIFIClientSta1.SetAttribute ("OnTime",StringValue("ns3
:: ConstantRandomVariable[Constant =1]"));
WIFIClientSta1.SetAttribute ("OffTime",StringValue("
ns3:: ConstantRandomVariable[Constant =0]"));
WIFIClientSta1.SetAttribute ("PacketSize", StringValue
("500"));
WIFIClientSta1.SetAttribute ("DataRate", StringValue (
"0.03Mb/s"));
Introduction NS-3 Tutorial C4 Conclusion
T1: On/Off Application 2/2
Possible to use TCP or UDP Transport layer protocols
ApplicationContainer sourceAppSta1;
sourceAppSta1 = WIFIClientSta1.Install (wifiStaNodes.
Get (1));
sourceAppSta1.Start (Seconds (0.5));
sourceAppSta1.Stop (Seconds (simTime));
PacketSinkHelper sinkSta1 ("ns3:: UdpSocketFactory",
InetSocketAddress (Ipv4Address :: GetAny (), 8));
ApplicationContainer sinkAppSta1 = sinkSta1.Install(
remoteHost);
sinkAppSta1.Start (Seconds (0.5));
sinkAppSta1.Stop (Seconds (simTime));
Introduction NS-3 Tutorial C4 Conclusion
T3: NetAnim Visualization 1/3
Open file: ltenetanim.xml
Introduction NS-3 Tutorial C4 Conclusion
T3: NetAnim Visualization 1/3
Introduction NS-3 Tutorial C4 Conclusion
T3: NetAnim Visualization 3/3
Introduction NS-3 Tutorial C4 Conclusion
T3: FlowMonitor Console Output
Uses probes, installed in network nodes, to track thepackets exchanged by the nodes, and it will measure anumber of parameters
Packets are divided according to the flow they belong to,where each flow is defined according to the probe’scharacteristics
Flow ID: 5 Src Addr 10.3.0.5 Dst Addr 1.0.0.2
Tx Packets = 33
Tx Bytes = 17424
Rx Packets = 33
Rx Bytes = 18744
Throughput: 33.729 Kb/s
Delay Sum = 1766ms
Delay = 53ms
Jitter = +34780416.0 ns
Lost Packets = 0
Introduction NS-3 Tutorial C4 Conclusion
T3: Tracing file wifi+lte nodes-3-2.pcap
Open the wifi+lte nodes-3-2.pcap file using Wireshark
Check transmitted data and used destination port (SIP)
Introduction NS-3 Tutorial C4 Conclusion
Final Conclusion
LTE+EPC model with the MTCG node implemented
Utilized topology for today’s aggregation scenarios withinSmartGrid infrastructure
FlowMonitor module used to measure the networkperformance
Each flow is defined according to the probe’s characteristics
NetAnim – offline animator based on the Qt toolkit (usesXML trace file collected during simulation)
Next time: Tutorial C6
Implementation of QoS mechanisms for Device-to-Device (D2D)communication between mobile devices
Introduction NS-3 Tutorial C4 Conclusion
Thank you for your attention.
Pavel Masek, Jiri Hosek
[email protected], [email protected]
Brno University of Technology,Faculty of Electrical Engineering and Communication,
Department of Telecommunication.