SlideShare a Scribd company logo
1 of 20
Download to read offline
I
WiMAX Implementation in NS3
Master Program
(Advanced Wireless Telecommunication)
By Student:
Mustafa Khaleel
II
Contents
1. Introduction ............................................................................................................................ 1
1.1. Study case ....................................................................................................................... 1
2. Network simulator 3 (NS-3).................................................................................................... 2
2.1. The basic model .............................................................................................................. 3
2.2. Ns-3 Packets.................................................................................................................... 6
2.3. Simulation Basics ............................................................................................................ 6
3. Simulation and Results ........................................................................................................... 7
Annex ............................................................................................................................................ 14
References..................................................................................................................................... 17
Figure 1 NS-2 and NS-3 ................................................................................................................... 2
Figure 2 the waf build system ........................................................................................................ 3
Figure 3 a special waf shell............................................................................................................. 3
Figure 4 the basic model................................................................................................................. 3
Figure 5 the class Application......................................................................................................... 4
Figure 6 NetDevices ........................................................................................................................ 5
Figure 7 Udpheader example ......................................................................................................... 6
Figure 8 header files ....................................................................................................................... 7
Figure 9 scheduler and log comopent........................................................................................... 7
Figure 10 Nodes .............................................................................................................................. 8
Figure 11 netDevice ........................................................................................................................ 8
Figure 12 configuration of PHY layer of Subscribers ..................................................................... 8
Figure 13 configuration of PHY layer of BaseStation..................................................................... 9
Figure 14 IP addresses..................................................................................................................... 9
Figure 15 the mobility model ......................................................................................................... 9
Figure 16 server and client-1........................................................................................................ 10
Figure 17 server and client-2......................................................................................................... 10
Figure 18 IpcsClassifierRecord user-1........................................................................................... 10
Figure 19 IpcsClassifierRecord user-2........................................................................................... 11
Figure 20 Running simulator ........................................................................................................ 11
Figure 21 simulation output......................................................................................................... 12
Figure 22 the position of nodes.................................................................................................... 12
Figure 23 Nodes in NetAnim......................................................................................................... 13
Figure 24 the transmission in time............................................................................................... 13
III
1
1. Introduction
Network simulator 3 (ns-3) is a discrete-event network simulator, targeted
primarily for research and educational use. ns-3 is free software, licensed
under the GNU GPLv2 license, and is publicly available for research,
development, and use.
The goal of the ns-3 project is to develop a preferred, open simulation
environment for networking research: it should be aligned with the
simulation needs of modern networking research and should encourage
community contribution, peer review, and validation of the software.
1.1.Study case
We use two nodes and base station in Wi-max with ns3 program v. 3.24
and simulate the traffic by changing the modulations schemes and we
will demonstrate the results packets, the delay and the packet flow
between the transmitter and receiver with animation environment
images that explain the transmission time between the nodes and the
base station, all these results will be shown in ns3 program and followed
steps.
2
2. Network simulator 3 (NS-3)
NS-3 is discrete-event network simulator, its open source (GNU GPLv2) and
it’s written in written entirely in C++ (with Python bindings).
NS-3 alignment with real systems (sockets, device, driver interface) also its
alignment with input/output standards (papa traces, ns-2 mobility scripts),
and its modular and documented core.
The figure below show the comparison between NS-2 and NS-3 from
Models view,
Figure 1 NS-2 and NS-3
3
NS-3 using the waf build system, and its Python-based framework for
configuring, compiling and installing applications.
Figure 2 the waf build system
Can run programs through a special waf shell;
Figure 3 a special waf shell
2.1.The basic model
In figure below show the basic model of ns-3
Figure 4 the basic model
Node is like a computer to which you will add functionality. One add things
like applications, protocol stacks and peripheral cards with their associated
drivers to enable the computer to do useful work. We use the same basic
model in ns-3 and it’s represented in C++ by the class Node.
4
Application
A user would typically run an application that acquires and uses the
resources controlled by the system software to accomplish some goal. It’s
represented in C++ by the class Application.
An Application may specialized versions of the application model
Application called UdpEchoClientApplication and
UdpEchoServerApplication, OnOffApplication, PacketSink, for example
client/server application set used to generate and echo simulated network
packets
Figure 5 the class Application
Channel
In the real world, one can connect a computer to a network. Often the
media over which data flows in these networks are called channels.
And it is represented in C++ by the class Channel. The Channel class
provides methods for managing communication subnetwork objects and
connecting nodes to them.
A Channel may specialized versions of the Channel model called
CsmaChannel, PointToPointChannel and WifiChannel. The CsmaChannel,
for example, models a version of a communication subnetwork that
implements a carrier sense multiple access communication medium. This
gives us Ethernet-like functionality.
5
Net Device
A net device is “installed” in a Node in order to enable the Node to
communicate with other Nodes in the simulation via Channels. Just as in a
real computer, a Node may be connected to more than one Channel via
multiple NetDevices.and NetDevices are strongly bound to Channels of a
matching type.
Figure 6 NetDevices
And there several specialized versions of the NetDevice called
CsmaNetDevice, PointToPointNetDevice, and WifiNetDevice, for example
the CsmaNetDevice is designed to work with a CsmaChannel; the
PointToPointNetDevice is designed to work with a PointToPointChannel
and a WifiNetNevice is designed to work with a WifiChannel.
Topology Helpers
Since connecting NetDevices to Nodes, NetDevices to Channels, assigning
IP addresses, etc., are such common tasks in ns-3, we call topology helpers
to make this as easy as possible, for example, it may take many distinct ns-3
core operations to create a NetDevice, add a MAC address, install that net
device on a Node, configure the node’s protocol stack, and then connect
the NetDevice to a Channel.
6
2.2.Ns-3 Packets
Each network packet contains a byte buffer, a list of tags,metadata and
buffer: bit-by-bit (serialized) representation of headers and trailers, the
tags: set of arbitrary, user-provided data structures (e.g., per-packet cross-
layer messages, or flow identifiers), finally the metadata: describes types of
headers and trailers that have been serialized.
To add a new header, subclass from Header, and write your Serialize() and
Deserialize() methods as we see in figure below, the Udpheader example
Figure 7 Udpheader example
2.3.Simulation Basics
Simulation time moves discretely from event to event as in C++ functions
schedule events to occur at specific simulation times, in ns3 we call Run()
function:
Simulation::Run() gets it all started
And the simulation will stop at specific time or when events end.
7
3. Simulation and Results
In our simulation scenario, the wireless network will composed three
nodes:
1. One base Station
2. Two subscriber stations
And subscriber station-1 sends packets to the station subscribe-2.
First we import the necessary header files defines the namespace to use.
Figure 8 header files
We create an object scheduler we will use later,
Figure 9 scheduler and log comopent
The ns-3 logging facility can be used to monitor or debug the progress of
simulation programs.
8
Figure 12 configuration of PHY layer of Subscribers
Now we create the network nodes.
- 1 base station.
- Two subscribers stations.
Figure 10 Nodes
We will create the WiMAX devices (netDevice). And also we define the type
of device for the Subscribe Stations and the Base Station.
Figure 11 netDevice
Adding extra features to the devices of Subscribers and define the
configuration of the physical layer like modulation order.
9
Figure 15 the mobility model
Adding extra features in the base station apparatus using the
Class BaseStationNetDevice.
Figure 13 configuration of PHY layer of BaseStation
We define the Internet Stack in order to implementation of TCP/IPv4- and
IPv6-related components. After that we Specify IP addresses
Installing the IP addresses of nodes.
Figure 14 IP addresses
We set positions nodes in our network. By define model the mobility
“ConstantPositionMobility” Model. Our nodes are firm on their positions
and will not move in space.
10
We set the subscriber station 0 to server and subscriber station 1 as a
client.
Figure 16 server and client-1
Figure 17 server and client-2
We define IpcsClassifierRecord of each user , and An IP packet classifier is
used to map incoming packets to appropriate connections based on a set of
criteria. The classifier maintains a list of mapping rules which associate an
IP to one of the service flows.
Figure 18 IpcsClassifierRecord user-1
11
IpcsClassifierRecord of user-2
Figure 19 IpcsClassifierRecord user-2
Finally we start we the simulator with following code
Figure 20 Running simulator
12
Results:
First we run the simulation with. /waf system and the output is,
Next we run the simulation under NetAnim environment,
We using there commands for NetAnim and we define the position of
nodes in x-axis and y-axis,
Figure 22 the position of nodes
Figure 21 simulation output
13
Finally we have the following,
Figure 23 Nodes in NetAnim
The yellow represent the Base Station and red represent Subscribers.
In following table represent the transmission between nodes with time,
Figure 24 the transmission in time
14
Annex
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/config-store-module.h"
#include "ns3/wimax-module.h"
#include "ns3/internet-module.h"
#include "ns3/global-route-manager.h"
#include "ns3/ipcs-classifier-record.h"
#include "ns3/service-flow.h"
#include <iostream>
#include "ns3/netanim-module.h"
#include "ns3/net-device-container.h"
#include "ns3/netanim-module.h"
using namespace ns3;
int main (int argc, char *argv[]){
WimaxHelper::SchedulerType scheduler =WimaxHelper::SCHED_TYPE_SIMPLE;
LogComponentEnable ("UdpClient", LOG_LEVEL_INFO);
LogComponentEnable ("UdpServer", LOG_LEVEL_INFO);
NodeContainer ssNodes;
NodeContainer bsNodes;
ssNodes.Create (2);
bsNodes.Create (1);
WimaxHelper wimax;
15
NetDeviceContainer ssDevs;
NetDeviceContainer bsDevs;
ssDevs = wimax.Install(ssNodes, WimaxHelper::DEVICE_TYPE_SUBSCRIBER_STATION,
WimaxHelper::SIMPLE_PHY_TYPE_OFDM, scheduler);
bsDevs = wimax.Install(bsNodes,
WimaxHelper::DEVICE_TYPE_BASE_STATION,WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
scheduler);
Ptr<SubscriberStationNetDevice> ss[2];
for (int i = 0; i < 2; i++) {
ss[i] = ssDevs.Get (i)->
GetObject<SubscriberStationNetDevice> ();
ss[i]->SetModulationType
(WimaxPhy::MODULATION_TYPE_QAM64_34);
}
Ptr<BaseStationNetDevice> bs;
bs = bsDevs.Get (0)->
GetObject<BaseStationNetDevice> ();
InternetStackHelper stack;
stack.Install (bsNodes);
stack.Install (ssNodes);
Ipv4AddressHelper address;
address.SetBase ("10.1.7.0", "255.255.255.0");
Ipv4InterfaceContainer SSinterfaces = address.Assign (ssDevs);
Ipv4InterfaceContainer BSinterface = address.Assign (bsDevs);
Ptr<ListPositionAllocator>
positionAlloc = CreateObject
<ListPositionAllocator> ();
positionAlloc->Add (Vector(15, 25, 0));
16
positionAlloc->Add (Vector(25, 15, 0));
positionAlloc->Add (Vector(5, 15, 0));
MobilityHelper bs_mobility;
bs_mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
bs_mobility.SetPositionAllocator(positionAlloc);
bs_mobility.Install(bsNodes);
UdpServerHelper udpServer;
ApplicationContainer serverApps;
UdpClientHelper udpClient;
ApplicationContainer clientApps;
udpServer = UdpServerHelper (22000);
serverApps = udpServer.Install (ssNodes.Get (0));
serverApps.Start (Seconds (4.0));
serverApps.Stop (Seconds (10.0));
udpClient=UdpClientHelper(SSinterfaces.GetAddress (0),22000);
udpClient.SetAttribute ("MaxPackets", UintegerValue (15000));
udpClient.SetAttribute ("Interval", TimeValue (Seconds (0.1)));
udpClient.SetAttribute ("PacketSize", UintegerValue (512));
clientApps = udpClient.Install (ssNodes.Get (1));
clientApps.Start (Seconds (5.0));
clientApps.Stop (Seconds (9.5));
Simulator::Stop (Seconds (15.0));
IpcsClassifierRecord DlClassifierUgs (Ipv4Address ("0.0.0.0"),
Ipv4Mask ("0.0.0.0"), SSinterfaces.GetAddress (0), Ipv4Mask ("255.255.255.255"), 0, 65000,
22000, 22000, 17, 1);
ServiceFlow DlServiceFlowUgs = wimax.CreateServiceFlow
(ServiceFlow::SF_DIRECTION_DOWN,ServiceFlow::SF_TYPE_RTPS, DlClassifierUgs);
ss[0]->AddServiceFlow (DlServiceFlowUgs);
IpcsClassifierRecord UlClassifierUgs (SSinterfaces.GetAddress(1), Ipv4Mask ("255.255.255.255"),
Ipv4Address ("0.0.0.0"),
17
Ipv4Mask ("0.0.0.0"), 0, 65000, 22000, 22000, 17, 1);
ServiceFlow UlServiceFlowUgs = wimax.CreateServiceFlow(ServiceFlow::SF_DIRECTION_UP,
ServiceFlow::SF_TYPE_RTPS,UlClassifierUgs);
ss[1]->AddServiceFlow (UlServiceFlowUgs);
AnimationInterface anim("animationWiMAX.xml");
anim.SetConstantPosition (ssNodes.Get(0),1.0,3.0);
anim.SetConstantPosition (ssNodes.Get(1),4.0,6.0);
anim.SetConstantPosition (bsNodes.Get(0),7.0,8.0);
Simulator::Run ();
Simulator::Destroy ();
return 0;
}
References
1. nsnam.org
2. ns-3 tutorial, Presenter: Tom Henderson,University of Washington,Simutools
Conference,March, 2008.
3.Youtube.com , Hitesh Choudhary channel.
4. ns-3 tutorial,GENI Eng. Conf., Nov. 2010
5. An IEEE 802.16 WiMAX Module for the NS-3 Simulator.

