スライド タイトルなし



Similar documents
トランスポートレイヤの仕事 計算機間での良好なデータのやり取りを実現する 誤りがないように 再送 パリティー情報による自動再生 (FEC; Forward Error Correction) データを取りこぼさないように それ以外に欲しくなる機能 並列データ転送 ネットワークに やさしく 道が混まな

スライド タイトルなし

Contents Part1: TCP Part2: TCP Part3: TCP Part4: Part5: TCP Part6:

I TCP 1/2 1

第1回 ネットワークとは

橡c03tcp詳説(3/24修正版).PDF

untitled


2004 SYN/ACK SYN Flood G01P014-6

untitled

2 1: OSI OSI,,,,,,,,, 4 TCP/IP TCP/IP, TCP, IP 2,, IP, IP. IP, ICMP, TCP, UDP, TELNET, FTP, HTTP TCP IP

2.5 トランスポート層 147

ヤマハ ルーター ファイアウォール機能~説明資料~

Microsoft PowerPoint - network8forPDF

Packet Tracer: 拡張 ACL の設定 : シナリオ 1 トポロジ アドレステーブル R1 デバイスインターフェイス IP アドレスサブネットマスクデフォルトゲートウェイ G0/ N/A G0/

SRT/RTX/RT設定例集

ヤマハ ルーター ファイアウォール機能~説明資料~

設定例集_Rev.8.03, Rev.9.00, Rev.10.01対応

TCP/IP Internet Week 2002 [2002/12/17] Japan Registry Service Co., Ltd. No.3 Internet Week 2002 [2002/12/17] Japan Registry Service Co., Ltd. No.4 2

main2.dvi

Agenda IPv4 over IPv6 MAP MAP IPv4 over IPv6 MAP packet MAP Protocol MAP domain MAP domain ASAMAP ASAMAP 2

TCP T ransmission Control Protocol TCP TCP TCP TCP TCP TCP TCP TCP c /(18)

Microsoft PowerPoint network8.pptx

NetEng-04.ppt

tcp/ip.key

untitled

ict2-.key

GA-1190J

Managed Firewall NATユースケース

DocuWide 2051/2051MF 補足説明書

スライド タイトルなし

total-all-nt.dvi

IPv4aaSを実現する技術の紹介

2011 I/ 2 1

スライド 1

wide93.dvi

i TCP/IP NIC Intel 3com NIC TCP/IP *1 20 IPv4 IPv6 IPv6 TCP/IP TCP/IP *1 3

IP.dvi

第1回 ネットワークとは

Teradici Corporation # Canada Way, Burnaby, BC V5G 4X8 Canada p f Teradici Corporation Teradi

