Upload
emily-tyler
View
221
Download
2
Embed Size (px)
Citation preview
© Tallal Elshabrawy 2
Data Link Layer
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
© Tallal Elshabrawy 3
Data Link Layer Functions
Framing (Grouping Bits into Frames)
Error Control
Flow Control
Medium Access Control
© Tallal Elshabrawy 4
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
© Tallal Elshabrawy 5
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
Sender Receiver
00
Data Frame
ACK
No Errors
11
Errors
11
ACK
No Errors
Timer
Frame is Good
Frame is Good
Detection/Correction
Detection/Correction
Detection/Correction
© Tallal Elshabrawy 6
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) Detection of erroneous frames or packets Retransmission of erroneous frames with the hope that
no errors would occur in the next attempt
© Tallal Elshabrawy 7
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)
© Tallal Elshabrawy 9
Stop-and-Wait ARQ
Stop after Transmitting a Packet Wait for an Acknowledgement
Transmitter Receiver
Packet
H
CRCH
Error Free Packet
ACK
Information Frame CRC
Transmitter Receiver
Packet
H
CRCH
Error Free Packet
ACK
Information Frame CRC
H : HeaderCRC : Cyclic Redundancy Check (Error Detection)
© Tallal Elshabrawy 10
Stop-and-Wait ARQ Operation
Machine A Machine B
Physical Channel
First Packet-Bit enters
ChannelsLast Packet-Bit
enters Channels
First Packet-Bit arrives at B
Last Packet-Bit arrives at B
Last ACK-Bit Arrives at A
Processing Time for Error
Detection
Channel is Idle
© Tallal Elshabrawy
Stop-and-Wait ARQ Modeling
12
Machine A Machine B
Physical Channel
Assumptions
Forward Channel BER
Backward Channel (i.e., ACK/NAK) is Error Free
Infinite number of retransmissions
© Tallal Elshabrawy
Stop-and-Wait ARQ Markov Model
13
Model DetailsState corresponds to
retransmissions of a given packet
The time step is equal to
Transition probabilities are governed by probability of packet error
ForDefine as the probability of Define as the transition
probability from to
© Tallal Elshabrawy
Stop-and-Wait ARQ Markov Model
14
𝚫=[ (𝟏−𝒑𝒆 ) 𝒑𝒆 𝟎 𝟎 …
(𝟏−𝒑𝒆 ) 𝟎 𝒑𝒆 𝟎 …
(𝟏−𝒑𝒆 ) 𝟎 𝟎 𝒑𝒆 …
⋮ ⋮ ⋮ ⋮ ⋱]
At steady State
With boundary condition
Solving:
© Tallal Elshabrawy
Stop-and-Wait ARQ Efficiency
16
Efficiency Decreases with: Increase in BER Increase in Packet Size
Efficiency measures number of transmissions required to send one packet
For
Notes The efficiency is expressed in terms of the time step The closed form solution presents a simple equation in terms of ,
© Tallal Elshabrawy
Stop-and-Wait ARQ Throughput
17
Throughput measures the percentage of time slots that are utilized for successful transmissions
Notes Throughput does not care how many attempts have been done to successfully
transmit a packet Throughput measures the channel utilization for successful transmission Efficiency rather measures the delay of a given packet Both efficiency and throughput represent two faces of the same coin