1 Network Simulator 2 Install Chao-Ying Chiu

Slides:



Advertisements
Similar presentations
Network Simulator and problems in installing. Introduction Problems in installing Wired networks modified example2.tcl commands in OTcl usual problems.
Advertisements

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.
建立使用案例敘述 --Use Case Narrative
3Com Switch 4500 切VLAN教學.
Mobile IP Lab TA: 洪敏書
Network Simulator 2 Tejas Vasavada.
ACM ICPC 競賽環境設定 Introducer: Hsing-Yen Ann Date: 2008/08/14.
邏輯設計 題目:3_8解碼器 姓名:李國豪 學號:B09322001.
1 Network Simulator (NS-2). 2 講義 Network Simulator (NS2) Part 1: 下載 Part 2: 安裝與測試 Part 3: 劇本 Part 4: 數據.
1.1 電腦的特性 電腦能夠快速處理資料:電腦可在一秒內處理數百萬個 基本運算,這是人腦所不能做到的。原本人腦一天的工 作量,交給電腦可能僅需幾分鐘的時間就處理完畢。 電腦能夠快速處理資料:電腦可在一秒內處理數百萬個 基本運算,這是人腦所不能做到的。原本人腦一天的工 作量,交給電腦可能僅需幾分鐘的時間就處理完畢。
VHDL 邏輯設計 題目:一對十六解多工器 題目:一對十六解多工器 姓名:李國豪 姓名:李國豪 學號:B09322001 學號:B09322001.
JDK 的安裝. 內 容 大 綱 JDK 安裝步驟 JDK 的主要工具程式 說明 Java 語言發展工具組 JDK(Java Development Kit) 的安裝與工具組中的主要工具程式。 JDK 是發展 Java 語言必備的工具,我們必須正確的安裝 JDK 工具組才可以正確的設計、開發與執行.
影像處理學習營 練習(四)製作影片 【下】 影像處理學習營 教師 吳清月. 製作影片 學習重點 一. 設定影片秒數。  加入音樂,與影片做結合。 三. 影片存檔方式之選擇  上傳到網路.
下載 Dev C++ Compiler. 網址 ding.php?groupnamehttp://sourceforge.net/project/downloa ding.php?groupname=dev-cpp & filename=devcpp _setup.exe.
從此處輸入帳號密碼登入到管理頁面. 點選進到檔案管理 點選「上傳檔案」上傳資料 點選瀏覽選擇電腦裡的檔案 可選擇公開或不公開 為平台上的資料夾 此處為檔案分類,可顯示在展示頁面上,若要參加 MY EG 競賽,做品一律上傳到 “ 98 MY EG Contest ” 點選此處確定上傳檔案.
Chapter 17 Windows API 程式入門 VC++ 與 WindowsVC++ 與 Windows 建構遊戲設計的舞台 建構遊戲設計的舞台.
Day 3 Outline Multicast example (from Day 2) Wireless Misc. utilities
Network Simulator Tutorial. The Network Simulator - ns-2 NS2 is a discrete event simulator targeted at networking research.
無線隨意及感測網路技術與 應用課程 實驗 1. 2 實驗目的 建立課程所使用平台 FT-6200 無線傳輸設備的相 容軟體環境 Jennic Evaluation System ,並學習相 關設定以及使用方法。 所有資源皆可從光碟片或網站上下載。 安裝並執行範例程式並且分析程式碼。
Linguistics phonetic symbols. 先下載 IPA 字型檔案,執行安裝。 由於這個程式的字型目錄設定錯誤, 所以等重新開機時就會發現字型消失。 所以必須根據以下步驟來讓 Windows 加入 IPA 字型。
Network Analyzer For Ethereal. 基本設備 Hardware pc network card can connect INTERNET Software OS Winpcap Ethereal.
如何使用 Yahoo Messenger Yahoo Messenger 雅虎即時通 讓你在第一時間內和上線的朋 友溝通!
Jump to first page NS Tutorial: mobile and wireless network simulation Ya Xu USC/ISI September 10th, 1999.
09610CS_ 校園授權軟體下載與安裝 講師 : 張智宏. 登入校務資訊系統 校園軟體下載.
-Artificial Neural Network- Matlab操作介紹 -以類神經網路BPN Model為例
Android 遊戲設計模組 1 Android 開發環境建構 郭育政 東吳大學資訊管理系 涂昆源 萬能科技大學資訊工程系 余執彰 萬能科技大學資訊工程系 周建興 淡江大學電機工程系 林旭陽 東吳大學資訊管理系 教育部網路通訊人才培育先導型計畫 ─ 課程發展計畫.
1 2nd European ns-2 Workshop Polly Huang ETH Zurich April 18 & 19, 2001.
MS office2003 於護理應用 (V) Excel 授課教師:郝德慧 講師. Excel 基本功能 Outline 1 Excel 的巨集錄製 2 Excel 的巨集執行 3 Excel 的繪製圖表 4 Excel 的專題範例操作 5.
遠端北風資料庫 公佈時間: 2006/4/26 繳交截止時間: 2006/5/10. 作業目的 實作遠端資料庫瀏覽程式.
Ns Simulation of IEEE SC546 Project (Fall 2002) SOO IL KIM JISUN YOON
Network Simulator 2(NS2) Yingyue Xu 8/25/2015. Overview: The Network simulator (NS): discrete event simulator for networks. supports wired, wireless,
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.
安裝 Android 開發環境 建國科技大學 資管系 饒瑞佶 2013/2 V1. 需要 JDK ( Java Runtime 1.5 above) Eclipse IDE Android SDK ADT.
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.
Define options(1/2) #channel type set val(chan) Channel/WirelessChannel # radio-propagation model set val(prop) Propagation/TwoRayGround # network interface.
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.
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.
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.
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.
Internet Technology Laboratory Department of Computer and Communication Kun Shan University  官方網站:
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.
Basics of NS-2 Training in TCL script
Introduction to ns-2 Noun Choi Oct. 11, 2007.
TexPoint fonts used in EMF.
Presentation transcript:

