Chapter 3, slide: 1 CS 372 – introduction to computer networks* Thursday July 8 Announcements: r Lab 3 is posted and due is Monday July 19. r Midterm is.

Slides:



Advertisements
Similar presentations
CS 4284 Systems Capstone Networking Godmar Back.
Advertisements

Transport Layer3-1 Homework r Chapter 2#10,13-18 r Due Wed September 17.
Transport Layer3-1 Pipelined protocols Pipelining: sender allows multiple, “in-flight”, yet-to- be-acknowledged pkts m range of sequence numbers must be.
Introduction 1 Lecture 12 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
Transport Layer 4 Slides from Kurose and Ross
Transport Layer 3-1 Transport services and protocols  provide logical communication between app processes running on different hosts  transport protocols.
Application Layer 2-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
The Future r There will be a Wireshark TCP homework up on the wiki later today. It will be due Wednesday. r The next test is coming soon – next Wednesday????
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
1 Outline r Transport-layer services r Multiplexing and demultiplexing r Connectionless transport: UDP r Principles of reliable data transfer.
Transport Layer3-1 Data Communication and Networks Lecture 6 Reliable Data Transfer October 12, 2006.
Announcement Project 1 due last night, how is that ? Project 2 almost ready, out tomorrow, will post online –Much harder than project 1, start early!
Announcement Project 1 due last night, how is that ? Homework 1 grade, comments out –Will be discussed in the next lecture Homework 2 out Project 2 almost.
Chapter 3 Transport Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 9.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Transport Layer3-1 Reliable Data Transfer. Transport Layer3-2 Principles of Reliable data transfer r important in app., transport, link layers r top-10.
1 Outline r Transport-layer services r Multiplexing and demultiplexing r Connectionless transport: UDP r Principles of reliable data transfer.
Announcement Project 2 out –Much harder than project 1, start early! Homework 2 due next Tu.
3-1 Sect. 3.4 Principles of reliable data transfer Computer Networking: A Top Down Approach Featuring the Internet, 1 st edition. Jim Kurose, Keith Ross.
CPSC 441: Reliable Transport1 Reliable Data Transfer Instructor: Carey Williamson Office: ICT Class.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
Some slides are in courtesy of J. Kurose and K. Ross Review of Previous Lecture r Transport-layer services r Multiplexing and demultiplexing r Connectionless.
9/30/ /2/2003 The Transport Layer September 30-October 2, 2003.
1 Transport Layer goals: r understand principles behind transport layer services: m multiplexing/demultiplexing m reliable data transfer m flow control.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 
CSCI 3335: C OMPUTER N ETWORKS C HAPTER 3 T RANSPORT L AYER Vamsi Paruchuri University of Central Arkansas Some.
Transport Layer 3-1 Chapter 3 outline 3.1 transport-layer services 3.2 multiplexing and demultiplexing 3.3 connectionless transport: UDP 3.4 principles.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.
14-1 Last time □ Mobility in Cellular networks ♦ HLR, VLR, MSC ♦ Handoff □ Transport Layer ♦ Introduction ♦ Multiplexing / demultiplexing ♦ UDP.
Transport Layer 3-1 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m sockets m reliable data transfer m.
15-1 Last time □ Reliable Data Transfer ♦ Provide rdt over unreliable network layer ♦ FSM model ♦ rdt 1.0: rdt over reliable channels ♦ rdt 2.0: rdt over.
Transport Layer 3-1 From Computer Networking: A Top Down Approach Featuring the Internet by Jim Kurose, Keith Ross Addison-Wesley, A note on the use of.
rdt2.2: a NAK-free protocol
Part 3: Transport Layer: Reliable Data Transfer CSE 3461/5461 Reading: Section 3.4, Kurose and Ross 1.
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
Transport Layer3-1 rdt2.1: sender, handles garbled ACK/NAKs Wait for call 0 from above sndpkt = make_pkt(0, data, checksum) udt_send(sndpkt) rdt_send(data)
Transport Layer 3-1 Chapter 3 outline 3.4 Principles of reliable data transfer.
September 24 th, 2013 CS1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Part.
1 John Magee 10 February 2014 CS 280: Transport Layer: Reliable Data Transfer Most slides adapted from Kurose and Ross, Computer Networking 6/e Source.
Transport Layer Our goals:
9: Pipelined Protocols and RTT Transport Layer 3-1 Slides adapted from: J.F Kurose and K.W. Ross,
Important r Midterm will be on m FRIDAY, Feb. 12th 1.
Introduction 1 Lecture 11 Transport Layer (Reliable Data Transfer) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
Application Layer 2-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Chapter 3 Transport Layer
Chapter 3 Transport Layer
Chapter 3 outline 3.1 transport-layer services
Last time Reliable Data Transfer
EEC-484/584 Computer Networks
rdt2.2: a NAK-free protocol
EEC-484/584 Computer Networks
EEC-484/584 Computer Networks
rdt2.2: a NAK-free protocol
rdt2.2: a NAK-free protocol
EEC-484/584 Computer Networks
EEC-484/584 Computer Networks
rdt2.2: a NAK-free protocol
EEC-484/584 Computer Networks
rdt2.2: a NAK-free protocol
Chapter 3 outline 3.1 transport-layer services
Chapter 3 Transport Layer
9: Pipelined Protocols and RTT
EEC-484/584 Computer Networks
EEC-484/584 Computer Networks
Chapter 3 Transport Layer
rdt2.0: FSM specification
CS 5565 Network Architecture and Protocols
rdt2.2: a NAK-free protocol
Presentation transcript:

