9: Pipelined Protocols and RTT Transport Layer 3-1 Slides adapted from: J.F Kurose and K.W. Ross, 1996-2010.

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
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 outline 3.1 transport-layer services
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????
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 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.
The Data Link Layer. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
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.
Reliable Data Transfer#1#1 Reliable Data Transfer.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Transport Layer3-1 Data Communication and Networks Lecture 5  Transport Protocols: Multiplexing and Reliable Data Transfer October 7, 2004.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
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.
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.
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.
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.
Before The Canned Slides r What sort of things did you learn from Mikes talk on Friday? r Mini-homework this week: create a wiki page with cross-referenced.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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 All.
Transport Layer Computer Networks Computer Networks Term A15.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.
Transport Layer Our goals:
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.
1 COMP 431 Internet Services & Protocols The Transport Layer Pipelined Transport Protocols Jasleen Kaur March 29, 2016.
Performance of rdt3.0 rdt3.0 works, but performance stinks
Chapter 3 Transport Layer
Chapter 3 outline 3.1 transport-layer services
Last time Reliable Data Transfer
rdt2.2: a NAK-free protocol
Transport Layer Our goals:
EEC-484/584 Computer Networks
EEC-484/584 Computer Networks
rdt2.2: a NAK-free protocol
rdt2.2: a NAK-free protocol
rdt2.2: a NAK-free protocol
rdt2.2: a NAK-free protocol
Chapter 3 outline 3.1 transport-layer services
Chapter 3 Transport Layer
9: Pipelined Protocols and RTT
Chapter 3 Transport Layer
rdt2.0: FSM specification
Lecture 5 – Chapter 3 CIS 5617, Spring2019 Anduo Wang
rdt2.2: a NAK-free protocol
Presentation transcript:

9: Pipelined Protocols and RTT Transport Layer 3-1 Slides adapted from: J.F Kurose and K.W. Ross,

3: Transport Layer 3a-2 Stop and Wait  Rdt3.0 also called Stop and Wait  Sender sends one packet, then waits for receiver response  What is wrong with stop and wait?  Slow!! Must wait full round trip time between each send  Obvious Fix?  Instead send lots, then stop and wait  Call this a pipelined protocol because many packets in the pipeline at the same time

3: Transport Layer 3a-3 Pipelined protocols Pipelining: sender allows multiple, “in-flight” yet-to- be-acknowledged packets  range of sequence numbers must be increased to be able to distinguish them all  Additional buffering at sender and/or receiver  Once allow multiple “in-flight” consider that channel may reorder the packets

Transport Layer 3-4 rdt3.0: stop-and-wait operation 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

3: Transport Layer 3a-5 How bad is Stop and Wait?  Depends on network conditions  example: 1 Gbps link, 15 ms end-to-end prop. delay, 1KB packet: T transmit = 1kb/pkt 10**9 b/sec = 1 microsec Utilization = U = = 1 microsec msec Utilization of the channel = 0.003% m 1KB pkt every 30 msec -> 33kB/sec throughput over 1 Gbps link m network protocol limits use of physical resources! r In general, smaller packets, longer RTT and higher maximum bandwidth, all make the situation worse

Transport Layer 3-6 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 with window size of 3

3: Transport Layer 3a-7 Filling the pipeline  How much in-flight data is needed to “fill the pipeline”?  Similar to question of how much water needed to fill a pipe (area of crosssection * length of pipe)  For networks, it is bandwidth*delay

Transport Layer 3-8 Pipelined Protocols Go-back-N: big picture:  sender can have up to N unacked packets in pipeline  rcvr only sends cumulative acks  doesn’t ack packet if there’s a gap  sender has timer for oldest unacked packet  if timer expires, retransmit all unack’ed packets Selective Repeat: big pic  sender can have up to N unack’ed packets in pipeline  rcvr sends individual ack for each packet  sender maintains timer for each unacked packet  when timer expires, retransmit only unack’ed packet

Transport Layer 3-9 Go-Back-N Sender:  k-bit seq # in pkt header  “window” of up to N, consecutive unack’ed pkts allowed  ACK(n): ACKs all pkts up to, including seq # n - “cumulative ACK”  may receive duplicate ACKs (see receiver)  timer for window of packets  timeout(n): retransmit pkt n and all higher seq # pkts in window