$ cal ) ( cal $ cal cal cal 1. () ( clear) 2. ( cal) 3. ( man) \() ( ) --() +()

Microsoft PowerPoint ppt [互換モード]

帯域を測ってみよう (適応型QoS/QoS連携/帯域検出機能)

Mac OS X Server QuickTime Streaming Server 5.0 の管理(バージョン 10.3 以降用)

ScreenOS 5.0 ScreenOS 5.0 Deep Inspection VLAN NetScreen-25/-50/-204/-208 HA NetScreen-25 HA Lite NetScreen-25 NetScreen-50) ALG(Application Layer Gat

SCREENOS NAT ScreenOS J-Series(JUNOS9.5 ) NAT ScreenOS J-Series(JUNOS9.5 ) NAT : Destination NAT Zone NAT Pool DIP IF NAT Pool Egress IF Loopback Grou

IIJ Technical WEEK SEILシリーズ開発動向:IPv6対応の現状と未来

<4D F736F F F696E74202D DB A B C C815B E >

IP IP DHCP..

tutorial.dvi


2008, 2009 TOSHIBA TEC CORPORATION All rights reserved

LAN

untitled

ルータ(IPv6)掲示用池田.PDF

IP 2.2 (IP ) IP 2.3 DNS IP IP DNS DNS 3 (PC) PC PC PC Linux(ubuntu) PC TA 2

untitled

Microsoft Word - Win-Outlook.docx

Microsoft PowerPoint pptx


TTC技術書

Macintosh HD:Users:ks91:Documents:lect:nm2002s:nm2002s03.dvi

NAT-f SIP NAT 1 1, 2 1 IP SIP NAT NAT NAT NAT-f NAT-free protocol NAT-f SIP Session Initiation Protocol NAT-f SIP NAT Researches on NAT traversal for

untitled

IT講習会

ScreenOS Copyright (C) 2005 NOX Co., Ltd. All Rights Reserved. Version1.00

オペレーティング システムでの traceroute コマンドの使用

snortの機能を使い尽くす & hogwashも使ってみる

NetLec17TCPIP1.ppt

双方向映像配信とブロードバンドへの適用

ppt

Microsoft PowerPoint - ykashimu_dslite_JANOG26_rev

TOPIC 2004 年 4 月 21 日に公開された TCP の脆弱性! Transmission Control Protocol: TCP について! 脆弱性発見の背景! 脆弱性情報の流通過程! 脆弱性の内容について! 実際の脆弱性への対応 脆弱性の対象となる製品 脆弱性の回避策と対策 公開情


wide94.dvi

TCP/IP Protocols and Services

MIRACLE LoadBalancerを使用したネットワーク構成と注意点

一般的に使用される IP ACL の設定

IP L09( Tue) : Time-stamp: Tue 14:52 JST hig TCP/IP. IP,,,. ( ) L09 IP (2017) 1 / 28

AirMac ネットワーク構成の手引き

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè1²ó

worm hoihoi

untitled

F コマンド

untitled

Microsoft PowerPoint ISC203(印刷版).ppt

Flow Control Information Network 1 /

rzakg.ps

2011 NTT Information Sharing Platform Laboratories

ワイヤレス~イーサネットレシーバー UWTC-REC3

fx-9860G Manager PLUS_J

2/11 ANNEX HATS HATS

GA-1200J

I j

untitled

httpredchk-j.pdf

R80.10_FireWall_Config_Guide_Rev1

Si-R30取扱説明書

目 次 1 改 訂 履 歴 はじめに L2 ACL 基 本 設 定 L2 ACL の 作 成 L2 ACL のインタフェースまたは VLAN への 適 用 L2 ACL の 設 定 の 確 認 L3 AC

total.dvi

Transcription:

トランスポートレイヤ 技 術 - TCP; Transmission Control Protocol - 1

トランスポートレイヤの 仕 事 計 算 機 のインターフェース(Socket) 間 での 良 好 な データのやり 取 りを 実 現 する 誤 りがないように 再 送 パリティー 情 報 による 自 動 再 生 (FEC; Forward Error Correction) データを 取 りこぼさないように (*) ファイルアクセスと 同 じ インターフェース を 提 供 それ 以 外 に 欲 しくなる 機 能 並 列 データ 転 送 ネットワークに やさしく 道 が 混 まないように ネットワークは 単 純 化 エンドホストが 賢 く 2

3

4

インターネットアーキテクチャ - TCP : Transmission Control Protocol - TCP (Transmission Control Protocol) ; end-to-end フロー 制 御 エラー 制 御 / 再 送 制 御 コネクション 管 理 セッションの 多 重 化 Application TCP IP Network Interface Physical IP Network Interface Physical Application TCP IP Network Interface Physical 5

TCP Features Stream Oriented Data Transmission Connection 確 立 (Three-way-handshake) Connection ( Stream ) Identifier = Socket {dst_ip_addr, dst_port, src_ip_addr, src_port} Sequence Number ; 32 bits バイト 番 号 : 0 - (2^32-1) 2^32 でSequence NumberがWrapされる Full-Duplex での 通 信 Acknowledgement (ACK) ; 次 に 受 信 すべきバイト 番 号 (SN)の 通 知 エラー 回 復 : セグメント 再 送 (Segment retransmission) by Time-out, Dupilicated-ACK Sliding Window Control を 用 いたデータ 転 送 制 御 (*) Window_size 65,535 Bytes 6

7

8

TCP Header Format UR AK PH RT SY FN : Urgent Pointer Field Significant (URG) : Acknowledgement Field Significant (ACK) : Push Function : Reset the Connection : Synchronize Sequence Numbers (SYN) : No More Data From Sender (FIN) 9

TCP Port Allocation (RFC1700) 1. Well-Known Ports ; 0-1,023 2. Registered Ports ; 1,024-49,151 3. Dynamic and/or Private Ports ; 49,152-65,535 最 新 情 報 : ftp://ftp.isi.edu/in-notes/iana/assignments/port-numbers 10

TCP Well-Known Ports Port Number Keyword Application 5 rje Remote Job Entry 20 ftp-data File Transfer [Default data] 21 ftp File Transfer [Control] 23 telnet Telnet 25 smtp Simple Management Protocol 39 rlp Resource Location Protocol 53 domain Domain Name Server 63 whois++ Whois++ 67 bootp Bootstrap Protocol Server 69 tftp Trivial File Transfer 70 gopher Gopher 79 finger Finger 80 http World Wide Web HTTP 110 pop3 Post Office Protocol - Version 3 111 sunrpc SUN Remote Procedure Call 119 nntp Network News Transfer Protocol 11

TCP Well-Known Ports Port Number Keyword Application 123 ntp Network Time Protocol 137 netbios-ns NetBIOS Name Service 138 netbios-dgm NetBIOS Datagram Service 139 netbios-ssn NetBIOS Session Service 179 bgp Border Gateway Protocol (BGP) 202 at-nbp AppleTalk Name Binding Protocol 213 ipx IPX 220 imap3 IMAP3 (Interactive Mail Access Protocol) 396 netware-ip Novell Netware over IP 540 uucp uucp daemon 546 dhcpv6-client DHCPv6 Client 547 dhcpv6-server DHCPv6 Server 560 rmonitor remote monitor daemon 12

TCP Connection 確 立 / 開 放 svr4.1037 (client) bsdi.discard(server) Active open (appli. open : telnet) SYN_ACK(a+1,b) Passive open open open Active Close (application close: quit) half close FIN (m,s+1) ACK (m+1) FIN_ACK (m+1,s) EOF to Application Passive Close (application close) ACK (s+1) half close full close 13

TCP Connection 確 立 / 開 放 SYN_SENT (Active open) ESTABLISHED Client SYN_ACK(a+1,b) Server LISTEN (Passive open) SYN_RCVD ESTABLISHED FIN_WAIT_1 (Active close) FIN_WAIT_2 TIME_WAIT FIN (m,s) ACK (m+1) FIN_ACK (m+1,s) CLOSE_WAIT (Passive close) LAST_ACK 2-MSL CLOSED ACK (s+1) CLOSED 14

TCP Connection 確 立 / 開 放 Log on the console; svr4% telnet bsdi discard Trying 140.252.13.35 Connected to bsdi. Escape character is ^]. ^] telnet> quit Connection closed. #port= 9 (server discard packet) tcpdump output 1 0.0 svr4.1037 > bsdi.discard: S 14155.14155(0) win 4096 <mss 1024> 2 0.024 (0.0024) bsdi.discard > svr4.1037: S 18239.18239(0) ack 14156 win 4096 <mss 1024> 3 0.007 (0.0048) svr4.1037 > bsdi.discard:. ack 18240 win 4096 4 4.155 (4.1482) svr4.1037 > bsdi.discard: F 14156:14156(0) ack 18240 win 4096 5 4.158 (0.0013) bsdi.discard > svr4.1037:. ack 14157 win 4096 6 4.159 (0.0014) bsdi.discard > svr4.1037: F 18240.18240(0) ack 14157 win 4096 7 4.189 (0.0225) svr4.1037 > bsdi.discard:. ack 18241 win 4096

