SlideShare a Scribd company logo
1 of 24
Download to read offline
Introduction NS-3 Tutorial C2 Conclusion
DCCN Tutorial C2: Communication Between
Devices Within LAN/WLAN Networks
Pavel Masek, Jiri Hosek
Brno University of Technology,
Faculty of Electrical Engineering and Communication,
Department of Telecommunication.
masekpavel@feec.vutbr.cz, hosek@feec.vutbr.cz
November 23, 2016
Introduction NS-3 Tutorial C2 Conclusion
WISLAB Research Group – http://www.wislab.cz
WISLAB - Wireless System Laboratory of Brno
Coordinated by Dr. Hosek
Experienced researchers and MSc. / Ph.D.
students
Working with the up-to-date equipment
Nowadays, focused mainly on the IoT domain
Communication 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 C2 Conclusion
DCCN Tutorials: Agenda
Tutorial #1 [Wed 23.11.16] - Communication
between devices within LAN/WLAN networks
Tutorial #2 [Thu 24.11.16] - Implementation of 4G cellular
communication within the SmartGrid ecosystem
Tutorial #3 [Fri 25.11.16] - Implementation of QoS
mechanisms for Device-to-Device (D2D) communication
between mobile devices
Main goal
From basic network topology to advanced communication
mechanisms used in today’s IoT/M2M scenarios – utilizing
Network Simulator 3 (NS-3) tool for timely use-cases
Introduction NS-3 Tutorial C2 Conclusion
Network Simulator 3 (NS-3) – https://www.nsnam.org
NS-3 is written in C++, with bindings available for
Python
Simulation programs are C++ executables or Python
programs
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 to
command-line and Unix (no IDE provided in
standard NS-3 framework)
Introduction NS-3 Tutorial C2 Conclusion
NS-3 Simulation Basics
Simulation time advances in discrete jumps from event
to event
C++ functions schedule events to occur at specific
simulation times
Several supporting libraries, not system-installed, can be in
parallel 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 C2 Conclusion
Motivation – Why to Use NS-3?
You want to study network performance or protocol
operation in a controllable or scalable environment
You are comfortable writing C++ or Python code, and
combining NS-3 with other code
You like the idea of working on an active open source
project
NS-3 has the models you are looking for, or you can
provide / integrate what is missing
Well-known projects
LENA (LTE-EPC Network Simulator)
DCE (Direct Code Execution)
Introduction NS-3 Tutorial C2 Conclusion
Created Virtual Machine for Development
Created as a VMware virtual machine (possible to run
via 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 to
develop straightforward from the command line; possible to
use advanced debugger)
Visualization tools: NetAnim, FlowMonitor, Python
visualizer
Tracing: Wireshark, trace files in NS-3, routing tables, etc.
As the utilized version, NS-3.23 was chosen – verified
functionality, stable, already contains new syntax
Introduction NS-3 Tutorial C2 Conclusion
Created Virtual Machine for Development
Created as a VMware virtual machine (possible to run
via 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 to
develop straightforward from the command line; possible to
use advanced debugger)
Visualization tools: NetAnim, FlowMonitor, Python
visualizer
Tracing: Wireshark, trace files in NS-3, routing tables, etc.
As the utilized version, NS-3.23 was chosen – verified
functionality, stable, already contains new syntax
Introduction NS-3 Tutorial C2 Conclusion
Created Virtual Machine – Eclipse with NS-3 project
Introduction NS-3 Tutorial C2 Conclusion
Network Scenario – LAN/WLAN communication
Default network topology implementing IEEE 802.11
PHY and MAC models
Scalable for future projects (number of nodes, used
communication technologies, etc.)
Intended network topology
Three groups of nodes (P2P, CSMA/CD, WiFi
(CSMA/CA))
n0 n1 n2 n3 n4
Point-to-point
LAN
10.1.2.0/24
10.1.1.0/24
n5n6n7
* * **
AP
Wi-Fi 10.1.3.0/24
Introduction NS-3 Tutorial C2 Conclusion
Tasks
1 Check structure of given code, understand to topology
helpers, containers, nodes, etc
2 Run the prepared simulation scenario
3 View output files (tracing files) via tcpdump and
Wireshark
4 Try to change provided code (rebuild the scenario) and
check the output files (e.g., change source and
destination nodes for data transmission, amount of
payload, etc.)
Introduction NS-3 Tutorial C2 Conclusion
T1: Point-to-point (P2P) Link
NodeContainer p2pNodes;
p2pNodes.Create (2);
// ------------------------------
PointToPointHelper pointToPoint;
pointToPoint. SetDeviceAttribute ("DataRate",
StringValue ("5Mbps"));
pointToPoint. SetChannelAttribute ("Delay", StringValue
("2ms"));
// ------------------------------
NetDeviceContainer p2pDevices;
p2pDevices = pointToPoint.Install (p2pNodes);
Introduction NS-3 Tutorial C2 Conclusion
T1: CSMA/CD Ethernet
NodeContainer csmaNodes;
csmaNodes.Add (p2pNodes.Get (1));
csmaNodes.Create (nCsma);
// ------------------------------
CsmaHelper csma;
csma. SetChannelAttribute ("DataRate",
StringValue ("100 Mbps"));
csma. SetChannelAttribute ("Delay", TimeValue (
NanoSeconds (6560)));
// ------------------------------
NetDeviceContainer csmaDevices;
csmaDevices = csma.Install (csmaNodes);
Introduction NS-3 Tutorial C2 Conclusion
T1: CSMA/CA – WiFi
NodeContainer wifiStaNodes;
wifiStaNodes.Create (nWifi);
NodeContainer wifiApNode = p2pNodes.Get (0);
// ------------------------------
YansWifiChannelHelper channel = YansWifiChannelHelper
:: Default ();
YansWifiPhyHelper phy = YansWifiPhyHelper :: Default ();
// ------------------------------
phy.SetChannel (channel.Create ());
Introduction NS-3 Tutorial C2 Conclusion
T1: CSMA/CA – WiFi MAC Layer
NetDeviceContainer staDevices;
staDevices = wifi.Install (phy , mac , wifiStaNodes);
// ------------------------------
mac.SetType ("ns3:: ApWifiMac",
"Ssid", SsidValue (ssid));
// ------------------------------
NetDeviceContainer apDevices;
apDevices = wifi.Install (phy , mac , wifiApNode);
Introduction NS-3 Tutorial C2 Conclusion
T1: IP Configuration
Ipv4AddressHelper address;
// ------------------------------
address.SetBase ("10.1.1.0", "255.255.255.0");
Ipv4InterfaceContainer p2pInterfaces;
p2pInterfaces = address.Assign (p2pDevices);
// ------------------------------
address.SetBase ("10.1.2.0", "255.255.255.0");
Ipv4InterfaceContainer csmaInterfaces ;
csmaInterfaces = address.Assign (csmaDevices);
// ------------------------------
address.SetBase ("10.1.3.0", "255.255.255.0");
address.Assign (staDevices);
address.Assign (apDevices);
Introduction NS-3 Tutorial C2 Conclusion
T1: ”Echo” Server
Location of echo server on the ”rightmost” node in the
created network topology (CSMA/CD)
UDP service, port 9
UdpEchoServerHelper echoServer (9);
// ------------------------------
ApplicationContainer serverApps = echoServer.Install
(csmaNodes.Get (nCsma));
serverApps.Start (Seconds (1.0));
serverApps.Stop (Seconds (10.0));
// ------------------------------
Introduction NS-3 Tutorial C2 Conclusion
T1: ”Echo” Client
UdpEchoClientHelper echoClient (csmaInterfaces .
GetAddress (nCsma), 9);
echoClient.SetAttribute ("MaxPackets", UintegerValue
(1));
echoClient.SetAttribute ("Interval", TimeValue (
Seconds (1.0)));
echoClient.SetAttribute ("PacketSize", UintegerValue
(1024));
// ------------------------------
ApplicationContainer clientApps =
echoClient.Install (wifiStaNodes.Get (nWifi - 1));
clientApps.Start (Seconds (2.0));
clientApps.Stop (Seconds (10.0));
Introduction NS-3 Tutorial C2 Conclusion
T1: PCAP Tracing
pointToPoint.EnablePcapAll ("wlan_lan");
phy.EnablePcap ("wlan_lan", apDevices.Get (0));
csma.EnablePcap ("wlan_lan",csmaDevices.Get (0),true);
Pcap tracing started on both P2P nodes (CSMA/CA and
CSMA/CD) – our backbone
Promiscuous mode configured on the WiFi (CSMA/CA)
network
Introduction NS-3 Tutorial C2 Conclusion
T3: Captured Communication from ”Echo” Server
reading from file wlan_lan -1-1.pcap , link -type EN10MB
(Ethernet)
2.017837 ARP , Request who -has 10.1.2.4 (ff:ff:ff:ff:ff
:ff) tell 10.1.2.1 , length 50
2.017861 ARP , Reply 10.1.2.4 is -at 00:00:00:00:00:06 ,
length 50
2.017861 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP , length
1024
2.022966 ARP , Request who -has 10.1.2.1 (ff:ff:ff:ff:ff
:ff) tell 10.1.2.4 , length 50
2.022966 ARP , Reply 10.1.2.1 is -at 00:00:00:00:00:03 ,
length 50
2.023072 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP , length
1024
Introduction NS-3 Tutorial C2 Conclusion
T3: Captured Communication from ”Echo” Client
reading from file wlan_lan -1-1.pcap , link -type EN10MB
(Ethernet)
2.017837 ARP , Request who -has 10.1.2.4 (ff:ff:ff:ff:ff
:ff) tell 10.1.2.1 , length 50
2.017861 ARP , Reply 10.1.2.4 is -at 00:00:00:00:00:06 ,
length 50
2.017861 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP , length
1024
2.022966 ARP , Request who -has 10.1.2.1 (ff:ff:ff:ff:ff
:ff) tell 10.1.2.4 , length 50
2.022966 ARP , Reply 10.1.2.1 is -at 00:00:00:00:00:03 ,
length 50
2.023072 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP , length
1024
Introduction NS-3 Tutorial C2 Conclusion
T4: Possible Modifications (Individual Tasks)
1 Add number of WiFi nodes and change location of the
”Echo” client node
2 Change number of transmitted data (payload)
3 Change total number of sent packets
4 Check performed changes via Wireshark (pass: student)
Run terminal: sudo wireshark
Open captured files
Introduction NS-3 Tutorial C2 Conclusion
Final Conclusion
We have got familiar with Network Simulator 3
Initial network topology created and simulated
Utilizing NS-3 structure (helpers, containers, etc.)
Ready to be extended by other communication technologies
Tracing of generated data traffic
Next time: Tutorial C4
Implementation of 4G (LTE) cellular communication
within the SmartGrid ecosystem
Introduction NS-3 Tutorial C2 Conclusion
Thank you for your attention.
Pavel Masek, Jiri Hosek
masekpavel@feec.vutbr.cz, hosek@feec.vutbr.cz
Brno University of Technology,
Faculty of Electrical Engineering and Communication,
Department of Telecommunication.