Transport Layer 3-10 GBN: sender extended FSM Wait start_timer //resend all packets in window udt_send(sndpkt[base]) udt_send(sndpkt[base+1]) … udt_send(sndpkt[nextseqnum-1]) timeout rdt_send(data) if (nextseqnum < base+N) { sndpkt[nextseqnum] = make_pkt(nextseqnum,data,chksum) udt_send(sndpkt[nextseqnum]) if (base == nextseqnum) //one timer per window start_timer nextseqnum++ } else refuse_data(data) //or just block the caller base = getacknum(rcvpkt)+1 //cummulative ack If (base == nextseqnum) stop_timer //have acked all outstanding else //send any data this allows us room in window to send start_timer //start timer for remaining base to nextseqnum rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) base=1 nextseqnum=1 rdt_rcv(rcvpkt) && corrupt(rcvpkt)  /*don’t do anything if receiver feedback corrupt */

Transport Layer 3-11 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  out-of-order pkt:  discard (don’t buffer) ->receiver buffering is not required but can help if want to!  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) 

Transport Layer 3-12 GBN in action Loss of one packets (pkt2) causes retransmissi on of 4 packets (2-5)

3: Transport Layer 3a-13 Selective Repeat  GBN forces sender to retransmit all packets in window even if some have been correctly received  To avoid that we need a finer granularity of acknowledgement  individual acknowledgements vs cumulative acknowledgements

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

Transport Layer 3-15 Selective repeat: sender, receiver windows

Transport Layer 3-16 Selective repeat data from above :  if next available seq # in window, send pkt timeout(n):  resend pkt n, restart timer ACK(n) in [sendbase,sendbase+N]:  mark pkt n as received  if n smallest unACKed pkt, advance window base to next unACKed seq # sender pkt n in [rcvbase, rcvbase+N-1]  send ACK(n)  out-of-order: buffer  in-order: deliver (also deliver buffered, in-order pkts), advance window to next not-yet-received pkt pkt n in [rcvbase-N,rcvbase-1]  ACK(n) otherwise:  ignore receiver

Transport Layer 3-17 Selective repeat in action Loss of one pkt causes retransmission of just that pkt

3: Transport Layer 3a-18 Selective Repeat vs GBN  Selective Repeat requires individual acknowledgements rather than chance for cumulative acknowledgements  GBN results in unnecessary retransmission of data correctly received  Sender can choose to buffer out of order and avoid unnecessary retransmission (but not required) – in selective repeat receiver can acknowledge these out of order packets

3: Transport Layer 3a-19 Pipelined protocols Sequence Number Dilemma Example:  seq #’s: 0, 1, 2, 3  window size=3  receiver sees no difference in two scenarios!  incorrectly passes duplicate data as new in (a)  Similar to the problem we saw in stop and wait until we added seq 0 and 1

3: Transport Layer 3a-20 Sequence Number Space  Q: what relationship between seq # size and window size?  A: sequence number space >= 2 * window size  True for Stop and Wait (1 <= ½*2)  need old and new version of every sequence #  Still one problem, packets could conceivably delayed for arbitrarily long in the network so could get an old packet N even after the sequence number space has wrapped around  Solution? Not really. In practice, assume a maximum time a packet could live in the network

3: Transport Layer 3a-21 TCP?  TCP is most like GBN  But many TCP implementations will buffer correctly received but out of order segments and senders use duplicate acknowledgments to infer which segment dropped.. This is sort of like Selective Repeat  TCP uses cumulative acknowledgements but counts bytes not packets and receiver ACKS what it wants not last thing it received  Window size is not fixed like N in GBN  TCP allows receiver to set a maximum (dynamically)  Effective window size also changed over time in response to signs of congestion in the network  We will discuss TCP specifics next…

3: Transport Layer 3a-22 Roadmap  Discussed general principles of reliable message delivery over unreliable channel  Lots of it is common sense (like with our flaky fax machine)  But there is a significant degree of subtlety in getting it right!  We are going to move on to talking specifically about TCP  Flow control? Congestion control?  We have most of the tools we need now: receiver feedback, checksums, sequence numbers, cumulative acknowledgments and retransmission timers