TCP Connection 確 立 / 開 放 tcpdump output 1 0.0 svr4.1037 > bsdi.discard: S 14155.14155(0) win 4096 <mss 1024> 2 0.024 (0.0024) bsdi.discard > svr4.1037: S 18239.18239(0) ack 14156 win 4096 <mss 1024> 3 0.007 (0.0048) svr4.1037 > bsdi.discard:. ack 18240 win 4096 4 4.155 (4.1482) svr4.1037 > bsdi.discard: F 14156:14156(0) ack 18240 win 4096 5 4.158 (0.0013) bsdi.discard > svr4.1037:. ack 14157 win 4096 6 4.159 (0.0014) bsdi.discard > svr4.1037: F 18240.18240(0) ack 14157 win 4096 7 4.189 (0.0225) svr4.1037 > bsdi.discard:. ack 18241 win 4096 [ 意 味 ] source.port > destination.port : flags SN_begin.SN_end(data_size) flags : S = SYN ; Synchronize sequence_number(sn) F = FIN ; Finish data transmission R = RST ; Reset connection P = PSH ; push data to receiving process asap. = ; none of above four flags is on SN_end = SN_begin + data_size win 4096 ; window size is 4096 mss 1024 ; maximum segment size is 1024 bytes 16

appl: close send: FIN SYN_RCVD FIN_WAIT_1 recv: ACK send: <nothing> recvl: SYN send: SYN, ACK FIN_WAIT_2 recv: ACK send: <nothing> appl: close send: FIN appl: passive open send: <nothing> recv: FIN send: ACK recv: FIN,ACK send: ACK recv: FIN send: ACK Active close CLOSED LISTEN passive open Send : RST appl: send data send: SYN recv: SYN send: SYN,ACK (simultaneous open) ESTABLISHED simultaneous close CLOSING recv: ACK send: <nothing> TIME_WAIT 2 MSL timeout appl: active open send: SYN SYN_SENT recv: SYN,ACK send: ACK recv: FIN send: ACK Active open appl: close or timeout CLOSE_WAIT appl: close send: FIN LAST_ACK Passive close recv: ACK send: <nothing>

