Date post: | 03-Jan-2016 |
Category: |
Documents |
Upload: | nerea-walters |
View: | 15 times |
Download: | 0 times |
Homework 3
NAT (1/9)
Network Address Translation Convert IP Address and port
between private and public realm Works on network layer and
transport layer
NAT (2/9)
A NAT B
163.13.128.5192.168.0.10
140.112.30.8
SA 192.168.0.10
SP 1234
DA 163.13.128.5
DP 5555
NAT (3/9)
A NAT B
163.13.128.5
140.112.30.8
SA 192.168.0.10
SP 1234
DA 163.13.128.5
DP 5555
Port:1234
192.168.0.10
NAT (4/9)
A NAT B
163.13.128.5192.168.0.10
140.112.30.8
SA 140.112.30.8
SP 5678
DA 163.13.128.5
DP 5555
Port:1234 Port:5678
NAT (5/9)
A NAT B
163.13.128.5
140.112.30.8
SA 140.112.30.8
SP 5678
DA 163.13.128.5
DP 5555
Port:1234 Port:5678 Port:5555
192.168.0.10
NAT (6/9)
A NAT B
163.13.128.5
140.112.30.8
SA 163.13.128.5
SP 5555
DA 140.112.30.8
DP 5678
192.168.0.10
NAT (7/9)
A NAT B
163.13.128.5
140.112.30.8
SA 163.13.128.5
SP 5555
DA 140.112.30.8
DP 5678
Port:5555Port:5678
192.168.0.10
NAT (8/9)
A NAT B
163.13.128.5
140.112.30.8
SA 163.13.128.5
SP 5555
DA 192.168.0.10
DP 1234
Port:5555Port:5678
192.168.0.10
NAT (9/9)
A NAT B
163.13.128.5
140.112.30.8
SA 163.13.128.5
SP 5555
DA 192.168.0.10
DP 1234
Port:5555Port:5678
192.168.0.10
Port:1234
Types of NAT
Full Cone NAT Restricted Cone NAT Port-Restricted Cone NAT Symmetric NAT
Binding Life Time of NAT (1/4)
When a client sends a UDP packet to public Internet, NAT will allocate a public port for the private address and port
If no UDP traffic on the public port for a period, NAT will release the public port
The period is “binding life time”
Binding Life Time of NAT (2/4)
ClientNAT
Server
192.168.0.10
140.112.30.80
Port:1234
Client use privet port to send a UDP
packet to public server
163.13.120.90
Binding Life Time of NAT (3/4)
ClientNAT
Server
192.168.0.10
140.112.30.80
Port:1234 Port:5555
163.13.120.90
NAT will allocate a public port for
192.168.0.10:1234
Binding Life Time of NAT (4/4)
ClientNAT
Server
192.168.0.10
140.112.30.80
Port:1234 Port:5555
163.13.120.90
If no UDP traffic on the public port for a period, NAT will
release the public port
Homework 3
了解前述四種類型 NAT 之運作方式與差異 設計測試 NAT 類型與 Binding Life Time 的
方法並實作
測試環境 -R219
Internet
Port-Restricted Cone NAT Restricted Cone NAT
Full
Cone N
AT
Public IPPublic IP
Public IP
PC PC PC PC PC PC PC PC
PC
PC
PC
PC
Private IP
測試用 NATBrand
Model Firmware Type Binding Life Time
SMC SMCWRB14T-G
V1.07 Full Cone NAT >155 min
PCI BLW-54PM Version3.0 Release00
Restricted Cone NAT
120~180 sec
PCI BRL-04R V1.0.0 Port-Restricted Cone NAT
59 sec
評分標準 書面報告 ( 共 25%)
解釋四種類型 NAT 的運作方式 測試方法與架構 ( 須寫出詳細流程 ) 流程圖
程式 &Demo ( 共 65%) 是否位於 NAT 下 (5%) Binding Life Time (10%) Full Cone NAT (15%) Restricted Cone NAT (15%) Port Restricted Cone NAT (15%) Symmetric NAT (5%)
注意事項 (1/2) 本次作業所有測試均是針對 UDP 本次作業兩個人一組 書面報告字數需 1500 字以上 書面報告須寫上中文姓名與學號 , 未寫者各扣 2 分 書面報告電子檔請繳交 .doc 或 .pdf 檔 Binding Life Time 的誤差必須在 10 秒以內 可以使用任何程式語言
注意事項 (2/2) Demo 時當場以截止繳交日期前寄出的 source code 編譯執行檔 執行環境以 R219 電腦中可提供的為主 , 如使用特殊的 Compiler,
請自行準備執行環境 作業驗收標準以可在 R219 之電腦執行為準 , 若 Demo 時程式無
法於 R219 之電腦執行 , 則視同作業未完成 作業請勿抄襲 Demo 時請攜帶書面報告紙本 , 並於封面註明中文姓名與學號 每組 Demo 時間為 15 分鐘 , 必須於時間內完成四種 NAT 與 Bin
ding Life Time 的測試 , 逾時未測試完畢的部份不予計分 Demo 時所使用的 NAT, Binding Life Time 均小於 5 分鐘 作業三最高分 90 分 (Term-Project 才有可能得到高於 90 分 )
繳交日期 95 年 6 月 24 日 24:00 前 於截止時間前將 Source Code 與書面報告寄至
[email protected] Demo 地點 : R219 Demo 時段 : 6/29 , 6/30 請於 Demo 前一週至 R442 門口填表預約時段 繳交格式
Source Code 檔名 : 學號 1_ 學號 2. 副檔名 書面報告檔名 : hw3_ 學號 1_ 中文姓名 1_ 學號 2_ 中文姓名 2. 副檔名 信件標題格式 : hw3_ 學號 1_ 中文姓名 1_ 學號 2_ 中文姓名 2 未依上述格式繳交者各扣 2 分