Lecture 26: Data Link Layer

Similar documents
COMPUTER NETWORKS - Window protocols

COMPUTER NETWORKS - Window protocols

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

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

Chapter 3. The Data Link Layer. Wesam A. Hatamleh

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

file:///c:/users/hpguo/dropbox/website/teaching/fall 2017/CS4470/H...

1999, Scott F. Midkiff

Data Link Layer. Srinidhi Varadarajan

Data Link Technology. Suguru Yamaguchi Nara Institute of Science and Technology Department of Information Science

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

Peer-to-Peer Protocols and Data Link Layer. Chapter 5 from Communication Networks Leon-Gracia and Widjaja

Data Link Control Protocols

16.682: Communication Systems Engineering. Lecture 17. ARQ Protocols

TCP/IP-2. Transmission control protocol:

Lecture 7: Flow Control"

I. INTRODUCTION. each station (i.e., computer, telephone, etc.) directly connected to all other stations

Analyzation of Automatic Repeat Request (ARQ) Protocols

Chapter 11 Data Link Control 11.1

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

Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione. Link Layer. Fundamentals of Communication Networks

10.1 REVIEW QUESTIONS

EITF25 Internet Techniques and Applications L3: Data Link layer. Stefan Höst

CS 421: Computer Networks SPRING MIDTERM I April 7, minutes

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

The data link layer has a number of specific functions it can carry out. These functions include. Figure 2-1. Relationship between packets and frames.

ELEN Network Fundamentals Lecture 15

The Transport Layer Reliability

Comparison of ISO-OSI and TCP/IP Suit. Functions of Data Link Layer:

Data Link Layer. Goals of This Lecture. Engineering Questions. Outline of the Class

Solutions for Chapter similar to 1 and 3

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

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

DATA LINK LAYER UNIT 7.

Chapter 11 Data Link Control 11.1

Layered Network Architecture. CSC358 - Introduction to Computer Networks

a. (4pts) What general information is contained in a LSR-PDU update that A might send?

Data Link Layer Lecture 7

Introduction to Data Communications & Networking

Performance of UMTS Radio Link Control

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP 23.1

Chapter 11 Data Link Control 11.1

Communication Networks

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

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

CMPE150 Midterm Solutions

TCP: Flow and Error Control

Overview. Data Link Technology. Role of the data-link layer. Role of the data-link layer. Function of the physical layer

Data Link Control Protocols

4. Error correction and link control. Contents

CS 455. Week Data Communications and Networking - Behrouz A Forouzan Edition: 4.

23-3 TCP. Topics discussed in this section: TCP Services TCP Features Segment A TCP Connection Flow Control Error Control 23.22

ECE/CSC 570 Section 001. Final test. December 11, 2006

Outline. EEC-484/584 Computer Networks. Data Link Layer Design Issues. Framing. Lecture 6. Wenbing Zhao Review.

Data Link Layer. Learning Objectives. Position of the data-link layer. MCA 207, Data Communication & Networking

The Link Layer II: Ethernet

Data Link Layer (part 2)

a. the physical layer, b. and the data-link layer. a. three physical layers, b. three data-link layers, c. and only one network layer.

Chapter Six. Errors, Error Detection, and Error Control. Data Communications and Computer Networks: A Business User s Approach Seventh Edition

Data Link Layer (cont.) ( h h h ) (Sicherungsschicht) HDLC - 1.

Computer Networking : Principles, Protocols and Practice

TCP and Congestion Control (Day 1) Yoshifumi Nishida Sony Computer Science Labs, Inc. Today's Lecture

CS422 Computer Networks

Data and Computer Communications

Flow control: Ensuring the source sending frames does not overflow the receiver

Advanced Computer Networks. Rab Nawaz Jadoon DCS. Assistant Professor COMSATS University, Lahore Pakistan. Department of Computer Science

Basic Reliable Transport Protocols

Reliable File Transfer in the Multicast Domain

Principles of Reliable Data Transfer

STEVEN R. BAGLEY PACKETS

Lecture 4: CRC & Reliable Transmission. Lecture 4 Overview. Checksum review. CRC toward a better EDC. Reliable Transmission

Reference Model. (virtual network service) (virtual session) Session. Session. (messages) Transport. Transport. (end-to-end packets) Network.

Data Link Layer. Indian Institute of Technology Madras

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