More Related Content

What's hot

Differences of Deep Learning Frameworks
Differences of Deep Learning FrameworksDifferences of Deep Learning Frameworks
Differences of Deep Learning FrameworksSeiya Tokui
 
Tsn linux elce17
Tsn linux elce17Tsn linux elce17
Tsn linux elce17henrikau
 
Creating a firewall in UBUNTU
Creating a firewall in UBUNTUCreating a firewall in UBUNTU
Creating a firewall in UBUNTUMumbai University
 
Notes from 2016 bay area deep learning school
Notes from 2016 bay area deep learning school Notes from 2016 bay area deep learning school
Notes from 2016 bay area deep learning school Niketan Pansare
 
ENHANCING PERFORMANCE OF AN HPC CLUSTER BY ADOPTING NONDEDICATED NODES
ENHANCING PERFORMANCE OF AN HPC CLUSTER BY ADOPTING NONDEDICATED NODES ENHANCING PERFORMANCE OF AN HPC CLUSTER BY ADOPTING NONDEDICATED NODES
ENHANCING PERFORMANCE OF AN HPC CLUSTER BY ADOPTING NONDEDICATED NODES csandit
 
Simulators for Wireless Sensor Networks (OMNeT++)
Simulators for Wireless Sensor Networks (OMNeT++)Simulators for Wireless Sensor Networks (OMNeT++)
Simulators for Wireless Sensor Networks (OMNeT++)Pradeep Kumar TS
 
