1 / 22

Network Simulator 2 Practice

Network Simulator 2 Practice. SungKyunKwan-Univ Mobile Computing LAB (http://csn.skku.ac.kr) 안혜환 hyehwan@ece.skku.ac.kr. Contents. User’s view of NS-2 What are Tcl, Otcl, Tclcl, NS ? Tcl Function Implementation Otcl Function Implementation Very Important Tcl “ns-lib.tcl” Otcl Library

Download Presentation

Network Simulator 2 Practice

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Network Simulator 2 Practice SungKyunKwan-Univ Mobile Computing LAB(http://csn.skku.ac.kr) 안혜환hyehwan@ece.skku.ac.kr

  2. Contents • User’s view of NS-2 • What are Tcl, Otcl, Tclcl, NS ? • Tcl Function Implementation • Otcl Function Implementation • Very Important Tcl “ns-lib.tcl” Otcl Library • Add New Uniform Distribution Agent • Add New Uniform Distribution Agent (WinCam) • Binding Variable • Add New Application • Implementation :33% Packets are not sent • Drop and Not Drop Packet (WinCam) • Sensor Network Simulation • Topology Generator “setdest” (WinCam) • Experiment (WinCam) • Performance Evaluation • Sink and Source Node Transmission Frequency • Agent Level and Entire Network Transmission Frequency • Reference

  3. User’s view of NS-2 It can be available by using script such as “awk” • Network Topology • Event OTcl C++

  4. What are Tcl, Otcl, Tclcl, NS ? Linkage • Ns is Not Simulator but Object • set ns [new Simulator] • common/simulator.cc Like “C++” Like “C” C++ Object

  5. Tcl Function Implementation

  6. Otcl Function Implementation

  7. Very Important Tcl “ns-lib.tcl” Otcl Library set ns [ new Simulator] source ns-autoconf.tcl source ns-address.tcl source ns-node.tcl source ns-rtmodule.tcl source ns-hiernode.tcl source ns-mobilenode.tcl source ns-bsnode.tcl source ns-link.tcl ……. ……. ……. ns-allinone-xxx/ns-2xx/MakefileTCL_LIB . .

  8. Add New Uniform Distribution Agent 1/2

  9. Add New Uniform Distribution Agent 2/2 • Modify : “ns-allinone2.xx/ns-2.xx/Makefile  OBJ_CC= common/ex-uniform.o • Re Compile : make clean, make depend, make

  10. Add New Uniform Distribution Agent (WinCam) • Result

  11. Variable Binding

  12. Add New Application • New Data Structure • New Application C++ • New Application Header • New Agent C++ • New Agent Header • Modify packet.h • Modify ns-packet.tcl • Modify agent.h • Modify app.h • Modify /ns-allinone-2.xx/ns-2.xx/Makefile • Set Default Values in ns-default.tcl • NS-2 Recompile • Implementation : 33% Uniform Distribution Send Loss Drop Modeling

  13. Implementation :33% Packets are not sent

  14. Drop and Not Drop Packet (WinCam) Drop Packet Not Drop Packet

  15. Sensor Network Simulator • Topology Generator • Simulation - Directed Diffusion- Flood • Experiment • Performance Evaluation

  16. Topology Generator “setdest” (WinCam)

  17. Experiment (WinCam) • Sensor network 1000 nodes with Flooding • Sensor network 1000 nodes with Directed Diffusion

  18. Performance Evaluation • Sink and Source Node Transmission Frequency • Agent Level and Entire Network Transmission Frequency

  19. Sink and Source Node Transmission Frequency

  20. Agent Level and Entire Network Transmission Frequency

  21. Reference • Ns manual • NS by example

  22. Thank You Q & A

More Related