More Related Content

What's hot

What is Content centric networking
What is Content centric networkingWhat is Content centric networking
What is Content centric networkingpraison
 
Adhoc and Sensor Networks - Chapter 10
Adhoc and Sensor Networks - Chapter 10Adhoc and Sensor Networks - Chapter 10
Adhoc and Sensor Networks - Chapter 10Ali Habeeb
 
Operationalizing EVPN in the Data Center: Part 2
Operationalizing EVPN in the Data Center: Part 2Operationalizing EVPN in the Data Center: Part 2
Operationalizing EVPN in the Data Center: Part 2Cumulus Networks
 
Virtual Private Network
Virtual Private NetworkVirtual Private Network
Virtual Private NetworkRajan Kumar
 
OpenStack High Availability
OpenStack High AvailabilityOpenStack High Availability
OpenStack High AvailabilityJakub Pavlik
 
Building DataCenter networks with VXLAN BGP-EVPN
Building DataCenter networks with VXLAN BGP-EVPNBuilding DataCenter networks with VXLAN BGP-EVPN
Building DataCenter networks with VXLAN BGP-EVPNCisco Canada
 
Lecture 11 14. Adhoc routing protocols cont..
Lecture 11 14. Adhoc  routing protocols cont..Lecture 11 14. Adhoc  routing protocols cont..
Lecture 11 14. Adhoc routing protocols cont..Chandra Meena
 