appl: close send: FIN << Client >> SYN_RCVD FIN_WAIT_1 recv: ACK send: <nothing> recvl: SYN send: SYN, ACK FIN_WAIT_2 recv: ACK send: <nothing> appl: close send: FIN appl: passive open send: <nothing> recv: FIN send: ACK recv: FIN,ACK send: ACK recv: FIN send: ACK Active close CLOSED LISTEN passive open send: RST appl: send data send: SYN recv: SYN send: SYN,ACK (simultaneous open) ESTABLISHED simultaneous close CLOSING recv: ACK send: <nothing> TIME_WAIT 2 MSL timeout appl: active open send: SYN SYN_SENT recv: SYN,ACK send: ACK recv: FIN send: ACK Active open appl: close or timeout CLOSE_WAIT appl: close send: FIN LAST_ACK Passive close recv: ACK send: <nothing>

appl: close send: FIN << Server >> SYN_RCVD FIN_WAIT_1 recv: ACK send: <nothing> recvl: SYN send: SYN, ACK FIN_WAIT_2 recv: ACK send: <nothing> appl: close send: FIN appl: passive open send: <nothing> recv: FIN send: ACK recv: FIN,ACK send: ACK recv: FIN send: ACK Active close CLOSED LISTEN passive open send: RST appl: send data send: SYN recv: SYN send: SYN,ACK (simultaneous open) ESTABLISHED simultaneous close CLOSING recv: ACK send: <nothing> TIME_WAIT 2 MSL timeout appl: active open send: SYN SYN_SENT recv: SYN,ACK send: ACK recv: FIN send: ACK Active open appl: close or timeout CLOSE_WAIT appl: close send: FIN LAST_ACK Passive close recv: ACK send: <nothing>

20

誤 りのないデータ 転 送 パケットが 紛 失 したり 誤 ったりしたら 再 送 (Resend)して もとにもどす 正 しく 受 信 できたかの 確 認 のメッセージ (ACK; Acknowledge)を 送 信 (From dst src) とても 原 始 的 な 手 順 では 速 度 が 出 ない 2つの 改 善 手 法 大 きなパケット 長 : 最 大 でも 帯 域 幅 の 1/3 まで パイプラインで パケットを 転 送 21

TCP Bulk Data Transmission - Sliding Window - Window 制 御 を 用 いたパケット 転 送 1Sliding Window (Receiver 設 定 ) 2Congestion Window(Sender 設 定 ) (1) ACKなしにwindow 数 のパケットを 転 送 (2) ACKのAggregation(ACKパケットの 減 少 ) (3) Receiver 側 によるwindow 幅 の 制 御 (4) ACK 受 信 でwindowをスライドさせる 22

TCP Sliding Window Offered window (advertised by receiver) Unsent window 1 2 3 4 5 6 7 8 9 10 11 sent and ACKed sent but not ACKed Can send ASAP Can not send until window slides 23