Your favorite blog : (popularly known as VIJAY JOTANI S BLOG..now in facebook.join ON FB VIJAY

CS457 Transport Protocols. CS 457 Fall 2014

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

Data Link Control Layer, Error Detection, Error Correction, and Framing

(Sicherungsschicht) Chapter 5 (part 2) [Wa0001] HDLC - 1.

TCP over wireless links

Transport Protocols and TCP: Review

Chapter 7: Data Link Control. CS420/520 Axel Krings Page 1

Chapter 7: Data Link Control. Data Link Control Protocols

Data Link Control CHAPTER 11. Solutions to Review Questions and Exercises. Review Questions

ECE 333: Introduction to Communication Networks Fall 2002

Question Points Score total 100

William Stallings Data and Computer Communications. Chapter 7 Data Link Control

TYPES OF ERRORS. Data can be corrupted during transmission. Some applications require that errors be detected and corrected.

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

rdt2.0 has a fatal flaw!

Lecture 2: Network Protocols and Layering

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

ARQ and HARQ inter-working for IEEE m system

Data Link Control. Surasak Sanguanpong Last updated: 11 July 2000

UNIT IV -- TRANSPORT LAYER

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

The Data Link Layer Chapter 3

Reliable Transport I: Concepts and TCP Protocol

PROBLEMSAND EXERCISES

Networking Link Layer

Transcription:

Introduction We have seen in previous lectures that the physical layer is responsible for the transmission of row bits (Ones and Zeros) over the channel. It is responsible for issues related to the line coding, modulation/demodulation of the transmitted signal, the actual radiation/reception of electromagnetic signals at the antennas, etc. However, the physical layer is not responsible in any form for the issues related to whither the transmitted bits were received correctly or with errors (or not received at all). These and other issues are dealt with by upper layers including the Data Link Layer. One of the protocols discussed here is called the Automatic Repeat request (ARQ) protocol. Automatic Repeat Request (ARQ) The ARQ protocol is responsible for verifying that all frames that are transmitted from a source machine reach the destination machine, and if some frames are received in error or they get lost completely, the source machine is requested to repeat the transmission of these frames again. There are three forms of the ARQ: 1. Stop and Wait 2. Go Back N 3. Selective Repeat The operation of ARQ methods is based on acknowledgment messages (ACK and NAK massages). Each of the above ARQ methods has its own features, advantages and disadvantages. Next, we will discuss each of the three ARQ methods and compare their performance. 1. Stop and Wait ARQ From its name, the transmitter stops transmitting after a complete frame has been sent and waits for a response from the receiving machine to confirm the correct reception of the frame. This ARQ method can be described as the following: 1. The source machine starts transmitting a new frame. 2. After transmitting the frame, a timer that expires after the expected time of the arrival of the ACK is started (if the transmitting machine expects an ACK response after x seconds, a timer with duration slightly more than x is set). 3. Once the frame reaches the destination machine, the destination machine responds with an ACK message indicating the reception of an error free frame. 1

4. Once the ACK message is received by the source machine, Step 1 is repeated. There are several issues that must be considered with the Stop and Wait ARQ method. These include the possibility of late or lost frames, and the possibility of late or lost ACK messages. Consider for example the communication link shown below, where we have the Data Link Layer of Machine A wanting to send a series of frames to the Data Link Layer of Machine B. We will assume that data is transmitted from Machine A to Machine B only in this direction and ACK frames in the other direction (but an extension to this situation for information going in the opposite direction is also possible), and we will assume that the Error Detection algorithm used is strong enough to detect ALL errors. Note: The ARQ protocols running in the Data Link Layers of different machines exchange the two types of frames: A) Information Frame (I Frame), which is usually several thousands of bits long and contains the following components 1. Header containing addressing and other information 2. Information Packet (which is the PDU sent by the Network Layer down to the Data Link Layer) 3. Trailer containing CRC bits for error detection (computed based on both Header and Information Packet) B) Control Frame (ACK frame), which is usually tens to hundreds of bits long and contains the following components 1. Header containing addressing and other information 2. Trailer containing CRC (computed based on Header). A CRC in the control frame is important because you want to avoid basing your decision regarding whither a frame was received correctly or not on erroneous data (data with errors). Let us consider the following possible scenarios and see how the Stop and Wait algorithm performs in each case. 1. Lost Frame Consider the following scenario: 3. Machine B transmits 2