Time Sensitive Networking in the Linux Kernel
Time Sensitive Networking in the Linux KernelTime Sensitive Networking in the Linux Kernel
Time Sensitive Networking in the Linux Kernelhenrikau
 
Preparing OpenSHMEM for Exascale
Preparing OpenSHMEM for ExascalePreparing OpenSHMEM for Exascale
Preparing OpenSHMEM for Exascaleinside-BigData.com
 
Improving Robustness In Distributed Systems
Improving Robustness In Distributed SystemsImproving Robustness In Distributed Systems
Improving Robustness In Distributed Systemsl xf
 
Intra-coding using non-linear prediction, KLT and Texture Synthesis: AV1 enco...
Intra-coding using non-linear prediction, KLT and Texture Synthesis: AV1 enco...Intra-coding using non-linear prediction, KLT and Texture Synthesis: AV1 enco...
Intra-coding using non-linear prediction, KLT and Texture Synthesis: AV1 enco...Förderverein Technische Fakultät
 
Kernel Recipes 2018 - XDP: a new fast and programmable network layer - Jesper...
Kernel Recipes 2018 - XDP: a new fast and programmable network layer - Jesper...Kernel Recipes 2018 - XDP: a new fast and programmable network layer - Jesper...
Kernel Recipes 2018 - XDP: a new fast and programmable network layer - Jesper...Anne Nicolas
 