Thuyet minh he thong tong dai dien thoai hi path 4000
Thuyet minh he thong tong dai dien thoai hi path 4000Thuyet minh he thong tong dai dien thoai hi path 4000
Thuyet minh he thong tong dai dien thoai hi path 4000thunguyet88
 
Destination Sequenced Distance Vector Routing (DSDV)
Destination Sequenced Distance Vector Routing (DSDV)Destination Sequenced Distance Vector Routing (DSDV)
Destination Sequenced Distance Vector Routing (DSDV)ArunChokkalingam
 
Issues of Wireless Sensor Networks
Issues of Wireless Sensor NetworksIssues of Wireless Sensor Networks
Issues of Wireless Sensor NetworksSouhaiel tekaya
 
Software Defined Networks Explained
Software Defined Networks ExplainedSoftware Defined Networks Explained
Software Defined Networks ExplainedCM Research
 
QOS (Quality of Services) - Computer Networks
 QOS (Quality of Services) - Computer Networks QOS (Quality of Services) - Computer Networks
QOS (Quality of Services) - Computer NetworksIIIT Manipur
 
SENSOR NETWORK PLATFORMS AND TOOLS
SENSOR NETWORK PLATFORMS AND TOOLSSENSOR NETWORK PLATFORMS AND TOOLS
SENSOR NETWORK PLATFORMS AND TOOLSjuno susi
 
