1. Trang chủ
  2. » Công Nghệ Thông Tin

Chapter 3 v7 01

109 0 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 109
Dung lượng 2,35 MB

Nội dung

©1996-2016, J.F Kurose and K.W Ross Computer Networks Lectured by: Nguyen Le Duy Lai (lai@hcmut.edu.vn) Computer Networking: A Top Down Approach 7th Edition, Global Edition Jim Kurose, Keith Ross Pearson April 2016 Introduction 1-1 ©1996-2016, J.F Kurose and K.W Ross Chapter Transport Layer Computer Networking: A Top Down Approach 7th Edition, Global Edition Jim Kurose, Keith Ross Pearson April 2016 Transport Layer 2-2 Chapter 3: Transport Layer our goals: ©1996-2016, J.F Kurose and K.W Ross ▪ understand principles behind transport layer services: • Multiplexing (mux), demultiplexing (demux) • reliable data transfer (rdt) • flow control • congestion control ▪ learn about Internet transport layer protocols: • UDP: connectionless transport • TCP: connection-oriented reliable transport • TCP flow control • TCP congestion control Transport Layer 3-3 ©1996-2016, J.F Kurose and K.W Ross Chapter 3: outline 3.1 transport-layer services 3.2 multiplexing and demultiplexing 3.3 connectionless transport: UDP 3.4 principles of reliable data transfer 3.5 connection-oriented transport: TCP • • • • segment structure reliable data transfer flow control connection management 3.6 principles of congestion control 3.7 TCP congestion control Transport Layer 3-4 ©1996-2016, J.F Kurose and K.W Ross Transport services and protocols ▪ provide logical communication between app processes running on different hosts ▪ transport protocols run in end systems • send side: breaks app messages into segments, passes to network layer • receive side: reassembles segments into messages, passes to app layer ▪ more than one transport protocol available to apps • Internet: TCP and UDP application transport network data link physical application transport network data link physical Transport Layer 3-5 Transport vs network layer ▪ network layer ▪ logical communication between hosts ©1996-2016, J.F Kurose and K.W Ross ▪ transport layer ▪ logical communication between processes ▪ relies on, enhances, network layer services household analogy: 12 kids in Ann’s house sending letters to 12 kids in Bill’s house: ▪ hosts = houses ▪ processes = kids ▪ app messages = letters in envelopes ▪ transport protocol = Ann and Bill who demux to in-house siblings ▪ network-layer protocol = postal service Transport Layer 3-6 Internet transport-layer protocols ▪ reliable, in-order delivery: TCP â1996-2016, J.F Kurose and K.W Ross ã connection setup • flow control • congestion control ▪ possibly unreliable, unordered delivery: UDP • no-frills extension of “best-effort” IP ▪ services not available: application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical application transport network data link physical • delay guarantees • bandwidth guarantees Transport Layer 3-7 ©1996-2016, J.F Kurose and K.W Ross Chapter outline 3.1 transport-layer services 3.2 multiplexing and demultiplexing 3.3 connectionless transport: UDP 3.4 principles of reliable data transfer 3.5 connection-oriented transport: TCP • • • • segment structure reliable data transfer flow control connection management 3.6 principles of congestion control 3.7 TCP congestion control Transport Layer 3-8 Multiplexing/demultiplexing multiplexing at sender: handle data from multiple sockets, add transport header (later used for demultiplexing) demultiplexing at receiver: use header info to deliver received segments to correct socket application ©1996-2016, J.F Kurose and K.W Ross application P3 P1 P2 application P4 transport transport network transport network link network physical link link physical socket process physical Transport Layer 3-9 How demultiplexing works ©1996-2016, J.F Kurose and K.W Ross ▪ host receives IP datagrams • each datagram has source IP address, destination IP address • each datagram carries one transport-layer segment • each segment has source, destination port number ▪ host uses IP addresses & port numbers to direct segment to appropriate socket 32 bits source port # dest port # other header fields application data (payload) TCP/UDP segment format Transport Layer 3-10 Causes/costs of congestion: scenario lout C/2 ©1996-2016, J.F Kurose and K.W Ross lin’ C/2 another “cost” of congestion: ▪ when packet dropped, any “upstream” transmission capacity used for that packet was wasted! Transport Layer 3-95 ©1996-2016, J.F Kurose and K.W Ross Chapter outline 3.1 transport-layer services 3.2 multiplexing and demultiplexing 3.3 connectionless transport: UDP 3.4 principles of reliable data transfer 3.5 connection-oriented transport: TCP • • • • segment structure reliable data transfer flow control connection management 3.6 principles of congestion control 3.7 TCP congestion control Transport Layer 3-96 TCP congestion control: additive increase multiplicative decrease AIMD saw tooth behavior: probing for bandwidth cwnd: TCP sender congestion window size ©1996-2016, J.F Kurose and K.W Ross ▪ approach: sender increases transmission rate (window size), probing for usable bandwidth, until loss occurs • additive increase (AI): increase cwnd by MSS every RTT until loss detected • multiplicative decrease (MD): cut cwnd in half after loss additively increase window size … … until loss occurs (then cut window in half) time Transport Layer 3-97 TCP Congestion Control: details sender sequence number space cwnd ©1996-2016, J.F Kurose and K.W Ross last byte ACKed last byte sent, notsent yet ACKed (“in-flight”) ▪ sender limits transmission: TCP sending rate: ▪ roughly: send cwnd bytes, wait RTT for ACKs, then send more bytes rate ~ ~ cwnd RTT bytes/sec LastByteSent< cwnd LastByteAcked ▪ cwnd is dynamic, function of perceived network congestion Transport Layer 3-98 TCP Slow Start â1996-2016, J.F Kurose and K.W Ross ã initially cwnd = MSS • double cwnd every RTT • done by incrementing cwnd for every ACK received Host B RTT ▪ when connection begins, increase rate exponentially until first loss event: Host A ▪ summary: initial rate is slow but ramps up exponentially fast time Transport Layer 3-99 TCP: detecting, reacting to loss ▪ loss indicated by timeout: • cwnd set to MSS; • window then grows exponentially (as in slow start) to threshold, then grows linearly ©1996-2016, J.F Kurose and K.W Ross ▪ loss indicated by duplicate ACKs: ▪ TCP RENO • dup ACKs indicate network capable of delivering some segments • cwnd is cut in half window then grows linearly ▪ TCP Tahoe always sets cwnd to (timeout or duplicate acks) Transport Layer 3-100 TCP: switching from Slow Start to Congestion Avoidance ©1996-2016, J.F Kurose and K.W Ross Q: when should the exponential increase switch to linear? A: when cwnd gets to 1/2 of its value before timeout Implementation: ▪ variable ssthresh ▪ on loss event, ssthresh is set to 1/2 of cwnd just before loss event * Check out the online interactive exercises for more examples: http://gaia.cs.umass.edu/kurose_ross/interactive/ Transport Layer 3-101 Summary: TCP Congestion Control duplicate ACK dupACKcount++ ©1996-2016, J.F Kurose and K.W Ross L cwnd = MSS ssthresh = 64 KB dupACKcount = slow start timeout ssthresh = cwnd/2 cwnd = MSS dupACKcount = retransmit missing segment dupACKcount == ssthresh= cwnd/2 cwnd = ssthresh + retransmit missing segment New ACK! new ACK cwnd = cwnd+MSS dupACKcount = transmit new segment(s), as allowed cwnd > ssthresh L timeout ssthresh = cwnd/2 cwnd = MSS dupACKcount = retransmit missing segment timeout ssthresh = cwnd/2 cwnd = dupACKcount = retransmit missing segment new ACK cwnd = cwnd + MSS (MSS/cwnd) dupACKcount = transmit new segment(s), as allowed congestion avoidance duplicate ACK dupACKcount++ New ACK! New ACK cwnd = ssthresh dupACKcount = dupACKcount == ssthresh= cwnd/2 cwnd = ssthresh + retransmit missing segment fast recovery duplicate ACK cwnd = cwnd + MSS transmit new segment(s), as allowed Transport Layer 3-102 TCP throughput ▪ avg TCP thru.put as function of window size, RTT? • ignore slow start, assume always data to send ▪ W: window size (measured in bytes) where loss occurs â1996-2016, J.F Kurose and K.W Ross ã avg window size (# in-flight bytes) is ắ W ã avg thruput is ¾ W per RTT Avg TCP thruput = W bytes/sec RTT W W/2 Transport Layer 3-103 TCP Futures: TCP over “long, fat pipes” ▪ example: 1500 byte segments, 100ms RTT, want 10 Gbps throughput ▪ requires W = 83,333 in-flight segments ▪ throughput in terms of segment loss probability, L ©1996-2016, J.F Kurose and K.W Ross [Mathis 1997]: MSS 1.22 TCP throughput = RTT L ➜ to achieve 10 Gbps throughput, need a loss rate of L = 2·10-10 – a very small loss rate! ▪ new versions of TCP for high-speed Transport Layer 3-104 TCP Fairness fairness goal: if K TCP sessions share same bottleneck link of bandwidth R, each should have average rate of R/K ©1996-2016, J.F Kurose and K.W Ross TCP connection TCP connection bottleneck router capacity R Transport Layer 3-105 Why is TCP fair? two competing sessions: ▪ additive increase gives slope of 1, as throughout increases ▪ multiplicative decrease decreases throughput proportionally ©1996-2016, J.F Kurose and K.W Ross R equal bandwidth share loss: decrease window by factor of congestion avoidance: additive increase loss: decrease window by factor of congestion avoidance: additive increase Connection throughput R Transport Layer 3-106 Fairness (more) Fairness and UDP ▪ multimedia apps often not use TCP • not want rate throttled by congestion control ©1996-2016, J.F Kurose and K.W Ross ▪ instead, use UDP: • send audio/video at constant rate, tolerate packet loss Fairness, parallel TCP connections ▪ application can open multiple parallel connections between two hosts ▪ web browsers this ▪ e.g., link of rate R with existing connections: • new app asks for TCP, gets rate R/10 • new app asks for 11 TCPs, gets R/2 Transport Layer 3-107 Explicit Congestion Notification (ECN) network-assisted congestion control: ©1996-2016, J.F Kurose and K.W Ross ▪ two bits in IP header (ToS field) marked by network router to indicate congestion ▪ congestion indication carried to receiving host ▪ receiver (seeing congestion indication in IP datagram) sets ECE (ECN-Echo) bit on receiver-to-sender ACK segment to notify sender of congestion TCP ACK segment source application transport network link physical ECN=00 IP datagram ECE=1 destination application transport network link physical ECN=11 Transport Layer 3-108 ©1996-2016, J.F Kurose and K.W Ross Chapter 3: summary ▪ principles behind transport layer services: • multiplexing, demultiplexing • reliable data transfer • flow control • congestion control ▪ instantiation, implementation in the Internet • UDP • TCP next: ▪ leaving the network “edge” (application, transport layers) ▪ into the network “core” ▪ two network layer chapters: • data plane • control plane Transport Layer 3-109

Ngày đăng: 11/04/2023, 09:46