1 Network Simulator 2 Install Chao-Ying Chiu

2 Outline n Install Cygwin n Install NS2 n Test NS2 Example

3 Install Environment n Linux u NS2 n Windows u Cygwin+NS2 u VMWare+NS2

4 Download Files before Install n Cygwin u /cg/ F /ftp%3a%2f%2fcygwin.csie.ntu.edu.tw%2fpub% 2fcygwin/

5 Files before Install (con.) n Cygwin u

6 Files before Install (con.) n NS2 u tar.gz tar.gz u 55MB

7 Install Cygwin n Download n Execute setup.exe (20~30 minutes)

8 Install Cygwin (con.) n 三種安裝選項

9 Install From Internet n 選擇從網路上直接安裝

10 Download From Internet n 從網路下載安裝檔案

11 Install From Local Directory n 選擇從硬碟裡的檔案安裝

12 Install From Local Directory (con.) n 選擇安裝檔案所在目錄

13 Install From Local Directory (con.) n 選擇安裝檔案所在目錄

14 Install From Local Directory (con.) n 準備安裝

15 Install From Local Directory (con.) n 選擇安裝選項

16 Install From Local Directory (con.) n 開始安裝

17 Install From Local Directory (con.) n 安裝中

18 Install From Local Directory (con.) n 安裝完成

19 Cygwin n Execute 帳號 名稱 電腦 名稱 注意 : 不能 有空格

20 Cygwin (con.) n 安裝完成後

21 Cygwin (con.) Type “ startx ”

22

23 Install NS2 n Download u tar.gz tar.gz u 55MB

24 Install NS2 (con.) n 將 ns2 檔案置於 cygwin/home/ 帳號目錄下

25 Install NS2 (con.) Type “ gzip -d -c ns-allinone-2.27.tar.gz | tar xvf - ” ( 解壓縮檔案 )

26 Install NS2 (con.) n 解壓縮後的結果

27 Install NS2 (con.) Type “ cd ns-allinone-2.27 ”

28 Install NS2 (con.) Type “./install ”

29 Install NS2 (con.) n 開始安裝 NS2

30 Install NS2 (con.)

31 Install NS2 (con.)

32 Install NS2 (con.)

33 Install NS2 (con.) n 安裝完成

34 Install NS2 (con.) n 加入環境變數 n Update your environment variables: u export NS_HOME=`pwd` u export PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/bin:$PATH u export LD_LIBRARY_PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:\ u $NS_HOME/otcl-1.8:$NS_HOME/lib:$LD_LIBRARY_PATH u export TCL_LIBRARY=$NS_HOME/tcl8.4.5/library

35 Install NS2 (con.) n To avoid retyping these commands everytime you login you can do the following, after having updated your environment variables as described above: u Type pwd at the command prompt u Note what the shell returns: a directory of the form /home/XXX/ns- allinone-2.27/ (where XXX is your login name) u Update your ~/.bashrc file by adding the following commands to it: F export NS_HOME=/ home/XXX/ns-allinone-2.27/ F export PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/bin:$PATH F export LD_LIBRARY_PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:\ F $NS_HOME/otcl-1.8:$NS_HOME/lib:$LD_LIBRARY_PATH F export TCL_LIBRARY=$NS_HOME/tcl8.4.5/library

36 Install NS2 (con.) n where you replace /home/XXX/ns-allinone- 2.27/ by whatever pwd returned. Make sure you respect the line breaks as shown above.

37 Install NS2 (con.) n 設環境變數

38 Install NS2 (con.)

39 Install NS2 (con.) Type “ cd ns-2.27 ”

40 Install NS2 (con.) Type “./validate ” ( 需要 70~80 分鐘 )

41 Install NS2 (con.)

42 Install NS2 (con.)

43 Install NS2 (con.)

44 Install NS2 (con.)

45 Install NS2 (con.) n NS2 安裝完成

46 Test NS2 Example (con.) n NS2 範例所在位置 u C:\cygwin\home\ 帳號 \ns-allinone-2.27\ns- 2.27\tcl\ex