IPsec vpn topology over GRE tunnels
IPsec vpn topology over GRE tunnelsIPsec vpn topology over GRE tunnels
IPsec vpn topology over GRE tunnelsMustafa Khaleel
 
Secure Shell(ssh)
Secure Shell(ssh)Secure Shell(ssh)
Secure Shell(ssh)Pina Parmar
 

What's hot (20)

What is Content centric networking
What is Content centric networkingWhat is Content centric networking
What is Content centric networking
 
Adhoc and Sensor Networks - Chapter 10
Adhoc and Sensor Networks - Chapter 10Adhoc and Sensor Networks - Chapter 10
Adhoc and Sensor Networks - Chapter 10
 
Operationalizing EVPN in the Data Center: Part 2
Operationalizing EVPN in the Data Center: Part 2Operationalizing EVPN in the Data Center: Part 2
Operationalizing EVPN in the Data Center: Part 2
 
Virtual Private Network
Virtual Private NetworkVirtual Private Network
Virtual Private Network
 
OpenStack High Availability
OpenStack High AvailabilityOpenStack High Availability
OpenStack High Availability
 
DPDK & Cloud Native
DPDK & Cloud NativeDPDK & Cloud Native
DPDK & Cloud Native
 
Building DataCenter networks with VXLAN BGP-EVPN
Building DataCenter networks with VXLAN BGP-EVPNBuilding DataCenter networks with VXLAN BGP-EVPN
Building DataCenter networks with VXLAN BGP-EVPN
 
Lecture 11 14. Adhoc routing protocols cont..
Lecture 11 14. Adhoc  routing protocols cont..Lecture 11 14. Adhoc  routing protocols cont..
Lecture 11 14. Adhoc routing protocols cont..
 
Networking Projects
Networking ProjectsNetworking Projects
Networking Projects
 
Thuyet minh he thong tong dai dien thoai hi path 4000
Thuyet minh he thong tong dai dien thoai hi path 4000Thuyet minh he thong tong dai dien thoai hi path 4000
Thuyet minh he thong tong dai dien thoai hi path 4000
 
Destination Sequenced Distance Vector Routing (DSDV)
Destination Sequenced Distance Vector Routing (DSDV)Destination Sequenced Distance Vector Routing (DSDV)
Destination Sequenced Distance Vector Routing (DSDV)
 
CCNP Security-Secure
CCNP Security-SecureCCNP Security-Secure
CCNP Security-Secure
 
Hybrid wireless protocols
Hybrid wireless protocolsHybrid wireless protocols
Hybrid wireless protocols
 
Issues of Wireless Sensor Networks
Issues of Wireless Sensor NetworksIssues of Wireless Sensor Networks
Issues of Wireless Sensor Networks
 
Software Defined Networks Explained
Software Defined Networks ExplainedSoftware Defined Networks Explained
Software Defined Networks Explained
 
QOS (Quality of Services) - Computer Networks
 QOS (Quality of Services) - Computer Networks QOS (Quality of Services) - Computer Networks
QOS (Quality of Services) - Computer Networks
 
SENSOR NETWORK PLATFORMS AND TOOLS
SENSOR NETWORK PLATFORMS AND TOOLSSENSOR NETWORK PLATFORMS AND TOOLS
SENSOR NETWORK PLATFORMS AND TOOLS
 
IPsec vpn topology over GRE tunnels
IPsec vpn topology over GRE tunnelsIPsec vpn topology over GRE tunnels
IPsec vpn topology over GRE tunnels
 
Secure Shell(ssh)
Secure Shell(ssh)Secure Shell(ssh)
Secure Shell(ssh)
 
macvlan and ipvlan
macvlan and ipvlanmacvlan and ipvlan
macvlan and ipvlan
 

Viewers also liked (16)

نواف النفيعي
نواف النفيعينواف النفيعي
نواف النفيعي
 
Elebda3.net 7852
Elebda3.net 7852Elebda3.net 7852
Elebda3.net 7852
 
علي الزهراني
علي الزهرانيعلي الزهراني
علي الزهراني
 
Wimax
WimaxWimax
Wimax
 
Wimax
WimaxWimax
Wimax
 
introduction to wimax
introduction to wimaxintroduction to wimax
introduction to wimax
 
