Presentation is loading. Please wait.

Presentation is loading. Please wait.

Communication Networks NETW 501

Similar presentations


Presentation on theme: "Communication Networks NETW 501"— Presentation transcript:

1 Communication Networks NETW 501
Lecture 7 Data Link Layer: Error Control & Flow Control Course Instructor: Dr.-Ing. Maggie Mashaly C3.220

2 Data Link Layer Network LLC MAC Physical
Data Link Layer provides a service for Network Layer (transfer of data from the network layer of a sender to the network layer of a receiver) Data Link Layer uses the Physical Layer to transmit bits of Data Link Frames over the physical medium LLC MAC Network Physical

3 Bit errors in Communication Systems
At the physical layer, bit errors are inevitable to occur with small but non zero probability, example: Bit error probability in the order of 10-6 for systems using copper wires Bit error probability in the order of 10-9 for modern optical fiber systems High bit error probability in the order of 10-3 for wireless transmission systems Some services are tolerant to relatively high bit error rates such as digital speech transmission Some applications must experience error-free communications such as electronic funds transfer

4 Error Control Error Control is a system to deal with errors that occur due to disturbances on the physical channel. Components of an error control system: Error Correction and Detection Acknowledgement (ACK) & Non- Acknowledgement Control Messages (NAK) Timers Frame Sequencing Sender Receiver Data Frame No Errors Detection/ Correction ACK Frame is Good 1 Errors Timer 1 Detection/ Correction 1 No Errors 1 Detection/ Correction ACK Frame is Good

5 Error Control Mechanisms
Forward Error Correction (FEC) Detection of erroneous frames or packets Processing of received frame bits in attempt to correct the errors Automatic Retransmission reQuest (ARQ) Retransmission of erroneous frames with the hope that no errors would occur in the next attempt

6 (Error Control & Flow Control )
Automatic Repeat reQuest (ARQ) protocols Purpose: To ensure a sequence of information packets is delivered in order and without errors or duplications despite transmission errors & losses (Error Control & Flow Control ) We will look at: Stop-and-Wait ARQ Go-Back N ARQ Selective Repeat ARQ

7 Stop and Wait Protocol

8 Stop-and–Wait ARQ Stop after Transmitting a Packet
Wait for an Acknowledgement H : Header CRC : Cyclic Redundancy Check (Error Detection)

9 Importance of Sequence Numbers
Sender Receiver Sender Receiver Frame 0 Frame 0 ACK ACK Frame 1 Frame 1 ACK Timeout Timeout Frame 1 Frame 1 ACK ACK Frame 2 Frame 2 In Scenario B, the receiver accepts Frame 1 Twice If the frame number is not included in the header, how could the receiver distinguish whether or not it has received Frame 1 correctly? THEREFORE: IT IS ESSENTIAL TO INCLUDE THE FRAME SEQUENCE NUMBER IN THE HEADER

10 BY INCLUDING THE SEQUENCE NUMBER IN THE ACK
Sequence Numbers in ACK Frames The sender may mistakenly interpret ACK as it assumes that the second ACK was for Frame 1 How Could the Sender Know which Frame does an ACK correspond to? BY INCLUDING THE SEQUENCE NUMBER IN THE ACK Sender Receiver ACK Frame 0 Frame 1 Frame 2 C Timeout

11 Stop–and–Wait ARQ Operation
Machine A Machine B Physical Channel First Packet-Bit enters Channels First Packet-Bit arrives at B Last Packet-Bit enters Channels Last Packet-Bit arrives at B Channel is Idle Processing Time for Error Detection Last ACK-Bit Arrives at A The Channel Idle Time (Wait for ACK) is an Inefficiency because the channel is not used

12 t0=Total Time to Transmit 1 Frame
Stop–and–Wait ARQ Efficiency Machine A Machine B Physical Channel t0=2tprop+2tproc+tf+ta t0=2tprop+2tproc+Lf/R+La/R tprop tf=Lf/R t0=Total Time to Transmit 1 Frame tproc ta=La/R tprop tprop Propagation Time tproc Processing Time tf Frame Transmission Time ta ACK Transmission Time Lf No. of Bits/Frame La No. of Bits/ACK tproc

13 Effective Transmission Rate Transmission Efficiency
Error-Free Channel Effective Transmission Rate Headers and CRC Effect of Header Effect of ACK Effect of Delay Bandwidth Product Transmission Efficiency

14 The Expected Efficiency
Noisy Channel Pf is the probability of Frame Error If k Transmissions are Required The Efficiency is The Expected Efficiency

15 References NETW 501 Lectures slides by Assoc. Prof. Tallal El-Shabrawy
“Communication Networks 2nd Edition”, A. Leon-Garcia and I. Widjaja, McGraw Hill, 2013 “Computer Networks 4th Edition”, A. S. Tanenbaum, Pearson International


Download ppt "Communication Networks NETW 501"

Similar presentations


Ads by Google