NCTUns Emulation
指導教授:潘仁義報告者:李詩涵、蕭惠陽
Kernel Re-entering Simulation Methodology Tunnel網路介面是實現 Kernel Re-entering
Simulation Methodology的關鍵技術 Tunnel
Pseudo network interface A corresponding device special file in the /dev
directory
Kernel Re-entering Simulation Methodology
Simulation Time= Link Propagation Time + Packet transmission
Time
Emulator Architecture External host
指在 NCTUns GUI裡的 Emulation host External machine
指欲 emulation的真實機器,有可能是 PC 、 PDA 、 IP CAM…等。
Example 1 實驗環境
Fedora 9 NCTUns 5.0
設定Machine IP 在 Linux設定實體 IP
設定 Nctuns External host IP
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
Run NCTUns-route add #route -n
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
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.
Kernel Emulation Module External Machine - TCP Sender
Kernel Module(Emulation Module) Filter packet, capture packet Simulation start: emulation module被加載到
Kernel,它會自動讀取配置文件,該文件包含了所有的過濾規則。
During simulation: emulation module 解讀所有packet header,為了把 external machine packet作傳或收。
Kernel Emulation Module External Machine - TCP Receiver
參考資料 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