Presentation is loading. Please wait.

Presentation is loading. Please wait.

NS-2 Training 12/12/2011. Introduction  NS-2: Network Simulator Generation 2  Latest Release: 2.35 / Nov. 4, 2011 

Similar presentations


Presentation on theme: "NS-2 Training 12/12/2011. Introduction  NS-2: Network Simulator Generation 2  Latest Release: 2.35 / Nov. 4, 2011 "— Presentation transcript:

1 NS-2 Training 12/12/2011

2 Introduction  NS-2: Network Simulator Generation 2  Latest Release: 2.35 / Nov. 4, 2011  http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/  Other Simulators  OPNET  QualNet  ns-3

3 Installation (1/2)  Cygwin  Linux-like environment for Windows  Download  http://140.116.72.80/~smallko/ns2/cygwin.rar  http://www.cygwin.com/  NS-2  The latest version: ns-2.35  ns-allinone-2.28/2.29  Download  http://sourceforge.net/projects/nsnam/files/allinone/  http://140.116.72.80/~smallko/ns2/ns-allinone-2.28.rar

4 Installation (2/2)  Nam: Network Animator (nam-1.15 released Nov 4 2011)  animation tool for viewing network simulation traces and real world packet traces  http://www.isi.edu/nsnam/nam/index.html

5 TCL Codes  TCL (Tool Command Language)  pronounced as "tickle"  Basic terms  Create a new simulator  Definitions for nam  Open a trace file  Network behaviors  Nodes, links, queue size, node position, traffic types, simulation times, etc. set ns [new Simulator] set nf [open out.nam w] $ns namtrace-all $nf set nd [open out.tr w] $ns trace-all $nd Initialize the packet format Create a scheduler Select the default address format /ns-2.xx/tcl/lib/ns-lib.tcl

6 Example

7 Output data  NAM  Trace appeared as "------" since no flag is set Explicit Congestion Notification

8 Analysis  AWK  Alfred Aho, Peter Weinberger, and Brian Kernighan  programming language that is designed for processing text- based data  pronounced as the same as the name of the bird, “auk”

9 Run AWK file  Commands  file1.awk  a command file  file2.tr  a primary input file  out.txt  an output file awk -f file1.awk file2.tr awk -f file1.awk file2.tr > out.txt

10 AWK  Form  Pattern is typically an expression  Action is a series of commands  In NS-2 Simulator /pattern/ { action } BEGIN { action } END { action }

11 AWK  You can measure  Delay, Jitter, Packet loss, and Throughput  Example

12 NSG2

13

14  NSG2  http://sites.google.com/site/pengjungwu/nsg http://sites.google.com/site/pengjungwu/nsg  JAVA6.0  http://java.sun.com/http://java.sun.com/ Creative Intelligence Information System Lab, Department of Computer Science and Engineering, National Sun Yat-sen University

15 Resources  Gunplot  Plot the analyzed results of awk  Web site  NS2 使用說明手冊  http://hpds.ee.ncku.edu.tw/~smallko/ns2/ns2.htm  NS-2 Trace Formats  http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats  Books  計算機網路實驗 — 以 NS2 模擬工具實作,柯志亨  計算機網路實驗 — 使用 NS2 模擬多媒體通訊與無線網路, 柯志亨團隊


Download ppt "NS-2 Training 12/12/2011. Introduction  NS-2: Network Simulator Generation 2  Latest Release: 2.35 / Nov. 4, 2011 "

Similar presentations


Ads by Google