Вы находитесь на странице: 1из 50
Errors Happen n Errors must be controlled Ø Detection Ø Correction n Must have redundancy
Errors Happen
n
Errors must be controlled
Ø Detection
Ø Correction
n
Must have redundancy
Ø Overhead incurred for error control
Ø Higher for correction
n
Error control strategies have limitation
Ø Having detected the errors, now what ?
Ø Need acknowledgement.
Ø Error recovery
n
Three armies problem!
ECE/CSC 570
The Three Armies Problem B A B n Acknowledgements are needed n But may not
The Three Armies Problem
B
A
B
n
Acknowledgements are needed
n
But may not be available
n
Hence requests must sometimes be implicit
ECE/CSC 570
ARQ Error Control n Types of errors: Lost frames, damaged frames n Most Error Control
ARQ Error Control
n
Types of errors: Lost frames, damaged frames
n
Most Error Control techniques are based on (1)
Error Detection Scheme (e.g., Parity checks,
CRC), and (2) Retransmission Scheme
n Error Control schemes that involve error
detection and retransmission of lost or corrupted
frames are referred to as Automatic Repeat
reQuest (ARQ) error control
ECE/CSC 570
Retransmission Strategies n Automatic Repeat reQuest (ARQ) Ø Detect frames with errors at the receiving
Retransmission Strategies
n
Automatic Repeat reQuest (ARQ)
Ø
Detect frames with errors at the receiving DLC module and to
request the transmitting DLC module to repeat the information in
those erroneous frames.
n
Correctness and Efficiency
Ø Correctness: Does the protocol succeed in releasing each
packet, once and only once, without errors, from the receiving
DLC?
Ø Efficiency: How much of the bit-transmitting capability of the bit
pipe is wasted by unnecessary waiting and by sending
unnecessary retransmissions?
n
Assumptions
Ø Transmissions are eventually successful.
ECE/CSC 570
Approach n Sequence numbers Ø Delineated streams of bits à stream of frames Ø Successive
Approach
n
Sequence numbers
Ø Delineated streams of bits à stream of frames
Ø Successive frames have different identities
n
Timing Diagrams
Ø Diagram showing sequence of events involved
Ø Transmission of frames (start and end)
Ø Delays – four kinds …
sender
Time
receiver
ECE/CSC 570
Some ARQ Protocols n Stop-And-Wait (SAW) Ø Simplex in data transmission Ø Half-duplex considering acknowledgement
Some ARQ Protocols
n
Stop-And-Wait (SAW)
Ø Simplex in data transmission
Ø Half-duplex considering acknowledgement
n
Go-Back-N (GBN)
Ø Increase utilization
Ø “Sliding window”
n
Selective Repeat Protocol (SRP)
Ø Increase efficiency
ECE/CSC 570
Assumptions n We refer to frames without transmission errors as error- free frames and those
Assumptions
n
We refer to frames without transmission errors as error-
free frames and those with transmission errors as error
frames.
n
We assume that the receiver can always distinguish error
frames from error-free frames.
n
Each transmitted frame is delayed by an arbitrary and
variable time before arriving at the receiver, and assume
that some frames might be “lost” and never arrive.
n
Those frames that arrive are assumed to arrive in the
same order as transmitted, with or without errors.
ECE/CSC 570
Stop-and-Wait (SAW) Flow Control: How to prevent the sender from flooding the receiver with data
Stop-and-Wait (SAW)
Flow Control: How to prevent the sender from flooding the
receiver with data faster than the latter is able to process them?
n
Simplest scheme
Ø Protocols in which the sender sends one frame and then waits
for an acknowledgement before proceeding are called SAW.
Ø Assume that no automatic buffering and queuing at the
receiver, the sender must never transmit a new frame until the
old one has been fetched.
n
Assume acknowledgement delay bound T
Ø A timer associated with each packet
Ø Implicit request for retransmission
n
Only one outstanding packet at anytime
ECE/CSC 570
Stop-and-Wait (2) n Frames are transmitted from A to B. n If the frame is
Stop-and-Wait (2)
n
Frames are transmitted from A to B.
n
If the frame is error-free, B sends an acknowledgement (called an
ack) back to A; if the frame is an error frame, B sends a negative
acknowledgement (called a nak) back to A.
n
Since error can occur from B to A as well as from A to B, the ack or
nak is protected with a CRC.
£ T
T
£ T
Sender A
X
Receiver B
ECE/CSC 570
Stop-and-Wait (3) n The trouble with unnumbered packets Ø The ack for packet 0 is
Stop-and-Wait (3)
n The trouble with unnumbered packets
Ø The ack for packet 0 is abnormally delayed, so A
retransmits packet 0, but B cannot tell whether it is 0
or 1.
0 £ T
£ T
0
T
Sender A
Ack
Packet 0 or 1 ?
Receiver B
Packet 0
Solution? Use a sequence number in the frame
header to identify successive packets.
ECE/CSC 570
Stop-and-Wait (4) n The trouble with unnumbered acks Ø If the transmitter at A times-out
Stop-and-Wait (4)
n The trouble with unnumbered acks
Ø If the transmitter at A times-out and sends packet 0 twice, node B can
use the sequence numbers to recognize that packet 0 is being
repeated. It must send an ack for both copies, however, and (since
acks can be lost) the transmitter cannot tell whether the second ack is
for packet 0 or 1.
SN
0
0
1
?
2
Sender A
Ack
Ack
Nak
Receiver B
Packet 0
Packet 0
Solution? Instead of returning ack or nak on the reverse
link, returns the number of the next packet awaited.
ECE/CSC 570
Stop-and-Wait (5) n In many applications, there is another stream of data from B to
Stop-and-Wait (5)
n
In many applications, there is another stream of data from B to A (full
duplex), and in this case, the frames from B to A carrying requests
for new A to B packets must be interspersed with data frames
carrying data from B to A.
n
“piggybacking” is to delay outgoing acks so that they can be
hooked onto the next outgoing data frame.
n
“piggyback” these requests for new packets into the headers of the
data frames from B to A.
SN
RN
Packet
CRC
Request Number (RN) for piggybacking
of the next packet awaited in the opposite direction
ECE/CSC 570
SAW: Algorithms for A-to-B Trans. n Algorithm at sender A for A-to-B transmission n Algorithm
SAW: Algorithms for A-to-B Trans.
n
Algorithm at sender A for A-to-B transmission
n
Algorithm at receiver B for A-to-B transmission
n
Use timer expires/disabled to handle the arbitrary delays
between subsequent transmissions in the algorithm
above.
SN
0
0
1
2
3
Sender A
Receiver B
RN
1
1
2
3
0
1
2
Packets out
ECE/CSC 570
SAW: Detailed Algorithms n The algorithm at node A for A-to-B transmission: 1. Set the
SAW: Detailed Algorithms
n
The algorithm at node A for A-to-B transmission:
1. Set the integer variable SN to 0
2. Accept a packet from the next higher layer at A; if no packet is available, wait
until it is; assign number SN to the new packet.
3. Transmit the SN-th packet in a frame containing SN in the sequence number
field.
4. If an error-free frame is received from B containing a request number RN greater
than SN, increase SN to RN and go to step 2.
5. If no such frame is received within some finite delay (timeout), go to step 3
n
The algorithm at node B for A-to-B transmission:
1. Set the integer variable RN to 0 and then repeat steps 2 and 3 forever.
2. Whenever an error-free frame is received from A containing a sequence number
SN equal to RN , release the received packet to the higher layer and increment
RN.
3. At arbitrary times, but within bounded delay after receiving any error-free data
frame from A, transmit a frame to A containing RN in the request number field.
ECE/CSC 570
Efficiency: Throughput Analysis of SAW n Throughput = # of successful packets received/sec (unit of
Efficiency: Throughput Analysis of SAW
n
Throughput = # of successful packets received/sec
(unit of packet/sec, bits/sec etc.)
n
Capacity = potential max. packets received/sec
n
Efficiency = throughput / capacity
= transmission time / total time between two (successful)
frames
n
Assumption:
Ø Fixed size frames
Ø Infinite sequence #’s
Ø Packet errors are assumed to be independent.
Ø Infinite retransmission
Note: From now on, “frame” and “packet” are used interchangeably.
ECE/CSC 570
More Assumptions n If there is no error, every ack arrives at the sender exactly
More Assumptions
n
If there is no error, every ack arrives at the sender exactly
S seconds after the start of the transmission of the packet.
Then the protocol transmits one packet every S seconds.
n
Assume that with probability (1-p), either the packet does
not reach the receiver, or the ack does not make it back to
the sender à in both cases, timeout occurs!
n
p = Probability of success !
n
Assume that if the ack gets to the sender (with probability
p), then it does so in exactly S seconds.
The efficiency depends on the packet error rate and
on the actual delay of the acknowledgements.
ECE/CSC 570
Efficiency of SAW (2): No Error case n Let time X be the random variable
Efficiency of SAW (2): No Error case
n
Let time X be the random variable that the sender
takes between the first transmission of packet n and
that of packet n+1 (time between successful packets).
n
In case of no error, i.e., p=1, then the throughput is l
= 1/S (packets/sec)
Ø Every S seconds, station A transmits 1 packet successfully.
ECE/CSC 570
Efficiency of SAW (3) n X : random variable that the sender takes between the
Efficiency of SAW (3)
n X : random variable that the sender takes between the first
transmission of packet n and that of packet n+1 (time between
successful packets)
Ø With probability 1-p, the ack does not come back. In this case, after T
seconds, the sender restarts its attempt to deliver packet n.
Ø With probability 1-p, one has X = T+Y, where Y is the time that the
sender takes from that second transmission of packet n until the
transmission of packet n+1.
ECE/CSC 570
Efficiency of SAW (4) n Then E( X ) = pS + (1- p){T +
Efficiency of SAW (4)
n Then
E( X ) = pS + (1- p){T + E(Y )}
Ø Since the transmission errors after the second transmission have the
same likelihood as after the first one, the random time Y has the same
statistics as the random variable X. Both X and Y are the random time
until the ack of a packet is correctly received, measured from the start of
the transmission of the packet.
E(X) = pS + (1 - p) (T + E(X))
1-
p
X
p
ECE/CSC 570

) =