Kernel Recipes 2014 - What’s new in nftables?
Kernel Recipes 2014 - What’s new in nftables?Kernel Recipes 2014 - What’s new in nftables?
Kernel Recipes 2014 - What’s new in nftables?Anne Nicolas
 
Geep networking stack-linuxkernel
Geep networking stack-linuxkernelGeep networking stack-linuxkernel
Geep networking stack-linuxkernelKiran Divekar
 
ディープニューラルネットワーク向け拡張可能な高位合成コンパイラの開発
ディープニューラルネットワーク向け拡張可能な高位合成コンパイラの開発ディープニューラルネットワーク向け拡張可能な高位合成コンパイラの開発
ディープニューラルネットワーク向け拡張可能な高位合成コンパイラの開発Shinya Takamaeda-Y
 
PASTE: A Network Programming Interface for Non-Volatile Main Memory
PASTE: A Network Programming Interface for Non-Volatile Main MemoryPASTE: A Network Programming Interface for Non-Volatile Main Memory
PASTE: A Network Programming Interface for Non-Volatile Main Memorymicchie
 
2.Phys & Link
2.Phys & Link2.Phys & Link
2.Phys & Linkphanleson
 

What's hot (20)

Introduction to ns3
Introduction to ns3Introduction to ns3
Introduction to ns3
 
Differences of Deep Learning Frameworks
Differences of Deep Learning FrameworksDifferences of Deep Learning Frameworks
Differences of Deep Learning Frameworks
 
Tsn linux elce17
Tsn linux elce17Tsn linux elce17
Tsn linux elce17
 
Creating a firewall in UBUNTU
Creating a firewall in UBUNTUCreating a firewall in UBUNTU
Creating a firewall in UBUNTU
 
Notes from 2016 bay area deep learning school
Notes from 2016 bay area deep learning school Notes from 2016 bay area deep learning school
Notes from 2016 bay area deep learning school
 
ENHANCING PERFORMANCE OF AN HPC CLUSTER BY ADOPTING NONDEDICATED NODES
ENHANCING PERFORMANCE OF AN HPC CLUSTER BY ADOPTING NONDEDICATED NODES ENHANCING PERFORMANCE OF AN HPC CLUSTER BY ADOPTING NONDEDICATED NODES
ENHANCING PERFORMANCE OF AN HPC CLUSTER BY ADOPTING NONDEDICATED NODES
 
Open shmem
Open shmemOpen shmem
Open shmem
 
Simulators for Wireless Sensor Networks (OMNeT++)
Simulators for Wireless Sensor Networks (OMNeT++)Simulators for Wireless Sensor Networks (OMNeT++)
Simulators for Wireless Sensor Networks (OMNeT++)
 
Time Sensitive Networking in the Linux Kernel
Time Sensitive Networking in the Linux KernelTime Sensitive Networking in the Linux Kernel
Time Sensitive Networking in the Linux Kernel
 
Preparing OpenSHMEM for Exascale
Preparing OpenSHMEM for ExascalePreparing OpenSHMEM for Exascale
Preparing OpenSHMEM for Exascale
 
Improving Robustness In Distributed Systems
Improving Robustness In Distributed SystemsImproving Robustness In Distributed Systems
Improving Robustness In Distributed Systems
 
Intra-coding using non-linear prediction, KLT and Texture Synthesis: AV1 enco...
Intra-coding using non-linear prediction, KLT and Texture Synthesis: AV1 enco...Intra-coding using non-linear prediction, KLT and Texture Synthesis: AV1 enco...
Intra-coding using non-linear prediction, KLT and Texture Synthesis: AV1 enco...
 
