NCTUNS...

Click here to load reader

download NCTUNS 網路¨“¬™¨“½œèˆ‡ ¨“¬ç¨‹¼é–‹ç™¼ ¯—¨ œ‹ç«‹é‡‘é–€¤§­¸è³‡è¨·¥ç¨‹­¸ç³»

of 135

  • date post

    16-Dec-2015
  • Category

    Documents

  • view

    239
  • download

    7

Embed Size (px)

Transcript of NCTUNS...

  • Slide 1
  • NCTUNS smallko@gmail.com http://csie.nqu.edu.tw/smallko
  • Slide 2
  • 1. NCTUNS GUI 2. LAN WLAN 3. Emulation 4. How to insert a new module into NCTUNS? http://csie.nqu.edu.tw/smallko/nctuns/sfifo.htm http://csie.nqu.edu.tw/smallko/nctuns/sfifo.htm 5. How to Get/Set a variable at the run-time? http://csie.nqu.edu.tw/smallko/nctuns/run_time.htm http://csie.nqu.edu.tw/smallko/nctuns/run_time.htm 6. How to write a simple MAC for wireless network? http://csie.nqu.edu.tw/smallko/nctuns/simple-mac.htm http://csie.nqu.edu.tw/smallko/nctuns/simple-mac.htm 7. How to write a flooding module for wireless simulations? http://csie.nqu.edu.tw/smallko/nctuns/flooding.htm http://csie.nqu.edu.tw/smallko/nctuns/flooding.htm
  • Slide 3
  • 1. NCTUNS GUI 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 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
  • Slide 4
  • 4 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.
  • Slide 5
  • 5 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)
  • Slide 6
  • 6 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,...
  • Slide 7
  • 7 Features (4) Kernel re-entering methodology
  • Slide 8
  • Slide 9
  • Slide 10
  • 10 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
  • Slide 11
  • 11 Utilization (2) Each simulation server = kernel modifications + nctunsse + protocol modules + coordinator
  • Slide 12
  • Slide 13
  • 13 Utilization (3) Folders organization tools = executable programs of various applications and tools pre-installed (/usr/local/nctuns/tools) bin = executable programs of the GUI program, dispatcher, coordinator, and the simulation engine (/usr/local/nctuns/bin) etc = configuration files needed by the dispatcher and coordinator programs (/usr/local/nctuns/etc) BMP = icon bmp files uses by the GUI program (/usr/local/nctuns/BMP) lib = libraries used by the simulation engine
  • Slide 14
  • 14 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
  • Slide 15
  • 15 Utilization (5) How to use the GUI?
  • Slide 16
  • NCTUns - Professor Nelson Fonseca16 Utilization (6 ) Draw topology
  • Slide 17
  • 17 Utilization (7)
  • Slide 18
  • 18 Utilization (8 ) Edit property
  • Slide 19
  • 19 Utilization (9)
  • Slide 20
  • 20 Utilization (10) Run simulation
  • Slide 21
  • 21 Utilization (11)
  • Slide 22
  • 22 Utilization (12)
  • Slide 23
  • 23 Utilization (13) Playback
  • Slide 24
  • 24 Utilization (14)
  • Slide 25
  • 25 Utilization (15)
  • Slide 26
  • 26 Utilization (16)
  • Slide 27
  • NCTUns - Professor Nelson Fonseca27 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 at http://www.lrc.ic.unicamp.br/~daniel/trento/nctuns/ http://www.lrc.ic.unicamp.br/~daniel/trento/nctuns/ See p54~p70 in DeveloperManual.pdf
  • Slide 28
  • 28 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 is generated by the GUI Wait for the results
  • Slide 29
  • 29 Examples (1) Scenario 1 Network topology: 2 hosts connected by an ethernet link Protocols: TCP and UDP Applications: rtcp/stcp Devices:
  • Slide 30
  • 30 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
  • Slide 31
  • 31 Examples (3)
  • Slide 32
  • 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 32 Examples (4)
  • Slide 33
  • 2. LAN WLAN Basic performance evaluation Routing (Static routing vs. Dynamic routing) Performance Anomaly Problem Performance evaluation of ad hoc routing protocols Performance evaluation of IEEE 802.11b wireless networks
  • Slide 34
  • Basic performance evaluation Tools Wireshark ( ) yum install wireshark* Gnuplot ( ) yum install gnuplot Throughput Measurement (Application and MAC Level)
  • Slide 35
  • tcpdump i eth1 U w mylog wireshark mylog udp_sudp_c 1.0.1.3 hub Example: hub
  • Slide 36
  • client server
  • Slide 37
  • server->client
  • Slide 38
  • 3~30s: ttcp t s p 1234 1.0.1.4 5~30s: ttcp t s p 4321 1.0.1.3 0~30s: ttcp r s p 4321 w thr_n3n4 0~30s: ttcp r s p 1234 w thr_n2n5 switch Application level MAC level Example: switch
  • Slide 39
  • At Node 4 Throughput: Application level vs. MAC level
  • Slide 40
  • Slide 41
  • Dynamic routing vs. Static Routing Bandwidth=10Mbps Link down = 5 ~ 25 sec (from R3 to R4) Run time:1~100 seconds rtcp stcp 1.0.2.1 Example: routing_wired
  • Slide 42
  • Slide 43
  • Slide 44
  • How to manually set the routing tables in wired simulation ? 1.0.6.2 1.0.6.1 1.0.5.2 1.0.5.1 1.0.4.2 1.0.4.1 1.0.3.2 1.0.3.1 1.0.2.1 1.0.2.2 1.0.1.1 1.0.1.2 rtcp stcp 1.0.6.2 Example: routing_wired_static
  • Slide 45
  • 1.0.6.2 1.0.6.1 1.0.5.2 1.0.5.1 1.0.4.2 1.0.4.1 1.0.3.2 1.0.3.1 1.0.2.1 1.0.2.2 1.0.1.1 1.0.1.2 rtcp stcp 1.0.6.2 *.srt-l
  • Slide 46
  • 1.0.6.2 1.0.6.1 1.0.5.2 1.0.5.1 1.0.4.2 1.0.4.1 1.0.3.2 1.0.2.1 1.0.2.2 1.0.3.1 1.0.1.2 1.0.2.1
  • Slide 47
  • How to manually set the routes in the wireless simulations? $node_(NID) + entry-changing time + "set-next-hop" + SrcNode + DstNode + NextHop + "chan" + channel
  • Slide 48
  • Slide 49
  • IEEE 802.11a/b/g 802.11b (1M/2M/5.5M/11M) 802.11a (multi-rate wireless network) (Performance Anomaly Problem) 1
  • Slide 50
  • (Performance Anomaly Problem) 2
  • Slide 51
  • Performance Anomaly Problem 11M group wireless nodes , AP stg -u 1024 29 1.0.1.2 1~30sec stg -u 1024 10 1.0.1.1 10~20sec Example: anomaly
  • Slide 52
  • Slide 53
  • 11M 1M stg -u 1024 29 1.0.1.2 1~30sec stg -u 1024 10 1.0.1.1 10~20sec Change link bandwidth from 11 to 1
  • Slide 54
  • 1 2 3 4
  • Slide 55
  • Slide 56
  • Increase the cwmin value of the 1Mbps node to lower the contending probability a.Press the R b.Edit the *.tcl file to increase the cwmin value c.Run
  • Slide 57
  • Limit the packet length of the 1Mpbs node
  • Slide 58
  • Performance evaluation of ad hoc routing protocols Compare DSDV, AODV, DSR routing protocols under static or dyna