1 Network Simulator (NS-2). 2 講義 Network Simulator (NS2) Part 1: 下載 Part 2: 安裝與測試 Part 3: 劇本 Part 4: 數據.

Slides:



Advertisements
Similar presentations
Wireless world in NS Padma Haldar USC/ISI.
Advertisements

NS-2 (network simulator) NS by example παρουσίαση Κων/νος Τρούλος.
Ns Tutorial 成功大學電機所電腦與網路組 博士候選人 柯志亨
An Introduction to NS-2 * Gayatri Swamynathan CS 276 TA *some slides are from a presentation by Haobo Yu & Nader Salehi, USC/ISI.
Brief Intro to ns2: The most widely used Network Simulator COMP5416 Advanced Network Technologies Based on: Marc Greis's
Ns-2 Tutorial Exercise (1) Multimedia Networking Group, The Department of Computer Science, UVA Jianping Wang Adopted from Nicolas’s slides Jianping Wang,
NS Tutorial (For CMPE 252 A) By Duy Nguyen 10/25/2012.
Network Simulator (NS) Prof. Nelson L. S. da Fonseca State University of Campinas, Brazil.
5-Jul-141 S.Pushpalatha, Associate Professor, PSNACET.
Introduction to NS. Information Main website Documentation, mailing list archive, tutorial Location of Source codes –C++ files.
Introduction to Wireless simulations Shao-Cheng Wang.
Simulation of GPRS MS-BS Interface Using ns-Network Simulator Dual Degree Presentation by Richa Jain (96D07007) Department of Electrical Engineering, Indian.
Proxy Mobile IPv6 for NS2.29 TA: 洪敏書
Proxy Mobile IPv6 for NS2.29 TA: 洪敏書
ECLIPSE NTHU CS /04/22. Outline Eclipse Installation Edit/Compile/Run the Java programs Java Document Generator.
Network Simulator 2 Tejas Vasavada.
第 15 章 Servlet 程式設計 Java 2 程式設計入門與應用. 2 目錄 15-1 Servlet 的簡介 15-1 Servlet 的簡介 15-2 建立 Servlet 程式 15-2 建立 Servlet 程式 溫故知新 自我突破習題.
CNA 2008 Project 1 TA: 徐志偉 Office: EA Grading policy: Total (100%) Report (20%) Socket Programming: (80%) –Basic (60%) –Advanced (20%)
1.1 電腦的特性 電腦能夠快速處理資料:電腦可在一秒內處理數百萬個 基本運算,這是人腦所不能做到的。原本人腦一天的工 作量,交給電腦可能僅需幾分鐘的時間就處理完畢。 電腦能夠快速處理資料:電腦可在一秒內處理數百萬個 基本運算,這是人腦所不能做到的。原本人腦一天的工 作量,交給電腦可能僅需幾分鐘的時間就處理完畢。
Web Meeting 使用教學 ─ 學生版.  如何即時線上與老師互動? 一. 瀏覽太御科技首頁 二. 安裝 JoinNet 在首頁的左手邊 1. 下載 JoinNet 進行安裝 JoinNet.
Network Simulator (NS-2)
Day 3 Outline Multicast example (from Day 2) Wireless Misc. utilities
MinGW 的安裝.
Network Simulator Tutorial. The Network Simulator - ns-2 NS2 is a discrete event simulator targeted at networking research.
Linguistics phonetic symbols. 先下載 IPA 字型檔案,執行安裝。 由於這個程式的字型目錄設定錯誤, 所以等重新開機時就會發現字型消失。 所以必須根據以下步驟來讓 Windows 加入 IPA 字型。
Yinfei Pan SUNY Binghamton Computer Science
組合語言與系統程式 軟體使用教學. 軟體下載及安裝 下載 到課程網頁下載 tw/~jiun/ 安裝 解壓縮後將 System Software 資料夾放在 D 槽 (C 槽版本放在 C 之下 )
Jump to first page NS Tutorial: mobile and wireless network simulation Ya Xu USC/ISI September 10th, 1999.
1 2nd European ns-2 Workshop Polly Huang ETH Zurich April 18 & 19, 2001.
Introduction to C Language ─ C 語言的基本概念. 大綱 C 編譯器簡介 Turbo C++ 的安裝與操作介紹 如何編寫 C 語言程式 輸出與輸入函數 Homework 資料參考網站.
Introduction to Network Simulator NS-2 Part II
Simulators for Sensor Networks Sagnik Bhattacharya 9/12/2001.
Network Simulator 2(NS2) Yingyue Xu 8/25/2015. Overview: The Network simulator (NS): discrete event simulator for networks. supports wired, wireless,
Network Simulator (NS2) 1 Tutorial on Network Simulator (NS2) Hemant Kumar Rath Infonet Lab, Dept of Electrical Engineering IIT Bombay, Mumbai
Wireless Networking and Systems CSE 590 ns2 tutorial.
Introduction to ns-2 Noun Choi Oct. 11, Outline Background ns-2 Internals Short demo Troubleshooting Reference links Q & A.
1 Introduction to Ns-2 Zhibin WU WINLAB, ECE Dept. Rutgers U.
1 / 10 Mobile Networking in ns Speaker : Mark Yang
Introduction to Mobility & Network Simulator 2 (NS-2)
NS2 - Wireless Network Ming-Feng Yang. 2 2 Outline Basic wireless model Extensions wireless model Example - Ad hoc network Example – WLAN Example – Mobile.
NS2 tutorial ChihHeng, Ke ( 柯志亨 ) Phd Candidate, EE Department, NCKU MSN:
Define options(1/2) #channel type set val(chan) Channel/WirelessChannel # radio-propagation model set val(prop) Propagation/TwoRayGround # network interface.
NS-2 網路模擬 Rung-Shiang Cheng ( 程榮祥 ) Department of Computer and Communication, Kun Shan University
MOBILE IP SOMULATION IN NS2 Presenter: 吳寶緣. Outlines  Overview  Hierarchical Address Format  Hierarchical Address Format-ex  MoblieIP Demo  Additional.
Date : 2010/11/23 Speaker : Chia-Wen Lu 1.  Network Simulation  Introduction to NS2  Simple Simulation Example 2.
Java Tutorial /10/21. Java Resource Java SDK –Download from –Install Jdk windows-i586.exe –
Network Simulator-2 Sandeep singla 1998A2A7540. NS-2 A discrete event simulator Focused on modeling network protocols –Wired, wireless –TCP,UDP,unicast,multicast.
NetFlow Very useful for traffic analysis Very useful for traffic analysis Standard sampler: Standard sampler: –Cisco Netflow –Juniper Traffic Sampling.
1 Network Simulator Tutorial. 2 Network Simulation * Motivation: Learn fundamentals of evaluating network performance via simulation Overview: fundamentals.
Internet Computing KUT Youn-Hee Han
Network Simulator ns-2. 2 Agenda Introduction Interface Tcl and OTcl TclCL Simulator Wired network Wireless network Program Assignment.
Scuola Superiore Sant’Anna Synchronize the WSNs Paolo Pagano (ReTiS Lab)
Quality evaluation of MPEG4 video transmission over GPRS networks.. Presented by: Abdullah M. Rana Multimedia Communication.
1 Network Simulation and Testing Polly Huang EE NTU
1 NS Fundamentals. USC INFORMATION SCIENCES INSTITUTE 2 OTcl and C++: The Duality C++ OTcl Pure C++ objects Pure OTcl objects C++/OTcl split objects ns.
Lab 2, Network Simulator ns2 Shiv Kalyanaraman Yong Xia (TA) Satish Raghunath Sept 4,
Network Simulator Tutorial Wireless Networks. Acknowledgements Material is taken from the presentations by Jim Kurose, University of Massachusetts, Amherst.
CDA6530: Performance Models of Computers and Networks Chapter 10: Introduction to Network Simulator (NS2) TexPoint fonts used in EMF. Read the TexPoint.
1 Network Simulator 2 Install Chao-Ying Chiu. 2 Outline n Install Cygwin n Install NS2 n Test NS2 Example.
TNK092: Network Simulation - Nätverkssimulering Lecture #1: Course basics and a first taste of NS2 Vangelis Angelakis Ph.D.
NS-2 Shahin Shayandeh December 2004 Session 1. Ns-2, the Network Simulator  A discrete event simulator Simple model  Focused on modeling network protocols.
Network Simulator with Mobile IP 2003 Huang – Yu Liu.
DMET 602: Networks and Media Lab Amr El Mougy Yasmeen EssamAlaa Tarek.
NS-2 Simulator 최 종 훈 Contents  About NS  Installation  Based on Linux  Based on Windows  Architecture  Using NS-2  Example  References.
1 Network Simulator 2 Install Chao-Ying Chiu
Basics of NS-2 Training in TCL script
Choe, Hyun Jung (Stella)
Planned Activities on Computer Networks for Sunday Academy
Introduction to ns-2 Noun Choi Oct. 11, 2007.
TexPoint fonts used in EMF.
Presentation transcript:

