1. Protokolle der OSI-Schicht 2
Error Control, Link Layer Control
Kapitel 7.5
Netze und Protokolle
Dr.-Ing. J. Steuer
Institut für Kommunikationstechnik
www.ikt.uni-hannover.de
2. FEC vs ARQ
FEC, Forward Error Correction, see Musmann, Kaiser
errors must be detected and corrected
high amount of redundant information
applied if application is time critical and/or error rate is high
ARQ, Automatic Repeat Request
errors need to detected only
less amount of redundant information
applied with low error rate and sufficient time to apply for data
repetition
repetition is initiated by a negative acknowledgement or a
missing acknowledgement and a time out
(2)
3. Methods for error detection
& error correction
one dimensional parity bit
two dimensional parity bit
codes
convolutional codes
BCH codes
Reed Solomon codes
For details refer to lectures of Prof. Musmann and Prof.
Kaiser
(3)
4. Verletzung des OSI-Modells
Hybride ARQ Typ2 Verfahren (Kontrolle Schicht 2, Daten
der Schicht 1)
2 2
1 1
1.) Übertragung von gering geschützten Daten
2.) Nach Fehler Sendung weiterer Redundanz auf Schicht 1
(4)
5. Process of error detection in L2
network layer network layer
(3) (3)
link layer (2): link layer (2):
1.take info from layer 3 1.in case of positive ack hand
2.calculate redundant over L3 to L7 and user info
information, using an to layer 3, otherwise wait for
appropriate coding repetition
scheme 4. performe FEC or give positive
3.add redundant ar negative acknowledgment
information to the 3.compare calculated redundance
layer 3-info with received redundance
4. continue with other 2. calculate redundant info from
tasks of the link layer L3 to L7 and user info
5. hand over enhanced 1.seperate L3 to L7 anduser info
information to layer 1
network
physical layer physical layer
(1) (1)
L1 L3
L2:Redundance, others L4 L5 L6 L7 user info
(5)
6. ARQ-Protocols
differentiation:
positive/negative acknowledgment (ack/nack)
positive acknowledgment only, (be careful:timing)
stop & wait ARQ
continous ARQ
pigy-packed ARQ
question: would a pure negative ack be a sensible solution?
(6)
7. ARQ-Protocols, Stop and Wait
using positive and negative acknowledgement or
positive acknowledgment and timeout:
frame n-1 frame n-1
positive
positive acknowledg-
acknowledgement ment
frame n frame n
corruption
timeout
corruption
negative
acknowledg-
repetition of
ment
frame n
repetiton of
frame n
time
time
remark: the ACK could be
lost as well
(7)
8. ARQ-Protocols, Stop and Wait with lost
frames (packets)
frame n-1 frame n-1
positive
positive acknowledg-
acknowledgement ment
frame n frame n
timeout
lost
timeout
lost
repetiton of
repetition of
frame n
frame n
time
time
Question: Is it necessary to distinguish frame n from the
repeated frame n at the receiver?
(8)
9. ARQ-Protocols, Stop and Wait with lost
frames (packets) and Enquiry
frame n-1 frame n-1
positive
positive acknowledg-
acknowledgement ment
frame n frame n
positive
timeout
lost
timeout
acknowledg-
ment
lost
ENQ
ENQ
repetition of positive repetition
acknowledgment of positive
acknowledg-
time
ment
time
• Why not just repeating the frame which is not acknowledged?
• how to differentiate which ACK is received? The transmitter does not know which frame
is lost, its own or the ACK! The way out is the odd and even numbering of the ACK´s!
(9)
10. ARQ-Protocols, Continuous
stop and wait is time consuming, especially on links with
high propagation delay
time saving:
continuous transmission without waiting for ACK
problem: propagation delay might result in late information from
the transmitter on transmission errors, consequently
a number of packets need to be retransmitted
solution: sliding window mechanism
(10)
11. Continuous ARQ-Protocols for full duplex
channels
frame 1
frame 1
frame 2 ACK 1 frame 2 ACK 1
frame 3
frame 3
ACK 2
ACK 2
frame 4
frame 4
NACK 3
NACK 3
frame 5
frame 5 ACK 4
frame 3
frame 3 ACK 5
frame 4 ACK 3
ACK 3
frame 5 ACK 4
ACK 5
Go back n selective
time
time
repeat
Go back n is easier to implement, selective repeat is more efficient!
(11)
12. piggy packing of ACK
frame 1
frame 2 frame 1,ACK 1
frame 3
frame2,ACK 2
frame 4, ACK1
frame3, NACK 3
frame 5,ACK2
frame 3,ACK3
frame 4 frame4, ACK 3
frame 5 frame5, ACK 4
ACK 4 frame6, ACK 5
ACK 5
ACK 6
time
Go back n
•The acknoledgement is partly transported with communication frames
•Sequence count required!
(12)
13. Communications Efficiency of ARQ-
stop&wait (1)
Performance of DLC − Pr otocols requires consideration of retransmissions :
def . : Re := effective data transmission rate
number of user data bits accepted by the destination
Re =
Total time for accep tan ce
K − nh
Re = (6.5.1)
K + na
+ 2(t p + tta ))
N(
R
def . : K := total bits per frame
nh := total bits per header in a frame
N := average number of attempts made to get accep tan ce
na := total bits per acknowledgment
R := transmission bit rate
t p := propagation time on the link
tta := turn around time to switch the direction of communication
(13)
14. Communications Efficiency of ARQ-
stop&wait (2)
Next we have to solve the average number of transmissions N:
• consider P to be the probability of an error on any frame transmission
• errors on different frames are independent
• j transmissions will be required to be successful, this means we need j-1
erroneous transmissions followed by one successful:
Pj = P j −1 (1 − P ) ( 6 .5 .2 )
• the average of j is the average number of transmissions N:
∞
N = ∑ jP j −1 (1 − P ) = (1 − P )[1 + 2 P + 3P 2 + ... + nP ∞ −1 ] (6.5.3)
j =1
• with Bronstein 1.61:
1 − (∞ + 1) P ∞ + ∞P ∞ +1 1
∞ −1
[1 + 2 P + 3P + ... + nP ] = =
2
(6.5.4)
(1 − P ) (1 − P )
2 2
(1 − P ) 1
No, we still miss the (6.5.5)
N= =
(1 − P ) 1 − P
2
Ready? frame error rate P
(14)
15. Communications Efficiency of ARQ-
stop&wait (3)
To get the average number of transmissions we have to find the probability
for disturbed frames P. The most common approach is to use the bit error
rate p and the number of bits per frame K (bit errors shall be independent
of each other):
P = 1 − (1 − p ) K ( 6 .5 .6 )
Which effect do we neglect with the given approach above?
considering p as burst error rate and combining 6.5.6 with 6.5.1 we get:
K − nh K − nh
Re = =
K + na 1 K + na
+ 2(t p + tta )) + 2(t p + tta ))
N( (
1− P
R R
(1 − p ) K R ( K − nh )
Re = ( 6 .5 .7 )
K + na + 2 R (t p + t a )
(15)
16. R:=4800bit/s;
nh:=48 bit;
(1 − p ) R ( K − nh )
K
ta:=0.1s; tp:=0.01s;
Re =
note:
K + na + 2 R (t p + t a ) na:=48bit;
• optimal frame length
• effective frame rate
drops, if too many
repetitions are
p1:=10^(-5);
required
Re:=effektive transmission rate
in bit/s;
K := frame length in Byte
p2:=10^(-4);
Which error rate do you
need, in order to run
IEEE802.3 efficient?
(16)
17. Communications Efficiency of error free
continuous ARQ
in an error free environment the time for acceptance is
just the serialization time:
K/R
def . : Re := effective data transmission rate
number of user data bits accepted by the destination
Re =
Total time for accep tan ce
K − nh
Re = (6.5.8)
K
R
def . : K := total bits per frame
nh := total bits per header in a frame
time
R := transmission bit rate
(17)
18. Communications Efficiency for continuous
ARQ and Go Back n (1)
each corrupted frame will cause a step of n frames backwards.
The first frame can be correct. This means we transmit one
frame to be successful. This causes an average of one frame to
be transmitted.
The first frame can be corrupted and request a repetition of n
frames. The probability for that is:
P (1 − P ) with the average transmitted frames :
n * P (1 − P )
• The second frame can be corrupted as well and request a repetition of 2n
frames. The probability for that is:
P 2 (1 − P ) with the average transmitted frames :
2n * P 2 (1 − P )
• The third frame can be corrupted as well and request a repetition of 3n
frames. The probability for that is:
P 3 (1 − P ) with the average transmitted frames :
3n * P 3 (1 − P )
(18)
19. Communications Efficiency for continuous
ARQ and Go Back n (2)
• The average number N of frames to be transmitted is the sum of the
average frames of the individual cases from the previous slide:
N = 1 + n * P (1 − P ) + 2n * P 2 (1 − P ) + 3n * P 3 (1 − P ) + ... 6.5.9
• again using Bronstein 1.61:
1 + (n − 1) P
P
N = 1+ n * = 6.5.10
(1 − P ) 1− P
• if we multiply now the average transmitted frames with the time to
serialize one frame, we get the „total time to get the bits accepted“ and
thus the effective transmission rate:
( K − nh ) (1 − P)( K − nh ) R (1 − [1 − (1 − p ) K ])( K − nh ) R
Re = = = 6.5.11
1 + (n − 1) P K [1 + (n − 1) P ]K [1 + (n − 1)[1 − (1 − p ) K ]]K
1− P R
(19)
20. R:=4800bit/s;
(1 − [1 − (1 − p ) ])( K − nh ) R
K
nh:=48 bit;
Re =
[1 + (n − 1)[1 − (1 − p ) K ]]K n:=5
p1:=10^(-5);
Go Back n p1:=10^(-5);
stop and wait
p2:=10^(-4);
Go Back n
p2:=10^(-4);
stop and wait
(20)
21. Fenstermechanismus
Sliding Window
unterer
Fensterrand
(hier:0)
unterer Fensterrand:
Sendelaufnummer des
ältesten noch nicht
bestätigten Datenpaketes
0
7 w=3
1 oberer Fensterrand:
6
Sendelaufnummer des
ersten noch nicht zur
2
5
Sendung freigegebenen
4 3 Datenpaketes
oberer
Fensterrand
(hier:3)
(21)
25. performance of the sliding window
-Acknowledgment at end of window- (1)
Tt : time to serialize
τ : propagation time
Tt
τ Tp : time to serialize the Acknowledgment
WTt fram
e1
fram
e2
fram The delay d from the start of transmission
d e3
until the complete receipt of the acknowledgment is
Tp
Ack1
d = W * Tt + Tp + 2τ 6.5.12
fram
e1
fram
e2 with the data rate R we get the ratio:
time
fram
(efficient data rate Re):
e3
Re W * Tt
=
window size: W=3 6.5.13
R d
(25)
26. performance of the sliding window
-Acknowledgment at end of window- (2)
combining equation 6.5.12 with 6.5.13:
W * Tt
Re = R 6.5.14
W * Tt + Tp + 2τ
the packet length is:
K= R *Tt 6.5.15
6.5.15 in 6.5.14:
K
W*
R
Re = R 6.5.16
K
W * + Tp + 2τ
R
W *K
Re = 6.5.15
W *K
+ Tp + 2τ
R
(26)
27. performance of the sliding window
-Acknowledgment at end of window- (3)
W *K
Re = 6.5.15
W *K
+ Tp + 2τ
R
W=5
parameters:
W=3
W=1
R=4800bit/sek
Tp=20ms
τ =20ms
(27)
28. performance of the sliding window
-Acknowledgment after receipt of frame-(1)
Tt : time to serialize
τ : propagation time
Tt
τ Tp : time to serialize the Acknowledgment
d WTt
fram
e1
The delay d from the start of transmission
fram
e2
until the complete receipt of the acknowledgment is:
fram
Ack1 Tp
e3
d = Tt + Tp + 2τ 6.5.16
fram
e4
with the data rate R we get the ratio:
fram
e5 (efficient data rate Re):
fram
Ack1 e6
⎧W * Tt ⎫
Re
= min ⎨ ,1⎬ 6.5.17
time
⎩d ⎭
fram R
e7
Equ. 6.5.17 this expresses the continous data flow
window size: W=3 for:
W * Tt ≥ d 6.5.18
(28)
29. performance of the sliding window
-Acknowledgment after receipt of frame- vs. -
Acknowledgment at end of window-
W=5
W=3 W=5
parameters:
W=3
R=4800bit/sek
Tp=20ms
W=1 τ =20ms
⎧W * Tt ⎫
Re
= min ⎨ ,1⎬ 6.5.17
⎩d ⎭
R
(29)
30. Fragen (2)
Wieviele Pakete können maximal ins Netz geschickt
werden, bevor ein acknowledge (Bestätigung) für den
Empfang kommen muß?
Wie können N(R) und N(S) benutzt werden, um eine
Fehlerfall-Steuerung zu realisieren?
Auf welchen Leitungen werden Sie die Fenstergröße groß
und auf welchen klein machen?
(30)
32. ARQ-Protocols
differentiation:
positive/negative acknowledgment
positive acknowledgment only, (be careful:timing)
question: would a pure negative ack be a sensible solution?
Could be done, but it takes time to wait for the timer!
(32)
33. ARQ-Protocols, Stop and Wait with lost
frames (packets)
frame n-1 frame n-1
positive
positive
acknowledg-
acknowledgement
timeout
timeout
ment
frame n frame n
lost
lost
repetiton of
repetition of
time
time
frame n
frame n
Question: Is it necessary to distinguish frame n from the
repeated frame n at the receiver?
answer: Of course it is. The receiver does not know the content of the frame. The
content should not be delivered twice at layer 3.
next Question: Propose the most simple method to differentiate both.
answer: add simply one bit to the header, which is set to one for the original
message and zero for the repetition. When does this method fail?
(33)
34. Communications Efficiency of ARQ-Protocols
(3)
To get the average number of transmissions we have to find the probability
for disturbed frames P. The most common approach is to use the bit error
rate p and the number of bits per frame K (bit errors shall be independent
of each other):
P = 1 − (1 − p ) K ( 6 .5 .6 )
Which effect do we neglect with the given approach above?
The error probability for the bits is (depending on the transmission media)
is often not independent of each other. Very often, especially in radio
systems we have burst errors. In such cases it is more realistic to consider
burst errors as independent rather than the bit errors!
An approximation from experience is that the burst error rate is
1/3 to 1/10
of the bit error rate.
(34)
35. R:=4800bit/s;
nh:=48 bit;
(1 − p ) R ( K − nh )
K
ta:=0.1s; tp:=0.01s;
Re =
note:
K + na + 2 R (t p + t a ) na:=48bit;
• optimal frame length
• effective frame rate
p1:=10^(-5);
drops, if too many
repetitions are
required
Re:=effektive transmission rate
in bit/s;
p2:=10^(-4);
K := frame length in Byte
Which error rate do you
need, in order to run
IEEE802.3 efficient? Better
Than p1, because the max.
Frame length is about 1500
octetts; for that using p2 Re
is already down.
(35)