Chapter 3, slide: 1 CS 372 – introduction to computer networks* Thursday July 8 Announcements: r Lab 3 is posted and due is Monday July 19. r Midterm is Wednesday July 21. Acknowledgement: slides drawn heavily from Kurose & Ross * Based in part on slides by Bechir Hamdaoui and Paul D. Paulson.

Chapter 3, slide: 2 rdt2.0 has a fatal flaw! What happens if ACK/NAK is corrupted? That is, sender receives garbled ACK/NAK r sender doesn’t know what happened at receiver! r can’t sender just retransmit?  Sure: sender retransmits current pkt if ACK/NAK garbled  Any problem with this ?? Handling duplicates: r sender adds sequence number to each pkt r receiver discards (doesn’t deliver up) duplicate pkt Sender sends one packet, then waits for receiver response stop and wait Sender sends one packet, then waits for receiver response stop and wait Receiver doesn’t know whether received pkt is a retransmit or a new pkt Problem: duplicate

Chapter 3, slide: 3 rdt2.1: sender, handles garbled ACK/NAKs Wait for call 0 from above sndpkt = make_pkt(0, data, checksum) udt_send(sndpkt) rdt_send(data) Wait for ACK or NAK 0 udt_send(sndpkt) rdt_rcv(rcvpkt) && ( corrupt(rcvpkt) || isNAK(rcvpkt) ) sndpkt = make_pkt(1, data, checksum) udt_send(sndpkt) rdt_send(data) rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && isACK(rcvpkt) udt_send(sndpkt) rdt_rcv(rcvpkt) && ( corrupt(rcvpkt) || isNAK(rcvpkt) ) rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && isACK(rcvpkt) Wait for call 1 from above Wait for ACK or NAK 1  

