SlideShare a Scribd company logo
1 of 23
Download to read offline
Building Topology
[Part-2]
Topology
STA-1
STA-2
STA-3
AP
CSMA
P2P
WIFI
P1 P2
C1 C2 C3 C4
CLIENT
SERVER
UdpEchoServerHelper
UdpEchoCientHelper
RoadMap
● Writing Code
● Detail Understanding
– Logging
– Tracing
– Attributes
Flow Chart
Point To Point
CSMA
WIFI Station
WIFI AP
NODE
Container
Point To Point
CSMA
WIFI Station
WIFI AP
NetDe`vice
Container
Point To Point
CSMA
WIFI Station
WIFI AP
SetAttributes
NetDevice
Point To Point
CSMA
Attach
NetDevice to
PHY
&CHANNEL
WIFI Station
WIFI AP
Configure
PHY & MAC
WIFI Station
WIFI AP
Attach
NetDevice to
PHY
&CHANNEL
Point To Point
CSMA
WIFI Station
WIFI AP
Install
ProtocolStack
Point To Point
CSMA
WIFI Station
WIFI AP
Assign IP
Address
Install Application
Topology Description
● Channels & Net Device
– Wireless
– Point to Point
– CSMA
● Node Container
– Access Point Node
– Station Nodes
– Point to Point Nodes
– CSMA Nodes
● Node P1 & P2 having two Net Device of different types
Classes
● NodeContainer
● PointToPointHelper
● CsmaHelper
● YansWifiChannelHelper
●
YansWifiPhyHelper
● WifiHelper
● NetDeviceContainer
● MobilityHelper
● InternetStackHelper
● Ipv4AddressHelper
●
Ipv4InterfaceContainer
● UdpEchoServerHelper
● UdpEchoClientHelper
● ApplicationContainer
`
Include
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/csma-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv4-global-routing-helper.h"
NODE
● We are having four different types of nodes.
● Create Four Different NodeContainer
– Point to Point
– Station Nodes
– Access Point
– CSMA NodeContainer n1,n2;
n1.Create(3);
[...]
N2.Create(1);
n2.Add(n1.Get(0));
void Create(uint32_t n);
Add()- used to add node in a node container
Create() - used to create node/s
NetDevice and Channel
● Three different NetDevice and Channel:-
– PointToPointHelper – NetDevice & Channel
– CsmaHelper – NetDevice & Channel
– YansWifiChannelHelper – Channel
– YansWifiPhyHelper – PHY
– WifiHelper – NetDevice
We use Install()method to attach NetDevice with Node
It will return an object to NetDeviceContainer
Configure WIFI NetDevice
`
NetDevice
PHY
MAC<attach>
YansWifiPhyHelper
NqosWifiMacHelper
YansWifiChannelHelper
WifiHelper
Node
Configure WIFI NetDevice
● WifiChannel & WifiPhy abstract class
– YansWifiChannel
● We use Helper [YansWifiChannelHelper]
● Set Channel related attributes
– [channel switch delay, energy of received signal,etc]
– YansWifiPhy
● We use Helper [YansWifiPhyHelper]
● Set PHY Layer related attributes
– [propogation delay] Set CHANNEL to PHY
void SetChannel(Ptr<YansWifiChannel>)-
Class YansWifiPhy
Configure MAC
● WifiMac abstract class
– List of MAC Types
● AdhocWifiMac – Infrastructure less network
● ApWifiMac – Access point Node MAC
● StaWifiMac – Station Node MAC
● Etc.
– We use Helper Class
● NqosWifiMacHelper or WifiMacHelper
– Set the appropiate MAC from the list and Set Attributes
● void SetType(T,A,V....);
● T- Type of MAC
● A- Name of Attribute
● V –Value of Attribute
Mobility
● It is used to track and maintain the
– Current Cartesian position
– Speed of an object
– Placement of Node
– Setup Mobility Model
Mobility
[Cartesian Position]
Source:http://en.wikipedia.org/wiki/Cartesian_coordinate_system
Mobility
● Assign Mobility to WIFI Nodes
– List of Mobility Model
● ConstantAccelerationMobilityModel
● ConstantPositionMobilityModel
● ConstantVelocityMobilityModel
● RandomDirection2dMobilityModel
● RandomWalk2dMobilityModel
● Etc
– List of Allocator Model (placement of Node)
● RandomDiscPositionAllocator
● RandomRectanglePositionAllocator
● GridPositionAllocator
● Etc.
Mobility Model
● RandomWalk2dMobilityModel
– 2D random walk mobility model
– Each instance moves with a speed and direction
choosen at random
– Nodes moves in Boundaries specified by Rectangle
– Rectangle(double xMin,double xMax,double yMin,double yMax)
x-axis
y-axis
xMin xMax
yMin
yMax
Allocator Model
● GridPositionAllocator
– Allocate position on a rectangular 2D grid
– List of Attributes
● MinX
● MinY
● DeltaX
● DeltaY
● GridWidth
● LayoutType
– ROW_FIRST
– COLUMN_FIRST
1 2 3
4
(MinX,MinY) DeltaX
DeltaY GridWidth
x-axis
y-axis
Mobility
● We use Helper Class
– MobilityHelper
● SetMobilityModel()-Set Mobility Model
● SetPositionAllocator() - Set Position Allocator
– Install the mobility on Nodes
– Mobility Model [Access Point & CSMA Nodes]
● ConstantPositionMobilityModel
Internet Stack & Ipv4Address
● Now its time to install Protocol Stack
– InternetStackHelper
● Install()
● Assign IP address to the NetDevice
– Ipv4InterfaceContainer
● Assign()
Application
STA-1
STA-2
STA-3
AP
CSMA
P2P
WIFI
P1 P2
C1 C2 C3 C4
CLIENT
SERVER
UdpEchoServerHelper
UdpEchoCientHelper
Animation
● AnimationInterface
– Set Methods for Nodes
● Description – SetNodeDescription(NodeContainer,”AP”)
● Color – SetNodeColor(NodeContainer , R,G,B)
● Position – SetConstantPosition(Node,X,Y)
● Etc.
– Add Background Image
● SetBackgroundImage(..,..,..,);
vodi EnablePacketMetadata(boolean value)
Start Simulation
Simulation::Run();
Simulation::Destroy();
return 0;
● Modify the Mobility Pattern using
– RandomWalk2dMobilityModel
● Distance- Change current direction and
speed after moving for this distance.
● Speed – speed of node
● Bounds – Area
To be Continued...

More Related Content

What's hot

The History and Evolution of SDN
The History and Evolution of SDNThe History and Evolution of SDN
The History and Evolution of SDNNapier University
 
Cisco Networking (Routing and Switching)
Cisco Networking (Routing and Switching)Cisco Networking (Routing and Switching)
Cisco Networking (Routing and Switching)Alan Mark
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocolMohd Arif
 
TCP/IP 3-way Handshake
TCP/IP 3-way Handshake TCP/IP 3-way Handshake
TCP/IP 3-way Handshake Alok Tripathi
 
CloudAnalyst: A CloudSim-based Tool for Modelling and Analysis of Large Scale...
CloudAnalyst: A CloudSim-based Tool for Modelling and Analysis of Large Scale...CloudAnalyst: A CloudSim-based Tool for Modelling and Analysis of Large Scale...
CloudAnalyst: A CloudSim-based Tool for Modelling and Analysis of Large Scale...ambitlick
 
message communication protocols in IoT
message communication protocols in IoTmessage communication protocols in IoT
message communication protocols in IoTFabMinds
 
Networking Components
Networking ComponentsNetworking Components
Networking ComponentsAkNirojan
 
Circuit Switching, Packet Switching, Virtual Circuit Networks and Datagram Ne...
Circuit Switching, Packet Switching, Virtual Circuit Networks and Datagram Ne...Circuit Switching, Packet Switching, Virtual Circuit Networks and Datagram Ne...
Circuit Switching, Packet Switching, Virtual Circuit Networks and Datagram Ne...Kaushik Panta
 

What's hot (20)

The History and Evolution of SDN
The History and Evolution of SDNThe History and Evolution of SDN
The History and Evolution of SDN
 
6lowpan
6lowpan6lowpan
6lowpan
 
Cisco Networking (Routing and Switching)
Cisco Networking (Routing and Switching)Cisco Networking (Routing and Switching)
Cisco Networking (Routing and Switching)
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocol
 
Routing ppt
Routing pptRouting ppt
Routing ppt
 
Static Routing
Static RoutingStatic Routing
Static Routing
 
TCP/IP 3-way Handshake
TCP/IP 3-way Handshake TCP/IP 3-way Handshake
TCP/IP 3-way Handshake
 
CloudAnalyst: A CloudSim-based Tool for Modelling and Analysis of Large Scale...
CloudAnalyst: A CloudSim-based Tool for Modelling and Analysis of Large Scale...CloudAnalyst: A CloudSim-based Tool for Modelling and Analysis of Large Scale...
CloudAnalyst: A CloudSim-based Tool for Modelling and Analysis of Large Scale...
 
Routing
RoutingRouting
Routing
 
message communication protocols in IoT
message communication protocols in IoTmessage communication protocols in IoT
message communication protocols in IoT
 
Snmp
SnmpSnmp
Snmp
 
Data Center Networks
Data Center NetworksData Center Networks
Data Center Networks
 
Tcp IP Model
Tcp IP ModelTcp IP Model
Tcp IP Model
 
Distance vector routing
Distance vector routingDistance vector routing
Distance vector routing
 
Network simulator
Network  simulatorNetwork  simulator
Network simulator
 
Network monitoring system
Network monitoring systemNetwork monitoring system
Network monitoring system
 
Networking Components
Networking ComponentsNetworking Components
Networking Components
 
Ip address and subnetting
Ip address and subnettingIp address and subnetting
Ip address and subnetting
 
Dsdv
DsdvDsdv
Dsdv
 
Circuit Switching, Packet Switching, Virtual Circuit Networks and Datagram Ne...
Circuit Switching, Packet Switching, Virtual Circuit Networks and Datagram Ne...Circuit Switching, Packet Switching, Virtual Circuit Networks and Datagram Ne...
Circuit Switching, Packet Switching, Virtual Circuit Networks and Datagram Ne...
 

Viewers also liked

Socio-technical System
Socio-technical SystemSocio-technical System
Socio-technical SystemRahul Hada
 
Fundamental of Shell Programming
Fundamental of Shell ProgrammingFundamental of Shell Programming
Fundamental of Shell ProgrammingRahul Hada
 
Introduction to Virtualization
Introduction to VirtualizationIntroduction to Virtualization
Introduction to VirtualizationRahul Hada
 
Support formobility
Support formobilitySupport formobility
Support formobilityRahul Hada
 
Software Engineering Introduction
Software Engineering IntroductionSoftware Engineering Introduction
Software Engineering IntroductionRahul Hada
 
Introduction of Cloud Computing
Introduction of Cloud ComputingIntroduction of Cloud Computing
Introduction of Cloud ComputingRahul Hada
 
Socket Programming using Java
Socket Programming using JavaSocket Programming using Java
Socket Programming using JavaRahul Hada
 
Mobile transportlayer
Mobile transportlayerMobile transportlayer
Mobile transportlayerRahul Hada
 
Quality planning
Quality planningQuality planning
Quality planningRahul Hada
 
WLAN - IEEE 802.11
WLAN - IEEE 802.11WLAN - IEEE 802.11
WLAN - IEEE 802.11Rahul Hada
 
Mobile Network Layer
Mobile Network LayerMobile Network Layer
Mobile Network LayerRahul Hada
 
Spring sim 2010-riley
Spring sim 2010-rileySpring sim 2010-riley
Spring sim 2010-rileySopna Sumāto
 
WiMAX implementation in ns3
WiMAX implementation in ns3WiMAX implementation in ns3
WiMAX implementation in ns3Mustafa Khaleel
 
Jammers&amp;anti jammers
Jammers&amp;anti jammersJammers&amp;anti jammers
Jammers&amp;anti jammersRitwik MG
 
Cryptanalysis of image encryption using traditional encryption tecnhniques
Cryptanalysis of image encryption using traditional encryption tecnhniquesCryptanalysis of image encryption using traditional encryption tecnhniques
Cryptanalysis of image encryption using traditional encryption tecnhniquesRitwik MG
 
ICT role in Yemen
ICT role in Yemen ICT role in Yemen
ICT role in Yemen Salah Amean
 

Viewers also liked (20)

Socio-technical System
Socio-technical SystemSocio-technical System
Socio-technical System
 
Fundamental of Shell Programming
Fundamental of Shell ProgrammingFundamental of Shell Programming
Fundamental of Shell Programming
 
Inheritance
InheritanceInheritance
Inheritance
 
Introduction to Virtualization
Introduction to VirtualizationIntroduction to Virtualization
Introduction to Virtualization
 
Support formobility
Support formobilitySupport formobility
Support formobility
 
Software Engineering Introduction
Software Engineering IntroductionSoftware Engineering Introduction
Software Engineering Introduction
 
Introduction of Cloud Computing
Introduction of Cloud ComputingIntroduction of Cloud Computing
Introduction of Cloud Computing
 
Socket Programming using Java
Socket Programming using JavaSocket Programming using Java
Socket Programming using Java
 
Risk
RiskRisk
Risk
 
Risk
RiskRisk
Risk
 
Mobile transportlayer
Mobile transportlayerMobile transportlayer
Mobile transportlayer
 
Quality planning
Quality planningQuality planning
Quality planning
 
WLAN - IEEE 802.11
WLAN - IEEE 802.11WLAN - IEEE 802.11
WLAN - IEEE 802.11
 
Mobile Network Layer
Mobile Network LayerMobile Network Layer
Mobile Network Layer
 
Spring sim 2010-riley
Spring sim 2010-rileySpring sim 2010-riley
Spring sim 2010-riley
 
WiMAX implementation in ns3
WiMAX implementation in ns3WiMAX implementation in ns3
WiMAX implementation in ns3
 
Jammers&amp;anti jammers
Jammers&amp;anti jammersJammers&amp;anti jammers
Jammers&amp;anti jammers
 
Cryptanalysis of image encryption using traditional encryption tecnhniques
Cryptanalysis of image encryption using traditional encryption tecnhniquesCryptanalysis of image encryption using traditional encryption tecnhniques
Cryptanalysis of image encryption using traditional encryption tecnhniques
 
Ns3
Ns3Ns3
Ns3
 
ICT role in Yemen
ICT role in Yemen ICT role in Yemen
ICT role in Yemen
 

Similar to Building Complex Topology using NS3

Camara Application Programming Interface (API) Overview.pdf
Camara Application Programming Interface (API) Overview.pdfCamara Application Programming Interface (API) Overview.pdf
Camara Application Programming Interface (API) Overview.pdfDimitrisLogothetis10
 
Overview of Distributed Virtual Router (DVR) in Openstack/Neutron
Overview of Distributed Virtual Router (DVR) in Openstack/NeutronOverview of Distributed Virtual Router (DVR) in Openstack/Neutron
Overview of Distributed Virtual Router (DVR) in Openstack/Neutronvivekkonnect
 
Chapter14ccna
Chapter14ccnaChapter14ccna
Chapter14ccnarobertoxe
 
Presentation on ccna
Presentation on ccnaPresentation on ccna
Presentation on ccnaHoneyKumar34
 
Intelligent Network Services through Active Flow Manipulation
Intelligent Network Services through Active Flow ManipulationIntelligent Network Services through Active Flow Manipulation
Intelligent Network Services through Active Flow ManipulationTal Lavian Ph.D.
 
Enabling Active Flow Manipulation (AFM) in Silicon-based Network Forwarding E...
Enabling Active Flow Manipulation (AFM) in Silicon-based Network Forwarding E...Enabling Active Flow Manipulation (AFM) in Silicon-based Network Forwarding E...
Enabling Active Flow Manipulation (AFM) in Silicon-based Network Forwarding E...Tal Lavian Ph.D.
 
Cloud Foundry Summit 2015: Cloud Foundry and IoT Protocol Support
Cloud Foundry Summit 2015: Cloud Foundry and IoT Protocol SupportCloud Foundry Summit 2015: Cloud Foundry and IoT Protocol Support
Cloud Foundry Summit 2015: Cloud Foundry and IoT Protocol SupportVMware Tanzu
 
FIWARE Tech Summit - lwM2M IoT Agent in Depth
FIWARE Tech Summit - lwM2M IoT Agent in DepthFIWARE Tech Summit - lwM2M IoT Agent in Depth
FIWARE Tech Summit - lwM2M IoT Agent in DepthFIWARE
 
SDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center NetworkingSDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center NetworkingThomas Graf
 
Network Virtualization & Software-defined Networking
Network Virtualization & Software-defined NetworkingNetwork Virtualization & Software-defined Networking
Network Virtualization & Software-defined NetworkingDigicomp Academy AG
 
Distributed routing
Distributed routingDistributed routing
Distributed routingMurali Reddy
 
WebTram: una WebApp GWT per l'editing di dati cartografici e topologici di un...
WebTram: una WebApp GWT per l'editing di dati cartografici e topologici di un...WebTram: una WebApp GWT per l'editing di dati cartografici e topologici di un...
WebTram: una WebApp GWT per l'editing di dati cartografici e topologici di un...GWTcon
 
CisCon 2018 - Overlay Management Protocol e IPsec
CisCon 2018 - Overlay Management Protocol e IPsecCisCon 2018 - Overlay Management Protocol e IPsec
CisCon 2018 - Overlay Management Protocol e IPsecAreaNetworking.it
 
Network and Service Virtualization tutorial at ONUG Spring 2015
Network and Service Virtualization tutorial at ONUG Spring 2015Network and Service Virtualization tutorial at ONUG Spring 2015
Network and Service Virtualization tutorial at ONUG Spring 2015SDN Hub
 
SD-WAN Catalyst a brief Presentation of solution
SD-WAN Catalyst a brief  Presentation of solutionSD-WAN Catalyst a brief  Presentation of solution
SD-WAN Catalyst a brief Presentation of solutionpepegaston2030
 
OpenNebula Networking - Rubén S. Montero
OpenNebula Networking - Rubén S. MonteroOpenNebula Networking - Rubén S. Montero
OpenNebula Networking - Rubén S. MonteroOpenNebula Project
 

Similar to Building Complex Topology using NS3 (20)

Chapter14ccna
Chapter14ccnaChapter14ccna
Chapter14ccna
 
Camara Application Programming Interface (API) Overview.pdf
Camara Application Programming Interface (API) Overview.pdfCamara Application Programming Interface (API) Overview.pdf
Camara Application Programming Interface (API) Overview.pdf
 
Overview of Distributed Virtual Router (DVR) in Openstack/Neutron
Overview of Distributed Virtual Router (DVR) in Openstack/NeutronOverview of Distributed Virtual Router (DVR) in Openstack/Neutron
Overview of Distributed Virtual Router (DVR) in Openstack/Neutron
 
Chapter14ccna
Chapter14ccnaChapter14ccna
Chapter14ccna
 
Chapter14ccna
Chapter14ccnaChapter14ccna
Chapter14ccna
 
Presentation on ccna
Presentation on ccnaPresentation on ccna
Presentation on ccna
 
Intelligent Network Services through Active Flow Manipulation
Intelligent Network Services through Active Flow ManipulationIntelligent Network Services through Active Flow Manipulation
Intelligent Network Services through Active Flow Manipulation
 
Enabling Active Flow Manipulation (AFM) in Silicon-based Network Forwarding E...
Enabling Active Flow Manipulation (AFM) in Silicon-based Network Forwarding E...Enabling Active Flow Manipulation (AFM) in Silicon-based Network Forwarding E...
Enabling Active Flow Manipulation (AFM) in Silicon-based Network Forwarding E...
 
Cloud Foundry Summit 2015: Cloud Foundry and IoT Protocol Support
Cloud Foundry Summit 2015: Cloud Foundry and IoT Protocol SupportCloud Foundry Summit 2015: Cloud Foundry and IoT Protocol Support
Cloud Foundry Summit 2015: Cloud Foundry and IoT Protocol Support
 
FIWARE Tech Summit - lwM2M IoT Agent in Depth
FIWARE Tech Summit - lwM2M IoT Agent in DepthFIWARE Tech Summit - lwM2M IoT Agent in Depth
FIWARE Tech Summit - lwM2M IoT Agent in Depth
 
SDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center NetworkingSDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center Networking
 
Network Virtualization & Software-defined Networking
Network Virtualization & Software-defined NetworkingNetwork Virtualization & Software-defined Networking
Network Virtualization & Software-defined Networking
 
Contrail Enabler for agile cloud services
Contrail Enabler for agile cloud servicesContrail Enabler for agile cloud services
Contrail Enabler for agile cloud services
 
Distributed routing
Distributed routingDistributed routing
Distributed routing
 
CCNA Training
CCNA TrainingCCNA Training
CCNA Training
 
WebTram: una WebApp GWT per l'editing di dati cartografici e topologici di un...
WebTram: una WebApp GWT per l'editing di dati cartografici e topologici di un...WebTram: una WebApp GWT per l'editing di dati cartografici e topologici di un...
WebTram: una WebApp GWT per l'editing di dati cartografici e topologici di un...
 
CisCon 2018 - Overlay Management Protocol e IPsec
CisCon 2018 - Overlay Management Protocol e IPsecCisCon 2018 - Overlay Management Protocol e IPsec
CisCon 2018 - Overlay Management Protocol e IPsec
 
Network and Service Virtualization tutorial at ONUG Spring 2015
Network and Service Virtualization tutorial at ONUG Spring 2015Network and Service Virtualization tutorial at ONUG Spring 2015
Network and Service Virtualization tutorial at ONUG Spring 2015
 
SD-WAN Catalyst a brief Presentation of solution
SD-WAN Catalyst a brief  Presentation of solutionSD-WAN Catalyst a brief  Presentation of solution
SD-WAN Catalyst a brief Presentation of solution
 
OpenNebula Networking - Rubén S. Montero
OpenNebula Networking - Rubén S. MonteroOpenNebula Networking - Rubén S. Montero
OpenNebula Networking - Rubén S. Montero
 

Recently uploaded

Teachers record management system project report..pdf
Teachers record management system project report..pdfTeachers record management system project report..pdf
Teachers record management system project report..pdfKamal Acharya
 
Online book store management system project.pdf
Online book store management system project.pdfOnline book store management system project.pdf
Online book store management system project.pdfKamal Acharya
 
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...MohammadAliNayeem
 
Supermarket billing system project report..pdf
Supermarket billing system project report..pdfSupermarket billing system project report..pdf
Supermarket billing system project report..pdfKamal Acharya
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1T.D. Shashikala
 
Artificial Intelligence Bayesian Reasoning
Artificial Intelligence Bayesian ReasoningArtificial Intelligence Bayesian Reasoning
Artificial Intelligence Bayesian Reasoninghotman30312
 
ChatGPT Prompt Engineering for project managers.pdf
ChatGPT Prompt Engineering for project managers.pdfChatGPT Prompt Engineering for project managers.pdf
ChatGPT Prompt Engineering for project managers.pdfqasastareekh
 
BURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdfBURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdfKamal Acharya
 
Quiz application system project report..pdf
Quiz application system project report..pdfQuiz application system project report..pdf
Quiz application system project report..pdfKamal Acharya
 
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical EngineeringC Sai Kiran
 
Electrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission lineElectrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission lineJulioCesarSalazarHer1
 
How to Design and spec harmonic filter.pdf
How to Design and spec harmonic filter.pdfHow to Design and spec harmonic filter.pdf
How to Design and spec harmonic filter.pdftawat puangthong
 
Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...Prakhyath Rai
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfJNTUA
 
Introduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AIIntroduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AISheetal Jain
 
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWINGBRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWINGKOUSTAV SARKAR
 
Low rpm Generator for efficient energy harnessing from a two stage wind turbine
Low rpm Generator for efficient energy harnessing from a two stage wind turbineLow rpm Generator for efficient energy harnessing from a two stage wind turbine
Low rpm Generator for efficient energy harnessing from a two stage wind turbineAftabkhan575376
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfKamal Acharya
 
ANSI(ST)-III_Manufacturing-I_05052020.pdf
ANSI(ST)-III_Manufacturing-I_05052020.pdfANSI(ST)-III_Manufacturing-I_05052020.pdf
ANSI(ST)-III_Manufacturing-I_05052020.pdfBertinKamsipa1
 
Intelligent Agents, A discovery on How A Rational Agent Acts
Intelligent Agents, A discovery on How A Rational Agent ActsIntelligent Agents, A discovery on How A Rational Agent Acts
Intelligent Agents, A discovery on How A Rational Agent ActsSheetal Jain
 

Recently uploaded (20)

Teachers record management system project report..pdf
Teachers record management system project report..pdfTeachers record management system project report..pdf
Teachers record management system project report..pdf
 
Online book store management system project.pdf
Online book store management system project.pdfOnline book store management system project.pdf
Online book store management system project.pdf
 
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
 
Supermarket billing system project report..pdf
Supermarket billing system project report..pdfSupermarket billing system project report..pdf
Supermarket billing system project report..pdf
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1
 
Artificial Intelligence Bayesian Reasoning
Artificial Intelligence Bayesian ReasoningArtificial Intelligence Bayesian Reasoning
Artificial Intelligence Bayesian Reasoning
 
ChatGPT Prompt Engineering for project managers.pdf
ChatGPT Prompt Engineering for project managers.pdfChatGPT Prompt Engineering for project managers.pdf
ChatGPT Prompt Engineering for project managers.pdf
 
BURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdfBURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdf
 
Quiz application system project report..pdf
Quiz application system project report..pdfQuiz application system project report..pdf
Quiz application system project report..pdf
 
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
 
Electrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission lineElectrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission line
 
How to Design and spec harmonic filter.pdf
How to Design and spec harmonic filter.pdfHow to Design and spec harmonic filter.pdf
How to Design and spec harmonic filter.pdf
 
Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
Introduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AIIntroduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AI
 
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWINGBRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
 
Low rpm Generator for efficient energy harnessing from a two stage wind turbine
Low rpm Generator for efficient energy harnessing from a two stage wind turbineLow rpm Generator for efficient energy harnessing from a two stage wind turbine
Low rpm Generator for efficient energy harnessing from a two stage wind turbine
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
 
ANSI(ST)-III_Manufacturing-I_05052020.pdf
ANSI(ST)-III_Manufacturing-I_05052020.pdfANSI(ST)-III_Manufacturing-I_05052020.pdf
ANSI(ST)-III_Manufacturing-I_05052020.pdf
 
Intelligent Agents, A discovery on How A Rational Agent Acts
Intelligent Agents, A discovery on How A Rational Agent ActsIntelligent Agents, A discovery on How A Rational Agent Acts
Intelligent Agents, A discovery on How A Rational Agent Acts
 

Building Complex Topology using NS3

  • 2. Topology STA-1 STA-2 STA-3 AP CSMA P2P WIFI P1 P2 C1 C2 C3 C4 CLIENT SERVER UdpEchoServerHelper UdpEchoCientHelper
  • 3. RoadMap ● Writing Code ● Detail Understanding – Logging – Tracing – Attributes
  • 4. Flow Chart Point To Point CSMA WIFI Station WIFI AP NODE Container Point To Point CSMA WIFI Station WIFI AP NetDe`vice Container Point To Point CSMA WIFI Station WIFI AP SetAttributes NetDevice Point To Point CSMA Attach NetDevice to PHY &CHANNEL WIFI Station WIFI AP Configure PHY & MAC WIFI Station WIFI AP Attach NetDevice to PHY &CHANNEL Point To Point CSMA WIFI Station WIFI AP Install ProtocolStack Point To Point CSMA WIFI Station WIFI AP Assign IP Address Install Application
  • 5. Topology Description ● Channels & Net Device – Wireless – Point to Point – CSMA ● Node Container – Access Point Node – Station Nodes – Point to Point Nodes – CSMA Nodes ● Node P1 & P2 having two Net Device of different types
  • 6. Classes ● NodeContainer ● PointToPointHelper ● CsmaHelper ● YansWifiChannelHelper ● YansWifiPhyHelper ● WifiHelper ● NetDeviceContainer ● MobilityHelper ● InternetStackHelper ● Ipv4AddressHelper ● Ipv4InterfaceContainer ● UdpEchoServerHelper ● UdpEchoClientHelper ● ApplicationContainer ` Include #include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/csma-module.h" #include "ns3/internet-module.h" #include "ns3/point-to-point-module.h" #include "ns3/applications-module.h" #include "ns3/ipv4-global-routing-helper.h"
  • 7. NODE ● We are having four different types of nodes. ● Create Four Different NodeContainer – Point to Point – Station Nodes – Access Point – CSMA NodeContainer n1,n2; n1.Create(3); [...] N2.Create(1); n2.Add(n1.Get(0)); void Create(uint32_t n); Add()- used to add node in a node container Create() - used to create node/s
  • 8. NetDevice and Channel ● Three different NetDevice and Channel:- – PointToPointHelper – NetDevice & Channel – CsmaHelper – NetDevice & Channel – YansWifiChannelHelper – Channel – YansWifiPhyHelper – PHY – WifiHelper – NetDevice We use Install()method to attach NetDevice with Node It will return an object to NetDeviceContainer
  • 10. Configure WIFI NetDevice ● WifiChannel & WifiPhy abstract class – YansWifiChannel ● We use Helper [YansWifiChannelHelper] ● Set Channel related attributes – [channel switch delay, energy of received signal,etc] – YansWifiPhy ● We use Helper [YansWifiPhyHelper] ● Set PHY Layer related attributes – [propogation delay] Set CHANNEL to PHY void SetChannel(Ptr<YansWifiChannel>)- Class YansWifiPhy
  • 11. Configure MAC ● WifiMac abstract class – List of MAC Types ● AdhocWifiMac – Infrastructure less network ● ApWifiMac – Access point Node MAC ● StaWifiMac – Station Node MAC ● Etc. – We use Helper Class ● NqosWifiMacHelper or WifiMacHelper – Set the appropiate MAC from the list and Set Attributes ● void SetType(T,A,V....); ● T- Type of MAC ● A- Name of Attribute ● V –Value of Attribute
  • 12. Mobility ● It is used to track and maintain the – Current Cartesian position – Speed of an object – Placement of Node – Setup Mobility Model
  • 14. Mobility ● Assign Mobility to WIFI Nodes – List of Mobility Model ● ConstantAccelerationMobilityModel ● ConstantPositionMobilityModel ● ConstantVelocityMobilityModel ● RandomDirection2dMobilityModel ● RandomWalk2dMobilityModel ● Etc – List of Allocator Model (placement of Node) ● RandomDiscPositionAllocator ● RandomRectanglePositionAllocator ● GridPositionAllocator ● Etc.
  • 15. Mobility Model ● RandomWalk2dMobilityModel – 2D random walk mobility model – Each instance moves with a speed and direction choosen at random – Nodes moves in Boundaries specified by Rectangle – Rectangle(double xMin,double xMax,double yMin,double yMax) x-axis y-axis xMin xMax yMin yMax
  • 16. Allocator Model ● GridPositionAllocator – Allocate position on a rectangular 2D grid – List of Attributes ● MinX ● MinY ● DeltaX ● DeltaY ● GridWidth ● LayoutType – ROW_FIRST – COLUMN_FIRST 1 2 3 4 (MinX,MinY) DeltaX DeltaY GridWidth x-axis y-axis
  • 17. Mobility ● We use Helper Class – MobilityHelper ● SetMobilityModel()-Set Mobility Model ● SetPositionAllocator() - Set Position Allocator – Install the mobility on Nodes – Mobility Model [Access Point & CSMA Nodes] ● ConstantPositionMobilityModel
  • 18. Internet Stack & Ipv4Address ● Now its time to install Protocol Stack – InternetStackHelper ● Install() ● Assign IP address to the NetDevice – Ipv4InterfaceContainer ● Assign()
  • 19. Application STA-1 STA-2 STA-3 AP CSMA P2P WIFI P1 P2 C1 C2 C3 C4 CLIENT SERVER UdpEchoServerHelper UdpEchoCientHelper
  • 20. Animation ● AnimationInterface – Set Methods for Nodes ● Description – SetNodeDescription(NodeContainer,”AP”) ● Color – SetNodeColor(NodeContainer , R,G,B) ● Position – SetConstantPosition(Node,X,Y) ● Etc. – Add Background Image ● SetBackgroundImage(..,..,..,); vodi EnablePacketMetadata(boolean value)
  • 22. ● Modify the Mobility Pattern using – RandomWalk2dMobilityModel ● Distance- Change current direction and speed after moving for this distance. ● Speed – speed of node ● Bounds – Area