Preface FOR DTMF BASED HOME APPLIANCES
Preface FOR DTMF BASED HOME APPLIANCESPreface FOR DTMF BASED HOME APPLIANCES
Preface FOR DTMF BASED HOME APPLIANCES
 
Mixed approach for scheduling process in wimax for high qos
Mixed approach for scheduling process in wimax for high qosMixed approach for scheduling process in wimax for high qos
Mixed approach for scheduling process in wimax for high qos
 
Building Complex Topology using NS3
Building Complex Topology using NS3Building Complex Topology using NS3
Building Complex Topology using NS3
 
Radio over Fiber Technology for WiMAX Systems
 Radio over Fiber Technology for WiMAX Systems Radio over Fiber Technology for WiMAX Systems
Radio over Fiber Technology for WiMAX Systems
 
Building Topology in NS3
Building Topology in NS3Building Topology in NS3
Building Topology in NS3
 
Wi fi in arabic
Wi fi in arabicWi fi in arabic
Wi fi in arabic
 
Ns3 implementation wifi
Ns3 implementation wifiNs3 implementation wifi
Ns3 implementation wifi
 
A tutorial on CloudSim
A tutorial on CloudSimA tutorial on CloudSim
A tutorial on CloudSim
 
WiMAX
WiMAXWiMAX
WiMAX
 
Wireless LAN security
Wireless LAN securityWireless LAN security
Wireless LAN security
 

Similar to WiMAX implementation in ns3

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
 
Plenzogan technology
Plenzogan technologyPlenzogan technology
Plenzogan technologyplenzogan
 
DCCN 2016 - Tutorial 1 - Communication with LAN/WLAN
DCCN 2016 - Tutorial 1 - Communication with LAN/WLANDCCN 2016 - Tutorial 1 - Communication with LAN/WLAN
DCCN 2016 - Tutorial 1 - Communication with LAN/WLANrudndccn
 
Digital_Notes___UNIT_5___EC8702___AD_HOC_AND__WIRELESS_SENSOR__NETWORKS.pdf.pdf
Digital_Notes___UNIT_5___EC8702___AD_HOC_AND__WIRELESS_SENSOR__NETWORKS.pdf.pdfDigital_Notes___UNIT_5___EC8702___AD_HOC_AND__WIRELESS_SENSOR__NETWORKS.pdf.pdf
Digital_Notes___UNIT_5___EC8702___AD_HOC_AND__WIRELESS_SENSOR__NETWORKS.pdf.pdfMathavan N
 
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
 
Final Report(Routing_Misbehavior)
Final Report(Routing_Misbehavior)Final Report(Routing_Misbehavior)
Final Report(Routing_Misbehavior)Ambreen Zafar
 
DCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystem
DCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystemDCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystem
DCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystemrudndccn
 
ECET 375 Effective Communication/tutorialrank.com
 ECET 375 Effective Communication/tutorialrank.com ECET 375 Effective Communication/tutorialrank.com
ECET 375 Effective Communication/tutorialrank.comjonhson203
 
ECET 375 Invent Yourself/newtonhelp.com
ECET 375 Invent Yourself/newtonhelp.comECET 375 Invent Yourself/newtonhelp.com
ECET 375 Invent Yourself/newtonhelp.comlechenau125
 
Performance comparision 1307.4129
Performance comparision 1307.4129Performance comparision 1307.4129
Performance comparision 1307.4129Pratik Joshi
 

Similar to WiMAX implementation in ns3 (20)

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
 
June 28 Presentation
June 28 PresentationJune 28 Presentation
June 28 Presentation
 
UDP Report
UDP ReportUDP Report
UDP Report
 
Plenzogan technology
Plenzogan technologyPlenzogan technology
Plenzogan technology
 
DCCN 2016 - Tutorial 1 - Communication with LAN/WLAN
DCCN 2016 - Tutorial 1 - Communication with LAN/WLANDCCN 2016 - Tutorial 1 - Communication with LAN/WLAN
DCCN 2016 - Tutorial 1 - Communication with LAN/WLAN
 
cscn1819.pdf
cscn1819.pdfcscn1819.pdf
cscn1819.pdf
 
opnet lab report
opnet lab reportopnet lab report
opnet lab report
 
Introduction to ns3
Introduction to ns3Introduction to ns3
Introduction to ns3
 
Digital_Notes___UNIT_5___EC8702___AD_HOC_AND__WIRELESS_SENSOR__NETWORKS.pdf.pdf
Digital_Notes___UNIT_5___EC8702___AD_HOC_AND__WIRELESS_SENSOR__NETWORKS.pdf.pdfDigital_Notes___UNIT_5___EC8702___AD_HOC_AND__WIRELESS_SENSOR__NETWORKS.pdf.pdf
Digital_Notes___UNIT_5___EC8702___AD_HOC_AND__WIRELESS_SENSOR__NETWORKS.pdf.pdf
 
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
 
NP-lab-manual (1).pdf
NP-lab-manual (1).pdfNP-lab-manual (1).pdf
NP-lab-manual (1).pdf
 
NP-lab-manual.pdf
NP-lab-manual.pdfNP-lab-manual.pdf
NP-lab-manual.pdf
 
Final Report(Routing_Misbehavior)
Final Report(Routing_Misbehavior)Final Report(Routing_Misbehavior)
Final Report(Routing_Misbehavior)
 