4. The ACK frame is received by Machine A in time (before Timer 0 expires). 6. The frame reaches Machine B (again assume that the frame is checked for errors and no errors Machine B transmits 7. Assume that ACK is lost or is received with errors. 8. Timer 1 times out (expires), and Machine A decides to re transmit Frame 1. 9. This time, Machine B receives Frame 1 correctly and sends 10. Machine A receives ACK before Timer 1 expires and decides to transmit Frame 2, and so on. Conclusion: The transmission recovers from the lost frame. 2. Lost ACK Consider the following scenario: 3. Machine B transmits 4. The ACK frame is received by Machine A in time (before Timer 0 expires). 6. Assume that Frame 1 gets lost or is received with errors. 7. Machine B will NOT send ACK because it did not receive Frame 1 correctly. 8. Timer 1 times out (expires), and Machine A decides to re transmit Frame 1. 9. This time, Machine B receives Frame 1 correctly and sends 10. Machine A receives ACK before Timer 1 expires and decides to transmit Frame 2, and so on. Conclusion: The transmission recovers from the lost frame 3

3. Delayed ACK Consider the following scenario: 3. Machine B transmits 4. The ACK frame is received by Machine A in time (before Timer 0 expires). 6. Frame 1 reaches Machine B in time. 7. Machine B transmits ACK to acknowledge Frame 1, but the ACK is delayed in the network, so it arrives to Machine A late after Timer 1 has expired. 8. Timer 1 times out (expires), and Machine A decides to re transmit Frame 1. 9. After the retransmission of Frame 1, the delayed old ACK is received, Machine B assumes that it is the ACK for the recently transmitted Frame 1. 10. Machine B will transmit Frame 2, and set a Timer 2 11. Assume that Frame 2 gets lost or corrupted by errors. 12. Assume that the ACK of retransmission of Frame 1 is received in the period at which an ACK for Frame 2 is expected. Machine A assumes that this is the ACK for frame 2. 13. Machine A decides to transmit Frame 3, and so on. 14. Frame 2 is lost and never gets re transmitted Conclusion: The transmission DOES NOT recover from the lost frame. 4

Need for a Sequence Number in the ACK As seen the last case (3. Delayed ACK), the possibility of ambiguity occurring for the different ACKs transmitted by Machine A is possible. This occurs because Machine A has no way of determining (as described above) the received ACKs belong to which frames. To avoid this possible ambiguity, a sequence number is needed in the ACKs to inform transmitting machine (Machine A) of which frame is actually being acknowledged. The question that we would like to answer is, what is the size (in number of bits) of the Sequence number needed for removing this possible ambiguity?. First, let us assume that any delay that a frame experiences is relatively small (compared to the time it takes a frame to propagate through the channel). This assumption is valid for the transmission of frames as the handling of frames is the responsibility of the Data Link Layer, which is responsible for transmission of frames of single links and is not responsible for the transmission of frames over an entire network or over the internet, and so delays are relatively small. Because of the structure of the Stop and Wait ARQ algorithm, only one frame may be outstanding (has not been acknowledged yet). The next frame is not transmitted until the current frame is acknowledged. So, any possible ambiguity as in the above figure will occur between a frame and the previous or next frame to it (for example, Frame 1 with Frame 2, or in general Frame X with Frame X+1). You will never have the possibility of ambiguity between Frame X and Frame X+2, for example). So, the sequence number that we need to add to the ACK must only be able to resolve the different between a frame and the frame before it or after it. So, ONE BIT SEQUENCE NUMBER is needed in the ACK to basically distinguish between the ACKs of EVEN and ODD frames. The use of a 1 bit sequence number to resolve possible ambiguity is illustrated in the following scenario and figure: 5

ACK(Even). 3. Machine B transmits ACK(Even). 4. The ACK(Even) frame is received by Machine A in time (before Timer 0 expires). ACK(Odd). 6. Frame 1 reaches Machine B in time. 7. Machine B transmits ACK(Odd) to acknowledge Frame 1, but the ACK(Odd) is delayed in the network, so it arrives to Machine A late after Timer 1 has expired. 8. Timer 1 times out (expires), and Machine A decides to re transmit Frame 1. 9. After the retransmission of Frame 1, the delayed old ACK(Odd) is received, Machine B assumes that it is the ACK(Odd) for the recently transmitted Frame 1. 10. Machine B will transmit Frame 2, and set a Timer 2. 11. Assume that Frame 2 gets lost or corrupted by errors. 12. Assume that the ACK(Odd) of retransmission of Frame 1 is received in the period at which an ACK(Even) for Frame 2 is expected. Machine A will ignore it because it is Expecting and ACK of an even frame but it receives an ACK for an odd frame. Timer 2 will not be reset and will ramin active waiting for ACK(Even). 13. Timer 2 expires after a period of time because no ACK(Even) is received. 14. Machine A decides to re transmit Frame 2, and repeat the process of waiting for ACK(Even). Conclusion: The transmission recovers from the lost frame. 6