S

+

T

Efficiency of SAW (5) n Therefore, under the assumptions, SAW transmits one packet every E(X)
Efficiency of SAW (5)
n
Therefore, under the assumptions, SAW transmits one packet every
E(X) seconds, on average. That is, the (successful) transmission
rate—or throughput is 1/E(X).
n
The efficiency of SAW is equal to its throughput 1/E(X) divided by the
line rate 1/t, where t is the transmission time of a packet. That is,
t
h
=
SW
S
+
T(
1-
p
) /
p
n
The minimum value of T for SAW is equal to S because the
transmitter waits until it knows that no ack can arrive before it
retransmits a packet. (T ¸ S)
ECE/CSC 570
A closer look on the efficiency n Assume no error, i.e., p=1, and T =
A closer look on the efficiency
n
Assume no error, i.e., p=1,
and T = S
n Efficiency h = t / S, where T = S = t + t out
n
Assume that t out = 2t prop + t proc ¼ 2t prop
n
a = t prop /t = propagation delay / transmission
delay
ECE/CSC 570
A closer look on the efficiency (2) n a = t prop /t = propagation
A closer look on the efficiency (2)
n
a = t prop /t = propagation delay / transmission
delay
Ø Let d = propagation delay, P = frame size in bits, R =
link speed in bps
n
Then, a = d/(P/R) = Rd / P, where Rd =
bandwidth-delay product representing the length
of the medium (link) in bits: i.e., How many bits
are required to fill the pipe ?
n
a >> 1?
a << 1?
ECE/CSC 570
Sliding Window Protocols n Bidirectional protocols Ø To use the same circuit for data in
Sliding Window Protocols
n
Bidirectional protocols
Ø
To use the same circuit for data in both directions, instead of one for
data (forward) and one for ack (reverse). The receiver can tell whether
the frame is data or ack by looking at the “type” in the packet header.
n
Piggybacking
Ø
Temporarily delaying outgoing acks so that they can be hooked onto
the next outgoing data frame (free ride for acks!).
n
How long should the receiver wait for a packet to piggyback the
ack?
Ø Too long – will incur retransmission
Ø Too short – separate acknowledgement
n
Ack with request # RN à acknowledge all packets up to (RN-1)
and request transmission of packet RN.
ECE/CSC 570
Sliding Window Protocols (2) n Major drawback of Stop-and-Wait Ø Only one frame can be
Sliding Window Protocols (2)
n
Major drawback of Stop-and-Wait
Ø Only one frame can be in transmission at a time
Ø Leads to inefficiency if propagation delay is much
longer than the transmission delay (i.e., a >> 1)
n
Sliding window flow control
Ø Allows transmission of multiple frames
Ø Assigns each frame a k-bit sequence number
Ø Range of sequence number is [0,1,…,2 k -1], i.e.,
frames are counted modulo 2 k
ECE/CSC 570
Operation of Sliding Window n Sending Window: Ø The sequence numbers within the sender’s window
Operation of Sliding Window
n Sending Window:
Ø The sequence numbers within the sender’s window represent frames
that are allowed to send (have been sent or can be sent, but are as
yet not acknowledged).
Ø When a new packet arrives from the network layer, the upper edge of
the window is advanced by one.
Ø The sender must have a buffer which keeps the copy of all frames
within the window because these frames may need retransmission.
Frames already
transmitted
Windows of frames that may
be transmitted
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
Last frame
Frame sequence
number
transmitted
Window shrinks as
frames are sent
Window expands as
acknowledgements are
received
ECE/CSC 570
Operation of Sliding Window (2) n Receiving Window: Ø The receiver maintains a receiving window
Operation of Sliding Window (2)
n Receiving Window:
Ø The receiver maintains a receiving window
corresponding to the sequence numbers of frames
that the receiver is permitted to accept.
Frames already
received
Windows of frames that are
accepted by receiver
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
Last frame
acknowledged
Window expands as
acknowledgements are sent
Window shrinks as frames
are received
ECE/CSC 570
Operation of Sliding Window (3) n How is “ flow control “ achieved? Ø Receiver
Operation of Sliding Window (3)
n
How is “ flow control “ achieved?
Ø Receiver can control the size of the sending window
Ø By limiting the size of the sending window, data flow
from the sender to the receiver can be limited.
n
Interpretation of ACK N message:
Ø Receiver acknowledges all packets until (but not
including) sequence number N.
ECE/CSC 570
Example Transmitter Receiver 0 1 2 3 4 5 6 7 0 1 2 3
Example
Transmitter
Receiver
0
1 2
3
4
5
6
7
0
1
2
3
0
1 2
3
4
5
6
7
0
1 3
2
F0
F1
F2
0
1 2
3
4
5
6
7
0
1
2
3
0
1 2
3
4
5
6
7
0
1 3
2
ACK 3
0
1
2
3
4
5
6
7
0
1 3
2
0
1
2
3
4
5
6
7
0
1
2
3
ECE/CSC 570
Example (cont’d) Transmitter Receiver F3 0 1 3 2 4 5 6 7 0 1
Example (cont’d)
Transmitter
Receiver
F3
0
1 3
2
4
5
6
7
0
1 2
3
0
1
2
3
4
5
6
7
0
1 2
3
F4
ACK 4
F5
F6
0
1 3
2
4
5
6
7
0
1 2
3
0
1 2
3
4
5
6
7
0
1 2
3
0
1 2
3
4
5
6
7
0
1 2
3
0
1
2
3
4
5
6
7
0
1
2
3
ECE/CSC 570
Why Use Sliding Window Protocols? n Example: Consider a 50-kbps satellite channel with a 500msec
Why Use Sliding Window Protocols?
n
Example: Consider a 50-kbps satellite channel with a
500msec round-trip delay. If we want to send 1000-
bit frames via the satellite.
Ø The first frame will be completely sent at t=20msec, and it arrives at
the receiver at t=270msec. The ack will be received at t=520msec.
Ø It means that the second frame cannot be sent out until t=520msec,
i.e., the sender is in idle from 20msec-520msec. That is 500/520,
about 96% of bandwidth is wasted.
Ø Therefore, the large window is desired if the product of bandwidth x
round-trip-delay is large.
n
Pipelining: the product of the bandwidth and the
delay (bandwidth-delay product) à the capacity of
the pipe (channel).
Ø The sender needs the ability to fill it without stopping in order to
operate at peak efficiency.
ECE/CSC 570
Sliding Window Protocols (ARQs) n Go Back n ARQ Ø If no error occurs, this
Sliding Window Protocols (ARQs)
n
Go Back n ARQ
Ø If no error occurs, this is the same as the previous
sliding window operation.
n
Selective Repeat ARQ
ECE/CSC 570
Go Back n ARQ n Window size W = n n n (=W): determines how
Go Back n ARQ
n
Window size W = n
n
n (=W): determines how many successive packets can
be sent without a request for a new packet
Ø Node A is not allowed to send packet i+n before i has been
acked (i.e., before i+1 has been requested)
n
Timer value T ¸ Wt
n
The sender transmits packets 0,1,2, …,W-1 and waits for
up to T seconds for each of their ACKs. As soon as the
receiver gets an ACK for packet 0 it transmits packet W.
n
If time-out, go back and retransmit.
ECE/CSC 570
Go Back n ARQ (2) n Operations: Ø A station may send multiple frames as
Go Back n ARQ (2)
n Operations:
Ø A station may send multiple frames as allowed by
the window size.
Ø receiver sends a NAK i if frame i is in error. After
that, the receiver discards all incoming frames until
the frame in error was correctly retransmitted.
Ø If sender receives a NAK i, it will retransmit frame i
and all packets i+1, i+2, … which have been sent,
but not been acknowledged.
ECE/CSC 570
Frame 6 Frame 5 Frame 4 Effect of transmission error Frame 6 Frame 5 n
Frame 6
Frame 5
Frame 4
Effect of transmission error
Frame 6
Frame 5
n Lost Frame
Frame 4
Frames 4,5,6 are
retransmitted
Frame 3
A
Frame 2
Frame 1
Frame 0
B
Frames 5 and 6
are discarded
ECE/CSC 570
ACK 3
NACK 4
ACK 6
Frame 5 Frame 4 Frame 3 Frame 2 Effect of transmission error (2) Frame 1
Frame 5
Frame 4
Frame 3
Frame 2
Effect of transmission error (2)
Frame 1
Frame 0
n Lost ACK
Frame 4
Timeout
Frames 0 -- 4 are
retransmitted
Frame 3
A
Frame 2
Frame 1
Frame 0
B
ECE/CSC 570
ACK 3
ACK 3
ACK 5
Go Back n ARQ (3): A-to-B Trans. n After each transmission, A sets an acknowledgement
Go Back n ARQ (3): A-to-B Trans.
n
After each transmission, A sets an acknowledgement
timer (time-out timer) for the frame just transmitted.
n
Case1: Damaged frame.
Ø
A
transmits frame i. B detects an error and has previously
successfully received frame (i-1). B sends a NAK i, indicating
that the frame is rejected. When A receives this NAK, it must
retransmit frame i and all subsequent frames that it has
transmitted.
Ø
frame i is lost in transit. A subsequently sends frame (i+1). B
receives a damaged frame (i+1), and sends a NAK i.
Ø
frame i is lost in transit and A does not soon send additional
frames. B receives nothing and returns neither an ACK or a NAK.
A will time out and retransmit frame i.
ECE/CSC 570
Go Back n ARQ (4): A-to-B Trans. n Case 2: Damaged ACK. Ø B receives
Go Back n ARQ (4): A-to-B Trans.
n
Case 2: Damaged ACK.
Ø B receives frame i and sends ACK(i+1), which is lost in transit.
Since acknowledgments a cumulative, it may be that A will
receive a subsequent ACK to a subsequent frame that will do
the job of the lost ACK before the associated time expires.
Ø A's timer expires. A will then retransmit frame i and all
subsequent frames.
n
Case 3: Damaged NAK. If a NAK is lost, A will time out
on the associated frame and retransmit that frame and
all subsequent frames.
n
Note: Each individual frame may not be individually
acknowledged, since an arriving ACK(i+1) implies that all frames
from frame i and backwards to the last acknowledged frame have
been delivered sound and well.
ECE/CSC 570
Go Back n ARQ (5): Sequence Numbers n A sequence space can only support a
Go Back n ARQ (5): Sequence Numbers
n
A sequence space can only support a window size of 2 k
– 1 for k-bits acknowledge field. (not 2 k =W )
n
Why?
Ø Consider a case in which a station transmits frame 0 and gets
an ACK1, and then transmits frame 1,2,3,4,5,6,7,0 (sequence
space of k = 3) and gets another ACK1.
Ø This is ambiguous à Is this (1) all eight frames were received
correctly, or (2) all frames were lost in transit, and the receiving
station is repeating its previous ACK1
n
Maximum # of outstanding packets (window size)
should be up to 2 k -1, when the max. seq. # is 2 k
ECE/CSC 570
Efficiency of GBN n We expect GBN to be more efficient than SAW. n Assume
Efficiency of GBN
n
We expect GBN to be more efficient than SAW.
n
Assume that every ACK of a packet reaches the sender
exactly S seconds after the sender started sending the
packet.
n
Denote by t the transmission time of a packet.
n
First we assume no errors and the window size is W—
sender transmits packets 0,1,…, W-1 then waits for the
first ACK which arrives after S seconds.
ECE/CSC 570
Efficiency of GBN (2) Assume no errors! A B W t If S W t
Efficiency of GBN (2)
Assume no errors!
A
B
W t
If
S
W
t fi
h =
S
S
t If
S < W t fi h = 1
ACK
Ï
W t ¸
h
=
min 1,
Ì
˝
GBN
Ó
S
˛
ECE/CSC 570
Efficiency of GBN (3) n Transmission errors will of course reduce the efficiency. n For
Efficiency of GBN (3)
n
Transmission errors will of course reduce the efficiency.
n
For simplicity, we assume that the window size of GBN
has the smallest value that results in an efficiency of
100% in the absence of error:
T = S = Wt
S
t
S, 1-p
S, 1-p
sender
k
k
receiver
t, p
t, p
ECE/CSC 570
Efficiency of GBN (4) n E (X) = pt + (1-p){ S + E(X)} (1
Efficiency of GBN (4)
n E (X) = pt + (1-p){ S + E(X)}
(1
-
p S
)
E
( X
) =t +
p
Since the useful transmission time per packet is t , the
transmission time, we conclude that the efficiency h GBN
of Go Back N is given by
(When S =T=Wt )
t
t
h
=
h
=
GBN
t + (1-
p S
)
/
p
GBN
E(X )
ECE/CSC 570
Example of Choosing W n Assume that a wireless link with a distance of 20km
Example of Choosing W
n
Assume that a wireless link with a distance of 20km and
a transmission rate of 13kbps.
n
The packets have 1000 bits and acknowledgements
100 bits.
n
So one-way propagation time is (20km)/3x10 5 km/s =
66.7us.
n
S = ?
t = ?
n
The efficiency of GBN is
Ï
W
¥ t ¸
Ó S
˛
If W=1, then the efficiency is approximately 90%, and if
W=2, then the efficiency is equal to 100%.
ECE/CSC 570

min 1,

Ì

˝

Example of Choosing W (note) n Assume that a wireless link with a distance of
Example of Choosing W (note)
n
Assume that a wireless link with a distance of 20km and a transmission
rate of 13kbps.
n
The packets have 1000 bits and acknowledgements 100 bits. Assume
each bit transmission time is t.
n
So one-way propagation time is (20km)/3x10 5 km/s = 66.7us.
n
S = (1000 + 100)/13000 + 2 ¢ 66.7 £ 10 -6 » 1102 /13000.
n
t = 1000/13000. Then the efficiency of GBN is
Ï
¥ 1000 ¸
min 1, W
Ì
˝
Ó
1102 ˛
If W=1, then the efficiency is approximately 90%, and if W=2, then the
efficiency is equal to 100%.
ECE/CSC 570
Example of Choosing W (2) n Consider an optical link of 50km with transmission rate
Example of Choosing W (2)
n
Consider an optical link of 50km with transmission rate of 2.4Gbps
and with packets and acknowledgements of 424 bits. Propagation
speed of the link is v = 2/3 ¢ c
n
So one-way propagation time is (50km)/2x10 5 km/s = 250us.
n
Let R = 2.4Gbps
Ï
¥ 424 ¸
min 1, W
n
S = ?
t = ?
Ì
˝
n
Then the efficiency of GBN is
n
This formula shows that the efficiency of 100% is achieved for a
window size W equal to 1.2 x 10 6 /424 =2831.
Conclusion: GBN is much more efficient than SAW in situations where
the round-trip time S is significantly larger than the transmission time t
ECE/CSC 570

Ó 1.2

¥ 10

6

˛

Example of Choosing W (2) (note) n Consider an optical link of 50km with transmission
Example of Choosing W (2) (note)
n
Consider an optical link of 50km with transmission rate of 2.4Gbps
and with packets and acknowledgements of 424 bits. Propagation
speed of the link is v = 2/3 ¢ c
n
So one-way propagation time is (50km)/2x10 5 km/s = 250us.
n
Let R = 2.4Gbps
Ï
¥ 424 ¸
n
S = (424+424)/R + 2¢ 250 £ 10 -6
min 1, W
Ì
˝
n
t = 424 / R.
n
Then the efficiency of GBN is
n
This formula shows that the efficiency of 100% is achieved for a
window size W equal to 1.2 x 10 6 /424 =2831.
ECE/CSC 570

Ó 1.2

¥ 10

6

˛

Selective-Repeat ARQ n Similar to Go-Back-n ARQ. However, the sender only retransmits frames for which
Selective-Repeat ARQ
n
Similar to Go-Back-n ARQ. However, the sender
only retransmits frames for which a NAK is
received.
n
Advantage over Go-Back-n:
Ø
Fewer Retransmission
n
Disadvantages:
Ø More complexity at sender and receiver
Ø Each frame must be acknowledged individually (no
cumulative acknowledgements)
Ø Receiver may receive frames out of sequence (buffer
required)
ECE/CSC 570
Frame 0 Frame 7 Frame 4 Selective-Repeat ARQ (2) Frame 6 Frame 5 n Lost
Frame 0
Frame 7
Frame 4
Selective-Repeat ARQ (2)
Frame 6
Frame 5
n Lost Frame
Frame 4
Only frame 4 is
retransmitted
Frame 3
A
Frame 2
Frame 1
Frame 0
B
Frames 5 and 6
are buffered
ECE/CSC 570
ACK 1
ACK 2
ACK 3
ACK 4
ACK 6 NACK 4
ACK 7
ACK 5
ACK 0
ACK 1
Efficiency of Selective Repeat ARQ n The basic idea of SRP is to accept out-of-order
Efficiency of Selective Repeat ARQ
n
The basic idea of SRP is to accept out-of-order packets
and to request retransmission from A only for those
packets that are not correctly received.
n
The upper bound of the efficiency h · 1-p error , where p error
is the probability of frame error.
n
If there is no error, the efficiency of SRP is identical to
that of GBN, which is repeated here
Ï
W t ¸
h
=
min 1,
Ì
˝
SRP
Ó
S
˛
ECE/CSC 570
Summary n DLC is to convert the raw bit stream offered by the physical layer
Summary
n
DLC is to convert the raw bit stream offered by
the physical layer into a stream of frames for use
by the network layer.
n
Framing methods are used to break bit streams
into frames.
n
Error control to transmit damaged or lost frames.
n
ARQ schemes are used to integrate error control
and flow control so that the slow receiver will not
be flooded by a fast sender.
ECE/CSC 570