L5: Building Direct Link Networks III. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

Similar documents
L2: Bandwidth and Latency. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

L3: Building Direct Link Networks I. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

CISC 7332X T6. C12a: LAN Switching. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 11/13/2018 CUNY Brooklyn College

2.4 Error Detection Bit errors in a frame will occur. How do we detect (and then. (or both) frames contains an error. This is inefficient (and not

Direct Link Networks (II)

Lecture 5. Homework 2 posted, due September 15. Reminder: Homework 1 due today. Questions? Thursday, September 8 CS 475 Networks - Lecture 5 1

Error Detection Codes. Error Detection. Two Dimensional Parity. Internet Checksum Algorithm. Cyclic Redundancy Check.

Point-to-Point Links. Outline Encoding Framing Error Detection Sliding Window Algorithm. Fall 2004 CS 691 1

Reliable Transmission

Flow Control, and Congestion Control

EE 122: Error detection and reliable transmission. Ion Stoica September 16, 2002

CS 640 Introduction to Computer Networks. Role of data link layer. Today s lecture. Lecture16

End-to-End Protocols: UDP and TCP. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

TCP. Sliding Windows, Flow Control, and Congestion Control. Networks : TCP Sliding Windows 1

High Level View. EE 122: Error detection and reliable transmission. Overview. Error Detection

The Transport Layer Reliability

L8: Packet Switching. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

Flow Control, and Congestion Control

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4021: Networks Discussion. Chapter 2.

Problem Statement. Physical and Data Link Layer Overview. Five Tasks Encoding. Make two computers talk to each other

End-to-End Protocols. End-to-End Protocols

Chapter 2: Getting Connected

CSCI-1680 Link Layer Reliability John Jannotti

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

Direct Link Communication I: Basic Techniques. Data Transmission. ignore carrier frequency, coding etc.

Administrivia. FEC vs. ARQ. Reliable Transmission FEC. Last time: Framing Error detection. FEC provides constant throughput and predictable delay

L1: Introduction. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 11, 2018

Transport Layer Marcos Vieira

Reliable Data Transfer

C13a: Packet Switching

Networking Link Layer

Reliable Byte-Stream (TCP)

CSCI-1680 Link Layer I Rodrigo Fonseca

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 4. September 09 CMSC417 Set 4 1

Direct Link Communication I: Basic Techniques. Data Transmission. ignore carrier frequency, coding etc.

L9: Bridges and LAN Switches. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

Principles of Reliable Data Transfer

Lecture 7: Sliding Windows. CSE 123: Computer Networks Geoff Voelker (guest lecture)

Computer Networking. Reliable Transport. Reliable Transport. Principles of reliable data transfer. Reliable data transfer. Elements of Procedure

L10: Simple Internetworking. Hui Chen, Ph.D. Department of Engineering & Computer Science Virginia State University Petersburg, VA 23806

Lecture 5: Flow Control. CSE 123: Computer Networks Alex C. Snoeren

EECS 122, Lecture 19. Reliable Delivery. An Example. Improving over Stop & Wait. Picture of Go-back-n/Sliding Window. Send Window Maintenance

CPE 548 Exam #1 (50 pts) February 17, 2016

Computer Network. Direct Link Networks Reliable Transmission. rev /2/2004 1

Programming Internet with Socket API. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

Lecture 7: Flow Control"

Data Link Control Protocols

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

Communication Networks

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University

C08a: Data Link Protocols

C14b: Classless Intradomain Routing

The flow of data must not be allowed to overwhelm the receiver

Data Communication & Computer Networks INFO

CPE 448/548 Exam #1 (100 pts) February 14, Name Class: 448

CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [NETWORKING] Frequently asked questions from the previous class surveys

C13b: Routing Problem and Algorithms

Solutions for Chapter similar to 1 and 3

Communications Software. CSE 123b. CSE 123b. Spring Lecture 3: Reliable Communications. Stefan Savage. Some slides couresty David Wetherall

10.1 REVIEW QUESTIONS

Telecom Systems Chae Y. Lee. Contents. Flow Control Error Detection/Correction Link Control (Error Control) Link Performance (Utility)

The Transport Layer Multiplexing, Error Detection, & UDP

INF Data Communication Data Link Layer

Internetworking: Global Internet and MPLS. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

UNIT I FUNDAMENTALS & LINK LAYER

Data Communications. Automatic Repeat Request Medium Access Control

Recap. More TCP. Congestion avoidance. TCP timers. TCP lifeline. Application Presentation Session Transport Network Data Link Physical

CSE 123: Computer Networks Alex C. Snoeren. HW 1 due NOW!

CSE 461: Framing, Error Detection and Correction

ECE697AA Lecture 3. Today s lecture

ELEN Network Fundamentals Lecture 15

Lecture 6. TCP services. Internet Transport Layer: introduction to the Transport Control Protocol (TCP) A MUCH more complex transport

Data Link Control. Outline. DLC functions

Solutions to Select Exercises

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Topics. TCP sliding window protocol TCP PUSH flag TCP slow start Bulk data throughput

Modeling and Performance Analysis of a Sliding Window Protocol

UNIT 2 TRANSPORT LAYER

Congestion Control. Principles of Congestion Control. Network-assisted Congestion Control: ATM. Congestion Control. Computer Networks 10/21/2009

TDTS06: Computer Networks

CSEP 561 Connections. David Wetherall

CSEP 561 Connections. David Wetherall

Department of Computer and IT Engineering University of Kurdistan. Data Communication Netwotks (Graduate level) Data Link Layer

TCP: Flow and Error Control

CSCD 330 Network Programming

ECEN Final Exam Fall Instructor: Srinivas Shakkottai

Lecture 11 Overview. Last Lecture. This Lecture. Next Lecture. Medium Access Control. Flow and error control Source: Sections , 23.

Transition to IPv6. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

Congestion Control. Principles of Congestion Control. Network assisted congestion. Asynchronous Transfer Mode. Computer Networks 10/23/2013

Answers to Sample Questions on Transport Layer

Programming Ethernet with Socket API. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

CMPE150 Midterm Solutions

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

RSC Part III: Transport Layer 3. TCP

Chapter 3 Transport Layer

Lecture 7: Flow & Media Access Control"

Reliable Transport : Fundamentals of Computer Networks Bill Nace

CSC 401 Data and Computer Communications Networks

ECE 544 Computer Networks II Mid-Term Exam March 29, 2002 Profs. D. Raychaudhuri & M. Ott

Transcription:

L5: Building Direct Link Networks III Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806 1

Acknowledgements Some pictures used in this presentation were obtained from the Internet The instructor used the following references Larry L. Peterson and Bruce S. Davie, Computer Networks: A Systems Approach, 5th Edition, Elsevier, 2011 Andrew S. Tanenbaum, Computer Networks, 5th Edition, Prentice- Hall, 2010 James F. Kurose and Keith W. Ross, Computer Networking: A Top- Down Approach, 5th Ed., Addison Wesley, 2009 Larry L. Peterson s (http://www.cs.princeton.edu/~llp/) Computer Networks class web site 2

Direct Link Networks Types of Networks Point-to-point Multiple access Encoding Encoding bits onto transmission medium Framing Delineating sequence of bits into messages Error detection Detecting errors and acting on them Reliable delivery Making links appear reliable despite errors Media access control Mediating access to shared link 3

Reliable Transmission How to make unreliable links appear to be reliable? What to do when a receiver detects that the received frame contains an error? 4

Acknowledgment and Time-Out Two fundamental mechanisms to make channels appear to be error-free Acknowledgements (ACK) Time out Automatic Repeat Request (ARQ) Stop-and-Wait Sliding Window Discuss Stop-and-Wait and Sliding Window protocols in the context of point-to-point links 5

Stop-and-Wait Sender transmits a frame Sender waits for an acknowledgement before transmitting the next frame If no acknowledgement arrives after a time-out, the sender times out and retransmits the original frame 6

Stop-and-Wait 7

Performance Performance analysis for the stop-and-wait protocol with point-to-point links Node 1 Node 2 Transmit delay Propagation delay Queuing & processing delay time time 8

Example Link bandwidth: 10 Gbps RTT = 40 ms Frame size = 1500 bytes Acknowledgement size = 64 bytes Timeout: 2 RTT Assume processing delay is 0 Stop-and-Wait protocol: receiver transmits acknowledge frame upon receiving the data frame Q: what is the maximum throughput (effective bandwidth)? 9

Throughput Q: what is the maximum throughput (effective bandwidth)? tx1 frame Note: tp = p1 + p2 = 1 RTT Transfer time = tx1 + tx2 + tp Throughput = Transfer size/transfer time Q: Is this a good protocol? 1 RTT + tx2 ack p1 p2 tp 10

Timeout? How long should the receiver wait? Timeout: 2 x RTT or more 11

Exercise L5-1 Data frame size (data) = 1500 bytes Acknowledgement frame size (ack) = 64 bytes Stop-and-Wait protocol: receiver is forced to wait 1 RTT before transmitting acknowledgement frame after having received data frame. No additional processing and queueing delay Draw timeline diagram first, and then compute throughputs and link bandwidth utilization for one of the following, Dial-up RTT = 87 s; Link bandwidth: 56 Kbps Satellite RTT = 230 ms; Link bandwidth: 45 Mbps 12

Stop-and-Wait Advantage Simple Achieve reliable transmission on non-reliable medium Disadvantage Performance is poor Could you give an intuitive explanation why the performance is poor? 13

Stop-and-Wait Does not keep the pipe full! Q: How much data are needed to keep the pipe full? Product of Delay Link Bandwidth (1 RTT) 10 Gbps = 1 40 ms 10 Gbps = 400 Mb = 50 MB 50 MB/1500 bytes = 33333 frames 1500 bytes << the product low link utilization Q: How to keep the pipe full? 14

How to keep the pipe full? Free discussion 15

Sliding Window Algorithm Allow multiple unacknowledged frames (send a few frames in a batch) try to fill the pipe Define a time window (threshold, or upper bound) on unacknowledged frames Sending window Receiving window Have variations 16

Sliding Windows Algorithm: Sender Assign sequence number to each frame (SeqNum) Maintain three state variables: Send Window Size (SWS) Last Acknowledgment Received (LAR) Last Frame Sent (LFS) Maintain invariant: LFS - LAR <= SWS Advance LAR when ACK arrives Buffer up to SWS frames Sender Window Size Last Acknowledge Received Last Frame Sent 17

Sliding Windows Algorithm: Receiver Maintain three state variables Receive Window Size (RWS) Largest Acceptable Frame (LAF) Last Frame Received (LFR) Maintain invariant: LAF - LFR <= RWS Frame SeqNum arrives: if LFR < SeqNum < = LAF, accept the frame if SeqNum < = LFR or SeqNum > LAF, discard the frame SeqNumToAck: largest sequence number not yet acknowledged ACK is cumulative ACK all frames with less or equal SeqNum Receiver Window Size Last Frame Received Largest Acceptable Frame 18

Example: No Frame Loss Sender Receiver LFR=5 RWS= 4 LAF=9 19

Time out Time out Time out Example: Frame Loss Frame 6 is lost Sender Receiver LFR=5 LAF=9 RWS= 4 SeqNumToAck=6 Frame 7 Buffered, but no ACK sent Frame 8 Buffered, but no ACK sent Frame 9 Buffered, but no ACK sent Frame 6 Acknowledge accumulated frames 20

Sliding Window Algorithm: SWS and RWS SWS should be determined by the product of delay bandwidth RWS does not have to be equal to SWS RWS = 1, does not buffer any frames that arrive out of order RWS > SWS is meaningless, since it is impossible for more than SWS frames to arrive out of order 21

Examples Consider following sliding window algorithm Caution: Parameters chosen for demos only. In reality they need to be carefully chosen. Check footnote in page 108. Timeout = 2 RTT SWS (send window size) = 4 Determined by delay bandwidth. Again check footnote in page 108. RWS (receive window size) = 4 Show timeline diagrams for the following scenarios Frame 5 lost Frame 6 lost Frames 5-8 lost ACK 6 lost ACK 8 lost and no more frames to send (for an extended period of time) 22

Sliding Window Algorithm: Implementation Data Structures 23

Sliding Window Algorithm: Implementation Sending 24

Sliding Window Algorithm: Implementation Receiving (1) 25

Sliding Window Algorithm: Implementation Receiving (2) 26

Exercise L5-2 Draw a timeline diagram for the sliding window algorithm with SWS=RWS=3 frames in the following two situations (draw two time diagrams for each situation). Use a timeout interval of 2 RTT Frame 4 is lost Frame 4-6 are lost 27

Discussion Alternatives or improvement Negative Acknowledgement (NAK) Selective Acknowledgement Finite sequence numbers and sliding window Frame order and flow control 28

Summary Reliable delivery Timeout and Acknowledgement Stop-and-Wait Sliding Window Idea: keep the pipe full Many different algorithms exist, e.g., concurrent logical channels How to implement? Consult the book 29