Virtual lab - Routing in Mobile Adhoc Networks
Virtual lab - Routing in Mobile Adhoc NetworksVirtual lab - Routing in Mobile Adhoc Networks
Virtual lab - Routing in Mobile Adhoc Networks
 
NP-lab-manual.docx
NP-lab-manual.docxNP-lab-manual.docx
NP-lab-manual.docx
 
D3.2b_v1.0_final
D3.2b_v1.0_finalD3.2b_v1.0_final
D3.2b_v1.0_final
 
DCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystem
DCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystemDCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystem
DCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystem
 
ECET 375 Effective Communication/tutorialrank.com
 ECET 375 Effective Communication/tutorialrank.com ECET 375 Effective Communication/tutorialrank.com
ECET 375 Effective Communication/tutorialrank.com
 
ECET 375 Invent Yourself/newtonhelp.com
ECET 375 Invent Yourself/newtonhelp.comECET 375 Invent Yourself/newtonhelp.com
ECET 375 Invent Yourself/newtonhelp.com
 
Performance comparision 1307.4129
Performance comparision 1307.4129Performance comparision 1307.4129
Performance comparision 1307.4129
 

More from Mustafa Khaleel

More from Mustafa Khaleel (6)

LTE-U
LTE-ULTE-U
LTE-U
 
Massive mimo
Massive mimoMassive mimo
Massive mimo
 
Turbocode
TurbocodeTurbocode
Turbocode
 
Mm wave
Mm waveMm wave
Mm wave
 
Adaptive filters
Adaptive filtersAdaptive filters
Adaptive filters
 
Ultra wideband technology (UWB)
Ultra wideband technology (UWB)Ultra wideband technology (UWB)
Ultra wideband technology (UWB)
 

Recently uploaded

The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 

Recently uploaded (20)

The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 

