nctuns 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系...
TRANSCRIPT
![Page 2: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/2.jpg)
大綱• 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
• 5. How to Get/Set a variable at the run-time? 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
• 7. How to write a flooding module for wireless simulations? http://csie.nqu.edu.tw/smallko/nctuns/flooding.htm
![Page 3: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/3.jpg)
1. NCTUNS 簡介與 GUI 操作Simulates and emulates network protocolsOpen sourceModified Linux kernelGUI and shell commandsClient-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
![Page 4: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/4.jpg)
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.
![Page 5: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/5.jpg)
5
Features (2)
Support to several links and devices is already included
PPP link, ethernet link, ...Host, hub, switch, router, ...QoS Diffserv boundary/interior routersOptical burst/circuit switchExternal host, external router (emulation)
![Page 6: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/6.jpg)
6
Features (3)
Creates virtual interfaces to simulate the devices of the scenario
Inspiration from loopback interfaceUtilizes IP address 1.0.0.0During the simulation it is possible to “see” the interfaces with
the commands /sbin/ifconfig or /sbin/routeInterfaces named tun0, tun1, tun2, ...
![Page 7: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/7.jpg)
7
Features (4)
Kernel re-entering methodology
![Page 8: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/8.jpg)
![Page 9: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/9.jpg)
![Page 10: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/10.jpg)
10
Utilization (1)
Basic components (binaries)nctunsclient – GUI interface between user and
systemnctuns – shell interface between user and systemnctunsse – NCTUns coredispatcher – 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
![Page 11: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/11.jpg)
11
Utilization (2)
Each simulation server = kernel modifications + nctunsse + protocol modules + coordinator
![Page 12: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/12.jpg)
![Page 13: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/13.jpg)
13
Utilization (3)
Folders organizationtools = 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
![Page 14: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/14.jpg)
14
Utilization (4)
Execution orderdispatcher
Waits client connection via TCP port 9800
Waits coordinator connection via TCP port 9810
coordinatorConnects to dispatcher
nctunsclient or nctunsConnects to dispatcher to send the
scenario and waits the end of the simulation. The nctunsse is started by the coordinator
![Page 15: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/15.jpg)
15
Utilization (5)
How to use the GUI?
![Page 16: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/16.jpg)
NCTUns - Professor Nelson Fonseca 16
Utilization (6)Draw topology
![Page 17: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/17.jpg)
17
Utilization (7)
![Page 18: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/18.jpg)
18
Utilization (8)Edit property
![Page 19: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/19.jpg)
19
Utilization (9)
![Page 20: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/20.jpg)
20
Utilization (10)Run simulation
![Page 21: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/21.jpg)
21
Utilization (11)
![Page 22: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/22.jpg)
22
Utilization (12)
![Page 23: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/23.jpg)
23
Utilization (13)Playback
![Page 24: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/24.jpg)
24
Utilization (14)
![Page 25: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/25.jpg)
25
Utilization (15)
![Page 26: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/26.jpg)
26
Utilization (16)
![Page 27: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/27.jpg)
NCTUns - Professor Nelson Fonseca 27
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/
See p54~p70 in DeveloperManual.pdf
![Page 28: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/28.jpg)
28
Utilization (18)
To run without the GUICreate the basic scenario from the GUI (It is
easier)Make the necessary changes in the filesRun nctuns <file.tcl>
<file.tcl> is generated by the GUIWait for the results
![Page 29: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/29.jpg)
29
Examples (1)
Scenario 1Network topology: 2 hosts connected by
an ethernet linkProtocols: TCP and UDPApplications: rtcp/stcpDevices:
![Page 30: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/30.jpg)
30
Examples (2)
Scenario 1 – Applications configurationTo 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.2Sending TCP segments to 1.0.1.2 at
port 8000Host 2: rtcp -p 8000
Receiving TCP segments from port 8000
![Page 31: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/31.jpg)
31
Examples (3)
![Page 32: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/32.jpg)
32
Scenario 2To 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 8000Receiving UDP datagrams from port
8000
Examples (4)
![Page 33: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/33.jpg)
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
![Page 34: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/34.jpg)
Basic performance evaluation
• Tools– Wireshark ( 封包觀測 )
• yum install wireshark*
– Gnuplot ( 繪圖 )• yum install gnuplot
• Throughput Measurement (Application and MAC Level)
![Page 35: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/35.jpg)
tcpdump –i eth1 –U –w mylogwireshark mylog
udp_sudp_c 1.0.1.3
封包觀測hub
Example: hub
![Page 36: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/36.jpg)
client server
![Page 37: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/37.jpg)
server->client
![Page 38: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/38.jpg)
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
switchApplication level
MAC level
Example: switch
![Page 39: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/39.jpg)
At Node 4 Throughput: Application level vs. MAC level
![Page 40: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/40.jpg)
![Page 41: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/41.jpg)
Dynamic routing vs. Static RoutingBandwidth=10MbpsLink down = 5 ~ 25 sec (from R3 to R4)
Run time:1~100 seconds
rtcp
stcp 1.0.2.1
Example: routing_wired
![Page 42: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/42.jpg)
![Page 43: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/43.jpg)
![Page 44: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/44.jpg)
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.11.0.4.21.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
![Page 45: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/45.jpg)
1.0.6.2
1.0.6.1
1.0.5.2
1.0.5.11.0.4.21.0.4.11.0.3.2
1.0.3.1
1.0.2.11.0.2.2
1.0.1.1
1.0.1.2
rtcp
stcp 1.0.6.2
*.srt-l
![Page 46: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/46.jpg)
1.0.6.2
1.0.6.1
1.0.5.2
1.0.5.1
1.0.4.21.0.4.11.0.3.2
1.0.2.1 1.0.2.2
1.0.3.1
1.0.1.2
1.0.2.1
![Page 47: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/47.jpg)
How to manually set the routes in the wireless simulations?
$node_(NID) + entry-changing time + "set-next-hop" + SrcNode + DstNode + NextHop + "chan" + channel
![Page 48: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/48.jpg)
![Page 49: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/49.jpg)
• 在 IEEE 的標準裡 802.11a/b/g 分別利用不同的編碼方式可支援多種不同的傳輸速度, 802.11b 提供了四種傳輸速度, (1M/2M/5.5M/11M) , 802.11a 則提供多達八種傳輸速度。
• 較低的傳輸速度對於訊號的抗干擾性較強,反之較高的傳輸速度則較弱。當訊號不良的時候選擇低速的傳輸速度,當訊號收訊良好時則選擇高速的傳輸。所以在一個無線區域網路中,可能同時存在具有不同傳輸速率的行動節點,我們通常稱這樣這網路為多速率網路環境 (multi-rate wireless network) 。
無線網路異常問題 (Performance Anomaly Problem) 1
![Page 50: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/50.jpg)
• 假設所有無線網路所有傳輸的封包大小都是相同的,在此假設下,當低速節點得到通道存取機會時,需要較久的時間才能把封包傳送完畢;另外,若是高速節點和低速節點發生傳輸碰撞,則高速節點還是需要等待低速節點把整個封包傳送過程完成後,才能重新競爭通到存取機會。以上兩個情況是主要造成整個無線網路效能變差的原因。
無線網路異常問題 (Performance Anomaly Problem) 2
![Page 51: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/51.jpg)
Performance Anomaly Problem
11M
11M
在 group wireless nodes 時 , 第一個一定要先選 AP
stg -u 1024 29 1.0.1.21~30sec
stg -u 1024 10 1.0.1.110~20sec
Example: anomaly
![Page 52: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/52.jpg)
![Page 53: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/53.jpg)
11M
1M
stg -u 1024 29 1.0.1.21~30sec
stg -u 1024 10 1.0.1.110~20sec
Change link bandwidth from 11 to 1
![Page 54: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/54.jpg)
1
2
3
4
![Page 55: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/55.jpg)
![Page 56: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/56.jpg)
Increase the cwmin value of the 1Mbps nodeto lower the contending probabilitya. Press the Rb. Edit the *.tcl file to increase the cwmin valuec. Run
![Page 57: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/57.jpg)
Limit the packet length of the 1Mpbs node
![Page 58: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/58.jpg)
Performance evaluation of ad hoc routing protocols
Compare DSDV, AODV, DSR routing protocols under static or dynamic situations
The nodes are all fixed.
Example : wrouting
![Page 59: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/59.jpg)
![Page 60: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/60.jpg)
![Page 61: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/61.jpg)
比較 DSDV, AODV, DSRRandom Number 要設定相同的數值 , 但不能為 0
![Page 62: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/62.jpg)
![Page 63: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/63.jpg)
![Page 64: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/64.jpg)
![Page 65: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/65.jpg)
The nodes are randomly moving.
Example : wrouting2
![Page 66: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/66.jpg)
![Page 67: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/67.jpg)
Performance evaluation of IEEE 802.11b wireless networks
• packet size vs. throughput– with/without wireless transmission error
Example: wperformance
![Page 68: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/68.jpg)
without wireless transmission error
![Page 69: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/69.jpg)
Kbytes/sec
Application data:500 bytes
![Page 70: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/70.jpg)
Application data:1000 bytes
Kbytes/sec
![Page 71: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/71.jpg)
Application data:2000 bytes
Kbytes/sec
??? Why ???
![Page 72: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/72.jpg)
Packets are fragmented into small packets and need to contend more times for transmission.
![Page 73: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/73.jpg)
Application data:2000 bytes
Kbytes/sec
Packet sizeOverheadThroughput
![Page 74: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/74.jpg)
With transmission error
Set the bit error rate to 0.0001
Kbytes/sec
Application data:500 bytes
![Page 75: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/75.jpg)
Application data:1000 bytes
Kbytes/sec
With transmission error,Packet sizethroughput
How to design a mechanism that can adjust the packet size under different wireless transmission error rates is important !!!
![Page 76: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/76.jpg)
4. Emulation
Example: emu
![Page 77: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/77.jpg)
![Page 78: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/78.jpg)
![Page 79: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/79.jpg)
192.168.0.196192.168.0.179
Simulated Host
External Host
![Page 80: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/80.jpg)
![Page 81: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/81.jpg)
How to insert a new module into NCTUNS?
[Background]1. This is a simplified version of First In First Out (Drop Tail) Queue. The codes were mainly re-written from original FIFO.cc/FIFO.h.
2. Please refer to DeveloperManual.pdf which is under /root/ NCTUns-6.0/doc/Developer.Manual folder. Take a closer look at the chapter 2 and chapter 5.
[Preparation]1. Change the path to /root/NCTUns-6.0/src/nctuns/module/ps2. Create a new folder named sFIFO.3. Prepare 3 files under sFIFO.
![Page 82: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/82.jpg)
![Page 83: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/83.jpg)
![Page 84: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/84.jpg)
![Page 85: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/85.jpg)
PACKET RECEPTION PACKET TRANSMISSION
![Page 86: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/86.jpg)
THE RELATIONSHIP BETWEEN PUT(), GET() AND SEND().
![Page 87: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/87.jpg)
THE RELATIONSHIP BETWEEN PUT(), GET() AND RECV().
![Page 88: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/88.jpg)
#ifndef __NCTUNS_sfifo_h__#define __NCTUNS_sfifo_h__ #include <object.h>#include <pcket.h>#include <timer.h> /* Define Interface Queue for every Interface */struct ifqueue { ePacket_ *ifq_head; /* head of ifq */ ePacket_ *ifq_tail; /* tail of ifq */ int ifq_len; /* current queue length */ int ifq_maxlen;/* max queue length */ int ifq_drops; /* drops count */}; /* Define Macros for IFq */#define IF_QFULL(ifq) ((ifq)->ifq_len >= (ifq)->ifq_maxlen)#define IF_DROP(ifq) ((ifq)->ifq_drops++)#define IF_ENQUEUE(ifq, m) { \ if ((ifq)->ifq_tail == 0) \ (ifq)->ifq_head = m; \ else \ (ifq)->ifq_tail->next_ep = m; \ (ifq)->ifq_tail = m; \ (ifq)->ifq_len++; \}
sfifo.h #define IF_PREPEND(ifq, m) { \ (m)->next_ep = (ifq)->ifq_head; \ if ((ifq)->ifq_tail == 0) \ (ifq)->ifq_tail = (m); \ (ifq)->ifq_head = (m); \ (ifq)->ifq_len++; \}#define IF_DEQUEUE(ifq, m) { \ (m) = (ifq)->ifq_head; \ if (m) { \ if (((ifq)->ifq_head = (m)->next_ep) == 0) \ (ifq)->ifq_tail = 0; \ (m)->next_ep = 0; \ (ifq)->ifq_len--; \ } \}
![Page 89: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/89.jpg)
class sfifo : public NslObject { private: struct ifqueue if_snd; /* output interface queue */ protected: int intrq(MBinder *); public: sfifo(u_int32_t type, u_int32_t id, struct plist* pl, const char *name); ~sfifo(); int init(); int recv(ePacket_ *); int send(ePacket_ *);}; #endif /* __NCTUNS_sfifo_h__ */
![Page 90: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/90.jpg)
#include <stdio.h>#include <stdlib.h>#include <assert.h>#include <fcntl.h>#include <unistd.h>#include <sys/stat.h>#include <nctuns_api.h>#include <ps/sFIFO/sfifo.h>#include <exportStr.h>#include <mbinder.h> MODULE_GENERATOR(sfifo); sfifo::sfifo(u_int32_t type, u_int32_t id, struct plist* pl, const char *name) : NslObject(type, id, pl, name){ /* disable flow control */ s_flowctl = DISABLED; r_flowctl = DISABLED;
/* initialize interface queue */ if_snd.ifq_head = if_snd.ifq_tail = 0; if_snd.ifq_len = 0; if_snd.ifq_drops = 0; /* bind variable */ vBind("max_qlen", &if_snd.ifq_maxlen); if_snd.ifq_maxlen = 50; /* by default */}
sfifo.cc
sfifo::~sfifo() { } int sfifo::init() { int (NslObject::*upcall)(MBinder *); /* set upcall */ upcall = (int (NslObject::*)(MBinder *))&sfifo::intrq; sendtarget_->set_upcall(this, upcall); return(1);}
![Page 91: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/91.jpg)
int sfifo::send(ePacket_ *pkt) { assert(pkt&&pkt->DataInfo_); /* * If Module-Binder Queue(MBQ) is full, we should * insert the outgoing packet into the interface * queue. If MBQ is not full, we can call the * put() or NslObject::send() method to pass the * outgoing packet to next module. */ if( sendtarget_->qfull() ) { /* MBQ is full, insert to ifq */ if (IF_QFULL(&if_snd)) { /* ifq full, drop it! */ IF_DROP(&if_snd); freePacket(pkt); return(1); } /* otherwise, ifq not full, insert it */ IF_ENQUEUE(&if_snd, pkt); return(1); }
else { /* * MBQ is not full, pass outgoing packet * to next module. */ return(NslObject::send(pkt)); }}
![Page 92: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/92.jpg)
int sfifo::recv(ePacket_ *pkt) { /* Just by pass incoming packet */ assert(pkt&&pkt->DataInfo_); return(NslObject::recv(pkt));}
int sfifo::intrq(MBinder *port) { ePacket_ *pkt; /* * Push the packet in the interface queue * to the MBQ. Whenever the pakcet in the * MBQ is sent, the scheduler will call this * member function to give sfifo module a * chance to send the next packet in the * interface queue. */ IF_DEQUEUE(&if_snd, pkt); if (pkt != NULL) { /* * If still exist packet in the interface * queue, we try to push it to the MBQ, */ assert(sendtarget_->enqueue(pkt) == 0); } return(1);}
## Makefile for the NCTUns engine module# obj-y = sfifo.o
Makefile
![Page 93: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/93.jpg)
![Page 94: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/94.jpg)
Change path to /root/NCTUns-6.0/src/nctuns and edit the nctuns.cc
Recompile the nctuns
![Page 95: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/95.jpg)
方法一
![Page 96: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/96.jpg)
(change FIFO to sFIFO and remove some redundant functions)
![Page 97: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/97.jpg)
![Page 98: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/98.jpg)
方法二
![Page 99: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/99.jpg)
記得要關閉 nctunsclient, 再重新開啟才會生效
![Page 100: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/100.jpg)
![Page 101: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/101.jpg)
How to Get/Set a variable at the run-time?
[Background] Refer to the section 2.1.3 in the DeveloperManual.pdf for advanced information. But in that document, it teaches you to use “EXPORT” function to register the variables that you are interested in. And then modify the module description file in order to get/set a variable at the run-time. Take the following scenario as an example. Node 2 is using stg program to send packets to Node 3. If we are interested in the current queue length in the Node 2, we have to do the following procedures: “Simulation/Run”->Node 2-> Node editor->FIFO->GET (Current Queue Length) in the Run Time Query group. It takes time and manyprocedures to achieve what we want. Therefore, I will introduce another method. With this method, you can get/set the information at the time exactly at any time you want during simulation.
![Page 102: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/102.jpg)
![Page 103: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/103.jpg)
![Page 104: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/104.jpg)
![Page 105: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/105.jpg)
![Page 106: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/106.jpg)
![Page 107: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/107.jpg)
![Page 108: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/108.jpg)
![Page 109: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/109.jpg)
![Page 110: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/110.jpg)
![Page 111: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/111.jpg)
![Page 112: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/112.jpg)
How to write a flooding module for wireless simulations?
![Page 113: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/113.jpg)
![Page 114: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/114.jpg)
![Page 115: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/115.jpg)
![Page 116: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/116.jpg)
![Page 117: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/117.jpg)
![Page 118: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/118.jpg)
How to write a simple MAC for wireless network?
MYMAC_SIMPLE
![Page 119: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/119.jpg)
![Page 120: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/120.jpg)
![Page 121: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/121.jpg)
![Page 122: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/122.jpg)
![Page 123: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/123.jpg)
![Page 124: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/124.jpg)
![Page 125: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/125.jpg)
![Page 126: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/126.jpg)
![Page 127: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/127.jpg)
![Page 128: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/128.jpg)
![Page 129: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/129.jpg)
![Page 130: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/130.jpg)
![Page 131: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/131.jpg)
![Page 132: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/132.jpg)
![Page 133: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/133.jpg)
![Page 134: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/134.jpg)
![Page 135: NCTUNS 網路模擬器操作與 模擬程式開發 柯志亨 國立金門大學資訊工程學系 副教授 smallko@gmail.com](https://reader033.vdocuments.mx/reader033/viewer/2022061601/56649ccb5503460f949942b8/html5/thumbnails/135.jpg)