Kernel Recipes 2018 - XDP: a new fast and programmable network layer - Jesper...
Kernel Recipes 2018 - XDP: a new fast and programmable network layer - Jesper...Kernel Recipes 2018 - XDP: a new fast and programmable network layer - Jesper...
Kernel Recipes 2018 - XDP: a new fast and programmable network layer - Jesper...
 
Kernel Recipes 2014 - What’s new in nftables?
Kernel Recipes 2014 - What’s new in nftables?Kernel Recipes 2014 - What’s new in nftables?
Kernel Recipes 2014 - What’s new in nftables?
 
Geep networking stack-linuxkernel
Geep networking stack-linuxkernelGeep networking stack-linuxkernel
Geep networking stack-linuxkernel
 
ディープニューラルネットワーク向け拡張可能な高位合成コンパイラの開発
ディープニューラルネットワーク向け拡張可能な高位合成コンパイラの開発ディープニューラルネットワーク向け拡張可能な高位合成コンパイラの開発
ディープニューラルネットワーク向け拡張可能な高位合成コンパイラの開発
 
3DD 1e SyCers
3DD 1e SyCers3DD 1e SyCers
3DD 1e SyCers
 
3rd 3DDRESD: ReCPU 4 NIDS
3rd 3DDRESD: ReCPU 4 NIDS3rd 3DDRESD: ReCPU 4 NIDS
3rd 3DDRESD: ReCPU 4 NIDS
 
PASTE: A Network Programming Interface for Non-Volatile Main Memory
PASTE: A Network Programming Interface for Non-Volatile Main MemoryPASTE: A Network Programming Interface for Non-Volatile Main Memory
PASTE: A Network Programming Interface for Non-Volatile Main Memory
 
2.Phys & Link
2.Phys & Link2.Phys & Link
2.Phys & Link
 

Similar to DCCN 2016 - Tutorial 1 - Communication with LAN/WLAN

WiMAX implementation in ns3
WiMAX implementation in ns3WiMAX implementation in ns3
WiMAX implementation in ns3Mustafa Khaleel
 
Plenzogan technology
Plenzogan technologyPlenzogan technology
Plenzogan technologyplenzogan
 
Paper9250 implementation of an i pv6 stack for ns-3
Paper9250 implementation of an i pv6 stack for ns-3Paper9250 implementation of an i pv6 stack for ns-3
Paper9250 implementation of an i pv6 stack for ns-3Suhail Ahmed Chandio
 
IWAN Lab Guide
IWAN Lab GuideIWAN Lab Guide
IWAN Lab Guidejww330015
 
Final Report(Routing_Misbehavior)
Final Report(Routing_Misbehavior)Final Report(Routing_Misbehavior)
Final Report(Routing_Misbehavior)Ambreen Zafar
 
NCS: NEtwork Control System Hands-on Labs
NCS:  NEtwork Control System Hands-on Labs NCS:  NEtwork Control System Hands-on Labs
NCS: NEtwork Control System Hands-on Labs Cisco Canada
 
VMware NSX 101: What, Why & How
VMware NSX 101: What, Why & HowVMware NSX 101: What, Why & How
VMware NSX 101: What, Why & HowAniekan Akpaffiong
 
Network simulator 2 a simulation tool for linux
Network simulator 2 a simulation tool for linuxNetwork simulator 2 a simulation tool for linux
Network simulator 2 a simulation tool for linuxPratik Joshi
 
Network programmability: an Overview
Network programmability: an Overview Network programmability: an Overview
Network programmability: an Overview Aymen AlAwadi
 
ACMSE2022-Tutorial-Slides.pptx
ACMSE2022-Tutorial-Slides.pptxACMSE2022-Tutorial-Slides.pptx
ACMSE2022-Tutorial-Slides.pptxSumit Roy
 

Similar to DCCN 2016 - Tutorial 1 - Communication with LAN/WLAN (20)

June 28 Presentation
June 28 PresentationJune 28 Presentation
June 28 Presentation
 
WiMAX implementation in ns3
WiMAX implementation in ns3WiMAX implementation in ns3
WiMAX implementation in ns3
 
Ns fundamentals 1
Ns fundamentals 1Ns fundamentals 1
Ns fundamentals 1
 
Plenzogan technology
Plenzogan technologyPlenzogan technology
Plenzogan technology
 
Dc project 1
Dc project 1Dc project 1
Dc project 1
 