WiMAX implementation in ns3

  • 1. I WiMAX Implementation in NS3 Master Program (Advanced Wireless Telecommunication) By Student: Mustafa Khaleel
  • 2. II Contents 1. Introduction ............................................................................................................................ 1 1.1. Study case ....................................................................................................................... 1 2. Network simulator 3 (NS-3).................................................................................................... 2 2.1. The basic model .............................................................................................................. 3 2.2. Ns-3 Packets.................................................................................................................... 6 2.3. Simulation Basics ............................................................................................................ 6 3. Simulation and Results ........................................................................................................... 7 Annex ............................................................................................................................................ 14 References..................................................................................................................................... 17 Figure 1 NS-2 and NS-3 ................................................................................................................... 2 Figure 2 the waf build system ........................................................................................................ 3 Figure 3 a special waf shell............................................................................................................. 3 Figure 4 the basic model................................................................................................................. 3 Figure 5 the class Application......................................................................................................... 4 Figure 6 NetDevices ........................................................................................................................ 5 Figure 7 Udpheader example ......................................................................................................... 6 Figure 8 header files ....................................................................................................................... 7 Figure 9 scheduler and log comopent........................................................................................... 7 Figure 10 Nodes .............................................................................................................................. 8 Figure 11 netDevice ........................................................................................................................ 8 Figure 12 configuration of PHY layer of Subscribers ..................................................................... 8 Figure 13 configuration of PHY layer of BaseStation..................................................................... 9 Figure 14 IP addresses..................................................................................................................... 9 Figure 15 the mobility model ......................................................................................................... 9 Figure 16 server and client-1........................................................................................................ 10 Figure 17 server and client-2......................................................................................................... 10 Figure 18 IpcsClassifierRecord user-1........................................................................................... 10 Figure 19 IpcsClassifierRecord user-2........................................................................................... 11 Figure 20 Running simulator ........................................................................................................ 11 Figure 21 simulation output......................................................................................................... 12 Figure 22 the position of nodes.................................................................................................... 12 Figure 23 Nodes in NetAnim......................................................................................................... 13 Figure 24 the transmission in time............................................................................................... 13
  • 3. III
  • 4. 1 1. Introduction Network simulator 3 (ns-3) is a discrete-event network simulator, targeted primarily for research and educational use. ns-3 is free software, licensed under the GNU GPLv2 license, and is publicly available for research, development, and use. The goal of the ns-3 project is to develop a preferred, open simulation environment for networking research: it should be aligned with the simulation needs of modern networking research and should encourage community contribution, peer review, and validation of the software. 1.1.Study case We use two nodes and base station in Wi-max with ns3 program v. 3.24 and simulate the traffic by changing the modulations schemes and we will demonstrate the results packets, the delay and the packet flow between the transmitter and receiver with animation environment images that explain the transmission time between the nodes and the base station, all these results will be shown in ns3 program and followed steps.
  • 5. 2 2. Network simulator 3 (NS-3) NS-3 is discrete-event network simulator, its open source (GNU GPLv2) and it’s written in written entirely in C++ (with Python bindings). NS-3 alignment with real systems (sockets, device, driver interface) also its alignment with input/output standards (papa traces, ns-2 mobility scripts), and its modular and documented core. The figure below show the comparison between NS-2 and NS-3 from Models view, Figure 1 NS-2 and NS-3
  • 6. 3 NS-3 using the waf build system, and its Python-based framework for configuring, compiling and installing applications. Figure 2 the waf build system Can run programs through a special waf shell; Figure 3 a special waf shell 2.1.The basic model In figure below show the basic model of ns-3 Figure 4 the basic model Node is like a computer to which you will add functionality. One add things like applications, protocol stacks and peripheral cards with their associated drivers to enable the computer to do useful work. We use the same basic model in ns-3 and it’s represented in C++ by the class Node.
  • 7. 4 Application A user would typically run an application that acquires and uses the resources controlled by the system software to accomplish some goal. It’s represented in C++ by the class Application. An Application may specialized versions of the application model Application called UdpEchoClientApplication and UdpEchoServerApplication, OnOffApplication, PacketSink, for example client/server application set used to generate and echo simulated network packets Figure 5 the class Application Channel In the real world, one can connect a computer to a network. Often the media over which data flows in these networks are called channels. And it is represented in C++ by the class Channel. The Channel class provides methods for managing communication subnetwork objects and connecting nodes to them. A Channel may specialized versions of the Channel model called CsmaChannel, PointToPointChannel and WifiChannel. The CsmaChannel, for example, models a version of a communication subnetwork that implements a carrier sense multiple access communication medium. This gives us Ethernet-like functionality.
  • 8. 5 Net Device A net device is “installed” in a Node in order to enable the Node to communicate with other Nodes in the simulation via Channels. Just as in a real computer, a Node may be connected to more than one Channel via multiple NetDevices.and NetDevices are strongly bound to Channels of a matching type. Figure 6 NetDevices And there several specialized versions of the NetDevice called CsmaNetDevice, PointToPointNetDevice, and WifiNetDevice, for example the CsmaNetDevice is designed to work with a CsmaChannel; the PointToPointNetDevice is designed to work with a PointToPointChannel and a WifiNetNevice is designed to work with a WifiChannel. Topology Helpers Since connecting NetDevices to Nodes, NetDevices to Channels, assigning IP addresses, etc., are such common tasks in ns-3, we call topology helpers to make this as easy as possible, for example, it may take many distinct ns-3 core operations to create a NetDevice, add a MAC address, install that net device on a Node, configure the node’s protocol stack, and then connect the NetDevice to a Channel.
  • 9. 6 2.2.Ns-3 Packets Each network packet contains a byte buffer, a list of tags,metadata and buffer: bit-by-bit (serialized) representation of headers and trailers, the tags: set of arbitrary, user-provided data structures (e.g., per-packet cross- layer messages, or flow identifiers), finally the metadata: describes types of headers and trailers that have been serialized. To add a new header, subclass from Header, and write your Serialize() and Deserialize() methods as we see in figure below, the Udpheader example Figure 7 Udpheader example 2.3.Simulation Basics Simulation time moves discretely from event to event as in C++ functions schedule events to occur at specific simulation times, in ns3 we call Run() function: Simulation::Run() gets it all started And the simulation will stop at specific time or when events end.
  • 10. 7 3. Simulation and Results In our simulation scenario, the wireless network will composed three nodes: 1. One base Station 2. Two subscriber stations And subscriber station-1 sends packets to the station subscribe-2. First we import the necessary header files defines the namespace to use. Figure 8 header files We create an object scheduler we will use later, Figure 9 scheduler and log comopent The ns-3 logging facility can be used to monitor or debug the progress of simulation programs.
  • 11. 8 Figure 12 configuration of PHY layer of Subscribers Now we create the network nodes. - 1 base station. - Two subscribers stations. Figure 10 Nodes We will create the WiMAX devices (netDevice). And also we define the type of device for the Subscribe Stations and the Base Station. Figure 11 netDevice Adding extra features to the devices of Subscribers and define the configuration of the physical layer like modulation order.
  • 12. 9 Figure 15 the mobility model Adding extra features in the base station apparatus using the Class BaseStationNetDevice. Figure 13 configuration of PHY layer of BaseStation We define the Internet Stack in order to implementation of TCP/IPv4- and IPv6-related components. After that we Specify IP addresses Installing the IP addresses of nodes. Figure 14 IP addresses We set positions nodes in our network. By define model the mobility “ConstantPositionMobility” Model. Our nodes are firm on their positions and will not move in space.
  • 13. 10 We set the subscriber station 0 to server and subscriber station 1 as a client. Figure 16 server and client-1 Figure 17 server and client-2 We define IpcsClassifierRecord of each user , and An IP packet classifier is used to map incoming packets to appropriate connections based on a set of criteria. The classifier maintains a list of mapping rules which associate an IP to one of the service flows. Figure 18 IpcsClassifierRecord user-1
  • 14. 11 IpcsClassifierRecord of user-2 Figure 19 IpcsClassifierRecord user-2 Finally we start we the simulator with following code Figure 20 Running simulator
  • 15. 12 Results: First we run the simulation with. /waf system and the output is, Next we run the simulation under NetAnim environment, We using there commands for NetAnim and we define the position of nodes in x-axis and y-axis, Figure 22 the position of nodes Figure 21 simulation output
  • 16. 13 Finally we have the following, Figure 23 Nodes in NetAnim The yellow represent the Base Station and red represent Subscribers. In following table represent the transmission between nodes with time, Figure 24 the transmission in time
  • 17. 14 Annex #include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/applications-module.h" #include "ns3/mobility-module.h" #include "ns3/config-store-module.h" #include "ns3/wimax-module.h" #include "ns3/internet-module.h" #include "ns3/global-route-manager.h" #include "ns3/ipcs-classifier-record.h" #include "ns3/service-flow.h" #include <iostream> #include "ns3/netanim-module.h" #include "ns3/net-device-container.h" #include "ns3/netanim-module.h" using namespace ns3; int main (int argc, char *argv[]){ WimaxHelper::SchedulerType scheduler =WimaxHelper::SCHED_TYPE_SIMPLE; LogComponentEnable ("UdpClient", LOG_LEVEL_INFO); LogComponentEnable ("UdpServer", LOG_LEVEL_INFO); NodeContainer ssNodes; NodeContainer bsNodes; ssNodes.Create (2); bsNodes.Create (1); WimaxHelper wimax;
  • 18. 15 NetDeviceContainer ssDevs; NetDeviceContainer bsDevs; ssDevs = wimax.Install(ssNodes, WimaxHelper::DEVICE_TYPE_SUBSCRIBER_STATION, WimaxHelper::SIMPLE_PHY_TYPE_OFDM, scheduler); bsDevs = wimax.Install(bsNodes, WimaxHelper::DEVICE_TYPE_BASE_STATION,WimaxHelper::SIMPLE_PHY_TYPE_OFDM, scheduler); Ptr<SubscriberStationNetDevice> ss[2]; for (int i = 0; i < 2; i++) { ss[i] = ssDevs.Get (i)-> GetObject<SubscriberStationNetDevice> (); ss[i]->SetModulationType (WimaxPhy::MODULATION_TYPE_QAM64_34); } Ptr<BaseStationNetDevice> bs; bs = bsDevs.Get (0)-> GetObject<BaseStationNetDevice> (); InternetStackHelper stack; stack.Install (bsNodes); stack.Install (ssNodes); Ipv4AddressHelper address; address.SetBase ("10.1.7.0", "255.255.255.0"); Ipv4InterfaceContainer SSinterfaces = address.Assign (ssDevs); Ipv4InterfaceContainer BSinterface = address.Assign (bsDevs); Ptr<ListPositionAllocator> positionAlloc = CreateObject <ListPositionAllocator> (); positionAlloc->Add (Vector(15, 25, 0));
  • 19. 16 positionAlloc->Add (Vector(25, 15, 0)); positionAlloc->Add (Vector(5, 15, 0)); MobilityHelper bs_mobility; bs_mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel"); bs_mobility.SetPositionAllocator(positionAlloc); bs_mobility.Install(bsNodes); UdpServerHelper udpServer; ApplicationContainer serverApps; UdpClientHelper udpClient; ApplicationContainer clientApps; udpServer = UdpServerHelper (22000); serverApps = udpServer.Install (ssNodes.Get (0)); serverApps.Start (Seconds (4.0)); serverApps.Stop (Seconds (10.0)); udpClient=UdpClientHelper(SSinterfaces.GetAddress (0),22000); udpClient.SetAttribute ("MaxPackets", UintegerValue (15000)); udpClient.SetAttribute ("Interval", TimeValue (Seconds (0.1))); udpClient.SetAttribute ("PacketSize", UintegerValue (512)); clientApps = udpClient.Install (ssNodes.Get (1)); clientApps.Start (Seconds (5.0)); clientApps.Stop (Seconds (9.5)); Simulator::Stop (Seconds (15.0)); IpcsClassifierRecord DlClassifierUgs (Ipv4Address ("0.0.0.0"), Ipv4Mask ("0.0.0.0"), SSinterfaces.GetAddress (0), Ipv4Mask ("255.255.255.255"), 0, 65000, 22000, 22000, 17, 1); ServiceFlow DlServiceFlowUgs = wimax.CreateServiceFlow (ServiceFlow::SF_DIRECTION_DOWN,ServiceFlow::SF_TYPE_RTPS, DlClassifierUgs); ss[0]->AddServiceFlow (DlServiceFlowUgs); IpcsClassifierRecord UlClassifierUgs (SSinterfaces.GetAddress(1), Ipv4Mask ("255.255.255.255"), Ipv4Address ("0.0.0.0"),
  • 20. 17 Ipv4Mask ("0.0.0.0"), 0, 65000, 22000, 22000, 17, 1); ServiceFlow UlServiceFlowUgs = wimax.CreateServiceFlow(ServiceFlow::SF_DIRECTION_UP, ServiceFlow::SF_TYPE_RTPS,UlClassifierUgs); ss[1]->AddServiceFlow (UlServiceFlowUgs); AnimationInterface anim("animationWiMAX.xml"); anim.SetConstantPosition (ssNodes.Get(0),1.0,3.0); anim.SetConstantPosition (ssNodes.Get(1),4.0,6.0); anim.SetConstantPosition (bsNodes.Get(0),7.0,8.0); Simulator::Run (); Simulator::Destroy (); return 0; } References 1. nsnam.org 2. ns-3 tutorial, Presenter: Tom Henderson,University of Washington,Simutools Conference,March, 2008. 3.Youtube.com , Hitesh Choudhary channel. 4. ns-3 tutorial,GENI Eng. Conf., Nov. 2010 5. An IEEE 802.16 WiMAX Module for the NS-3 Simulator.