47

48 Test NS2 Example (con.) Type “ cd tcl/ex ”

49 Test NS2 Example (con.) Type “ startx ”

50

51 Test NS2 Example (con.) n 執行 simple.tcl 範例  Type “ ns simple.tcl ”

52

53

54

55

56 NS2 Introduction n NS2  Network Simulator – version2 n 由 VINT project 所開發 u Virtual InterNetwork Testbed n Language u Kernel: C++ u TCL/OTCL (Object Tool Command Language)

57 Basic OTCL set ns_ [new Simulator] set tracefd [open simple.tr w] $ns_ trace-all $tracefd set namtrace [open simple.nam w] $ns_ namtrace-all-wireless $namtrace $val(x) $val(y) Simulator ObjectTrace file nameNAM file name

58 Basic – creating wireless topology set topo [new Topography] $topo load_flatgrid $opt(x) $opt(y) where opt(x) and opt(y) are the boundaries used in simulation. create-god $val(nn) Number of node

59 Basic – node config $ns_ node-config -adhocRouting DSDV or DSR or TORA or AODV \ -topoInstance $topo \ -addressType hierarchical \ -wiredRouting ON \ -mobileIP ON \ -llType LL \ -macType Mac/802_11 \ -antType Antenna/OmniAntenna \ -propType Propagation/TwoRayGround \ -phyType Phy/WirelessPhy \ -channelType Channel/WirelessChannel \ -ifqType Queue/DropTail/PriQueue \ -ifqLen \ Wired-cum-wireless MobileIP

60 Basic – node config (con.) -agentTrace ON or OFF \ -routerTrace ON or OFF \ -macTrace ON or OFF \ -movementTrace ON or OFF

61 Basic – create node set $node [$ns node] n Create Node $node set X_ $node set Y_ $node set Z_ n Start-position

62 Basic – node movement $ns_ at $time $node setdest n Future destinations

63 Basic n Create Node for {set i 0} {$i < $val(nn)} {incr i}{ $node_($i) set X_ [expr { $val(x)*rand() } ] $node_($i) set Y_ [expr { $val(y)*rand() } ] $node_($i) set Z_ 0.0 $node_($i) radius 500} n Random initial node position for {set i 0} {$i < $val(nn)} {incr i} { set node_($i) [$ns_ node]} Only wireless node

64 Basic n Initial node size $ns duplex-link $n0 $n2 2Mb 10ms DropTail n Link for {set i 0} {$i < $val(nn)} {incr i} { $ns_ initial_node_pos $node_($i) 50;}

65 Basic 範例 n Two nodes, one link set n0 [$ns node] set n1 [$ns node] $ns duplex-link $n0 $n1 1Mb 10ms DropTail

66

67 Basic 範例 n #Create a UDP agent and attach it to node n0 set udp0 [new Agent/UDP] $ns attach-agent $n0 $udp0 # Create a CBR traffic source and attach it to udp0 set cbr0 [new Application/Traffic/CBR] $cbr0 set packetSize_ 500 $cbr0 set interval_ $cbr0 attach-agent $udp0

68 Basic 範例 n #Create a Null agent (a traffic sink) and attach it to node n1 set null0 [new Agent/Null] $ns attach-agent $n1 $null0 n #Connect the traffic source with the traffic sink $ns connect $udp0 $null0 n #Schedule events for the CBR agent $ns at 0.5 "$cbr0 start" $ns at 4.5 "$cbr0 stop"

69

70 Basic 範例 n #Create links between the nodes $ns duplex-link $n0 $n2 1Mb 10ms DropTail $ns duplex-link $n1 $n2 1Mb 10ms DropTail $ns duplex-link $n3 $n2 1Mb 10ms SFQ SFQ (stochastic fair queueing) $ns duplex-link-op $n0 $n2 orient right-down $ns duplex-link-op $n1 $n2 orient right-up $ns duplex-link-op $n2 $n3 orient right

71

72 Basic 範例 n #Define different colors for data flows $ns color 1 Blue $ns color 2 Red $udp0 set class_ 1 $udp1 set class_ 2 n #Monitor the queue for the link between node 2 and node 3 $ns duplex-link-op $n2 $n3 queuePos 0.5

73 Basic 範例 n #Connect the traffic sources with the traffic sink $ns connect $udp0 $null0 $ns connect $udp1 $null0 n #Schedule events for the CBR agents $ns at 0.5 "$cbr0 start" $ns at 1.0 "$cbr1 start" $ns at 4.0 "$cbr1 stop" $ns at 4.5 "$cbr0 stop"

74

75

76 Simulation of AODV

77 Simulation of AODV

78 Simulation of AODV

79

80

81 Trace File

82

83 Reference n Cygwin u n Cygwin+NS2 安裝 u cygwin.shtml cygwin.shtml n NS2 基本語法教學 ( 中文 ) u n 華玄明 u

84 Reference (con.) n File download u FTP F F Port:21 F Name: ns2 F Password: ns2123