nctuns emulation 指導教授:潘仁義 報告者:李詩涵、蕭惠陽. kernel re-entering...
TRANSCRIPT
![Page 1: NCTUns Emulation 指導教授:潘仁義 報告者:李詩涵、蕭惠陽. Kernel Re-entering Simulation Methodology Tunnel 網路介面是實現 Kernel Re-entering Simulation Methodology](https://reader033.vdocuments.net/reader033/viewer/2022061616/5697bf8d1a28abf838c8c327/html5/thumbnails/1.jpg)
NCTUns Emulation
指導教授:潘仁義報告者:李詩涵、蕭惠陽
![Page 2: NCTUns Emulation 指導教授:潘仁義 報告者:李詩涵、蕭惠陽. Kernel Re-entering Simulation Methodology Tunnel 網路介面是實現 Kernel Re-entering Simulation Methodology](https://reader033.vdocuments.net/reader033/viewer/2022061616/5697bf8d1a28abf838c8c327/html5/thumbnails/2.jpg)
Kernel Re-entering Simulation Methodology Tunnel網路介面是實現 Kernel Re-entering
Simulation Methodology的關鍵技術 Tunnel
Pseudo network interface A corresponding device special file in the /dev
directory
![Page 3: NCTUns Emulation 指導教授:潘仁義 報告者:李詩涵、蕭惠陽. Kernel Re-entering Simulation Methodology Tunnel 網路介面是實現 Kernel Re-entering Simulation Methodology](https://reader033.vdocuments.net/reader033/viewer/2022061616/5697bf8d1a28abf838c8c327/html5/thumbnails/3.jpg)
Kernel Re-entering Simulation Methodology
Simulation Time= Link Propagation Time + Packet transmission
Time
![Page 4: NCTUns Emulation 指導教授:潘仁義 報告者:李詩涵、蕭惠陽. Kernel Re-entering Simulation Methodology Tunnel 網路介面是實現 Kernel Re-entering Simulation Methodology](https://reader033.vdocuments.net/reader033/viewer/2022061616/5697bf8d1a28abf838c8c327/html5/thumbnails/4.jpg)
Emulator Architecture External host
指在 NCTUns GUI裡的 Emulation host External machine
指欲 emulation的真實機器,有可能是 PC 、 PDA 、 IP CAM…等。
![Page 5: NCTUns Emulation 指導教授:潘仁義 報告者:李詩涵、蕭惠陽. Kernel Re-entering Simulation Methodology Tunnel 網路介面是實現 Kernel Re-entering Simulation Methodology](https://reader033.vdocuments.net/reader033/viewer/2022061616/5697bf8d1a28abf838c8c327/html5/thumbnails/5.jpg)
Example 1 實驗環境
Fedora 9 NCTUns 5.0
![Page 6: NCTUns Emulation 指導教授:潘仁義 報告者:李詩涵、蕭惠陽. Kernel Re-entering Simulation Methodology Tunnel 網路介面是實現 Kernel Re-entering Simulation Methodology](https://reader033.vdocuments.net/reader033/viewer/2022061616/5697bf8d1a28abf838c8c327/html5/thumbnails/6.jpg)
設定Machine IP 在 Linux設定實體 IP
設定 Nctuns External host IP
![Page 7: NCTUns Emulation 指導教授:潘仁義 報告者:李詩涵、蕭惠陽. Kernel Re-entering Simulation Methodology Tunnel 網路介面是實現 Kernel Re-entering Simulation Methodology](https://reader033.vdocuments.net/reader033/viewer/2022061616/5697bf8d1a28abf838c8c327/html5/thumbnails/7.jpg)
Run NCTUns - ifup tun1~tun4 #ifconfig
tun1=1.0.1.1 tun2=1.0.1.2 tun3=1.0.2.1 tun4=1.0.2.2 eth0=192.168.1.100
![Page 8: NCTUns Emulation 指導教授:潘仁義 報告者:李詩涵、蕭惠陽. Kernel Re-entering Simulation Methodology Tunnel 網路介面是實現 Kernel Re-entering Simulation Methodology](https://reader033.vdocuments.net/reader033/viewer/2022061616/5697bf8d1a28abf838c8c327/html5/thumbnails/8.jpg)
Run NCTUns-route add #route -n
![Page 9: NCTUns Emulation 指導教授:潘仁義 報告者:李詩涵、蕭惠陽. Kernel Re-entering Simulation Methodology Tunnel 網路介面是實現 Kernel Re-entering Simulation Methodology](https://reader033.vdocuments.net/reader033/viewer/2022061616/5697bf8d1a28abf838c8c327/html5/thumbnails/9.jpg)
Run NCTUns Tun1=n1
Tun2=n2(left)
Destination Gateway
1.0.1.0/24 X
1.0.2.0/24 1.1.1.2
1.1.1.0/24 x
Destination Gateway
1.2.1.0/24 X
1.0.1.0/24 x
2.1.1.0/24 x
Tun3=n2(right)
Tun4=n4
Destination Gateway
1.2.2.0/24 X
1.0.2.0/24 x
2.1.2.0/24 x
Destination Gateway
1.0.2.0/24 X
2.2.1.0/24 2.2.2.1
2.2.2.0/24 x
![Page 10: NCTUns Emulation 指導教授:潘仁義 報告者:李詩涵、蕭惠陽. Kernel Re-entering Simulation Methodology Tunnel 網路介面是實現 Kernel Re-entering Simulation Methodology](https://reader033.vdocuments.net/reader033/viewer/2022061616/5697bf8d1a28abf838c8c327/html5/thumbnails/10.jpg)
![Page 11: NCTUns Emulation 指導教授:潘仁義 報告者:李詩涵、蕭惠陽. Kernel Re-entering Simulation Methodology Tunnel 網路介面是實現 Kernel Re-entering Simulation Methodology](https://reader033.vdocuments.net/reader033/viewer/2022061616/5697bf8d1a28abf838c8c327/html5/thumbnails/11.jpg)
Simulator turned into network emulator First, virtual clock 與 real time同步 Second, 在真實世界中,新增 system routing table
為了傳 packet 至 simulation machine-------------------emulation 開始 -------------------------
Third, packet-filtering rules need to be installed Add the system routing table on the simulation
machine 為了允許在真實世界中 incoming packet可被抓取至
simulation network Finally, the headers of the captured packets need
to be translated they can be forwarded between the simulated network
and the real-world devices.
![Page 12: NCTUns Emulation 指導教授:潘仁義 報告者:李詩涵、蕭惠陽. Kernel Re-entering Simulation Methodology Tunnel 網路介面是實現 Kernel Re-entering Simulation Methodology](https://reader033.vdocuments.net/reader033/viewer/2022061616/5697bf8d1a28abf838c8c327/html5/thumbnails/12.jpg)
Kernel Emulation Module External Machine - TCP Sender
![Page 13: NCTUns Emulation 指導教授:潘仁義 報告者:李詩涵、蕭惠陽. Kernel Re-entering Simulation Methodology Tunnel 網路介面是實現 Kernel Re-entering Simulation Methodology](https://reader033.vdocuments.net/reader033/viewer/2022061616/5697bf8d1a28abf838c8c327/html5/thumbnails/13.jpg)
Kernel Module(Emulation Module) Filter packet, capture packet Simulation start: emulation module被加載到
Kernel,它會自動讀取配置文件,該文件包含了所有的過濾規則。
During simulation: emulation module 解讀所有packet header,為了把 external machine packet作傳或收。
![Page 14: NCTUns Emulation 指導教授:潘仁義 報告者:李詩涵、蕭惠陽. Kernel Re-entering Simulation Methodology Tunnel 網路介面是實現 Kernel Re-entering Simulation Methodology](https://reader033.vdocuments.net/reader033/viewer/2022061616/5697bf8d1a28abf838c8c327/html5/thumbnails/14.jpg)
Kernel Emulation Module External Machine - TCP Receiver
![Page 15: NCTUns Emulation 指導教授:潘仁義 報告者:李詩涵、蕭惠陽. Kernel Re-entering Simulation Methodology Tunnel 網路介面是實現 Kernel Re-entering Simulation Methodology](https://reader033.vdocuments.net/reader033/viewer/2022061616/5697bf8d1a28abf838c8c327/html5/thumbnails/15.jpg)
參考資料 NCTUNS TOOL FOR INNOVATIVE NETWORK
EMULATIONS http://nsl.csie.nctu.edu.tw/NovaNCTUnsEmulation
New2009.pdf The GUI User Manual for the NCTUns 6.0
Network Simulator and Emulator(Ch7 Emulation) http://nsl10.csie.nctu.edu.tw/support/documentati
on/GUIManual.pdf The Protocol Developer Manual for the
NCTUns 6.0 Network Simulator and Emulator http://nsl10.cs.nctu.edu.tw/support/documentation
/DeveloperManual.pdf