SEE013_1P0438Stop and Wait ARQ

Download Report

Transcript SEE013_1P0438Stop and Wait ARQ

Stop and Wait
Automatic Repeat Request
This is a simple data link layer protocol. It is implemented using acknowledgement for
error free frame and retransmission on timeout. it is further optimized using
sequence numbers in frames and acknowledgements.
Course Name: Communication Networks
Authors
Amita Shinde
Mentor
Prof. Sarvanan
Learning Objectives
After interacting with this Learning Object, the learner will be able to;
• Describe simple Automatic Repeat Request Stop and Wait Protocol
• Identify various problems occurring during transmission while
implementing Stop and Wait ARQ and mechanisms to solve them.
• Estimating timeout period for optimum transmission.
Theory button content :Transmitter Flowchart
Start
N=0
Transmit Nth Frame
+ Seq. No. N
Start Timer
Received
Ack.?
Yes
Error Free ACK?
No
No
No
Timeout?
Yes
Yes
Is ACK Seq.
No. = N+1
No
Yes
N= N+1
End of Frames?
No
Yes
Stop
Note for animator: Colours/ positions/design etc. are suggestive and
will be finalized by designer
Start
Theory button content :Receiver Flowchart
Next Frame Expected No. = N
No
Received
Frame.?
Yes
No
Is Frame Error Free ?
Yes
Reject Frame
Is Frame Seq.
No. =N?
No
Yes
Accept Frame ‘N’
Transmit Acknowledgement
+ Seq. No. N+1
N = N+1
Note for animator: Colours/ positions/design etc. are suggestive and
will be finalized by designer
Master Layout 1
Source
Destination
C
R
C
C1
C
R
C
0
C2
C
1 ACK R
C
Frame path
Error Check
0
Frame channel
C3
Error Check
C4
Ack channel
Ack path
C
1 ACK R
C
Transmitter
Time
Time-line
01
Receiver
Elements of Master Layout 1
Transmitter time line
Arrow a1
Timeline 1
Arrow a3
Arrow a2
Timeline 2
Timeline 4
Timeline 3
Arrow f2
Arrow f1
Arrow a4
Arrow f3
Arrow f 0
C
R
C
Receiver time line
H
Frame
Packet
H
C
R
C
C
H ACK R
C
ACK
Header
1 ACK
C
R
C
Ack with
sequence no.
CRC
1
Ack Sequence No.
Ack
Ack Packet
0
Frame Sequence no.
C
R
C
0
C
R
C
0
Frame 0
C
R
C
0
1
Frame 1
C
R
C
0
2
Frame 2
C
R
C
0
3
Frame 3
Frame with
sequence no.
Note for animator: Colours/ positions/design etc. are suggestive and will be finalized by designer
Elements of Master Layout 1
P1
P2
Image i/p
Image o/p
P3
P4
Instructions to illustrator:
Image i/p & o/p should be same size.
P1,p2,p3,p4 are parts of i/p image…all of equal size & 1/4th of i/p image
i/p image & p1,p2,p3,p4 are same for all screens. Only, o/p image may vary as shown.
P1,p2,p3,p4 make o/p image
Note for animator: Colours/ positions/design etc. are suggestive and will be finalized by designer
Master Layout 2
Source
Destination
Duplicate
frame
Duplicate
ack
status message :
indicates duplicate ackin ack
error, frame & ack seq. no. early
timeout
status message :
indicates duplicate frames
in ack error, early timeout etc.
Noise image ( like lightening)
In frame error, ack error ,
early timeout & next frame error
C1
C2
C
1 ACK R
C
C
R
C
C
R
C
Frame path
0
Next Frame
0
Expected
Error Check
0
1
Expected
Ack. No
Error Check
Frame channel
C3
C4
Ack channel
Ack path
C
1 ACK R
C
Transmitter
Time
Timeout
Receiver
01
status message : Time-line
indicates timeout event
In frame error onwards
Note for animator: Colours/ positions/design etc. are suggestive and will be finalized by designer
Elements of master layout 2 in addition to the master layout 1
Duplicate
frame
Duplicate
ack
Noise
or
Timeout
status message :
indicates timeout event
In frame error onwards
status message :
indicates duplicate
frames in ack error, early
timeout etc.
Transparent color used to show that frame is
passing ‘through’.
A rectangle or hollow cube can be show.
status message :
indicates duplicate ackin
ack error, frame & ack
seq. no. early timeout
Noise image ( like
lightening)
In frame error, ack error ,
early timeout & next frame
error
Compare Consecutive
Error Check
No. indicating next ack expected.
Start with 1. increment as every ack
passes through it up to 3
The number digit in frame should
coincide with this digit while passing.
Next Frame
0
Expected
1
No. indicating next frame expected.
Start with 0 increment by 1 up to 3
as every frame passes through it.
The number digit in frame should
coincide with this digit while
passing.
Expected
Ack. No
Note for animator: Colours/ positions/design etc. are suggestive and will be finalized by designer.
Refer to these elements from step 4 onwards. All elements are not used at every step.
Elements are added at every step as shown in the step itself.
List of animations:
Step 3
Ideal Case
Step 4
Frame Error
Step 5
Acknowledgement Error
Step 6
Early Timeout
Step 8
Comparison of consecutive content!
Step 9
Frame Sequence Number
Step 10
Frame Sequence Number: Acknowledgement Error
Step 11
Frame Sequence Number: Early Timeout
Step 12
Frame Sequence Number: Early Timeout & Next
Frame Error
Step 13
Frame & Acknowledgement Sequence Number
Step 14
Frame & Acknowledgement Sequence Number:
Early Timeout & Next Frame Error
Step 15
1 bit sequence number
Note for animator: This is for animator’s reference. Can be used in drop-down menu.
Step 1
Introduction
The basic principle behind automatic repeat request (ARQ) is to initiate frame
retransmissions when errors are detected in the received frame. Retransmissions are
initiated using a combination of timeouts and acknowledgements.
Stop-and-wait ARQ (SW ARQ) is the simplest ARQ protocol. When a source node sends
a frame, it starts a timer and waits for an acknowledgement (ACK) from the destination.
If the destination node receives a frame in which no errors are detected, it sends an ACK
frame back to the sender informing it of error-free frame reception. Once an ACK for a
frame arrives at the source, the next frame is transmitted.
If errors are detected in the frame, then the destination does nothing.
If the timer at the source exceeds a predetermined threshold, a timeout event is
declared and the frame is resent.
This simple process further imposes some problems, you can learn about these
problems and the mechanisms used to solve them, step by step.
Instructions to animator:
This will be the very first introduction screen as the user opens this animation.
Step 2
The image is to be accurately transmitted from
source to destination using Stop and Wait ARQ.
The image is divided in four parts &
transmitted as four consecutive frames.
Observe how Stop and Wait ARQ protocol
achieves accurate transmission of this
image to the destination.
Error Check
Error Check
Transmitter
Receiver
Transmitter
Receiver
Step 3
Ideal Case
Error Check
C
R
C
H
Error Check
C
ACK R
C
Transmitter
Receiver
Transmitter
Receiver
Step 3
Ideal Case
Sequence
Description of Action/Interactivity
Instructions to animator
1
Continue from step 2
Refer to master layout1 for images etc
2
In i/p image , show P1 selected (rectangle)
3
Show P1 appear down at the shown position
4
P1 transforms into packet with animation
5
Header rectangle appears
6
CRC rectangle appears
Now Packet, Header & CRC should become one object i.e.
frame
7
Start moving frame to right
8
As soon as it touches C1( its rightmost boundary touches
channel’s left boundary);
Move frame through channel
Show arrow f0 starting from top left
Timeline 1 starts
X –coordinates of timeline 1 & arrow
f0 should be same at every instance
9
Frame reaches C2
Arrow f0 completes
X –coordinates of timeline 1 & arrow
f0 should be same at every instance
10
Frame moves further into receiver
Step 3
Ideal case
Seq.
Description of Action/Interactivity
Instructions to animator
11
Frame passes from ‘Error Check’ block
CRC rectangle disappears
It should look like passing ‘though’
12
Header & packet reach at shown position.
They also disappear
P1 appears at shown position in receiver
13
Ack appears at shown position in receiver
14
Ack starts moving to left
15
Ack touches C4,
Arrow a1 starts from bottom left
16
Ack crosses point C3 completely
Arrow a1 completes.
17
Ack passes through ‘Error check’ block in transmitter
CRC disappears
18
Timeline 1 completes
Ack disappears
19
Repeat sequence 2 to 18 for image P2, packet, header, frame,
arrow f1, timeline 2, arrow a2, ack
20
Repeat sequence 2 to 18 for image P3, packet, header, frame,
arrow f2, timeline 3, arrow a3, ack
21
Repeat sequence 2 to 18 for image P4, packet, header, frame,
arrow f3, timeline 4, arrow a4, ack
22
Show text’ Image reached accurately’
Now, X –coordinates of timeline 1 & arrow
a1 should be same at every instance
X –coordinates of timeline 2 & arrow a2 or f1
should be same at every instance
Follow the style of animation for all next
cases
Step 4
Frame Error
ACKs don’t exist here from beginning.
They appear 1 by 1 & move
C
C
Don’t stack the ACK.
Make them disappear
after reaching here
C
C
C
Don’t stack the Frames.
Make them disappear
after reaching here and make
p1 through p4 appear
ACK
ACK
ACK
ACK
C
Error Check
Transmitter
Timeout
Noise
Error Check
Receiver
Step 4
Frame Error
Description of Action/Interactivity
Text to be displayed
For all frames that cross the ‘error check’ block & reach
their position in receiver block,
Make the frame disappear & corresponding part
of o/p image (frame 0=p1,frame 1=p2, frame
2=p3,frame3=p4) appear
When the retransmission occurs,
1.
Show T1 when noise strikes
2.
Show T2 when frame rejected
3.
Then show T3 before & during timeout
4.
Show T4after timeout with retransmission
5.
Show ‘Next’ button after retransmit ack received
6.
Show T5 when destination image complete
7.
Show T6. words ‘acknowledgement error’ are
highlighted as they indicate another animation
menu from drop down list.
T1: Frame is corrupted
T2:…hence rejected
T3: No acknowledgement!
T4: Frame retransmitted
T5: Image received accurately!
T6: The transmitter retransmits a frame when ‘Timeout’
occurs.
This mechanism is useful to handle a frame error .
Is it equally useful for an acknowledgement error?
Step 5
Don’t stack the Frames.
Make them disappear
after reaching here
Acknowledgement Error
C
C
C
C
C
C
C
C
Duplicate
frame
Don’t stack the ACK.
Make them disappear
after reaching here
Error Check
Error Check
Noise
Transmitter
Timeout
Find Solution
ACK
ACK
ACK
ACK
ACK
Receiver
Step 5
Acknowledgement Error
Description of Action/Interactivity
1.
Text to be displayed
For all frames,
When the frames reach their last point in receiver, make
then disappear and make corresponding part of o/p image
p1,p2,p3,p4)appear in receiver.
When the retransmission occurs,
1.
Show T1 when 1st frame received. Make the frame
disappear and make P1 appear
2.
Show T2 when noise strikes
3.
Show T3 when frame rejected
4.
Then show T3 before & during timeout
5.
Show T4 after timeout with retransmission
6.
Show T5
7.
Show T6 at end of animation & ‘Find Solution’ action button
T1: Frame received correctly
T2: Noise strikes the acknowledgement
T3:…hence acknowledgement rejected
T4: Frame retransmitted
T5: Duplicate frame received!
T6: A duplicate fames was received twice.
How to solve this problem?
Interactivity
Boundary Limit
Result
Instructions for
learner
action button
‘Find Solution
Activate after T5
Go to step 7
when clicked
Click here to find solution
to the problem of duplicate
frames
Step 6
Early Timeout
ACK C
Duplicate
frame
C
C
C
C
C
Error Check
Error Check
Receiver
Transmitter
Timeout
Find Solution
Step 6
Early Timeout
Description of Action/Interactivity
Text to be displayed
For all frames that cross the ‘error check’ block & reach their
position in receiver block,
Make the frame disappear & part of o/p image (frame
0=p1, frame 1=p2, frame 2=p3, frame 3=p4) appear.
st
Only 1 frame & its retransmission is shown here. But also show
2nd, 3rd, frame like step 5
When the retransmission occurs,
1.
Show T1 when 1st frame received
2.
Show T2 after timeout with retransmission
3.
Show ‘Next’ button after retransmit ack received
4.
Show T3
5.
Show T4 after entire image received.]
6.
Show T5 and action button ‘Find Solution ‘
T1: Frame received correctly
T2: Frame retransmitted
T3: Duplicate frame received!
T4: Inaccurate image reached destination!
T5: A duplicate fames was received twice.
How to solve this problem?
Interactivity
Boundary Limit
Result
Instruction to learner
(optional)
Clickable
action button
‘Find Solution
Show after T5
If clicked
Go to step 7
Click here to find solution
to the problem of duplicate
frames
Step 7
Can you suggest a solution to solve this problem?
Compare content of consecutive frames at receiver & discard if it is same.
Add a sequence no. to each frame & verify the same at the receiver..
Interactivity
Boundary Limit
Result
Instructions to
animator
Instructions
to learner
Two selectable
options:
Action buttons
Only one selected at a
time.
2nd option is correct.
1st selected:
Show
comparison
(step 8)
2nd selected:
Show sequence
numbers
(step 9)
Don’t show –ve
feedback.
Show only positive
feedback for 2nd option
Click on the
correct option
Step 8
Comparison
Receiver
Transmitter
Buffer
Duplicate
Error Check
C
R
C
H
Error
Check
H
H ACK
ACK C
C
Step 8
Comparison
Description of Action/Interactivity
Text to be displayed
The animation is shown here considering parts of another
image (chessboard).
Show the same using parts of i/p image used (4 of
diamond card)…p1,p2,p3,p4
When the retransmission occurs,
1.
Show T1 when 1st frame received
2.
Show T2 when 2nd frame received
3.
show T3 when 3rd frame rejected
4.
Show ‘Next’ button after duplicate content
5.
Show T4 when 4nd frame received
6.
Show T5 when destination image complete
7.
Show T6. Words ‘sequence numbers’ are
highlighted as they indicate another animation menu
from drop down list.
T1 New content, hence accepted.
Content buffered for further comparison!
T2: New content, hence accepted.
T3: : Duplicate content, hence rejected
T4: New content, hence accepted.
T5: Inaccurate image reached destination!
T6: Now try to check if adding sequence numbers to
the frames would solve this problem!
Step 9
Transmitter
Frames with Seq. No.
Receiver
Expected Fame No. =1
=0
Error Check
C
R
C
0
Error Check
C
ACK R
C
Step 9
Frames with Seq. No.
Description of Action/Interactivity
Text to be displayed
Only first frame & corresponding image part is shown
animated here.
Similarly show remaining 3.
Similar to step 3 (+ expected frame no. increment
while every ACK is generated)
1.
2.
3.
Show T1 when frame is created & keep till it
is received( Keep as long as frame’0’
remains on frame)
Show T2 every time a frame is received (for
all 4 frames)
Show T3 at the end of animation
T1: Frame with sequence number ‘0’
T2: Sequence no. matched! Frame accepted!
T3: Will the frames with sequence number also be duplicated
if there is an acknowledgement error or early timeout?
Step 10
Frame Sequence No. : Acknowledgement Error
No
match
C
C3
C
C
CC
22
1
1
C
0
ACK
ACK
ACK
ACK
Next Frame 0
123
Expected
Error Check
Error Check
Noise
Timeout
with sequence
Sequence
no.matched
2successfully!
received
Frame
sequence
no.
not
Acknowledgement
received
successfully!
Image
reached
destination
number
‘1’
received
successfully!
corrupted
, hence rejected!
‘0’
Acknowledgement
Frame
with
no.
1
retransmitted
Receiver
Step 10
Frame Sequence No. : Acknowledgement Error
Description of Action/Interactivity
Text to be displayed
For all frames that cross the ‘error check’ &
‘expected frame ‘ block & reach their position
in receiver block,
Make the frame disappear & corresponding
part of o/p image (p1,p2,p3,p4) appear.
Also, make the ‘ack’ disappear after they
reach the last point in transmitter block.
1.
2.
3.
4.
5.
6.
7.
8.
Show T1 when frame 0 is created & keep till
it is received( Keep as long as frame’0’
remains on screen)
Show T2 for ack1
Show T3 for frame 1
Show T4 for ack 2 (noise strikes)
Show T5 when frame 1 sent again
Show T6 when frame 1 thrown
Show T7 for ack2
Show T8 at the end
T1: Frame with sequence number ‘0’ received & accepted!
T2: Ack received & accepted!
T3: Frame with sequence number ‘1’ received & accepted!
T4: Error in ACK! ACK rejected !
T5: Frame 1 retransmitted
T6: Frame sequence no. not matched! Frame rejected
T7: ACK received &accepted
T8: Image reached destination successfully
The text to be displayed is shown in animation. At every
shown instance, overwrite old text with new text. (old text
disappears & new text appears)
Step 11
Frames with Sequence No.: Early Timeout
C
3
C
C
2
1
Cc
0
No
Match
Next Frame
Expected
0
13
2
Error Check
Error Check
ACK
Receiver
Timer
Timeout
Step 11
Frame Sequence No. Early Timeout
Description of Action/Interactivity
Text to be displayed
For all frames that cross the ‘error check’ & ‘expected
frame ‘ block & reach their position in receiver block,
Make the frame disappear & corresponding part of
o/p image (p1,p2,p3,p4) appear.
Also, make the ‘ack’ disappear after they reach the
last point in transmitter block.
Complete animation sequence is shown . Include above
instructions to the same.
Timer (circle) is used for time synchronization. However it
can be replaced with counter on the timing diagram.
1.
2.
3.
4.
5.
6.
7.
8.
Show T1 when frame is received
Show T2 for timeout
Show T3 for frame 1transmission
Show T4 for frame ‘0’ (duplicated) rejected!
Show T5 when ACK 1 (duplicate) rejected
Show T6 when frame 2 transmitted
Show T7 at the end
Show T8
T1: Frame sequence number ‘0’ received & accepted!
T2: Timeout! Frame ‘0’ retransmitted!
T3: ACK ‘1’ received! Frame 1 transmitted!
T4: Duplicate frame ‘0’ rejected!
T5: Duplicate ACK ‘1’ rejected!
T6: ACK ‘2’ received! Frame ‘2’ transmitted!
T7: The image accurately sent to destination!
T8:
Can we have accurate transmission using
frame sequence number even when early timeout
occurs followed by error in the next frame?
Step 12
Frames with Sequence No.: Early Timeout, Next Frame Error
cC
33
C
C
c
C
22
11
0c
C
C
00
ACK
ACK
No
No
Match
Match
Next Frame
Expected
Error Check
Error Check
Receiver
Transmitter
Timer
1
0
Timeout
Timeout
Step 12
Frames with Sequence No.: Early Timeout, Next Frame Error
Description of Action/Interactivity
Text to be displayed
For all frames that cross the ‘error check’ &
‘expected frame ‘ block & reach their position
in receiver block,
Make the frame disappear & corresponding
part of o/p image (p1,p2,p3,p4) appear.
Also, make the ‘ack’ disappear after they
reach the last point in transmitter block.
1.
2.
3.
4.
5.
6.
7.
Show T1 when frame is created & keep till it
is received( Keep as long as frame’0’
remains on screen)
Show T2 after timeout
Show T3 for frame 0 rejected
Show T4 for frame 1 at receiver
Show T5 when frame 2 sent
Show T6 when frame 2 thrown
Show T7 T8 at the end
T1: Frame with sequence number ‘0’ received & accepted!
T2: Timeout! Frame ‘0’ retransmitted!
T3: This is not expected frame!
T4:Error in frame ‘1’ !
T5: Ack is assumed to be for frame ‘1’ and frame ‘2’
transmitted
T6: This is not the expected frame
T7: In this way, the system gets stuck in the same loop
The image can not each destination accurately!
T8: Observe if using sequence numbers in frames as well as
acknowledgements can solve this problem!
Step 13
C
3
C
C
22
C
C
11
C
C
00
Frames and Acknowledgements with Sequence No.
1
2
3
4
41
3
2
Next Ack
Expected
Error Check
Transmitter
ACK
ACK
ACK
ACK
Next Frame
Expected
0
2
1
3
4
Error Check
Receiver
Step 13
Frames and Acknowledgements with Sequence No
Description of Action/Interactivity
Text to be displayed
For all frames that cross the ‘error check’ &
‘expected frame ‘ block & reach their
position in receiver block, Increment ‘Next
Frame Expected’ number
Make the frame disappear &
corresponding part of o/p image
(p1,p2,p3,p4) appear.
For all ’ack’ that cross the ‘error check’ & ‘expected
ack ‘ block & reach their position
make the ‘ack’ disappear
Increment .’expected ack no.
1.
2.
3.
4.
5.
6.
7.
8.
9.
Show T1 for frame 0
Show T2 for ack1
Show T3 for frame 1
Show T4 for ack 2
Show T5 for frame 2
Show T6 for ack 3
Show T7 for frame 3
Show T8 for ack 4
Show T9 and T10 at the end!
T1: Frame sequence number ‘0’ received & accepted!
T2: Ack received & accepted!
T3: Frame sequence number ‘1’ received & accepted!
T4: Ack received & accepted!
T5: Frame sequence number ‘2’ received & accepted!
T6: Ack received & accepted
T7: Frame sequence number ‘3’ received & accepted!
T8: Ack received & accepted
T9: The image reached destination successfully!
T10: Now, see if this mechanism is useful when there is early
timeout with next frame in error!
Step 14
Frames and Acknowledgements with Sequence No. : Early Timeout, NFE
No
No Match
Match
3
C
C
3
C
11
2
C
C
00
C
C
C
0
12
Next ACK
Expected
Error Check
1 ACK
Next Frame
Expected
01
Error Check
Receiver
Timeout
Step 14
Frames and Acknowledgements with Sequence No. : Early Timeout, NFE
Description of Action/Interactivity
Text to be displayed (numbered T1,T2
etc.)
For all frames that cross the ‘error check’ & ‘expected frame ‘
block & reach their position in receiver block,
Make the frame disappear & corresponding part of
o/p image (p1,p2,p3,p4) appear.
Also, make the ‘ack’ disappear after they reach the
last point in transmitter block.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Show T1 as frame’0’ received
Show T2 for timeout & 0frame 0 retransmit
Show T3 for frame 0 (duplicate) rejected
Show T4 for frame 1
Show T5 when ack 0 (duplicate) thrown
Show T6 for frame1 thrown from error check block
Show T7 from frame 1 retransmit
Halt here or Repeat early timeout case for frame 1,
2,3. but don’t repeat the frame error case
Show T8 at the end!
Show T9
T1: Frame sequence number ‘0’ received & accepted!
T2: Timeout! Frame. ‘0’ retransmitted
T3: This is not the expected frame! Discarded!
ACK sent!
T4: Frame 1 transmitted
T5: This is not the expected ACK! Discarded!
T6: Error detected in frame ‘1’! Rejected!
T7: Timeout! Frame ‘1’ retransmitted!
T8 : In spite of early timeout and also next frame being
in error, the image is finally received at the destination
accurately!
T9: The sequence numbers can be reduced to 1 bit!
Step 15
C
1
c
C
CC
00
11
C
C
00
Frames and Acknowledgements with 1 bit Sequence
No.
1
0
1
0
0
1
Next Ack
Expected
Error Check
Transmitter
ACK
ACK
ACK
ACK
Next Frame
Expected
1
0
Error Check
Receiver
Step 15
Frames and Acknowledgements with 1 bit Sequence
No
Description of Action/Interactivity
Text to be displayed
For all frames that cross the ‘error check’ &
‘expected frame ‘ block & reach their position
in receiver block, toggle ‘Next Frame
Expected’ number (0 to 1 or 1 to 0)
Make the frame disappear & corresponding
part of o/p image (p1,p2,p3,p4) appear.
For all ’ack’ that cross the ‘error check’ & ‘expected
ack ‘ block & reach their position
make the ‘ack’ disappear
toggle.’expected ack no.
1.
2.
3.
4.
5.
Show T1 as (frame’0’) received
Show T2 as frame1 received
Show T3 as frame 2 received
Show T4 as frame 3 received
Show T5 after animation over
T1: Frame sequence number ‘0’ received & accepted!
T2: Frame with sequence no. ‘1’ received and accepted
T3: Frame sequence number ‘0’ received & accepted!
T4: Frame with sequence no. ‘1’ received and accepted
T5: Image reached destination accurately
Interactivity Step 1
.Observe the detailed timing diagram of frame transmission.
Error
Check
Tf+Tp+2τ
t=0
C
R
C
τ
H
Ta
Ta+Tf+
Tp+2τ
Tf+τ
τ
Transmitter
Tp
τ
Tf
C
H ACK R
C
Error Check
Tf+Tp+τ
Ta+Tf+
Tp+τ
Receiver
RTT = 2τ + Tf + Ta + Tp
Glossary
Interactivity Step 2
Interactivity
Boundary Limit
Result
Instructions to
learner
Link to
‘Glossary’
Selectable link
(clickable)
When selected, link to ‘Glossary’
Refer to glossary
for meanings of
important terms
Seq
Description of Action/Interactivity
Instructions to animator
1
Header rectangle appears
2
CRC rectangle appears
Now Packet, Header & CRC should become one object i.e. frame
3
Start moving frame to right
4
As soon as frame it touches transmitter block’s boundary ( its
rightmost boundary touches channel’s left boundary);
Move frame through channel
Show left most arrow starting from top left
Timeline starts
Start all other arrows one by one.
X –coordinates of timeline & arrows
should be same at every instance
5
Frame reaches C2
1st arrow completes
X –coordinates of timeline & arrow
should be same at every instance
6
Frame moves further into receiver
Other arrows complete one by one
Interactivity Step 2
Seq
Description of Action/Interactivity
Instructions to animator
7
Frame reaches last position. All frame arrows complete.
8
ACK starts moving to left.
9
As soon as ACK touches receiver block’s boundary ( its left
boundary touches channel’s right boundary);
Move ACK through channel
Show left most ‘ACK’ arrow starting from down left
Start all other arrows one by one.
X –coordinates of timeline & arrows
should be same at every instance
10
‘ACK’ reaches transmitter boundary
1st arrow completes
X –coordinates of timeline & arrow
should be same at every instance
11
‘ACK’ moves further into transmitter
Other arrows complete one by one
12
‘ACK’ reaches last position. All frame arrows complete.
Interactivity Step 2
When this image is transmitted using simple stop and wait ARQ, an error is detected in the 2nd frame.
The round trip time (RTT) for each frame is 100.
Three options of timeout duration (80,100,120) are available.
Observe the transmission using all 3 values one by one.
Does this value affect the image reaching destination?
According to you, which value gives maximum throughput with accurate transmission?
Timeout duration
80
100
120
Error Check
Error Check
Transmitter
Receiver
Transmitter
Receiver
Interactivity Step 2
Interactivity
Boundary
Limit
Result
Instructions to
learner
Selection of
timeout value
List of values
User selects a value
Select a value for
timeout duration.
Play button
Activate when
values
selected
The animation will start . It will take the
time value depending upon user entered
values
Click on play to
view animation
80
Show animation as early timeout/ early
timeout with next frame error case
100
Show animation like ideal case/ frame
error
120
Show animation like ideal case/ frame
error with late retransmission
Glossary button content
τ
(Propagation
Delay): Time taken by a single bit to reach from one
node to the other, say from source to destination
Tf (Transmit Duration of the frame): Time required to put all frame bits on
the channel.
Ta (Transmit duration of the ACK): Time required to put all ACK bits on the channel.
Tp (Processing delay): Delay between the reception of the frame at the
destination and the start of the ACK transmission.
RTT (Round Trip Time): Time taken to transmit a frame and receive an
acknowledgement when no errors are introduced by the channel.
Round-trip time (RTT)= Propagation delays + Transmit duration + Processing delays
RTT = 2τ + Tf + Ta + Tp
Questionnaire Q 1
A timer is started at the beginning of frame transmission. What should
be the duration for timeout?
Timeout duration > Round Trip Time (RTT)
Timeout duration < Round Trip Time (RTT)
Instructions to animator:
1st answer (in green) is correct.
Show positive feedback if correct answer is selected.
Give negative feedback for wrong answer selected.
Use same interactivity for all questions ( either the suggested animation or radio button etc.)
Questionnaire Q 2
Observe the images. The source image is transmitted in 4 consecutive packets
without sequence numbers. However, the image generated at destination is
shown here. It doesn’t match with the source image exactly.
Which sequence of events would have caused this?
Source image
4 packets transmitted
Error detected in ACK and next frame
Early timeout and error detected in retransmitted frame
Error detected in ACK
Early timeout and error detected in next frame
Instructions to animator:
4th is correct answer.
Show positive feedback if correct answer is selected.
Give negative feedback for wrong answer selected.
Destination image
Questionnaire Q 3
When frames and acknowledgements are sent on a noiseless channel
with sequence numbers and timeout duration is less than half of RTT;
Every frame will be transmitted only once.
Every frame will be transmitted at least thrice.
1st frame will be transmitted twice.
1st frame will be transmitted at least thrice and next frames only once..
Instructions to animator:
2nd
answer (in green) is correct.
Show positive feedback if correct answer is selected.
Give negative feedback for wrong answer selected.
Use same interactivity for all questions ( either the suggested animation or radio button etc.)
Questionnaire Q 4
The following image is transmitted in four parts as shown; using a mechanism for
comparing consecutive frame content. How would received image look?
a
b
c
d
Instructions to animator:
‘d’ is correct answer.
Show positive feedback if correct answer is selected.
Give negative feedback for wrong answer selected.
Use same interactivity for all questions ( either the suggested animation in Q1 or radio button etc.)
Questionnaire Q 5
Match the problem with appropriate mechanism used to solve the problem.
A. Frame sequence number
1. Frame received with error
2. A frame duplicated and next frame lost
3. Duplicate frames received
1-A, 2-B, 3-C
1-C, 2-B, 3-A
1-B, 2-C, 3-A
1-B, 2-A, 3-C
B. Retransmit frame
C. Frame and ACK sequence number
Instructions to animator:
‘3rd option (in green) is correct answer.
Show positive feedback if correct answer is selected.
Give negative feedback for wrong answer selected.
Use same interactivity for all questions ( either the
suggested animation in Q1 or radio button etc.)
References
1. Alberto Leon-Garcia, Indra Widjaja, Communication Networks: Fundamental Concepts and
Key architectures, Tata McGraw-Hill, 2nd edition, 2004.
2. Andrew S. Tanenbaum, Computer networks, Pearson Prentice Hall, 4th edition,2003.
Animation Design