SlideShare uma empresa Scribd logo
1 de 25
ns  network simulator Edwin Hernandez January 19 th , 2001 Harris Lab Seminar                       
Background on  ns ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Characteristics of  ns ,[object Object],[object Object],[object Object],[object Object]
Installation process for  ns ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The starting point ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A test script for  ns ,[object Object],[object Object],[object Object],set ns_ [new Simulator] $ns_ at 1 “puts hello world” $ns_ at 1.5  “exit” $ns_ run
Creating the network nodes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creating TCP traffic ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creating TCP Traffic ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creating UDP traffic ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Polling the LossMonitor proc record {sink} { global fthrput fpcklost  #Get an instance of the simulator set ns [Simulator instance] #Set the time for polling set time 0.25 #How many bytes have been received by the traffic set bw1 [$sink set bytes_] set lpkts [$sink set nlost_] set now [$ns now] puts $fthrput "$now [expr $bw1/$time*8]" puts $fpcklost "$now $lpkts" #Reset the bytes_ values on the traffic sinks $sink set bytes_ 0 $sink set nlost_ 0 #Re-schedule the record function $ns at [expr $now+$time] "record sink" }
Creating UDP traffic ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creating UDP traffic ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Wireless extensions  ,[object Object],[object Object],[object Object]
Simulation of two wireless nodes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Simple wireless simulation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Configuring the wireless/phy ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Important initialization variables ,[object Object],[object Object],[object Object],[object Object],[object Object]
Creating the mobile nodes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Adding movement to the nodes ,[object Object],[object Object],[object Object],[object Object]
Tracing the node movement and traffic information ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
New trace format ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
We can visualize the trace/nam files Network animator screenshots of an ad-hoc network simulation (courtesy of S. Shah)
ns-2  can be modified ,[object Object],[object Object],class TwoRayGround : public Propagation { public: TwoRayGround(); virtual double Pr(PacketStamp *tx, PacketStamp *rx,  WirelessPhy *ifp); protected: double TwoRay(double Pt, double Gt, double Gr, double ht,  double hr, double L$ double last_hr, last_ht; double crossover_dist; };
For more internals and how to modify  ns ,[object Object],[object Object],[object Object],[object Object]

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Ns2
Ns2Ns2
Ns2
 
Introduction to NS2 - Cont..
Introduction to NS2 - Cont..Introduction to NS2 - Cont..
Introduction to NS2 - Cont..
 
Network simulator 2
Network simulator 2Network simulator 2
Network simulator 2
 
Session 1 introduction to ns2
Session 1   introduction to ns2Session 1   introduction to ns2
Session 1 introduction to ns2
 
Ns2
Ns2Ns2
Ns2
 
Ns2
Ns2Ns2
Ns2
 
Ns2
Ns2Ns2
Ns2
 
Ns2 introduction 2
Ns2 introduction 2Ns2 introduction 2
Ns2 introduction 2
 
Ns2
Ns2Ns2
Ns2
 
Network Simulator Tutorial
Network Simulator TutorialNetwork Simulator Tutorial
Network Simulator Tutorial
 
Venkat ns2
Venkat ns2Venkat ns2
Venkat ns2
 
Error Control in Multimedia Communications using Wireless Sensor Networks report
Error Control in Multimedia Communications using Wireless Sensor Networks reportError Control in Multimedia Communications using Wireless Sensor Networks report
Error Control in Multimedia Communications using Wireless Sensor Networks report
 
Extending ns
Extending nsExtending ns
Extending ns
 
This is not your father's monitoring.
This is not your father's monitoring.This is not your father's monitoring.
This is not your father's monitoring.
 
Artimon - Apache Flume (incubating) NYC Meetup 20111108
Artimon - Apache Flume (incubating) NYC Meetup 20111108Artimon - Apache Flume (incubating) NYC Meetup 20111108
Artimon - Apache Flume (incubating) NYC Meetup 20111108
 
Protocol handler in Gecko
Protocol handler in GeckoProtocol handler in Gecko
Protocol handler in Gecko
 
#2 (UDP)
#2 (UDP)#2 (UDP)
#2 (UDP)
 
Introduction to Rust
Introduction to RustIntroduction to Rust
Introduction to Rust
 
Advanced cocos2d
Advanced cocos2dAdvanced cocos2d
Advanced cocos2d
 
Udp socket programming(Florian)
Udp socket programming(Florian)Udp socket programming(Florian)
Udp socket programming(Florian)
 

Semelhante a Ns network simulator

NS2-tutorial.ppt
NS2-tutorial.pptNS2-tutorial.ppt
NS2-tutorial.pptWajath
 
Cs757 ns2-tutorial-exercise
Cs757 ns2-tutorial-exerciseCs757 ns2-tutorial-exercise
Cs757 ns2-tutorial-exercisePratik Joshi
 
ns2-lecture.ppt
ns2-lecture.pptns2-lecture.ppt
ns2-lecture.pptAnniModgil
 
Ns2: OTCL - PArt II
Ns2: OTCL - PArt IINs2: OTCL - PArt II
Ns2: OTCL - PArt IIAjit Nayak
 
Network simulator 2
Network simulator 2Network simulator 2
Network simulator 2AAKASH S
 
Network simulator 2
Network simulator 2Network simulator 2
Network simulator 2AAKASH S
 
study-of-network-simulator.pdf
study-of-network-simulator.pdfstudy-of-network-simulator.pdf
study-of-network-simulator.pdfJayaprasanna4
 
link-state-routing-3.pdf
link-state-routing-3.pdflink-state-routing-3.pdf
link-state-routing-3.pdfJayaprasanna4
 
Ns2: Introduction - Part I
Ns2: Introduction - Part INs2: Introduction - Part I
Ns2: Introduction - Part IAjit Nayak
 
18CSL51 - Network Lab Manual.pdf
18CSL51 - Network Lab Manual.pdf18CSL51 - Network Lab Manual.pdf
18CSL51 - Network Lab Manual.pdfSelvaraj Seerangan
 
Running wireless simulations in ns
Running wireless simulations in nsRunning wireless simulations in ns
Running wireless simulations in nsagam_alpine
 

Semelhante a Ns network simulator (20)

NS2-tutorial.ppt
NS2-tutorial.pptNS2-tutorial.ppt
NS2-tutorial.ppt
 
NS2-tutorial.pdf
NS2-tutorial.pdfNS2-tutorial.pdf
NS2-tutorial.pdf
 
Introduction to ns2
Introduction to ns2Introduction to ns2
Introduction to ns2
 
Cs757 ns2-tutorial-exercise
Cs757 ns2-tutorial-exerciseCs757 ns2-tutorial-exercise
Cs757 ns2-tutorial-exercise
 
Ns2 ns3 training in mohali
Ns2 ns3 training in mohaliNs2 ns3 training in mohali
Ns2 ns3 training in mohali
 
ns2-lecture.ppt
ns2-lecture.pptns2-lecture.ppt
ns2-lecture.ppt
 
Ns tutorial
Ns tutorialNs tutorial
Ns tutorial
 
Ns2: OTCL - PArt II
Ns2: OTCL - PArt IINs2: OTCL - PArt II
Ns2: OTCL - PArt II
 
Network simulator 2
Network simulator 2Network simulator 2
Network simulator 2
 
Network simulator 2
Network simulator 2Network simulator 2
Network simulator 2
 
Ns2pre
Ns2preNs2pre
Ns2pre
 
NS2 (1).docx
NS2 (1).docxNS2 (1).docx
NS2 (1).docx
 
study-of-network-simulator.pdf
study-of-network-simulator.pdfstudy-of-network-simulator.pdf
study-of-network-simulator.pdf
 
Ns fundamentals 1
Ns fundamentals 1Ns fundamentals 1
Ns fundamentals 1
 
cscn1819.pdf
cscn1819.pdfcscn1819.pdf
cscn1819.pdf
 
link-state-routing-3.pdf
link-state-routing-3.pdflink-state-routing-3.pdf
link-state-routing-3.pdf
 
Ns2: Introduction - Part I
Ns2: Introduction - Part INs2: Introduction - Part I
Ns2: Introduction - Part I
 
18CSL51 - Network Lab Manual.pdf
18CSL51 - Network Lab Manual.pdf18CSL51 - Network Lab Manual.pdf
18CSL51 - Network Lab Manual.pdf
 
Ns2
Ns2Ns2
Ns2
 
Running wireless simulations in ns
Running wireless simulations in nsRunning wireless simulations in ns
Running wireless simulations in ns
 

Mais de Dr. Edwin Hernandez

MEVIA Platform for Music and Video
MEVIA Platform for Music and VideoMEVIA Platform for Music and Video
MEVIA Platform for Music and VideoDr. Edwin Hernandez
 
Proposal NFT Metaverse Projects.pdf
Proposal NFT Metaverse Projects.pdfProposal NFT Metaverse Projects.pdf
Proposal NFT Metaverse Projects.pdfDr. Edwin Hernandez
 
Next Generation Spaces for Startups
Next Generation Spaces for Startups Next Generation Spaces for Startups
Next Generation Spaces for Startups Dr. Edwin Hernandez
 
Analisis del Fraude Electoral en el 2017 - EGLA CORP
Analisis del Fraude Electoral en el 2017 - EGLA CORPAnalisis del Fraude Electoral en el 2017 - EGLA CORP
Analisis del Fraude Electoral en el 2017 - EGLA CORPDr. Edwin Hernandez
 
EGLAVATOR - Innovation, intellectual property services, and capital 2022 - 1
EGLAVATOR - Innovation, intellectual property services, and capital 2022 - 1EGLAVATOR - Innovation, intellectual property services, and capital 2022 - 1
EGLAVATOR - Innovation, intellectual property services, and capital 2022 - 1Dr. Edwin Hernandez
 
MEVIA and Cloud to Cable TV Intellectual Property
MEVIA and Cloud to Cable TV Intellectual PropertyMEVIA and Cloud to Cable TV Intellectual Property
MEVIA and Cloud to Cable TV Intellectual PropertyDr. Edwin Hernandez
 
Tips para mejorar ventas digitales
Tips para mejorar ventas digitalesTips para mejorar ventas digitales
Tips para mejorar ventas digitalesDr. Edwin Hernandez
 
Securing 4G and LTE systems with Deep Learning and Virtualization
Securing 4G and LTE systems with Deep Learning and VirtualizationSecuring 4G and LTE systems with Deep Learning and Virtualization
Securing 4G and LTE systems with Deep Learning and VirtualizationDr. Edwin Hernandez
 
MEVIA - Technology Updates - 2020
MEVIA - Technology Updates -  2020MEVIA - Technology Updates -  2020
MEVIA - Technology Updates - 2020Dr. Edwin Hernandez
 
MEVIA - Entertaiment and Cloud-based Solution for Yachts
MEVIA - Entertaiment and Cloud-based Solution for Yachts MEVIA - Entertaiment and Cloud-based Solution for Yachts
MEVIA - Entertaiment and Cloud-based Solution for Yachts Dr. Edwin Hernandez
 
NextGENTV broadcasting with Cloud to Cable (ATSC 3.0) - Broadcasting to CABSAT
NextGENTV broadcasting with Cloud to Cable  (ATSC 3.0) - Broadcasting to CABSATNextGENTV broadcasting with Cloud to Cable  (ATSC 3.0) - Broadcasting to CABSAT
NextGENTV broadcasting with Cloud to Cable (ATSC 3.0) - Broadcasting to CABSATDr. Edwin Hernandez
 
New Revenue Opportunities for Cloud Apps and Services with CloudtoCable
New Revenue Opportunities for Cloud Apps and Services with CloudtoCableNew Revenue Opportunities for Cloud Apps and Services with CloudtoCable
New Revenue Opportunities for Cloud Apps and Services with CloudtoCableDr. Edwin Hernandez
 
EGLA CORP: Innovation, Intellectual Property Services, and Capital
EGLA CORP:  Innovation, Intellectual Property Services, and CapitalEGLA CORP:  Innovation, Intellectual Property Services, and Capital
EGLA CORP: Innovation, Intellectual Property Services, and CapitalDr. Edwin Hernandez
 
Music for Cable Music Service for Operators
Music for Cable   Music Service for OperatorsMusic for Cable   Music Service for Operators
Music for Cable Music Service for OperatorsDr. Edwin Hernandez
 
Cloud to Cable intellectual Property Portfolio
Cloud to Cable intellectual Property PortfolioCloud to Cable intellectual Property Portfolio
Cloud to Cable intellectual Property PortfolioDr. Edwin Hernandez
 
Music for Cable TV - Channel Lineup
Music for Cable TV - Channel LineupMusic for Cable TV - Channel Lineup
Music for Cable TV - Channel LineupDr. Edwin Hernandez
 

Mais de Dr. Edwin Hernandez (20)

MEVIA Platform for Music and Video
MEVIA Platform for Music and VideoMEVIA Platform for Music and Video
MEVIA Platform for Music and Video
 
Proposal NFT Metaverse Projects.pdf
Proposal NFT Metaverse Projects.pdfProposal NFT Metaverse Projects.pdf
Proposal NFT Metaverse Projects.pdf
 
Emulation MobileCAD
Emulation MobileCADEmulation MobileCAD
Emulation MobileCAD
 
EGLA NFT Offering
EGLA NFT OfferingEGLA NFT Offering
EGLA NFT Offering
 
Next Generation Spaces for Startups
Next Generation Spaces for Startups Next Generation Spaces for Startups
Next Generation Spaces for Startups
 
Analisis del Fraude Electoral en el 2017 - EGLA CORP
Analisis del Fraude Electoral en el 2017 - EGLA CORPAnalisis del Fraude Electoral en el 2017 - EGLA CORP
Analisis del Fraude Electoral en el 2017 - EGLA CORP
 
EGLAVATOR - Innovation, intellectual property services, and capital 2022 - 1
EGLAVATOR - Innovation, intellectual property services, and capital 2022 - 1EGLAVATOR - Innovation, intellectual property services, and capital 2022 - 1
EGLAVATOR - Innovation, intellectual property services, and capital 2022 - 1
 
MEVIA and Cloud to Cable TV Intellectual Property
MEVIA and Cloud to Cable TV Intellectual PropertyMEVIA and Cloud to Cable TV Intellectual Property
MEVIA and Cloud to Cable TV Intellectual Property
 
EGLAVATOR - Who are we?
EGLAVATOR - Who are we?EGLAVATOR - Who are we?
EGLAVATOR - Who are we?
 
Tips para mejorar ventas digitales
Tips para mejorar ventas digitalesTips para mejorar ventas digitales
Tips para mejorar ventas digitales
 
Securing 4G and LTE systems with Deep Learning and Virtualization
Securing 4G and LTE systems with Deep Learning and VirtualizationSecuring 4G and LTE systems with Deep Learning and Virtualization
Securing 4G and LTE systems with Deep Learning and Virtualization
 
EGLAVATOR by EGLA CORP
EGLAVATOR by EGLA CORPEGLAVATOR by EGLA CORP
EGLAVATOR by EGLA CORP
 
MEVIA - Technology Updates - 2020
MEVIA - Technology Updates -  2020MEVIA - Technology Updates -  2020
MEVIA - Technology Updates - 2020
 
MEVIA - Entertaiment and Cloud-based Solution for Yachts
MEVIA - Entertaiment and Cloud-based Solution for Yachts MEVIA - Entertaiment and Cloud-based Solution for Yachts
MEVIA - Entertaiment and Cloud-based Solution for Yachts
 
NextGENTV broadcasting with Cloud to Cable (ATSC 3.0) - Broadcasting to CABSAT
NextGENTV broadcasting with Cloud to Cable  (ATSC 3.0) - Broadcasting to CABSATNextGENTV broadcasting with Cloud to Cable  (ATSC 3.0) - Broadcasting to CABSAT
NextGENTV broadcasting with Cloud to Cable (ATSC 3.0) - Broadcasting to CABSAT
 
New Revenue Opportunities for Cloud Apps and Services with CloudtoCable
New Revenue Opportunities for Cloud Apps and Services with CloudtoCableNew Revenue Opportunities for Cloud Apps and Services with CloudtoCable
New Revenue Opportunities for Cloud Apps and Services with CloudtoCable
 
EGLA CORP: Innovation, Intellectual Property Services, and Capital
EGLA CORP:  Innovation, Intellectual Property Services, and CapitalEGLA CORP:  Innovation, Intellectual Property Services, and Capital
EGLA CORP: Innovation, Intellectual Property Services, and Capital
 
Music for Cable Music Service for Operators
Music for Cable   Music Service for OperatorsMusic for Cable   Music Service for Operators
Music for Cable Music Service for Operators
 
Cloud to Cable intellectual Property Portfolio
Cloud to Cable intellectual Property PortfolioCloud to Cable intellectual Property Portfolio
Cloud to Cable intellectual Property Portfolio
 
Music for Cable TV - Channel Lineup
Music for Cable TV - Channel LineupMusic for Cable TV - Channel Lineup
Music for Cable TV - Channel Lineup
 

Ns network simulator

  • 1. ns network simulator Edwin Hernandez January 19 th , 2001 Harris Lab Seminar                       
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. Polling the LossMonitor proc record {sink} { global fthrput fpcklost #Get an instance of the simulator set ns [Simulator instance] #Set the time for polling set time 0.25 #How many bytes have been received by the traffic set bw1 [$sink set bytes_] set lpkts [$sink set nlost_] set now [$ns now] puts $fthrput "$now [expr $bw1/$time*8]" puts $fpcklost "$now $lpkts" #Reset the bytes_ values on the traffic sinks $sink set bytes_ 0 $sink set nlost_ 0 #Re-schedule the record function $ns at [expr $now+$time] "record sink" }
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23. We can visualize the trace/nam files Network animator screenshots of an ad-hoc network simulation (courtesy of S. Shah)
  • 24.
  • 25.