Paper9250 implementation of an i pv6 stack for ns-3
Paper9250 implementation of an i pv6 stack for ns-3Paper9250 implementation of an i pv6 stack for ns-3
Paper9250 implementation of an i pv6 stack for ns-3
 
IWAN Lab Guide
IWAN Lab GuideIWAN Lab Guide
IWAN Lab Guide
 
Tut hemant ns2
Tut hemant ns2Tut hemant ns2
Tut hemant ns2
 
Final Report(Routing_Misbehavior)
Final Report(Routing_Misbehavior)Final Report(Routing_Misbehavior)
Final Report(Routing_Misbehavior)
 
NCS: NEtwork Control System Hands-on Labs
NCS:  NEtwork Control System Hands-on Labs NCS:  NEtwork Control System Hands-on Labs
NCS: NEtwork Control System Hands-on Labs
 
Ns2
Ns2Ns2
Ns2
 
VMware NSX 101: What, Why & How
VMware NSX 101: What, Why & HowVMware NSX 101: What, Why & How
VMware NSX 101: What, Why & How
 
Ns2
Ns2Ns2
Ns2
 
Glomosim scenarios
Glomosim scenariosGlomosim scenarios
Glomosim scenarios
 
ICT Lab Overview
ICT Lab OverviewICT Lab Overview
ICT Lab Overview
 
Network simulator 2 a simulation tool for linux
Network simulator 2 a simulation tool for linuxNetwork simulator 2 a simulation tool for linux
Network simulator 2 a simulation tool for linux
 
opnet lab report
opnet lab reportopnet lab report
opnet lab report
 
Network programmability: an Overview
Network programmability: an Overview Network programmability: an Overview
Network programmability: an Overview
 
CV-05.02.2017
CV-05.02.2017CV-05.02.2017
CV-05.02.2017
 
ACMSE2022-Tutorial-Slides.pptx
ACMSE2022-Tutorial-Slides.pptxACMSE2022-Tutorial-Slides.pptx
ACMSE2022-Tutorial-Slides.pptx
 

Recently uploaded

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