Chapter 3, slide: 4 rdt2.1: receiver, handles garbled ACK/NAKs Wait for 0 from below sndpkt = make_pkt(NAK, chksum) udt_send(sndpkt) rdt_rcv(rcvpkt) && not corrupt(rcvpkt) && has_seq0(rcvpkt) rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && has_seq1(rcvpkt) extract(rcvpkt,data) deliver_data(data) sndpkt = make_pkt(ACK, chksum) udt_send(sndpkt) Wait for 1 from below rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && has_seq0(rcvpkt) extract(rcvpkt,data) deliver_data(data) sndpkt = make_pkt(ACK, chksum) udt_send(sndpkt) rdt_rcv(rcvpkt) && (corrupt(rcvpkt) sndpkt = make_pkt(ACK, chksum) udt_send(sndpkt) rdt_rcv(rcvpkt) && not corrupt(rcvpkt) && has_seq1(rcvpkt) rdt_rcv(rcvpkt) && (corrupt(rcvpkt) sndpkt = make_pkt(ACK, chksum) udt_send(sndpkt) sndpkt = make_pkt(NAK, chksum) udt_send(sndpkt)

Chapter 3, slide: 5 rdt2.1: discussion Sender: r seq # added to pkt r two seq. #’s (0,1) will suffice. Why?  New pkt  Retransmitted pkt r must check if received ACK/NAK corrupted r twice as many states  state must “remember” whether “current” pkt has 0 or 1 seq. # Receiver: r must check if received packet is duplicate  state indicates whether 0 or 1 is expected pkt seq # r note: receiver can not know if its last ACK/NAK received OK at sender

Chapter 3, slide: 6 rdt2.2: a NAK-free protocol r do we really need NAKs?? r instead of NAK, receiver sends ACK for last pkt received OK  receiver must explicitly include seq # of pkt being ACKed r duplicate ACK at sender results in same action as NAK: retransmit current pkt r rdt2.2: same functionality as rdt2.1, using ACKs only

Chapter 3, slide: 7 rdt3.0: channels with errors and loss New assumption: packet may be lost: underlying channel can also lose packets (data or ACKs) r checksum, seq. #, ACKs, retransmissions will be of help, but not enough r What else is needed? Approach: timeout policy: r sender waits “reasonable” amount of time for ACK r retransmits if no ACK received in this time r if pkt (or ACK) just delayed (not lost):  retransmission will be duplicate, but use of seq. #’s already handles this  receiver must specify seq # of pkt being ACKed r requires countdown timer

Chapter 3, slide: 8 rdt3.0 in action ( still stop-n-wait w/ (0,1) sn)

Chapter 3, slide: 9 rdt3.0 in action ( still stop-n-wait w/ (0,1) sn) rcv ACK1 do nothing

Chapter 3, slide: 10 Performance of rdt3.0: stop-n-wait first packet bit transmitted, t = 0 senderreceiver RTT last packet bit transmitted, t = L / R first packet bit arrives last packet bit arrives, send ACK ACK arrives, send next packet, t = RTT + L / R r rdt3.0 works, but performance stinks r example: R=1 Gbps, 15 ms e-e prop. delay, L=1000Byte packet: T transmit = b/pkt 10 9 b/sec = 8 microsec L (packet length in bits) R (transmission rate, bps) =

Chapter 3, slide: 11 Performance of rdt3.0: stop-n-wait first packet bit transmitted, t = 0 senderreceiver RTT last packet bit transmitted, t = L / R first packet bit arrives last packet bit arrives, send ACK ACK arrives, send next packet, t = RTT + L / R r rdt3.0 works, but performance stinks r example: R=1 Gbps, 15 ms e-e prop. delay, L=1000Byte packet:  U sender : utilization – fraction of time sender busy sending

Chapter 3, slide: 12 Performance of rdt3.0: stop-n-wait first packet bit transmitted, t = 0 senderreceiver RTT last packet bit transmitted, t = L / R first packet bit arrives last packet bit arrives, send ACK ACK arrives, send next packet, t = RTT + L / R r rdt3.0 works, but performance stinks r example: R=1 Gbps, 15 ms e-e prop. delay, L=1000Byte packet:  1kB pkt every 30 msec -> 33kB/sec thruput over 1 Gbps link  network protocol limits use of physical resources!

Chapter 3, slide: 13 Pipelining: increased utilization first packet bit transmitted, t = 0 senderreceiver RTT last bit transmitted, t = L / R first packet bit arrives last packet bit arrives, send ACK ACK arrives, send next packet, t = RTT + L / R last bit of 2 nd packet arrives, send ACK last bit of 3 rd packet arrives, send ACK Increase utilization by a factor of 3! Question: What is the link utilization U sender

Chapter 3, slide: 14 Pipelined protocols Pipelining: sender allows multiple, “in-flight”, yet-to-be-ACK’ed pkts r what about the range of sequence numbers then?? r What about buffering at receiver?? r Two generic forms of pipelined protocols: go-Back-N and selective repeat

Go-Back-N: sender Sender: r k-bit seq # in pkt header r “window” of up to N, consecutive unACKed pkts allowed Chapter 3, slide: 15 r ACK(n): ACKs all pkts up to, including seq # n - “cumulative ACK” m may receive duplicate ACKs (see receiver) r timeout(n): retransmit pkt n and all higher seq # pkts in window

Chapter 3, slide: 16 GBN: receiver extended FSM ACK-only: always send ACK for correctly-received pkt with highest in-order seq #  may generate duplicate ACKs  need only remember expectedseqnum r out-of-order pkt:  discard (don’t buffer) -> no receiver buffering!  Re-ACK pkt with highest in-order seq # Wait udt_send(sndpkt) default rdt_rcv(rcvpkt) && notcurrupt(rcvpkt) && hasseqnum(rcvpkt,expectedseqnum) extract(rcvpkt,data) deliver_data(data) sndpkt = make_pkt(expectedseqnum,ACK,chksum) udt_send(sndpkt) expectedseqnum++ expectedseqnum=1 sndpkt = make_pkt(expectedseqnum,ACK,chksum) 

Chapter 3, slide: 17 GBN in action

Chapter 3, slide: 18 Selective Repeat r receiver individually acknowledges all correctly received pkts  buffers pkts, as needed, for eventual in-order delivery to upper layer r sender only resends pkts for which ACK not received  sender timer for each unACKed pkt r sender window  N consecutive seq #’s  again limits seq #s of sent, unACKed pkts

Chapter 3, slide: 19 Selective repeat: sender, receiver windows

Chapter 3, slide: 20 Selective repeat in action GBN?

Chapter 3, slide: 21 Selective repeat: dilemma Example: r seq #’s: 0, 1, 2, 3 r window size=3

Chapter 3, slide: 22 Selective repeat: dilemma Example: r seq #’s: 0, 1, 2, 3 r window size=3 r receiver sees no difference in two scenarios! Even though,  (a) is a retransmit pkt  (b) is a new pkt r in (a), receiver incorrectly passes old data as new r Is this a pb in GBN? Why? doesn’t buffer out-of-order Q: what relationship between seq # size and window size to avoid duplication problem??

Chapter 3, slide: 23 Chapter 3 outline r 1 Transport-layer services r 2 Multiplexing and demultiplexing r 3 Connectionless transport: UDP r 4 Principles of reliable data transfer r 5 Connection-oriented transport: TCP r 6 Principles of congestion control r 7 TCP congestion control

Chapter 3, slide: 24 TCP Round Trip Time (RTT) and Timeout Why need to estimate RTT? r “timeout” and “retransmit” needed to address pkt loss r need to know when to timeout and retransmit Ideal world: r exact RTT is needed Real world: r RTTs change over time bcause  pkts may take different paths  network load changes over time r RTTs can only be estimated Some intuition r What happens if too short: premature timeout  unnecessary retransmissions r What happens if too long:  slow reaction to segment loss

Chapter 3, slide: 25 Technique: Exponential Weighted Moving Average (EWMA) EstimatedRTT = (1-  )*EstimatedRTT +  *SampleRTT 0 <  < 1; typical value:  = r SampleRTT:  measured time from segment transmission until ACK receipt r current value of RTT r Ignore retransmission r EstimatedRTT:  estimated based on past & present; smoother than SampleRTT r to be used to set timeout period TCP Round Trip Time (RTT) and Timeout

Chapter 3, slide: 26 Technique: Exponential Weighted Moving Average (EWMA) EstimatedRTT = (1-  )*EstimatedRTT +  *SampleRTT 0 <  < 1; typical value:  = Example Suppose 3 ACKs returned with SampleRTT 1, SampleRTT 2, and SampleRTT 3. Question: What would be EstimatedRTT after receiving the 3ACKs ? Assume that EstimatedRTT 1 = SampleRTT 1 TCP Round Trip Time (RTT) and Timeout

Chapter 3, slide: 27 Technique: Exponential Weighted Moving Average (EWMA) EstimatedRTT = (1-  )*EstimatedRTT +  *SampleRTT 0 <  < 1; typical value:  = What happens if  is too small (say very close 0):  A sudden, real change in network load does not get reflected in EstimatedRTT fast enough r May lead to under- or overestimation of RTT for a long time What happens if  is too large(say very close 1):  Transient fluctuations/changes in network load affects EstimatedRTT and makes it unstable when it should not r Also leads to under- or overestimation of RTT TCP Round Trip Time (RTT) and Timeout

Chapter 3, slide: 28 Example RTT estimation:

Chapter 3, slide: 29 Setting the timeout  timeout = EstimtedRTT, any problem with this???  add a “safety margin” to EstimtedRTT  large variation in EstimatedRTT -> larger safety margin r see how much SampleRTT deviates from EstimatedRTT: TimeoutInterval = EstimatedRTT + 4*DevRTT DevRTT = (1-  )*DevRTT +  *|SampleRTT-EstimatedRTT| (typically,  = 0.25) Then set timeout interval: TCP Round Trip Time (RTT) and Timeout