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

OpenvSwitch Deep Dive
OpenvSwitch Deep DiveOpenvSwitch Deep Dive
OpenvSwitch Deep Diverajdeep
 
1000 Ccna Questions And Answers
1000 Ccna Questions And Answers1000 Ccna Questions And Answers
1000 Ccna Questions And AnswersCCNAResources
 
Unit IOT NETCONF.pptx
Unit IOT NETCONF.pptxUnit IOT NETCONF.pptx
Unit IOT NETCONF.pptxsridharan83
 
Bastion jump hosts with Teleport
Bastion jump hosts with TeleportBastion jump hosts with Teleport
Bastion jump hosts with TeleportFaelix Ltd
 
pfSense firewall workshop guide
pfSense firewall workshop guidepfSense firewall workshop guide
pfSense firewall workshop guideSopon Tumchota
 
VPN (virtual private network)
VPN (virtual private network) VPN (virtual private network)
VPN (virtual private network) Netwax Lab
 
mobile ad-hoc network (MANET) and its applications
mobile ad-hoc network (MANET) and its applicationsmobile ad-hoc network (MANET) and its applications
mobile ad-hoc network (MANET) and its applicationsAman Gupta
 
Software Defined Network - SDN
Software Defined Network - SDNSoftware Defined Network - SDN
Software Defined Network - SDNVenkata Naga Ravi
 
CCNA Security - Chapter 3
CCNA Security - Chapter 3CCNA Security - Chapter 3
CCNA Security - Chapter 3Irsandi Hasan
 
Mobile Network Layer
Mobile Network LayerMobile Network Layer
Mobile Network LayerRahul Hada
 
Ethernet - Networking presentation
Ethernet - Networking presentationEthernet - Networking presentation
Ethernet - Networking presentationViet Nguyen
 
Introduction to Network Function Virtualization (NFV)
Introduction to Network Function Virtualization (NFV)Introduction to Network Function Virtualization (NFV)
Introduction to Network Function Virtualization (NFV)rjain51
 

What's hot (20)

OpenvSwitch Deep Dive
OpenvSwitch Deep DiveOpenvSwitch Deep Dive
OpenvSwitch Deep Dive
 
1000 Ccna Questions And Answers
1000 Ccna Questions And Answers1000 Ccna Questions And Answers
1000 Ccna Questions And Answers
 
Unit IOT NETCONF.pptx
Unit IOT NETCONF.pptxUnit IOT NETCONF.pptx
Unit IOT NETCONF.pptx
 
Bastion jump hosts with Teleport
Bastion jump hosts with TeleportBastion jump hosts with Teleport
Bastion jump hosts with Teleport
 
VLAN vs VXLAN
VLAN vs VXLANVLAN vs VXLAN
VLAN vs VXLAN
 
pfSense firewall workshop guide
pfSense firewall workshop guidepfSense firewall workshop guide
pfSense firewall workshop guide
 
Ad-Hoc Networks
Ad-Hoc NetworksAd-Hoc Networks
Ad-Hoc Networks
 
VPN (virtual private network)
VPN (virtual private network) VPN (virtual private network)
VPN (virtual private network)
 
FTP & TFTP
FTP & TFTPFTP & TFTP
FTP & TFTP
 
mobile ad-hoc network (MANET) and its applications
mobile ad-hoc network (MANET) and its applicationsmobile ad-hoc network (MANET) and its applications
mobile ad-hoc network (MANET) and its applications
 
AMQP
AMQPAMQP
AMQP
 
Software Defined Network - SDN
Software Defined Network - SDNSoftware Defined Network - SDN
Software Defined Network - SDN
 
6LoWPAN: An Open IoT Networking Protocol
6LoWPAN: An Open IoT Networking Protocol6LoWPAN: An Open IoT Networking Protocol
6LoWPAN: An Open IoT Networking Protocol
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
An Introduction to OMNeT++ 5.1
An Introduction to OMNeT++ 5.1An Introduction to OMNeT++ 5.1
An Introduction to OMNeT++ 5.1
 
CCNA Security - Chapter 3
CCNA Security - Chapter 3CCNA Security - Chapter 3
CCNA Security - Chapter 3
 
Mobile Network Layer
Mobile Network LayerMobile Network Layer
Mobile Network Layer
 
Ethernet - Networking presentation
Ethernet - Networking presentationEthernet - Networking presentation
Ethernet - Networking presentation
 
Introduction to Network Function Virtualization (NFV)
Introduction to Network Function Virtualization (NFV)Introduction to Network Function Virtualization (NFV)
Introduction to Network Function Virtualization (NFV)
 
Protocol snmp
Protocol snmpProtocol snmp
Protocol snmp
 

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
 
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
 
ns-3: History and Future
ns-3: History and Futurens-3: History and Future
ns-3: History and Futuremathieu_lacage
 
Network Simulation NS3
Network Simulation NS3Network Simulation NS3
Network Simulation NS3baddi youssef
 

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
 
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
 
ICT role in Yemen
ICT role in Yemen ICT role in Yemen
ICT role in Yemen
 
ns-3: History and Future
ns-3: History and Futurens-3: History and Future
ns-3: History and Future
 
Network Simulation NS3
Network Simulation NS3Network Simulation NS3
Network Simulation NS3
 

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

Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...drjose256
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashidFaiyazSheikh
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.benjamincojr
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdfAlexander Litvinenko
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfragupathi90
 
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
 
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Lovely Professional University
 
Introduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of ArduinoIntroduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of ArduinoAbhimanyu Sangale
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..MaherOthman7
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfJNTUA
 
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...Nitin Sonavane
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdfKamal Acharya
 
Lab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docxLab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docxRashidFaridChishti
 
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUUNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUankushspencer015
 
Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)NareenAsad
 
Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemSampad Kar
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxMustafa Ahmed
 
Multivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptxMultivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptxalijaker017
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...archanaece3
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...josephjonse
 

Recently uploaded (20)

Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded Systems
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdf
 
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
 
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
 
Introduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of ArduinoIntroduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of Arduino
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdf
 
Lab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docxLab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docx
 
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUUNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
 
Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)
 
Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating System
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 
Multivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptxMultivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptx
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 

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