TCP Sliding Window Sent 3 and 4 Offered window (advertised by receiver) Unsent window 1 2 3 4 5 6 7 8 9 10 11 sent and ACKed sent but not ACKed Can send ASAP Can not send until window slides Receive ack 5 from receiver 3+window=9 5+window=11 Receive ack 5 from receiver

TCP Sliding Window Window advertise by receiver shrink enlarge window closed by ACK reception = ACKed SN Opend by ACK reception (=ack+window) Slide window by ACK from receiver 25

TCP Congestion Window Offered window (advertised by receiver) Unsent window 1 2 3 4 5 6 7 8 9 10 11 sent and ACKed Congestion window ( cwnd =1 ) Shall not send ASAP Can not send until window slides sent but not ACKed 26

TCP Congestion Window Sent 3 Offered window (advertised by receiver) Unsent window 1 2 3 4 5 6 7 8 9 10 11 sent and ACKed Shall send without ACK ASAP; cwnd=2 (cwnd cwnd*2) Shall not send ASAP Can not send until window slides 3+window=9 4+window=10 Receive ack 4 from receiver Receive ack 4 from receiver

TCP Congestion Window Slow Start Policy (cwnd ; exponential increase) cwnd = 1 ; for (セグメント 転 送 ) { for (not congestion) { if (セグメント 転 送 ACK 受 信 ) { cwnd = cnwd +1 } cwnd = 1 } (*) 注 意 : Congestion Avoidance では 若 干 異 なる SenderがLocal に 制 御 することなので 変 えることが 容 易 に 可 能 28

cwnd cwnd TCP Congestion Window advertised_window advertised_window congestion time time < Congestionなしの 場 合 > < Congestion 経 験 の 場 合 > (*) Duplicated ACKを 使 用 せず 29

1 TCP Congestion Window(1) [ 送 ] [ 受 ] [ 送 ] [ 受 ] 1 1 1 1 1 1 1 30

2 TCP Congestion Window(2) [ 送 ] [ 受 ] [ 送 ] [ 受 ] 2 3 2 3 3 2 2 3 3 2 2 3 2 3 31

4 TCP Congestion Window(3) 7 6 5 [ 送 ] [ 受 ] [ 送 ] [ 受 ] 4 5 4 7 6 6 5 4 4 5 7 7 6 5 4 4 5 6 4 5 6 7 32

8 TCP Congestion Window(4) 12 11 10 9 [ 送 ] [ 受 ] [ 送 ] [ 受 ] 5 6 7 8 9 8 13 12 11 10 6 7 10 9 8 8 9 14 13 12 11 7 11 10 9 8 8 9 10 15 14 13 12 8 9 10 11 必 要 なウィンドー 幅 BWxRTT 33

Congestion Window Control [ 目 的 ] cwndの 大 きな 振 動 を 防 ぎ 適 切 なcwndで 運 用 する [1] cwndの 制 御 (i) ssthresh 以 下 のcwndサイズ Exponential increase (slow start) (ii) ssthresh 以 上 のcwndサイズ Liner increase (congestion avoidance) [2] ssthreshの 制 御 (i) Timeout ; goto 1 (ii) Duplicated-ACK ; 1/2 cwnd=1; ssthresh=64kb; for () { if ( Timeout ) { cwnd=1; ssthresh = cwnd/2; } if ( duplicated ACK ) { ssthresh=cwnd / 2; cwnd=ssthresh; } if (cwnd ssthresh) { slow_start; /* exponential */ } else { congestion_avoidance; /* liner */ } } 34

Congestion Window Control ( 続 ) ICMP 制 御 メッセージ (1) ICMP Source Quench cwnd = 1 ; ssthresh = as is ; (2) Host unreachable No Action ; 35

(cwnd_1) / 2 (cwnd_3) / 2 cwnd slow-start slow-start Congestion avoidance Congestion avoidance Congestion avoidance cwdn_1 cwdn_3 Target cnwd ssthresh Timeout Fast Recovery Fast Recovery 36

Window Scaling for Long Fat Pipe - RFC1323 - Network Bandwidth(bps) RTT(ms) BWxRTT(B) Ethernet 10.000 M 3 3,750 T1( 大 陸 間 ) 1.544 M 60 11,580 T1( 衛 星 ) 1,544 M 500 96,500 T3( 大 陸 間 ) 45,000 M 60 337,500 OC12( 大 陸 間 ) 2,400,000 M 60 7,500,000 Max. Window Size ; 2^(16) Bytes = 64KB Window Scaling ; wscale wscale=n 64 x 2^(n) windowサイズ 37

RFC 1379 ; T/TCP - Transaction TCP - [ 目 的 ] TCPコネクションの 確 立 開 放 手 続 きの 速 度 アップ [ 方 法 ] CC (Connection Count) Option SYNへのPiggy-back ; half-synchronization (1) SYN, Data, FIN, CC (2) SYN, SYN-ACK, Data, FIN, FIN-ACK, CC, CC-Echo (3) FIN-ACK 38

Client RFC 1379 ; T/TCP Server Client Server SYN_ACK(a+1,b) SYN,S-ack,Data, F,F-ack Data_ACK(a+2,b+1) FIN (m,s) ACK (m+1) FIN_ACK (m+1,s) ACK (s+1) 9 セグメント 3 セグメント 39

40

再 送 間 隔 1.5 sec 3 sec 6 sec 64 sec RTO Expired Retransmission bsdi.1023 1 3 4 6 7 8 9 17 SYN 0:0(0) win4096 <mss1024> svr4.discard SYN 3:3(0) ack 1 win4096 <mss1024> ack 4 win4096 PSH 1:15(14) ack 4 win4096 ack 15 win 4096 5 2 再 送 トライ (RTO; 再 送 タイマ) RTO = 1.5 sec /* 変 更 可 能 */ for ( 9 minutes) { if ( RTO expired) { retransmission; RTO=RTO x 2; RTO=min{64sec, RTO}; } } end /* 諦 める */ 18 41

Retransmission by Duplicated ACK (2) Reception of Duplicated ACK - Fast Retransmission / Fast Recovery Segment 廃 棄 特 性 ; single (or few) segment(s) あるい は 連 続 多 数 未 ACKの 同 一 ACK Segmentsを 複 数 (3 回 ) 受 信 したら 再 送 42

Fast Retransmission by Duplicated ACK 6401:6656(256) ack1 6657:6912(256) ack1 6913:7168(256) ack1 7169:7424(256) ack1 7425:7680(256) ack1 7681:7936(256) ack1 7937:8192(256) ack1 8193:8448(256) ack1 6657:6912(256) ack1 Fast Retransmission 8449:8704(256) ack1 8705:8960(256) ack1 ack 5889 ack 6145 ack 6401 ack 6657 ack 6657 1 ack 6657 2 ack 6657 3 ack 6657 ack 6657 ack 6657 ack 8449 win5888 8961:9216(256) ack1 ack 8705 win5888

UDP 44

UDP Header format 0 7 8 15 16 23 24 31 +--------+--------+--------+--------+ Source Destination Port Port +--------+--------+--------+--------+ Length Checksum +--------+--------+--------+--------+ data octets... +----------------...

46

UDP Header format 0 7 8 15 16 23 24 31 +--------+--------+--------+--------+ フロー 制 御 も 誤 り 訂 正 制 御 Source Destination も 行 Port わない Port +--------+--------+--------+--------+ アプリケーションに 任 せる Length Checksum +--------+--------+--------+--------+ data octets... +----------------...

RTP 48

RTP RTP; Real-time Transport Protocol RTPはEnd-Hostでのみ 適 用 される (*) ルータでの 通 信 品 質 はOut-of-Focus 基 本 仕 様 ; RFC1889, RFC1890 Playbackタイミングの 再 生 - Payload Type - Sequence Number - Time-Stamp 2 対 のUDP Portを 使 用 - User Data - Control Data ContentごとにRTP Payload Formatを 規 定 49

RTP RTP Payload Format 仕 様 RFC2029 ; CellB Video Encoding (for SUN) RFC2032 ; H.261 Video Stream RFC2035 ; JPEG-compressed Video RFC2250 ; MPEG1/MPEG2 Video Control Protocol RTCP ; RTP Control Protocol 通 信 品 質 監 視 機 能 - 通 信 受 信 / 送 信 ノード - 品 質 監 視 ノード 50

Application RTP RTPの 仕 事 ; 受 信 ノードにおいて 送 信 側 から 送 信 される データの 出 力 タイミングを 再 生 する タイミング 制 御 送 信 ノード 受 信 バッファ Generate Delay-Jitter 51

RTP d1 d2 d3 d4 送 信 側 タイミング; t1 t2 t3 t4 t5 受 信 側 入 力 タイミング; t1 t2 t3 t4 t5 受 信 側 出 力 タイミング; T T+t1 T+t2 T+t3 T+t4 T+t5 Off-set d1 d2 d3 d4 52

NAT 53

NAT(Network Address Translation) 受 信 パケットのIPアドレス(src_IP)およびポート 番 号 の(src_port) 変 換 テーブルを 持 ちIPヘッダの 変 換 (RFC1631) (1) Private Global - DNS : 宛 先 ノードのIPアドレスが 解 決 される - 受 信 パケット(dst_IP) 送 信 パケットの(src_IP, src_port)の 書 換 え (2) Global Private - 受 信 パケット(src_IP, src_port) 送 信 パケットの(dst_IP)の 書 換 え (*) ポート 番 号 (src_port)の 機 能 (i) src_ipの 多 重 化 (ii) dst_ipのマッピング 54

NAT A NAT C 入 力 出 力 アドレス ポート アドレス ポート 送 信 宛 先 送 信 宛 先 送 信 宛 先 送 信 宛 先 A ー ー ー N ー ー ー 送 信 アドレス A C A C A Nに 変 換 宛 先 アドレス N C N C N Aに 変 換

Traditional NAT 組 織 内 インターネット A NAT C 送 信 ポート 番 号 送 信 アドレス A Nに 変 換 宛 先 ポート 番 号 C A 200 100 100 A 200 C 宛 先 アドレス C N 200 100 100 200 N C Basic NAT N Aに 変 換 送 信 ポート 番 号 送 信 アドレス A N 100 150に 変 換 宛 先 ポート 番 号 100 A 200 C 宛 先 アドレス 150 200 N C NAPT C A 200 100 N A 150 100に 変 換 C N 200 150

NAPT (Network Address and Port Translation) 172.20.6.1 172.20.6.2 172.20.6.3 NATルータ 157.82.246.115 インターネットへ 送 信 元 IP=172.20.6.1 送 信 元 ポート=1234 1 送 信 元 IP=157.82.240.115 送 信 元 ポート=54321 宛 先 IP=172.20.6.1 宛 先 ポート=1234 2 宛 先 IP=157.82.240.115 宛 先 ポート=54321 1 内 から 外 に 向 かうパケットがあるとNATルータはポート 番 号 を 割 当 2 その 後 外 から 来 るパケットについてもIPアドレスとポート 番 号 を 変 換 57

Bi-directional NAT 組 織 内 インターネット A NAT C DNS (1) ホストAのアドレスは? (2)アドレスはN C A 200 100 C N 200 100 (3) N Aに 変 換 送 信 ポート 番 号 送 信 アドレス A Nに 変 換 100 A 200 C 100 200 N C (4) 宛 先 ポート 番 号 宛 先 アドレス

Twice NAT 組 織 内 インターネット A NAT C (1)ホストC のアドレスは? (2)アドレスは Nl1 DNS 送 信 アドレス A Ng Nl1 Cに 変 換 (3) A Nl1 宛 先 アドレス Ng1 C (4) Nl1 A C Ng1 Ng A C Nl1に 変 換

However Limitation on the number of session states for NAT operation Each user could use certain number of sessions How many sessions? Even as the best case, 65,536 is the maximum number of sessions, shared by customers accommodated into a single IPv4 address When the number of users is 2,000, it will be only 30 sessions This means.. 60

Limitation of NAT Solution Host Host Host NAT Host Host Host Maximum # of sessions 61

Limitation of NAT Solution Host You may have already Host Host experienced!!!! NAT Host Host Host Maximum # of sessions 62

Max 30 Connections 63

Max 20 Connections 64

Max 15 Connections 65

Max 10 Connections 66

Max 5 Connections 67

Some examples of major Web site Application # of TCP sessions No operation 5~10 Yahoo top page 10~20 Google image search 30~60 ニコニコ 動 画 50~80 OCN photo friend 170~200+ itunes 230~270 igoogle 80~100 楽 天 (Rakuten) 50~60 Amazon 90 HMV 100 YouTube 68 90

トランスポートレイヤ 技 術 - TCP; Transmission Control Protocol - 69