1 Network Simulator (NS-2)

2 講義 Network Simulator (NS2) Part 1: 下載 Part 2: 安裝與測試 Part 3: 劇本 Part 4: 數據

3 Part 1: 下載

4

5 Step 1

6 Step 2 ns-allinone-2.33.tar.gz 約 50MB UP

7 Part 2: 安裝與測試

8 Setup for Linux-based systems If the file is put at /root Step 1: cd /root Step 2: tar zxvf ns-allinone-2.33.tar.gz Step 3: cd /root/ns-allinone-2.33 Step 4:./install Setup for windows-based systems 安裝流程  中文教學網站 - 柯志亨 (Chih-Heng, Ke) 

9 Directory structure ns-allinone-2.33 tk8.4 bin tcl8.4 ns-2.33nam-1.12 ….. Source node (C++) Execute files AODV aodv.cc, aodv.h, aodv_packet.h

10 Overview for NS2 structure

11 Part 3: 劇本 1 Base station (original data server) Mobile host

12 set ns_ [new Simulator] set tracefd [open Trace w] $ns_ trace-all $tracefd set nf [open BS_MH_nam w] $ns_ namtrace-all-wireless $nf set topo [new Topography] $topo load_flatgrid create-god 3 $ns_ node-config -adhocRouting AODV \ -llType LL \ -macType Mac/802_11 \ -ifqType Queue/DropTail/PriQueue \ -ifqLen 50 \ -antType Antenna/OmniAntenna \ -propType Propagation/TwoRayGround \ -phyType Phy/WirelessPhy \ -channelType Channel/WirelessChannel \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \ -macTrace OFF \ -movementTrace OFF BS_MH_1.tcl