DCCN 2016 - Tutorial 1 - Communication with LAN/WLAN

  • 1. Introduction NS-3 Tutorial C2 Conclusion DCCN Tutorial C2: Communication Between Devices Within LAN/WLAN Networks Pavel Masek, Jiri Hosek Brno University of Technology, Faculty of Electrical Engineering and Communication, Department of Telecommunication. masekpavel@feec.vutbr.cz, hosek@feec.vutbr.cz November 23, 2016
  • 2. Introduction NS-3 Tutorial C2 Conclusion WISLAB Research Group – http://www.wislab.cz WISLAB - Wireless System Laboratory of Brno Coordinated by Dr. Hosek Experienced researchers and MSc. / Ph.D. students Working with the up-to-date equipment Nowadays, focused mainly on the IoT domain Communication 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
  • 3. Introduction NS-3 Tutorial C2 Conclusion DCCN Tutorials: Agenda Tutorial #1 [Wed 23.11.16] - Communication between devices within LAN/WLAN networks Tutorial #2 [Thu 24.11.16] - Implementation of 4G cellular communication within the SmartGrid ecosystem Tutorial #3 [Fri 25.11.16] - Implementation of QoS mechanisms for Device-to-Device (D2D) communication between mobile devices Main goal From basic network topology to advanced communication mechanisms used in today’s IoT/M2M scenarios – utilizing Network Simulator 3 (NS-3) tool for timely use-cases
  • 4. Introduction NS-3 Tutorial C2 Conclusion Network Simulator 3 (NS-3) – https://www.nsnam.org NS-3 is written in C++, with bindings available for Python Simulation programs are C++ executables or Python programs 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 to command-line and Unix (no IDE provided in standard NS-3 framework)
  • 5. Introduction NS-3 Tutorial C2 Conclusion NS-3 Simulation Basics Simulation time advances in discrete jumps from event to event C++ functions schedule events to occur at specific simulation times Several supporting libraries, not system-installed, can be in parallel 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
  • 6. Introduction NS-3 Tutorial C2 Conclusion Motivation – Why to Use NS-3? You want to study network performance or protocol operation in a controllable or scalable environment You are comfortable writing C++ or Python code, and combining NS-3 with other code You like the idea of working on an active open source project NS-3 has the models you are looking for, or you can provide / integrate what is missing Well-known projects LENA (LTE-EPC Network Simulator) DCE (Direct Code Execution)
  • 7. Introduction NS-3 Tutorial C2 Conclusion Created Virtual Machine for Development Created as a VMware virtual machine (possible to run via 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 to develop straightforward from the command line; possible to use advanced debugger) Visualization tools: NetAnim, FlowMonitor, Python visualizer Tracing: Wireshark, trace files in NS-3, routing tables, etc. As the utilized version, NS-3.23 was chosen – verified functionality, stable, already contains new syntax
  • 8. Introduction NS-3 Tutorial C2 Conclusion Created Virtual Machine for Development Created as a VMware virtual machine (possible to run via 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 to develop straightforward from the command line; possible to use advanced debugger) Visualization tools: NetAnim, FlowMonitor, Python visualizer Tracing: Wireshark, trace files in NS-3, routing tables, etc. As the utilized version, NS-3.23 was chosen – verified functionality, stable, already contains new syntax
  • 9. Introduction NS-3 Tutorial C2 Conclusion Created Virtual Machine – Eclipse with NS-3 project
  • 10. Introduction NS-3 Tutorial C2 Conclusion Network Scenario – LAN/WLAN communication Default network topology implementing IEEE 802.11 PHY and MAC models Scalable for future projects (number of nodes, used communication technologies, etc.) Intended network topology Three groups of nodes (P2P, CSMA/CD, WiFi (CSMA/CA)) n0 n1 n2 n3 n4 Point-to-point LAN 10.1.2.0/24 10.1.1.0/24 n5n6n7 * * ** AP Wi-Fi 10.1.3.0/24
  • 11. Introduction NS-3 Tutorial C2 Conclusion Tasks 1 Check structure of given code, understand to topology helpers, containers, nodes, etc 2 Run the prepared simulation scenario 3 View output files (tracing files) via tcpdump and Wireshark 4 Try to change provided code (rebuild the scenario) and check the output files (e.g., change source and destination nodes for data transmission, amount of payload, etc.)
  • 12. Introduction NS-3 Tutorial C2 Conclusion T1: Point-to-point (P2P) Link NodeContainer p2pNodes; p2pNodes.Create (2); // ------------------------------ PointToPointHelper pointToPoint; pointToPoint. SetDeviceAttribute ("DataRate", StringValue ("5Mbps")); pointToPoint. SetChannelAttribute ("Delay", StringValue ("2ms")); // ------------------------------ NetDeviceContainer p2pDevices; p2pDevices = pointToPoint.Install (p2pNodes);
  • 13. Introduction NS-3 Tutorial C2 Conclusion T1: CSMA/CD Ethernet NodeContainer csmaNodes; csmaNodes.Add (p2pNodes.Get (1)); csmaNodes.Create (nCsma); // ------------------------------ CsmaHelper csma; csma. SetChannelAttribute ("DataRate", StringValue ("100 Mbps")); csma. SetChannelAttribute ("Delay", TimeValue ( NanoSeconds (6560))); // ------------------------------ NetDeviceContainer csmaDevices; csmaDevices = csma.Install (csmaNodes);
  • 14. Introduction NS-3 Tutorial C2 Conclusion T1: CSMA/CA – WiFi NodeContainer wifiStaNodes; wifiStaNodes.Create (nWifi); NodeContainer wifiApNode = p2pNodes.Get (0); // ------------------------------ YansWifiChannelHelper channel = YansWifiChannelHelper :: Default (); YansWifiPhyHelper phy = YansWifiPhyHelper :: Default (); // ------------------------------ phy.SetChannel (channel.Create ());
  • 15. Introduction NS-3 Tutorial C2 Conclusion T1: CSMA/CA – WiFi MAC Layer NetDeviceContainer staDevices; staDevices = wifi.Install (phy , mac , wifiStaNodes); // ------------------------------ mac.SetType ("ns3:: ApWifiMac", "Ssid", SsidValue (ssid)); // ------------------------------ NetDeviceContainer apDevices; apDevices = wifi.Install (phy , mac , wifiApNode);
  • 16. Introduction NS-3 Tutorial C2 Conclusion T1: IP Configuration Ipv4AddressHelper address; // ------------------------------ address.SetBase ("10.1.1.0", "255.255.255.0"); Ipv4InterfaceContainer p2pInterfaces; p2pInterfaces = address.Assign (p2pDevices); // ------------------------------ address.SetBase ("10.1.2.0", "255.255.255.0"); Ipv4InterfaceContainer csmaInterfaces ; csmaInterfaces = address.Assign (csmaDevices); // ------------------------------ address.SetBase ("10.1.3.0", "255.255.255.0"); address.Assign (staDevices); address.Assign (apDevices);
  • 17. Introduction NS-3 Tutorial C2 Conclusion T1: ”Echo” Server Location of echo server on the ”rightmost” node in the created network topology (CSMA/CD) UDP service, port 9 UdpEchoServerHelper echoServer (9); // ------------------------------ ApplicationContainer serverApps = echoServer.Install (csmaNodes.Get (nCsma)); serverApps.Start (Seconds (1.0)); serverApps.Stop (Seconds (10.0)); // ------------------------------
  • 18. Introduction NS-3 Tutorial C2 Conclusion T1: ”Echo” Client UdpEchoClientHelper echoClient (csmaInterfaces . GetAddress (nCsma), 9); echoClient.SetAttribute ("MaxPackets", UintegerValue (1)); echoClient.SetAttribute ("Interval", TimeValue ( Seconds (1.0))); echoClient.SetAttribute ("PacketSize", UintegerValue (1024)); // ------------------------------ ApplicationContainer clientApps = echoClient.Install (wifiStaNodes.Get (nWifi - 1)); clientApps.Start (Seconds (2.0)); clientApps.Stop (Seconds (10.0));
  • 19. Introduction NS-3 Tutorial C2 Conclusion T1: PCAP Tracing pointToPoint.EnablePcapAll ("wlan_lan"); phy.EnablePcap ("wlan_lan", apDevices.Get (0)); csma.EnablePcap ("wlan_lan",csmaDevices.Get (0),true); Pcap tracing started on both P2P nodes (CSMA/CA and CSMA/CD) – our backbone Promiscuous mode configured on the WiFi (CSMA/CA) network
  • 20. Introduction NS-3 Tutorial C2 Conclusion T3: Captured Communication from ”Echo” Server reading from file wlan_lan -1-1.pcap , link -type EN10MB (Ethernet) 2.017837 ARP , Request who -has 10.1.2.4 (ff:ff:ff:ff:ff :ff) tell 10.1.2.1 , length 50 2.017861 ARP , Reply 10.1.2.4 is -at 00:00:00:00:00:06 , length 50 2.017861 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP , length 1024 2.022966 ARP , Request who -has 10.1.2.1 (ff:ff:ff:ff:ff :ff) tell 10.1.2.4 , length 50 2.022966 ARP , Reply 10.1.2.1 is -at 00:00:00:00:00:03 , length 50 2.023072 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP , length 1024
  • 21. Introduction NS-3 Tutorial C2 Conclusion T3: Captured Communication from ”Echo” Client reading from file wlan_lan -1-1.pcap , link -type EN10MB (Ethernet) 2.017837 ARP , Request who -has 10.1.2.4 (ff:ff:ff:ff:ff :ff) tell 10.1.2.1 , length 50 2.017861 ARP , Reply 10.1.2.4 is -at 00:00:00:00:00:06 , length 50 2.017861 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP , length 1024 2.022966 ARP , Request who -has 10.1.2.1 (ff:ff:ff:ff:ff :ff) tell 10.1.2.4 , length 50 2.022966 ARP , Reply 10.1.2.1 is -at 00:00:00:00:00:03 , length 50 2.023072 IP 10.1.2.4.9 > 10.1.3.3.49153: UDP , length 1024
  • 22. Introduction NS-3 Tutorial C2 Conclusion T4: Possible Modifications (Individual Tasks) 1 Add number of WiFi nodes and change location of the ”Echo” client node 2 Change number of transmitted data (payload) 3 Change total number of sent packets 4 Check performed changes via Wireshark (pass: student) Run terminal: sudo wireshark Open captured files
  • 23. Introduction NS-3 Tutorial C2 Conclusion Final Conclusion We have got familiar with Network Simulator 3 Initial network topology created and simulated Utilizing NS-3 structure (helpers, containers, etc.) Ready to be extended by other communication technologies Tracing of generated data traffic Next time: Tutorial C4 Implementation of 4G (LTE) cellular communication within the SmartGrid ecosystem
  • 24. Introduction NS-3 Tutorial C2 Conclusion Thank you for your attention. Pavel Masek, Jiri Hosek masekpavel@feec.vutbr.cz, hosek@feec.vutbr.cz Brno University of Technology, Faculty of Electrical Engineering and Communication, Department of Telecommunication.