計算機網(wǎng)絡(luò)第五版(英文版)(6)
《計算機網(wǎng)絡(luò)第五版(英文版)(6)》由會員分享,可在線閱讀,更多相關(guān)《計算機網(wǎng)絡(luò)第五版(英文版)(6)(81頁珍藏版)》請在裝配圖網(wǎng)上搜索。
1、單擊此處編輯母版標(biāo)題樣式,,單擊此處編輯母版文本樣式,,第二級,,第三級,,第四級,,第五級,,,,*,The Transport Layer,Chapter 6,6.1 The Transport Service,6.1.1Services Provided to the Upper Layers (1),Transport layer adds reliability to the network layer,,Offers connectionless (e.g., UDP) and connection-oriented (e.g, TCP) service to applicatio
2、ns,6.1.1Services Provided to the Upper Layers (2),Transport layer sends,segments,in packets (in frames),Segment,Segment,6.1.2 Transport Service Primitives (1),Primitives that applications might call to transport data for a simple connection-oriented service,,Client calls CONNECT, SEND, RECEIVE, DISC
3、ONNECT,,Client calls CONNECT, SEND, RECEIVE, DISCONNECT,Segment,6.1.2 Transport Service Primitives (2),State diagram for a simple connection-oriented service,,Solid lines (right) show client state sequence,,,Dashed lines (left) show server state sequence,,,Transitions in italics are due to segment a
4、rrivals.,,5.1.3 Berkeley Sockets,Very widely used primitives started with TCP on UNIX,,Notion of “sockets〞 as transport endpoints,,Like simple set plus SOCKET, BIND, and ACCEPT,6.2 Elements of Transport Protocols,6.2.1 Addressing (1),Transport layer adds TSAPs,,Multiple clients and servers can run o
5、n a host with a single network (IP) address,,TSAPs are ports for TCP/UDP,,Well-known TSAPs,6.2.1 Addressing (2),How a user process in host 1 establishes a connection with a mail,server in host 2 via a process server,,Process server,,that acts as a proxy for less heavily used servers,6.2.2 Connection
6、 Establishment (1),Key problem is to ensure reliability even though packets may be lost, corrupted,,delayed,, and,duplicated,,Don’t treat an old or duplicate packet as new,,(Use ARQ and checksums for loss/corruption),,Approach,,Don’t reuse sequence numbers within twice the,MSL,(,Maximum Segment Life
7、time,) of 2T=240 secs,,Three-way handshake for establishing connection,6.2.2 Connection Establishment (2),Use a sequence number space large enough that it will not wrap, even when sending at full rate,,Clock (high bits) advances & keeps state over crash,,For a clock rate of,C,and a sequence number s
8、pace of size,S,, we must have,S/C>T,Need seq. number not to wrap within T seconds,Need seq. number not to climb too slowly for too long,6.2.2 Connection Establishment (3),Three-way handshake used for initial packet,,Since no state from previous connection,,Both hosts contribute fresh seq. numbers,,C
9、R = Connect Request,6.2.2 Connection Establishment (4),Three-way handshake protects against odd cases,,Duplicate CR. Spurious ACK does not connect,,Duplicate CR and DATA. Same plus DATA will be rejected (wrong ACK).,,To avoid an attacker to predict the next initial sequence number,,pseudorandom init
10、ial sequence numbers,are used for connections in practice.,a),b),Problems: 4,6.2.3 Connection Release (1),Key problem is to ensure reliability while releasing,,Asymmetric release (when one side breaks connection) is abrupt and may lose data,X,6.2.3 Connection Release (2),Symmetric release (both side
11、s agree to release) can’t be handled solely by the transport layer,,Two-army problem shows pitfall of agreement,Attack?,Attack?,6.2.3 Connection Release (3),Normal release sequence, initiated by transport user on Host 1,,DR=Disconnect Request,,Both DRs are ACKed by the other side,,6.2.3 Connection R
12、elease (4),Error cases are handled with timer and retransmission,Final ACK lost, Host 2 times out,Lost DR causes retransmissions,Extreme: Many lost DRs cause both hosts to timeout,6.2.4 Error Control and Flow Control (1),Foundation for error control is a sliding window (from Link layer) with checksu
13、ms and retransmissions,,Flow control,manages buffering at sender/receiver,,Issue is that data goes to/from the network and applications at different times,,Window tells sender available buffering at receiver,,Makes a variable-size sliding window,,The sender and receiver need to,dynamically adjust,
14、their buffer allocations,6.2.4 Error Control and Flow Control (2),Different buffer strategies trade efficiency / complexity,a) Chained fixed-size buffers,b) Chained variable-size buffers,c) One large circular buffer,6.2.4 Error Control and Flow Control (3),Flow control example: A’s data is limited b
15、y B’s buffer,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,2,3,4,5,3,4,5,6,3,4,5,6,3,4,5,6,3,4,5,6,7,8,9,10,B’s Buffer,6.2.4 Error Control and Flow Control (4),The carrying capacity of the network limits the maximum flow,,If the network can handle,c,segments/sec and the rou
16、nd-trip time is,r,, the sender’s window should be,cr,,The window size should be adjusted frequently, to track changes in the carrying capacity,6.2.5 Multiplexing,Kinds of transport / network sharing that can occur,,Multiplexing: connections share a network address,,Inverse multiplexing: addresses sh
17、are a connection,Multiplexing,Inverse Multiplexing,,,6.2.6 Crash Recovery,Application needs to help recovering from a crash,,Transport can fail since A(ck) / W(rite) not atomic,Write Short reports (6-1),1. There is crash recovery in connection between ATM and remote data base in a bank. Design a sol
18、ution which is beneficial to costumer or the bank. Is there a fair solution for both parts? If yes, design the solution, if no, give your reason.,6.3 Congestion Control,Two layers are responsible for congestion control,,Transport layer, controls the offered load,,Network layer, experiences congestio
19、n,Delay begins to rise sharply when congestion sets in,Goodput rises more slowly than load when congestion sets in,6.3.1 Desirable Bandwidth Allocation (1),Efficient use of bandwidth gives high goodput, low delay,,The load with the,highest power,represents an efficient load for the transport entity
20、to place on the network.,,Bottleneck link,6.3.1 Desirable Bandwidth Allocation (2),Fair use gives bandwidth to all flows (no starvation),,This is,max-min fair,, which maximizes the minimum bandwidth flows get, then lets flows go ahead when they are able to use excess bandwidth.,,Max-min fairness giv
21、es equal shares of bottleneck,6.3.1 Desirable Bandwidth Allocation (3),We want bandwidth levels to converge quickly when traffic patterns change,Flow 1 slows quickly when Flow 2 starts,Flow 1 speeds up quickly when Flow 2 stops,6.3.2 Regulating the Sending Rate (1),Sender may need to slow down for d
22、ifferent reasons,,Flow control, when the receiver is not fast enough [left],,Congestion, when the network is not fast enough [right],,Our focus is dealing with this problem – congestion,A fast network feeding a low-capacity receiver,? flow control is needed,A slow network feeding a high-capacity rec
23、eiver,? congestion control is needed,6.3.2 Regulating the Sending Rate (3),Different congestion signals the network may use to tell the transport endpoint to slow down (or speed up),,Except the following list, Windows includes Compound TCP that uses both packet loss and delay as feedback signals.,6.
24、3.2 Regulating the Sending Rate (4),If two flows increase/decrease their bandwidth in the same way when the network signals free/busy they will not converge to a fair allocation,+/– percentage,+ /– constant,6.3.2 Regulating the Sending Rate (5),The,AIMD,(,Additive Increase Multiplicative Decrease,)
25、control law does converge to a fair and efficient point!,,TCP uses AIMD for this reason,User 1’s bandwidth,User 2’s bandwidth,6.3.3 Wireless Issues,Wireless links lose packets due to transmission errors,,Do not want to confuse this loss with congestion,,Or connection will run slowly over wireless li
26、nks!,,Masking strategy,,Wireless links use ARQ, which masks errors,Discussing Topics (6-1),1. Summarize a transport protocol that is designed for wireless links, especially a wireless mesh network.,,6.4 The Internet Transport Protocols: UDP,6.4.1 Introduction to UDP (1),UDP (User Datagram Protocol)
27、is a shim over IP,,Header has ports (TSAPs), length and checksum,6.4.1 Introduction to UDP (2),Checksum covers UDP segment and IP pseudoheader,,Fields that change in the network are zeroed out,,Provides an end-to-end delivery check,,The UDP checksum operation is mandatory with IPv6 for all packets,,
28、6.4.2 UDP Header Compression Using 6LoWPAN (1),UDP headers using LOWPAN_NHC,,The UDP compression format,,Bits 0 through 4 represent the NHC ID and ’11110’ indicates the specific UDP header compression encoding,,C: Checksum,,1: All 16 bits of Checksum are elided.,,P: Ports,,11: First 12 bits of bo
29、th Source Port and Destination Port are 0xf0b and elided. The remaining 4 bits for each are carried in-line,,The UDP Length field MUST always be elided and is inferred from lower layers using the 6LoWPAN Fragmentation header or the IEEE 802.15.4 header.,6.4.2 UDP Header Compression Using 6LoWPAN (2)
30、,Compressing UDP Ports,,Allows a particular range of ports number (0xf0b0 to 0xf0bf) to be compressed down to 4 bits,,Should avoid using those ports as dynamic ports whenever possible,,Compressing UDP Checksum,,A compressor in the source transport endpoint MAY elide the UDP Checksum if it is authori
31、zed by the upper layer.,,A decompressor that expands a 6LoWPAN packet with the C bit set MUST compute the UDP Checksum on behalf of the source node and place that value in the restored UDP header,6.4.3 RPC (Remote Procedure Call),RPC connects applications over the network with the familiar abstracti
32、on of procedure calls,,Stubs package parameters/results into a message,,UDP with retransmissions is a low-latency transport,6.4.4 Real-Time Transport (1),RTP (Real-time Transport Protocol) provides support for sending real-time media over UDP,,Often implemented as part of the application,6.4.4 Real-
33、Time Transport (2),RTP header contains fields to describe the type of media and synchronize it across multiple streams,,RTCP sister protocol helps with management tasks,6.4.4 Real-Time Transport (3),Buffer at receiver is used to delay packets and absorb jitter so that streaming media is played out s
34、moothly,6.4.4 Real-Time Transport (4),High jitter, or more variation in delay, requires a larger playout buffer to avoid playout misses,,Propagation delay does not affect buffer size,Problems: 17, 20,6.5 The Internet Transport Protocols: TCP,6.5.1 The TCP Service Model (1),TCP provides applications
35、with a reliable byte stream between processes; it is the workhorse of the Internet,,Popular servers run on well-known ports,6.5.1 The TCP Service Model (2),Applications using TCP see only the byte stream [right] and not the segments [left] sent as separate IP packet,s,6.5.2 The TCP Segment Header,,T
36、CP header includes addressing (ports), sliding window (seq. / ack. number), flow control (window), error control (checksum) and more.,,Problems: 18,6.5.3 TCP Connection Establishment,TCP sets up connections with the three-way handshake,,Release is symmetric, also as described before,6.5.4 TCP Connec
37、tion State Modeling (1),The TCP connection finite state machine has more states than our simple example from earlier.,,6.5.4 TCP Connection State Modeling (2),Solid line is the normal path for a client.,,Dashed line is the normal path for a server.,,Light lines are unusual events.,,Transitions are l
38、abeled by the cause and action, separated by a slash.,6.5.5 TCP Sliding Window (1),,TCP adds flow control to the sliding window as before,,ACK + WIN is the sender’s limit,6.5.5 TCP Sliding Window (2),,Need to add special cases to avoid unwanted behavior,,E.g., silly window syndrome [below],6.5.6
39、 TCP Timer Management,,TCP estimates retransmit timer from segment RTTs,,Tracks both average and variance (for Internet case),,Timeout is set to average plus 4 x variance,6.5.7 TCP Congestion Control (1),TCP uses AIMD with loss signal to control congestion,,Implemented as a congestion window (cwnd)
40、for the number of segments that may be in the network,,Uses several mechanisms that work together,6.5.7 TCP Congestion Control (2),Congestion window controls the sending rate,,Rate is cwnd / RTT; window can stop sender quickly,,ACK clock (regular receipt of ACKs) paces traffic and smoothes out sende
41、r bursts,6.5.7 TCP Congestion Control (3),Slow start grows congestion window exponentially,,Doubles every RTT while keeping ACK clock going,6.5.7 TCP Congestion Control (4),Additive increase grows cwnd slowly,,Adds 1 every RTT,,Keeps ACK clock,6.5.7 TCP Congestion Control (5),Slow start followed by
42、 additive increase (TCP Tahoe),,Threshold is half of previous loss cwnd,6.5.7 TCP Congestion Control (6),With fast recovery, we get the classic sawtooth (TCP Reno),,Retransmit lost packet after 3 duplicate ACKs,,New packet for each dup. ACK until loss is repaired,6.5.7 TCP Congestion Control (7),SAC
43、K (Selective ACKs) extend ACKs with a vector to describe received segments and hence losses,,Allows for more accurate retransmissions / recovery,Problems: 25, 26, 27, 28, 30,Discussing Topics (6-2),,2. Problems: 38, 39, 40,6.5.8 SSL,—The Secure Sockets Layer (1),,TLS,(Transport Layer Security) is th
44、e IETF version,6.5.8 SSL,—The Secure Sockets Layer (2),Phases in SSL V3 connection establishment (simplified),,Only the client (Alice) authenticates the server (Bob),,Session key computed on both sides (E,B,, R,A,, R,B,),,6.5.8 SSL,—The Secure Sockets Layer (3),Data transmission using SSL. Authentic
45、ation and encryption for a connection use the session key,,6.6 Performance Issues,,6.6.1 Performance Problems,,Unexpected loads often interact with protocols to cause performance problems,,Need to find the situations and improve the protocols,,Examples,,Broadcast storm: one broadcast triggers anothe
46、r,,Synchronization: a building of computers all contact the DHCP server together after a power failure,,Tiny packets: some situations can cause TCP to send many small packets instead of few large ones,6.6.2 Measuring Network Performance,Measurement is the key to understanding performance – but has i
47、ts own pitfalls.,,Example pitfalls:,,Caching: fetching Web pages will give surprisingly fast results if they are unexpectedly cached,,Timing: clocks may over/underestimate fast events,,Interference: there may be competing workloads,6.6.3 Host Design for Fast Networks,Poor host software can greatly s
48、low down networks.,,Rules of thumb for fast host software:,,Host speed more important than network speed,,Reduce packet count to reduce overhead,,Minimize data touching,,Minimize context switches,,Avoiding congestion is better than recovering from it,,Avoid timeouts,6.6.4 Fast Segment Processing (1)
49、,Speed up the common case with a fast path [pink],,Handles packets with expected header; OK for others to run slowly,6.6.4 Fast Segment Processing (2),Header fields are often the same from one packet to the next for a flow; copy/check them to speed up processing,,6.6.5 Header Compression,,Overhead c
50、an be very large for small packets,,40 bytes of header for RTP/UDP/IP VoIP packet,,Problematic for slow links, especially wireless,,Header compression mitigates this problem,,Runs between Link and Network layer,,Omits fields that don’t change or change predictably,,40 byte TCP/IP header ? 3 bytes of
51、 information,,Gives simple high-layer headers and efficient links,6.6.7 Protocols for “Long Fat〞 Networks (1),Networks with high bandwidth (“Fat〞) and high delay (“Long〞) can store much information inside the network,,Requires protocols with ample buffering and few RTTs, rather than reducing the bit
52、s on the wire,,6.6.7 Protocols for “Long Fat〞 Networks (2),You can buy more bandwidth but not lower delay,,Need to shift ends (e.g., into cloud) to lower further,Problems: 31, 32, 33, 34, 35, 36, 37,6.7 Delay Tolerant Networking,,DTNs (Delay Tolerant Networks) store messages inside the network until
53、 they can be delivered,,6.7.1DTN Architecture (1),,Messages called bundles are stored at DTN nodes while waiting for an intermittent link to become a contact,,Bundles might wait hours, not milliseconds in routers,,May be no working end-to-end path at any time,6.7.1 DTN Architecture (2),,Example DTN
54、connecting a satellite to a collection point,6.7.2 Bundle Protocol (1),,The Bundle protocol uses TCP or other transports and provides a DTN service to applications,,6.7.2 Bundle Protocol (2),,Features of the bundle message format,,Dest./source add high-level addresses (not port/IP),,Custody transfer shifts delivery responsibility,,Dictionary provides compression for efficiency,End,,Chapter 6,,
- 溫馨提示:
1: 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
2: 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
3.本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
5. 裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 市教育局冬季運動會安全工作預(yù)案
- 2024年秋季《思想道德與法治》大作業(yè)及答案3套試卷
- 2024年教師年度考核表個人工作總結(jié)(可編輯)
- 2024年xx村兩委涉案資金退還保證書
- 2024年憲法宣傳周活動總結(jié)+在機關(guān)“弘揚憲法精神推動發(fā)改工作高質(zhì)量發(fā)展”專題宣講報告會上的講話
- 2024年XX村合作社年報總結(jié)
- 2024-2025年秋季第一學(xué)期初中歷史上冊教研組工作總結(jié)
- 2024年小學(xué)高級教師年終工作總結(jié)匯報
- 2024-2025年秋季第一學(xué)期初中物理上冊教研組工作總結(jié)
- 2024年xx鎮(zhèn)交通年度總結(jié)
- 2024-2025年秋季第一學(xué)期小學(xué)語文教師工作總結(jié)
- 2024年XX村陳規(guī)陋習(xí)整治報告
- 2025年學(xué)校元旦迎新盛典活動策劃方案
- 2024年學(xué)校周邊安全隱患自查報告
- 2024年XX鎮(zhèn)農(nóng)村規(guī)劃管控述職報告