Académique Documents
Professionnel Documents
Culture Documents
• Bit errors
probability 0 → 1 equals probability 1 → 0 (=P)
transmission of frame of n bits :
• probability no errors : P1=(1-P)n
• probability of one or more undetected errors P2
• probability of one or more detected bit errors P3
error detecting codes : minimize P2
• parity check
• longitudinal redundancy check
• cyclic redundancy check
Error detection : principles (1)
• Requirements of function f
elements of W should be representable in small
number of bits (=overhead)
size of W large enough to detect errors
probability that f(d)=r should be equal for almost
all r
if P(d → d’)>p, then f(d) ≠ f(d’)
f is efficiently computable (in hardware)
Algebraic background (1)
d : [a n −1 a n − 2 ...a1 a 0 ]
• Multiplication and addition
n n n
∑i =0
ai X i + ∑
i =0
bi X i = ∑
i =0
(a i + bi ) X i
n m n m
∑i =0
ai X i × ∑
i =0
bi X i = ∑∑
i =0 j =0
ai b j X i + j
Algebraic background (2)
1 1 1 0 0 1 0 0 0
1 0 1 0 1 0 1 1 1
1 0 0 1 1 0 1 0 0
0 0 1 1 0 1 1 1 1
0 1 1 0 0 1 1 0 0
1 0 0 0 0 1 0 0 0
Cyclic Redundancy Check (CRC)
• CRC : polynomial representation
Generator polynomial P (degree n) : n+1 bits
M : k bit message to be transmitted
F : n bit frame check sequence
T : concatenation of M and F : T = < M , F >; hence T =
2n M + F
• CRC : Operation
compute F such that T/P has rest 0
Let 2n M = QP + R, then R is rest of 2n M / P
Then 2n M + R is dividable by P, hence F = R
F (= R) has at most n bits
CRC : Example
X 15 + X 14 + 1 is not divisible by
X k + 1, k < 32768
CRC Effectiveness (2)
Router
Router
Router
LAN
LAN
Router
Router
Flow control
Stop-and-Wait Flow Control
• Sender :
transmit frame
• Receiver :
accepts the frame
processes the frame
sends an acknowledgement to sender
• Sender :
when acknowledgement is received, send second
frame
Efficiency of Stop-and-Wait (1)
• Model parameters
TD: total time to send n frames
• Efficiency nt frame
E=
n( 2t prop + t frame )
t prop
a=
t frame
1
E=
1 + 2a
Efficiency of Stop-and-Wait (3)
• Let
d: length of the link
V: propagation speed ( 200000 km/s )
L: frame length
R: link data rate
• Then d L Rd Rd
t prop = , t frame = ⇒a= = /L
V R VL V
where Rd/V length of the link in bits
a = length of the link in frames
Efficiency : example
• Satellite link
tprop: 270 ms, R=56kbit/s, L=4000 bits
tframe: 71 ms, a=3.8 and hence E = 1/(1+7.6) = 0.12
• LAN
0.1 km < d < 10 km, 0.1 Mbit/s < R < 10 Mbit/s
L=500 bits, 0.001 < a < 1
a=0.01 : E=0.98 ; a=0.1 : E=0.83
• Telephony
R=9.6 Kbit/s, L=500 bits
d=100m : a=9.6 10-6 and E=1; d=5000km : E=0.5
Sliding Window Protocol (1)
• Inefficiency of stop-and-wait when frames are
short
long frames have higher probability of errors and
retransmission of long frame higher bandwidth
needs
E [ B ]ρ
long frames imply longer delays ( )
2(1 − ρ )
long frames need large buffer sizes
• When a>1, need for other protocol : sliding
window protocol
Sliding Window Protocol (2)
7 1
2
6
5 3
4
Sliding Window : Example
• Parameters
N : window size
a = Rd/VL
frame transmission time = 1
• Sliding window operation
station A starts transmission at t0
first frame arrives at t0 + a
complete frame arrives at t0 + a + 1; B issues ack
ack arrives at t0 + 2a + 1
Sliding Window : Efficiency (2)
• Consider two cases :
N > 2a + 1 : ack reaches station A before window
is used, hence no interruptions
N < 2a + 1 : at time t0 + N, ack has not arrived
yet, and transmission is stopped till t0 + 2a + 1
• Efficiency E
E = 1 , N > 2a + 1
E = N / (2a + 1) , N < 2a + 1
Error Control
• Errors
lost frame : frame does not arrive or is unrecognizable
damaged frame : error detected in frame
• Automatic Repeat Request (ARQ)
positive acknowledgment (ACK)
timeout
negative acknowledgment (NACK)
• ARQ protocols
Stop-and-Wait ARQ
Go-Back-N ARQ
Selective reject ARQ
Stop-and-Wait ARQ
• Computation of Nr
∞ ∞
N r = (1 − K )∑ i =1
P i −1 (1 − P ) + K ∑
i =1
iP i −1 (1 − P )
K 1 − P + KP
=1− K + =
1− P 1− P
• Efficiency :
1− P
E= , when N > 2a + 1
1 + 2aP
N (1 − P )
= , when N ≤ 2a + 1
(1 + 2a )(1 − P + NP )
Selective Reject ARQ
0.5
Stop-and-wait
P=10-3