大規模 nat を越えるための udp multi hole punching の拡張
Post on 11-Feb-2016
282 Views
Preview:
DESCRIPTION
TRANSCRIPT
卒業論文審査会 February 1, 2010
Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering 1
コンピュータ・ネットワーク工学科 4 年後藤滋樹研究室戸部 和洋 (1G06R140-0)
大規模 NAT を越えるための UDP Multi Hole Punching の拡張
卒業論文審査会 February 1, 2010
2Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
NAT の問題点• NAT は外側から接続できない
• NAT の内側のホストのアドレス は外側からわからない• インバウンドの開始パケット
(initiation packet) を破棄する
研究の背景 (1)Network Address Translator (NAT) の問題
global addressrealm
privateaddressrealm
NAT は外側から接続できないUDP Hole Punching によって、 NAT を越えて相手と直接通信( NAT 越え)できる。※ ただし、 Cone NAT に限る。 i.e. Symmetric NAT は(普通には)越えられない。
theInternet
UDP Hole Punching
(5) 戻りパケットを期待して穴が空く
host-A rendezvousserver
host-BNAT-A NAT-B
(1)host-A の外部IP, 外部 port がわかる
(7) 戻りパケットを期待して穴が空く
(2)host-B の外部IP, 外部 port がわかる
(3)host-B と通信したいな(4) host-B は (A, P) にいますhost-B にもお知らせしますね
(6) 知らない相手のパケットは破棄(8) 戻りパケットとして転送される
(9) 戻りパケットとして転送される
NAT越え
卒業論文審査会 February 1, 2010
3Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
(7)
(8)
(9)
TimeExceeded
NAT-B(Symmetric NAT)
NAT-A(Cone NAT)host-A
server-A server-Bhost-B
(10)
(11)
既存手法UDP Multi Hole Punching
• UDP Hole Punching の改良版• 2 台のサーバとの通信
によるポート予測• 低い TTL に設定した
UDP パケットを大量送信
• Symmetric NAT をリレーサーバなしで越えられる• サーバに低負荷・低遅延• cf. TURN, ICE, Teredo当時はこれでよかったが・・・
• IPv4 アドレスの在庫枯渇が迫る (IANA:2011, RIR:2012) [Huston]
• ISP は大規模 NAT (Large Scale NAT/Carrier Grade NAT) の配置を計画 • NAT の多段接続
• NAT 越えが難しくなるe.g. UPnP は機能しない
• ポート番号の制限• 同時セッション数の制限
e.g. Google Maps
研究の背景 (2)大規模 NAT (Large Scale NAT)
homenetwork
ISPnetwork
ISPnetwork
globaladdressrealm
ISP sharedaddressrealm
privateaddressrealmUDP Multi Hole
Punchingの改良が必要
homeNAT
homenetwork
homenetwork
home NAT
homenetwork
theInternet
Large ScaleNAT
[Huston] G. Huston, “IPv4 Address Report”,http://www.potaroo.net/tools/ipv4/index.html
卒業論文審査会 February 1, 2010
5Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
ポート数の制限• NAT で使えるポート数にはかぎりがある
• 約 60000 個 (=216 - 1024) のポート番号を複数のユーザで共有するため• 高速化のため、大量のセッションを同時に張るアプリケーションがある
• iTunes (230 ~ 270)• Amazon (90)• ニコニコ動画 (50 ~ 80)
「虫食い」の Google Maps
• 大規模 NAT にポート数が制限されて、虫食い状態になったGoogle Maps
このページの図と測定値はすべて以下の文献から引用しています。[Miyakawa] 宮川 晋 , “ インターネット 10 分講座:大規模 NAT( Large Scale NAT:LSN ) あるいはキャリアグレード NAT ( CGN )” ,http://www.nic.ad.jp/ja/newsletter/No41/0800.html
卒業論文審査会 February 1, 2010
6Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
背景のまとめと研究の目的• 大規模 NAT や集合団地における NAT の配置
• NAT の多段接続• 利用可能ポート番号の制限
⇒ UDP Multi Hole Punching (既存の NAT 越え手法)による Symmetric NAT 越えの可能性が低下
• 大規模 NAT 環境においても、 UDP Multi Hole Punchingが効率的に利用できるように技術を拡張• ポート予測 (Port Prediction)• Low TTL Value Determination
Mapping Behavior• Address and Port-Dependent Mapping (Symmetric NAT)
PR
PR’PNPN’
PN’’NAT
Addr: Na
Remote<AR, PR><AX, PR’><AX, PR’’>
Local<AL, PL><AL, PL><AL, PL>
Global<AN, PN><AN, PN’><AN, PN’’>
Host-XAddr: AX (≠AR)
Host-LAddr: AL
Host-RAddr: AR
internalnetwork
external network
NAT maps a new endpoint when a local host (Host-L) sends a packet to any external endpoints which Host-L hasn’t sent a packet, if the NAT behaves as “Endpoint-Independent Mapping”. This NAT was once called “Symmetric NAT”.
Hole Punching must predict this new port (PN’’).
PL
PXmapped a new port (PN’’)mapped a new port (PN’)
ポート予測 (Port Prediction)
- 4- 4
- 61 !?
+1+1+1
• NAT が割り当てるポートの規則性を調べ、次に割り当てられるポートを予測する技術• これが成功すれば、 Hole Punching で Symmetric NAT を越えられる
規則性あり(Predictable)
規則性なし(Random)
Random の場合手当たり次第に大量のパケットを送信するしかない(最後の手段)
「最後の手段」として大量のポートをオープン⇒ 大規模 NAT のポートを食い尽くしてしまう
既存手法の問題点 1ポート予測 (Port Prediction) における問題問題点 1. 同じ NAT に他のホストがいる場合、
ポート予測が正しく行えない可能性がある• 自分以外のホストの通信によっても、 Symmetric NAT が新しいポートのマッピングを生成するため• Predictable (e.g. Incremental) にもかかわらず、
Random と誤判定してしまう可能性がある
卒業論文審査会 February 1, 2010
10Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
提案手法 1Port Prediction の拡張
解決策 1-a. キャプチャ法• ポート予測中に LAN 内のパケットをキャプチャ• NAT の外側の新しいあて先へパケットが流れていた場合、その数をポート予測で考慮する
• Predictable であるにもかかわらず、 Random と誤判定してしまう可能性を減らすことができる解決策 1-b. スキャン法• 所属するネットワーク上の全 IP アドレスを確認• 応答のあったノード数をポート予測で考慮する
卒業論文審査会 February 1, 2010
11Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
キャプチャ法 vs. スキャン法スキャン法
利点• ユーザモードでも動作(実装による) 欠点• 確率的な予測のみ• スキャンのための時間がかかる• 攻撃として検知される可能性あり (e.g. IDS)
キャプチャ法 利点
• ポート予測に追加時間がほとんどかからない 欠点• 管理者権限 (Windows) /
root権限 (Linux) が必要• ハブでつながっているマシンのトラヒックしかキャプチャできない
12
Low TTL Value Determination
• UDP Multi Hole Punching はパケットの TTL を低く設定 1) して送信することで、自分側の NATを越えて、相手側の NAT に到達する前にパケットを破棄する• Low TTL Value Determination : 1) の値を決めるアルゴ
リズム• UDP Multi Hole Punching : 「決めうち」• NATBLASTER : 「 traceroute の方法」(提案のみ、未実装)
• e.g.) TTL = 2 の場合
NAT router(1st hop)
router(2nd hop)
router(3rd hop)
router(4th hop)
NAT router(5th hop)
TTL の値は次の条件を満たしていればよいTTL > 1 ∧ TTL – 5 < 0 ∴ 1 < TTL < 5
Time Exceeded
TTL => 1
TTL => 0
13
既存手法の問題点 (2)Low TTL Value Determination における問題
NAT router(1st hop)
NAT router(2nd hop)
router(3rd hop)
NAT router(4th hop)
NAT router(5th hop)
• NAT が多段の場合、自分側の一番外側の NATを越えて相手側の一番外側の NAT に到達する前に TTL が 0 になればよいが・・・• TTL > 2 ∧ TTL – 4 < 0 ∴ 2 < TTL < 4
問題点 2. NAT がいくつ連なっているか判断できない• Traceroute で得られたルーターの IP アドレスから、
NAT かどうか判断できることがあるが、 ICMP を返さないルータがある
14
解決策 2. traceroute や tracert で hop 数を求め、 それを 2 で割った値を TTL とする[ 仮定 ] NAT は経路の両端に存在し、中央にはない(は
ず)• 本手法は途中のルーターの IP アドレスを知る( NAT
か判定する)必要がないため ICMP が返されなくても問題ない
提案手法 2Low TTL Value Determination の方法
$ tracert 208.77.188.166
Tracing route to www.example.com [208.77.188.166]over a maximum of 30 hops:
1 * * * Request timed out. 2 * * * Request timed out. (省略) 11 * * * Request timed out. 12 144 ms 147 ms 146 ms www.example.com [208.77.188.166]
Trace complete. e.g.) hop 数 =12 TTL := 12/2 = 6⇒
卒業論文審査会 February 1, 2010
15Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
Java で実装• 一部、 Ruby で実装し、 java.lang.Runtime#exec() で実行• Java では、ユニキャスト UDP パケットの TTL を設定できない
ため
• キャプチャ法• Jpcap を利用
• libpcap / WinPcap の Java ラッパー
• スキャン法• java.net.InetAddress#isReachable()
• (権限があれば) ICMP ECHO REQUEST• (なければ)ポート 7 (Echo) で TCP 接続
実装
実験用ネットワーク( VMware ESXi による仮想環境)
internal host-1,2(192.168.0.0/24)
home NAT-1(flexNES).1
virtual switch(promiscuous mode) ISP-1
sharedaddressrealm
.2
(10.0.0.0/24)
.2 .1
ISP-2sharedaddressrealm
(10.0.1.0/24)
.1
internall host-3(192.168.1.0/24)
.1
virtual switch
external server-1, 2(192.0.2.128/26)
.2
global realmLSN-1
(flexNES)LSN-2
(flexNES).66
vs vs
.2.65.1
.129
Linuxrouter
virtual switch (vs).3
.130 .131
(192.0.2.0 /26)
(192.0.2.64/26)
home NAT-2(flexNES) private
realm-2privaterealm-1
vs vs
※flexible NAT Emulation Server (flexNES) = RFC4787 に準拠した NAT エミュレータ
Sym
.2
※Sym = Symmetric NAT
実験用ネットワーク(論理図)
internal host-1,2(192.168.0.0/24)
home NAT-1(flexNES).1
ISP-1sharedaddressrealm
(10.0.0.0/24)
.2 .1
ISP-2sharedaddressrealm
(10.0.1.0/24)
.1
internall host-3(192.168.1.0/24)
.1
external server-1, 2(192.0.2.128/26)
.2
global realmLSN-1
(flexNES)LSN-2
(flexNES).66 .2
.65.1
.129
Linuxrouter
.130 .131
(192.0.2.0 /26)
(192.0.2.64/26)
home NAT-2(flexNES) private
realm-2privaterealm-1
※flexible NAT Emulation Server (flexNES) = RFC4787 に準拠した NAT エミュレータ
.2 .3 .2
Sym
※Sym = Symmetric NAT
卒業論文審査会 February 1, 2010
18Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
まとめと今後の課題まとめ
UDP Multi Hole Punching の拡張• 必要以上のポートをオープンしてしまう問題の解決• 通信経路上で NAT が多段になっていても適応可能
今後の課題Low TTL Value Determination における仮定の妥当性の検討
• 「 NAT はエンドホストの近くに集中」• 「経路の中央付近には存在しない」
卒業論文審査会 February 1, 2010
19Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
ご清聴ありがとうございました
NAT の問題点• NAT の内側のホストのアドレス は外側からわからない• NAT は、知らない相手からのパケット (unsolicited packet)を破棄する
Network Address Translator (NAT)
Internet
globaladdressrealm
NAT
privateaddressrealm
• NAT の内側にあるホストの<IP Address, port> と、 NAT の外側の <IP Address, port> を変換する装置• たいていの家庭用 BBルータに実装されている
• 複数のホストが同じグローバル IP アドレスを使用してインターネットにアクセス可• NAT 内部ではプライベート IPアドレスを使うことが多い• e.g. 192.168.xxx.yyy NAT は外側から接続できない
※IP アドレスだけでなくポート番号も変換する装置は、厳密には Network Address and Port Translator(NAPT) であるが、現在はほとんどが NAPT であるため、これらを区別せずに NAT と呼ぶことが多い。
卒業論文審査会 February 1, 2010
21Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
NAT 越え手法の比較×:UPnP利点 Windows API にある [15]
欠点• ローカルネットワークにある
NATルータしか操作できない• ISP の NAT に届かない
• 認証機構が存在しない• ISP の NAT が UPnP を許可してしまうと・・・
• 「全部俺のポート!」• 極一部のユーザが、大量のポートフォワーディング生成
○:Relaying利点 どんな NAT 環境でも機能欠点
• 転送による遅延が発生• リレーサーバの負荷大
◎:UDP Hole Punching利点 NAT が多段でも機能欠点
• UDP のみ( TCP は難しい)• Symmetric NAT は難しい
卒業論文審査会 February 1, 2010
22Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
Hole Punching のセキュリティ• Hole Punching で「穴を開ける」と言われると、セキュリティを気にされる方が多いですが・・・• NAT≠ファイアウォール
• Filtering Behavior (cf. RFC4787) のおかげで、ファイアウォール的にふるまうように見えるだけ• 家庭用ルータには多くの機能が実装されている
• どの機能のおかげなのかわかりづらい• NAT とパケットフィルタ型ファイアウォールが混在
• セキュリティ対策はアプリケーションで行う• 受信パケットの送信元チェックなどをアプリで行う
卒業論文審査会 February 1, 2010
23Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
Java の場合• java.net.DatagramSocket.connect(InetAddress ho
st, int port)• 指定されたリモートホストの指定されたポートだけに
パケットを送信(あるいはそのポートからだけパケットを受信する)ように DatagramSocket に指示する。
• 指定された以外のホストまたはポートにパケットを送信しようとすると、 IlligalArgumentException が発生する。
• 指定された以外のホストまたはポートから受信したパケットは、黙って破棄され、例外やその他の通知はない。
卒業論文審査会 February 1, 2010
24Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
TCP Hole Punching
• UDP Hole Punchingのようにはいかない・・・• 同時オープンする方法
• TTL を低くして送る手法(1) 戻りパケットを期待して穴が空く
host-A rendezvousserver
host-BNAT-A NAT-B
(5) 戻りパケットを期待して穴が空く
(2) 知らない相手のパケットは破棄
(6) 穴が閉じているので通らない
SYN
RST
(3)TCP RST を返してしまう
(4) 開いた穴が閉じてしまうSYN
RST
(7) 開いた穴が閉じてしまう
host-A rendezvousserver
host-BNAT-A NAT-B
SYN(low TTL)
ICMP TimeExceeded
開いた穴が閉じないSYN
ACK
host-A rendezvousserver
host-BNAT-A NAT-B
SYN SYN
SYN/ACK
SYN/ACK SYN/ACK
※ 同時オープン (simultaneous open) の詳細は、「詳解 TCP/IP Vol.1 プロトコル」を参照して下さい。
第 1 回論文ゼミ tobe
UDP Multi Hole PunchingPhase I
(1) Host-A sends a UDP packet to server-A. Then, server-A gets host-A’s external end-point <AA1, PA1> mapped by NAT-A.
(2) Server-A informs host-A of the endpoint <AA1, PA1>.
(3) Host-A sends a UDP packet, which contains <AA1, PA1> in the payload, to server-B. Then, server-B gets <AA1, PA1> and the external endpoint <AA2, PA2> (usually AA1= AA2, PA1= PA2 if
NAT-A is Cone NAT). Server-B analyzes these endpoints.
(1)
(2)
(3)
NAT-B(Symmetric NAT)
NAT-A(Cone NAT)host-A
server-A server-Bhost-B
第 1 回論文ゼミ tobe
UDP Multi Hole PunchingPhase II
(4)
(5)
(6)
(6) Host-B sends a UDP packet, which contains <AB1, PB1> in the payload, to server-B. Then, server-B gets <AB1, PB1> and the external endpoint <AB2, PB2> (usually AB1= AB2, PB1≠PB2 if
NAT-B is Symmetric NAT). Server-B analyzes these endpoints.
(5) Server-B informs host-B of the endpoint <AB1, PB1>.
(4) Host-B sends a UDP packet to server-B. Then, server-B gets host-B’s external end-point <AB1, PB1> mapped by NAT-B.
NAT-B(Symmetric NAT)
NAT-A(Cone NAT)host-A
server-A server-Bhost-B
第 1 回論文ゼミ tobe
UDP Multi Hole PunchingPhase III
(8) Host-B sends a lot of packets whose TTL is set so low that they’ll be dropped between NAT-B and NAT-A.
(11) UDP session is established.
(7)
(8)
(9)
TimeExceeded
(9) Server-B informs host-A of the info for UDP Multi Hole Punching.
NAT-B(Symmetric NAT)
NAT-A(Cone NAT)host-A
server-A server-Bhost-B
(7) Server-B predicts the next external endpoint <AA3, PA3> or the range NAT-A will map. and then informs host-B of the info.
(10) Host-A sends a lot of packets to holes, opened at (9), of NAT-B. (10)
(11)
卒業論文審査会 February 1, 2010
28Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
Interactive Connectivity Establishment (ICE)
• offer/answer モデルのプロトコル (e.g. SIP/SDP) が、 NAT を越えて UDPベースのマルチメディアセッションを確立することをサポート• STUN や TURN で通信可能なエンドポイント <IP, port>
(candidate) を調べ、最適なエンドポイントを選択して通信する• Symmetric NAT は TURN によるリレーで越えられる
TURNserver
Relayed Candidate
the Internet
Server-reflexive CandidateNAT router
Host Candidate
卒業論文審査会 February 1, 2010
29Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
NAT の分類 (RFC 3489)
• Cone NAT• Full Cone NAT• Restricted Cone NAT• Port Restricted Cone NAT
• Symmetric NAT• あて先ごとに異なるマッピングを生成する
• cf. Address-Dependent Filtering/Address and Port-Dependent Filtering (RFC 4787)
• UDP Hole Punching では越えられない
卒業論文審査会 February 1, 2010
30Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
NAT の特性 (RFC 4787) (1/2)• Address and Mapping Behavior
• Endpoint-Independent Mapping (Cone)• Address-Dependent Mapping (Symmetric)• Address and Port-Dependent Mapping (Symmetric)
• Port Assignment Behavior• Port Preservation• Port Overloading• No Port Preservation
• Port Parity• Port Contiguity
卒業論文審査会 February 1, 2010
31Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
NAT の特性 (RFC 4787) (2/2)
• Mapping Refresh• Filtering Behavior
• Endpoint-Independent Filtering (Full Cone)• Address-Dependent Filtering (Restricted Cone)• Address and Port-Dependent Filtering
(Port Restricted Cone)• Hairpinning Behavior• ICMP Destination Unreachable Behavior
卒業論文審査会 February 1, 2010
32Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
Mapping Behavior (1)
• Endpoint-Independent Mapping (Cone NAT)
NATAddr: AN
PR
PR’
Remote<any, any>
Local<AL, PL>
Global<AN, PN>
PN
Host-XAddr: AX (≠AR)
Host-LAddr: AL
Host-RAddr: AR
internal network external network
NAT maps the same endpoint whenever a local host (Host-L) sends a packet to any external endpoints (Addr : any, Port : any), if the NAT behaves as “Endpoint-Independent Mapping”. This NAT was once called “Cone NAT”.
PL
PX
卒業論文審査会 February 1, 2010
33Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
Mapping Behavior (2)
• Address-Dependent Mapping (Symmetric NAT)
NATAddr: AN
PR
PR’
Hole Punching must predict this new port (PN’).
PN
PN’
mapped a new port (PN’)
Remote<AR, any><AX, any>
Local<AL, PL><AL, PL>
Global<AN, PN><AN, PN’>
Host-XAddr: AX (≠AR)
Host-LAddr: AL
Host-RAddr: AR
internal network external network
NAT maps a new endpoint when a local host (Host-L) sends a packet to any external hosts (≠R) which Host-L hasn’t sent a packet, if the NAT behaves as “Endpoint-Independent Mapping”. This NAT was once called “Symmetric NAT”.
PL
PX
卒業論文審査会 February 1, 2010
34Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
Mapping Behavior (3)• Address and Port-Dependent Mapping (Symmetric NAT)
PR
PR’PNPN’
PN’’NAT
Addr: Na
Remote<AR, PR><AX, PR’><AX, PR’’>
Local<AL, PL><AL, PL><AL, PL>
Global<AN, PN><AN, PN’><AN, PN’’>
Host-XAddr: AX (≠AR)
Host-LAddr: AL
Host-RAddr: AR
internalnetwork
external network
NAT maps a new endpoint when a local host (Host-L) sends a packet to any external endpoints which Host-L hasn’t sent a packet, if the NAT behaves as “Endpoint-Independent Mapping”. This NAT was once called “Symmetric NAT”.
Hole Punching must predict this new port (PN’’).
PL
PXmapped a new port (PN’’)mapped a new port (PN’)
卒業論文審査会 February 1, 2010
35Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
Filtering Behavior (1)
• Endpoint-Independent Filtering
internal network external network
NAT forwards all packets from any external endpoints (Addr : any, Port : any)to a local host (Host-L) which has already sent a packet to the external network,if the NAT behaves as “Endpoint-Independent Filtering”.
NATAddr: AN
Host-LAddr: AL
Host-XAddr: AX (≠AR)
Host-RAddr: AR
PR’PR
PN
Local<AL, PL>
Global<AN, PN>
PX
PL
Remote<any, any>
卒業論文審査会 February 1, 2010
36Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
Filtering Behavior (2)
• Address-Dependent Filtering
Host-LAddr: AL
NATAddr: AN
internal network external network
Host-XAddr: AX (≠AR)
Host-RAddr: AR
PR’PR
PN
Local<AL, PL>
Global<AN, PN>
NAT forwards packets from the only remote Host-R (Addr : AR, Port : any) thata local (Host-L) has already sent a packet to, but drops packets from any other remote hosts, if the NAT behaves as “Endpoint-Independent Filtering”.
PX
Remote<AR, any>
PL
卒業論文審査会 February 1, 2010
37Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
Filtering Behavior (3)
• Address and Port-Dependent Filtering
Host-RAddr: AR
Host-XAddr: AX (≠AR)
NATAddr: AN
PR’PR
internal network external network
Local<AL, PL>
Global<AN, PN>
Host-LAddr: AL
NAT forwards packets from the only endpoint (Addr : AR, Port : PR) that a local (Host-L) has already sent a packet to, but drops packets from any other remote hosts, if the NAT behaves as “Endpoint-Independent Filtering”.
PX
PNPL
Remote< AR, PR>
38
ポートフォワーディング/ポートマッピング
( Aterm DR203C の設定画面)
(例) UDP 5730 192.168.0.2 5730
卒業論文審査会 February 1, 2010
39Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
パケットフィルタ( Aterm DR203C の設定画面)
卒業論文審査会 February 1, 2010
40Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
ISP 規模の IPv4 アドレス共有方式• 大規模 NAT (Large Scale NAT : LSN)
• NAT444• DS-lite [Dual-stack lite broadband deployments post
IPv4 exhaustion]
• A+P [The A+P Approach to the IPv4 Address Shortage]
アドレスを共有する以上、どの形式を採用しても 使用できるポート番号数の制限は避けられない。 ⇒ NAT444 以外のモデルにおいても本研究は有効
卒業論文審査会 February 1, 2010
41Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
IP アドレス管理の構造
【出典】 IP アドレス管理の基礎知識 , http://www.nic.ad.jp/ja/ip/admin-basic.html
卒業論文審査会 February 1, 2010
42Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
IP アドレスが欲しい時は
【出典】 IP アドレスが欲しい時は , http://www.nic.ad.jp/ja/ip/whereto/
卒業論文審査会 February 1, 2010
43Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
Projected RIR and IANA Consumption (/8s)
【出典】 Geoff Huston, IPv4 Address Report, http://www.potaroo.net/tools/ipv4/index.html
Projected IANA Unallocated Address Pool Exhaustion: 09-Sep-2011Projected RIR Unallocated Address Pool Exhaustion: 10-Oct-2012
卒業論文審査会 February 1, 2010
44Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
IPv4 Address Status
【出典】 Geoff Huston, IPv4 Address Report, http://www.potaroo.net/tools/ipv4/index.html
卒業論文審査会 February 1, 2010
45
NAT444• NAT 444 model uses two Network Address and
Port Translators (NAPTs) with three types of IPv4 address blocks.1. Private Address inside CPE2. an IPv4 Address block
between CPEs and LSN3. IPv4 Global Addresses
that is outside LSN• The ISPs using NAT444
provide IPv6 connectivityby dual stack model.
The IPv4Internet
The IPv6Internet
IPv4/IPv6Dual Stack host
Dual Stack
IPv4 IPv6
IPv4Global Address
IPv4 Private Address /IPv6 Dual Stack
LSN
IPv4 NAT /IPv6 Dual Stack CPE
卒業論文審査会 February 1, 2010
46Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
NAT444 (Cont.)
• What type of IPv4 Address block should we use between CPEs and LSN?• Global Address• RFC1918 Private Address (10/8)
could conflict with its customer's network address• Class-E Address (240/4)• ISP Shared Address
is intended to be assigned between CPE and LSN in a NAT444
卒業論文審査会 February 1, 2010
47Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
DS-Lite (NAT464)
ISPcore network (IPv6)
10.0.0.2
homerouter
2001:0:0:2::1
2001:0:0:1::1
host
10.0.0.2
homenetwork
IPv4 over IPv6tunnel
B4 concentrator
NAT-44
the Internet (IPv4)
host (IPv4)
129.0.0.1
128.0.0.1
The dual-stack lite model is built onIPv4 over IPv6 tunnels to crossthe network to reach a carrier-grade IPv4-IPv4 NAT.
Address FamilyTransfer Router
(AFTR)
※B4 element= Basic Bridging BroadBand element
卒業論文審査会 February 1, 2010
48Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
A+P (Address + Port)
• avoid the presence of a CGN function.• assign
• the same IP public address to several customers at the same time (shared address)
• a restricted port range to each customer• so that two customers with the same IP address
have two different port ranges that do not overlap
• introduce a new function in the ISP network called Port Range Router (PRR).
卒業論文審査会 February 1, 2010
49Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
NAT444 v.s. DS-lite/A+PNAT444• 利点
• ユーザ宅の機器 (CPE)の交換が不要• 欠点
• NAT が多段になる• UPnP が機能しない
• ISP Shared Address (IPv4) が必要
• ステートフル×: Scalability/Availability
DS-lite/A+P (ハイブリッド構成も可)
• 利点• NAT が 1 段で済む
• UPnP が機能する• ISP 網を IPv6 オンリーで
構成可能• ステートレス
○ : Scalability/Availability
• 欠点• ユーザ宅の機器 (CPE)
の交換が必要
卒業論文審査会 February 1, 2010
50Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
提案手法 1 ( PortPrediction の拡張)の問題点
• NAT が多段で自分が所属する NAT より上に Symmetric NAT があると機能しない
• でも、 LSN は Symmetric NAT で実装されない• NAT MUST have Endpoint-Independent Mapping [16]• LSN も NAT なので、 Endpoint-Independent Mapping (Cone
NAT≠Symmetric NAT) として実装されるはず
これがSymmetric NATだと機能しない×
自分
これはSymmetric NATで OK
Internet○
これもSymmetric NATで OK
○
卒業論文審査会 February 1, 2010
51Kazuhiro TOBE, GOTO Laboratory, Dept. of Computer Science and Engineering
利用シーンQ. キャプチャ法はルーターの下にスイッチがあるとすべてのパケットをキャプチャすることができないが、どういう利用シーンを想定しているか?A. NAT 越えが必要になるのは主に IP電話やオンラインゲームなどの P2P アプリケーションであり、これらは家庭の小さなネットワークで使用されることが多いため、問題にならない。
top related