1 / 43

Simulation and Emulation with NCTUns

Simulation and Emulation with NCTUns. Professor Nelson Fonseca nfonseca@ic.unicamp.br. Outline. Introduction Simulation X Emulation Details Features Installation Utilization Examples Conclusions References. Introduction. Main features. Simulates and emulates network protocols

daphnec
Download Presentation

Simulation and Emulation with NCTUns

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. Simulation and Emulation with NCTUns Professor Nelson Fonseca nfonseca@ic.unicamp.br

  2. NCTUns - Professor Nelson Fonseca Outline • Introduction • Simulation X Emulation • Details • Features • Installation • Utilization • Examples • Conclusions • References

  3. NCTUns - Professor Nelson Fonseca Introduction

  4. NCTUns - Professor Nelson Fonseca Main features • Simulates and emulates network protocols • Open source • Modified Linux kernel • GUI and shell commands • Client-server model to allow communication between simulation/emulation engine and interface • Since 2002 (version 1.0)‏ • Version 5.0 released in 2008

  5. NCTUns - Professor Nelson Fonseca Comparing with traditional simulators • Uses native Linux TCP/IP stack • Interacts with real devices in virtual networks • Allows experiments with real applications • There is no need to change the real applications • Allows remote simulations and concurrent simulations • Easy to create simulation servers • Can take advantage of multiple cores/processors

  6. NCTUns - Professor Nelson Fonseca Simulation X Emulation

  7. NCTUns - Professor Nelson Fonseca Simulation • Ideal to create several different scenarios • Ideal when there isn't available testbeds • Results not always the same as the reality because the applications are not the same • Example: applications in the ns-2 simulator need to be rewritten to run inside the simulator (problem recently solved with ns-3)‏

  8. NCTUns - Professor Nelson Fonseca Emulation • Uses real applications and network devices • More realistic scenarios and more trustable results • Can combine virtual and real devices/protocols • Example: how will be the behaviour of a real application over a new transport protocol? • Less flexible than simulations • the characteristics of the emulated links are limited to the characteristics of the real links

  9. NCTUns - Professor Nelson Fonseca NCTUns • Simulator and emulator • It is possible to use as a conventional simulator • It is possible to evaluate new real applications over different network configurations • It is possible to evaluate new protocols with different real applications • It is possible to capture the generated traffic and use it as input to packet analysers like wireshark

  10. NCTUns - Professor Nelson Fonseca Details

  11. NCTUns - Professor Nelson Fonseca Features (1)‏ • Support to several protocols is already included: • IEEE 802.3, IEEE 802.11, IEEE 802.16, Learning bridge protocol, Spanning tree protocol, ... • IP, Mobile IP, RIP, OSPF, OBS, GPRS, ... • TCP, UDP, SDP, ... • HTTP, FTP, telnet, ... (+ any real application)‏ • Some specific applications included: • stcp/rtcp - Greedy TCP traffic • ttcp - Greedy TCP/UDP trafic • stg/rtg - Greedy TCP/UDP traffic, trace driven, self-similar traffic, on-off, constant-bit-rate, and various packet streams.

  12. NCTUns - Professor Nelson Fonseca Features (2)‏ • Support to several links and devices is already included • PPP link, ethernet link, ... • Host, hub, switch, router, ... • QoS Diffserv boundary/interior routers • Optical burst/circuit switch • External host, external router (emulation)‏

  13. NCTUns - Professor Nelson Fonseca Features (3)‏ • Creates virtual interfaces to simulate the devices of the scenario • Inspiration from loopback interface • Utilizes IP address 1.0.0.0 • During the simulation it is possible to “see” the interfaces with the commands /sbin/ifconfig or /sbin/route • Interfaces named tun0, tun1, tun2, ...

  14. NCTUns - Professor Nelson Fonseca Features (4)‏ • How loopback works? (Host 1 and Host 2 are the same host)‏

  15. NCTUns - Professor Nelson Fonseca Features (5)‏ • Kernel re-entering methodology

  16. NCTUns - Professor Nelson Fonseca Installation (1)‏ • Download from:http://nsl10.csie.nctu.edu.tw/products/nctuns/download/download.php • Software requirements: • Operating system Fedora Linux 10.0 • gcc and g++ compiler • X window system • Tcl • rsh server and rlogin • SELINUX disabled • Firewall disabled • root privileges

  17. NCTUns - Professor Nelson Fonseca Installation (2)‏ • Hardware requirements: • RAM memory 256 MB • Pentium 1.6GHz processor • At least 200MB free disk space • Multi-core processors are supported

  18. NCTUns - Professor Nelson Fonseca Installation (3)‏ • Installation procedure • Uncompress the downloaded .tar.gz file • Run ./install.sh • Reboot • Select one of the two new kernels: • NCTUns • NCTUns (ELP) – If you want to use more than one core/processor

  19. NCTUns - Professor Nelson Fonseca Utilization (1)‏ • Basic components (binaries)‏ • nctunsclient – GUI interface between user and system • nctuns – shell interface between user and system • nctunsse – NCTUns core • dispatcher – Manage the simulation requests. Can control multiple coordinators running in different machines • coordinator – Receives the simulation from the dispatcher and forward it to the nctunsse

  20. NCTUns - Professor Nelson Fonseca Utilization (2)‏ • Each simulation server = kernel modifications + nctunsse + protocol modules + coordinator

  21. NCTUns - Professor Nelson Fonseca Utilization (3)‏ • Folders organization • tools = executable programs of various applications and tools pre-installed by NCTUns 5.0 • bin = executable programs of the GUI program, dispatcher, coordinator, and the simulation engine • etc = configuration files needed by the dispatcher and coordinator programs • BMP = icon bmp files uses by the GUI program • lib = libraries used by the simulation engine

  22. NCTUns - Professor Nelson Fonseca Utilization (4)‏ • Execution order • dispatcher • Waits client connection via TCP port 9800 • Waits coordinator connection via TCP port 9810 • coordinator • Connects to dispatcher • nctunsclient or nctuns • Connects to dispatcher to send the scenario and waits the end of the simulation. The nctunsse is started by the coordinator

  23. NCTUns - Professor Nelson Fonseca Utilization (5)‏ • How to use the GUI?

  24. NCTUns - Professor Nelson Fonseca Utilization (6)‏ • Draw topology

  25. NCTUns - Professor Nelson Fonseca Utilization (7)‏

  26. NCTUns - Professor Nelson Fonseca Utilization (8)‏ • Edit property

  27. NCTUns - Professor Nelson Fonseca Utilization (9)‏

  28. NCTUns - Professor Nelson Fonseca Utilization (10)‏ • Run simulation

  29. NCTUns - Professor Nelson Fonseca Utilization (11)‏

  30. NCTUns - Professor Nelson Fonseca Utilization (12)‏

  31. NCTUns - Professor Nelson Fonseca Utilization (13)‏ • Playback

  32. NCTUns - Professor Nelson Fonseca Utilization (14)‏

  33. NCTUns - Professor Nelson Fonseca Utilization (15)‏

  34. NCTUns - Professor Nelson Fonseca Utilization (16)‏

  35. NCTUns - Professor Nelson Fonseca Utilization (17)‏ • Main simulation files • .emu: external routing table (needed to emulation)‏ • .ndt: nodes identification • .tfc: list of commands to be executed • .srt-l: internal routing table (tun[0-9]* devices)‏ • .tcl: scenario details • One example of each file is available athttp://www.lrc.ic.unicamp.br/~daniel/trento/nctuns/

  36. NCTUns - Professor Nelson Fonseca Utilization (18)‏ • To run without the GUI • Create the basic scenario from the GUI (It is easier)‏ • Make the necessary changes in the files • Run nctuns <file.tcl> • <file.tcl> is generated by the GUI • Wait for the results

  37. NCTUns - Professor Nelson Fonseca Examples (1)‏ • Scenario 1 • Network topology: 2 hosts connected by an ethernet link • Protocols: TCP and UDP • Applications: rtcp/stcp • Devices:

  38. NCTUns - Professor Nelson Fonseca Examples (2)‏ • Scenario 1 – Applications configuration • To simulate data transfer between host 1 (1.0.1.1) and hosts 2 (1.0.1.2) via TCP using stcp and rtcp • Host 1: stcp -p 8000 1.0.1.2 • Sending TCP segments to 1.0.1.2 at port 8000 • Host 2: rtcp -p 8000 • Receiving TCP segments from port 8000

  39. NCTUns - Professor Nelson Fonseca Examples (3)‏

  40. NCTUns - Professor Nelson Fonseca Examples (4)‏ • Scenario 2 • To simulate data transfer between host 1 (1.0.1.1) and host 2 (1.0.1.2) via UDP using stg and rtg • Host 1: stg -u 1000 50 -m 50 50 -p 8000 1.0.1.2 • Sending UDP datagrams to 1.0.1.2 at port 8000. Transmission rate limited to 50Mbps and packet size equal to 1000 bytes. • Host 2: rtg -u -p 8000 • Receiving UDP datagrams from port 8000

  41. NCTUns - Professor Nelson Fonseca Conclusions

  42. NCTUns - Professor Nelson Fonseca Conclusions • Joins simulation and emulation in one tool • Intuitive and simple GUI • Good if there is a few number of scenarios • Hard to manage if there is a large number of scenarios • Good documentation • Several demo videos at official website

  43. NCTUns - Professor Nelson Fonseca References • http://nsl10.csie.nctu.edu.tw/ • Official website • http://nsl.csie.nctu.edu.tw/nctuns.html • List of related papers • http://nsl10.csie.nctu.edu.tw/support/documentation/GUIManual.pdf • GUI user manual • http://nsl10.csie.nctu.edu.tw/support/documentation/DeveloperManual.pdf • Developer manual • http://nsl10.csie.nctu.edu.tw/support/documentation/DemoVideos/ • Videos of NCTUns in action

More Related