Chapter 5 Peer-to-Peer Protocols and Data Link Layer

Slides:



Advertisements
Similar presentations
William Stallings Data and Computer Communications 7th Edition
Advertisements

Go-Back-N Improve Stop-and-Wait by not waiting!
Data and Computer Communications Updated: 2/9/2009.
Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.
Flow and Error Control. Flow Control Flow control coordinates the amount of data that can be sent before receiving acknowledgement It is one of the most.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control and Protocols.
ELEN 602 Lecture 5 Review of last lecture –Error Detection -- parity/CRC etc. Automatic Retransmission Request (ARQ) Reading: Chap
Chapter 6 Errors, Error Detection, and Error Control.
Chapter 7 – Data Link Control Protocols
Error Checking continued. Network Layers in Action Each layer in the OSI Model will add header information that pertains to that specific protocol. On.
Link-Level Flow and Error Control
Data Link Control Protocols
Data Link Control Protocols Dr. Muazzam A. Khan. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow.
Aegis School of Telecommunication Chapter 7 Data Link Control Protocols Telecom Systems I by Dr. M. G. Sharma, Phd.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Data Link Layer We have now discussed the prevalent shared channel technologies  Ethernet/IEEE  Wireless LANs (802.11) We have now covered chapters.
1 CSE3213 Computer Network I Service Model, Error Control, Flow Control, and Link Sharing (Ch. 5.1 – and 5.7.1) Course page:
Chapter 5 Peer-to-Peer Protocols and Data Link Layer PART I: Peer-to-Peer Protocols ARQ Protocols and Reliable Data Transfer Flow Control.
1 Transport Layer Lecture 10 Imran Ahmed University of Management & Technology.
Data Link and Flow Control Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific.
Error/Flow Control Modeling (ARQ Modeling). © Tallal Elshabrawy 2 Data Link Layer  Data Link Layer provides a service for Network Layer (transfer of.
Eighth Edition by William Stallings Chapter 7 – Data Link Control Protocols Data Link Control Protocols need layer of logic above Physical to manage exchange.
Chapter 3: Channel Coding (part 3). Automatic repeat request (ARQ) protocols ▫Used in combination with error detection/correction ▫Block of data with.
Data Link Layer Flow and Error Control. Flow Control Flow Control Flow Control Specifies the amount of data can be transmitted by sender before receiving.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Principles of reliable data transfer 0.
COSC 3213: Computer Networks I Instructor: Dr. Amir Asif Department of Computer Science York University Section M Topics: 1.Flow Control and ARQ Protocols.
1 Flow&Error Control R. Supakorn. 2 Flow Control Flow control refers to a set of procedure used to restrict the amount of data that the sender can send.
CSCI 465 D ata Communications and Networks Lecture 11 Martin van Bommel CSCI 465 Data Communications & Networks 1.
DATA LINK CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 4 : Chapter 7 Data & computer.
Data Link Layer.
Chapter 3: The Data Link Layer –to achieve reliable, efficient communication between two physically connected machines. –Design issues: services interface.
PROTOCOL BASICS. 2 Introduction In chapter 3: Circuits and techniques can be employed to transmit a frame of information between 2 DTEs Error detection.
Powerpoint Templates Data Communication Muhammad Waseem Iqbal Lec # 15.
1 Wireless Networks Lecture 5 Error Detecting and Correcting Techniques (Part II) Dr. Ghalib A. Shah.
24/11/1013-Datalink1 The Data Link Layer Role Services Functions –Framing –Encapsulation –Addressing –Connection Control –Ordered Delivery –Flow Control.
Chapter 3 Transport Layer
Computer Communication & Networks
2.10 Flow and Error Control Before that ...
Fast Retransmit For sliding windows flow control we waited for a timer to expire before beginning retransmission of a packet TCP uses an additional mechanism.
Chapter 9: Data Link Control
Data Link Layer Flow Control.
Data Link Layer - 3 Dr. Sanjay P. Ahuja, Ph.D.
Part III Datalink Layer 10.
UNIT 4 Data Link Control Line Discipline Flow Control Error Control
Chapter 23 Introduction To Transport Layer
Data Communications and Networking Pipelined reliable data transfer
CMPT 371 Data Communications and Networking
Chap. 4 Data link layer 2.
Instructor Mazhar Hussain
Data Link Layer What does it do?
CIS 321 Data Communications & Networking
Flow Control.
Lecture on Data Link Control
Data Link Layer: Data Link Control
Rivier College CS575: Advanced LANs Chapter 6: Logical Link Control
Flow and Error Control.
Overview Jaringan Komputer (2)
Data Link Layer as a Reliable Data Transport Protocol
Protocol Basics.
CS412 Introduction to Computer Networking & Telecommunication
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Communication Networks NETW 501
CS4470 Computer Networking Protocols
The Transport Layer Reliability
Lecture 4 Peer-to-Peer Protocols and Data Link Layer
Chapter 9: Data Link Control
Error Checking continued
Presentation transcript:

Chapter 5 Peer-to-Peer Protocols and Data Link Layer PART I: Peer-to-Peer Protocols ARQ Protocols and Reliable Data Transfer Flow Control

Chapter Overview Peer-to-Peer protocols: many protocols involve the interaction between two peers Service Models are discussed & examples given Detailed discussion of ARQ provides example of development of peer-to-peer protocols Flow control

Chapter 5 Peer-to-Peer Protocols and Data Link Layer ARQ Protocols and Reliable Data Transfer

Automatic Repeat Request (ARQ) Purpose: to ensure a sequence of information packets is delivered in order and without errors or duplications despite transmission errors & losses We will look at: Stop-and-Wait ARQ Go-Back N ARQ Selective Repeat ARQ Basic elements of ARQ: Error-detecting code with high error coverage ACKs (positive acknowledgments) NAKs (negative acknowlegments) Timeout mechanism

Timer set after each frame transmission Stop-and-Wait ARQ Transmit a frame, wait for ACK Error-free packet Packet Information frame Transmitter (Process A) Receiver (Process B) Timer set after each frame transmission Control frame CRC Information packet Header Information frame Control frame: ACKs CRC Header

Need for Sequence Numbers (a) Frame 1 lost A B Frame 1 ACK Time Time-out 2 (b) ACK lost A B Frame 1 ACK Time Time-out 2 In cases (a) & (b) the transmitting station A acts the same way But in case (b) the receiving station B accepts frame 1 twice Question: How is the receiver to know the second frame is also frame 1? Answer: Add frame sequence number in header Slast is sequence number of most recent transmitted frame

Sequence Numbers (c) Premature Time-out A B Frame ACK 1 Time Time-out 2 The transmitting station A misinterprets duplicate ACKs Incorrectly assumes second ACK acknowledges Frame 1 Question: How is the receiver to know second ACK is for frame 0? Answer: Add frame sequence number in ACK header Rnext is sequence number of next frame expected by the receiver Implicitly acknowledges receipt of all prior frames

Stop-and-Wait ARQ Transmitter Ready state Wait state Receiver Await request from higher layer for packet transfer When request arrives, transmit frame with updated Slast and CRC Go to Wait State Wait state Wait for ACK or timer to expire; block requests from higher layer If timeout expires retransmit frame and reset timer If ACK received: If sequence number is incorrect or if errors detected: ignore ACK If sequence number is correct (Rnext = Slast +1): accept frame, go to Ready state Receiver Always in Ready State Wait for arrival of new frame When frame arrives, check for errors If no errors detected and sequence number is correct (Slast=Rnext), then accept frame, update Rnext, send ACK frame with Rnext, deliver packet to higher layer If no errors detected and wrong sequence number accept frame send ACK frame with Rnext If errors detected discard frame

Sliding Window Protocols Suppose that a sliding window of size is 1, with a 3-bit sequence number. (a) Initially. (b) After the first frame has been sent. (c) After the first frame has been received. (d) After the first acknowledgement has been received.

Practice on Slide Window Protocols Draw a series of buffers at a sender and a receiver which illustrates the following (a), (b), (c), and (d). Suppose that a sliding window of size is has a 3-bit sequence number. Thus, each of them has 8 buffers. (a) Initially. The receiver knows that the sender will send a data. (b) After the first frame has been sent. (c) After the first frame has been received & the ACK has been sent by the receiver. (d) After the first acknowledgement has been received.

Stop-and-Wait Efficiency B First frame bit enters channel Last frame bit enters channel Channel idle while transmitter waits for ACK Last frame bit arrives at receiver Receiver processes frame and prepares ACK ACK arrives First frame bit arrives at receiver t 10000 bit frame @ 1 Mbps takes 10 ms to transmit If wait for ACK = 1 ms, then efficiency = 10/11= 91% If wait for ACK = 20 ms, then efficiency =10/30 = 33%

Applications of Stop-and-Wait ARQ IBM Binary Synchronous Communications protocol (Bisync): character-oriented data link control Xmodem: modem file transfer protocol Trivial File Transfer Protocol (RFC 1350): simple protocol for file transfer over UDP

Go-Back-N Improve Stop-and-Wait by not waiting! Keep channel busy by continuing to send frames Allow a window of up to Ws outstanding frames Use m-bit sequence numbering If ACK for oldest frame arrives before window is exhausted, we can continue transmitting If window is exhausted, pull back and retransmit all outstanding frames Alternative: Use timeout

Go-Back-N ARQ Go-Back-4: Time A B fr Time 1 2 3 4 5 6 ACK1 out of sequence frames Go-Back-4: 4 frames are outstanding; so go back 4 7 8 9 ACK2 ACK3 ACK4 ACK5 ACK6 ACK7 ACK8 ACK9 Rnext 0 1 2 3 3 4 5 6 7 8 9 Frame transmission are pipelined to keep the channel busy Frame with errors and subsequent out-of-sequence frames are ignored Transmitter is forced to go back when window of 4 is exhausted

Applications of Go-Back-N ARQ HDLC (High-Level Data Link Control): bit-oriented data link control V.42 modem: error control over telephone modem links

Selective Repeat ARQ Go-Back-N ARQ inefficient because multiple frames are resent when errors or losses occur Selective Repeat retransmits only an individual frame Timeout causes individual corresponding frame to be resent NAK causes retransmission of oldest un-acked frame Receiver maintains a receive window of sequence numbers that can be accepted Error-free, but out-of-sequence frames with sequence numbers within the receive window are buffered Arrival of frame with Rnext causes window to slide forward by 1 or more

Selective Repeat ARQ A B fr Time 1 2 3 4 5 6 ACK1 8 9 7 10 11 12 ACK2 Time 1 2 3 4 5 6 ACK1 8 9 7 10 11 12 ACK2 NAK2 ACK7 ACK8 ACK9 ACK10 ACK11 ACK12

Applications of Selective Repeat ARQ TCP (Transmission Control Protocol): transport layer protocol uses variation of selective repeat to provide reliable stream service Service Specific Connection Oriented Protocol: error control for signaling messages in ATM networks

Chapter 5 Peer-to-Peer Protocols and Data Link Layer Flow Control

Flow Control Receiver has limited buffering to store arriving frames Information frame Control frame Transmitter Receiver buffer fill Receiver has limited buffering to store arriving frames Several situations cause buffer overflow Mismatch between sending rate & rate at which user can retrieve data Surges in frame arrivals Flow control prevents buffer overflow by regulating rate at which source is allowed to send information

Window Flow Control Transmitter can never send more than Ws frames B tcycle Return of permits Time Sliding Window ARQ method with Ws equal to buffer available Transmitter can never send more than Ws frames ACKs that slide window forward can be viewed as permits to transmit more Can also pace ACKs as shown above Return permits (ACKs) at end of cycle regulates transmission rate Problems using sliding window for both error & flow control Interplay between transmission rate & retransmissions