13 for {set i 0} {$i < 3 } {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0 } set udp0 [new Agent/UDP] set null0 [new Agent/Null] $ns_ attach-agent $node_(1) $udp0 $ns_ attach-agent $node_(2) $null0 $ns_ connect $udp0 $null0 set cbr0 [new Application/Traffic/CBR] $cbr0 set type_ CBR $cbr0 set packet_size_ 500 $cbr0 set interval_ 0.5 $cbr0 attach-agent $udp0

14 $node_(0) set X_ 1 $node_(0) set Y_ 1 $ns_ at 0 "$node_(0) setdest 1 1 1" $node_(1) set X_ 500 $node_(1) set Y_ 500 $ns_ at 0 "$node_(1) setdest " $node_(2) set X_ 500 $node_(2) set Y_ 400 $ns_ at 0 "$node_(2) setdest " $ns_ at 100 "$cbr0 start" $ns_ at 100 "$cbr0 stop" $ns_ at 100 "stop" proc stop {} { global ns_ tracefd $ns_ flush-trace close $tracefd exit 0 } $ns_ run

15 執行劇本 Step 1: cd /root/ns-allinone-2.33 Step 2: cd bin Step 3:./ns my_scenario.tcl Option Step 4:./nam BS_MH_nam

16

17

18 Useful additional program NAM: Viewing network simulation traces and real world packet traces

19 自行撰寫劇本產生器 Network size, Number of nodes, Simulation time EX:./scenario_generator my_scenario.tcl PS: 這隻程式請自行撰寫,之後會繼續用到且延伸。 由於是產生 ” 文字檔 ” ,所以任何語言且可以。

20 Event-driven for Node 1. Create timer AODV.h AODV.cc ……E9E8E7E6E5E4E3E2E1 Simulation Time Event 1

21 aodv.h

22 aodv.h

23 aodv.h

24 aodv.cc

25 aodv.cc

26 aodv.cc

27 aodv.h

28 aodv.cc

29 How to compile source code? 1. cd /root/ns-allinone-2.33/ns make

30 aodv.cc

31

32 aodv.cc

33

34 aodv_packet.h

35 aodv.cc

36 aodv.cc

37 aodv.cc

38 aodv.h

39 aodv.cc

40 Part 4: 數據

41

42 aodv.cc

43

44 aodv.cc

45

46 劇本 2: Measure the Round-Trip Time (RTT) Base station (original data server) Mobile host RTT (ms) data size (bytes) Number of node:20, 50 Overall query rate: 5 Simulation time: 100