0% found this document useful (0 votes)
31 views

CommNetw Tut9 Solution

The document compares Stop-and-Wait, Go-Back-N, and Selective Repeat ARQ protocols for communication between two stations. It provides the time diagrams and sliding windows for transmitting the first three frames for each protocol assuming an error-free channel. It then calculates the total time required to deliver all frames, the effective transmission rate, and transmission efficiency for each protocol without errors. Finally, it considers the first frame being received in error for each protocol, provides the modified time diagrams and calculations, and finds the new transmission efficiency.

Uploaded by

Mahamad Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

CommNetw Tut9 Solution

The document compares Stop-and-Wait, Go-Back-N, and Selective Repeat ARQ protocols for communication between two stations. It provides the time diagrams and sliding windows for transmitting the first three frames for each protocol assuming an error-free channel. It then calculates the total time required to deliver all frames, the effective transmission rate, and transmission efficiency for each protocol without errors. Finally, it considers the first frame being received in error for each protocol, provides the modified time diagrams and calculations, and finds the new transmission efficiency.

Uploaded by

Mahamad Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Faculty of Information Engineering & Technology (IET)

Course: Communication Network (NETW501); Winter 2015


Eng. Hana Hesham
Eng. Mohamed Atef

Sheet 9 (Solution)

 Problem “1”:
Compare Stop-&-Wait, Go-Back-2 and Selective Repeat (Ws=Wr=2) ARQ Protocols for
communication between two stations A and B in each part of the problem given that:

The message size is 10KB, transmission rate is 1Mbps. The frame has fixed size 1500B
(including headers). The header size is 300B. The ACK size is also 300B. The processing
time is 10 µsec. in each machine. Assume electrical signals propagate at a speed of
m/sec. and the distance of the physical channel is 500m.

I. Plot the time diagram and sliding window(s) within first three frames then
find the total time required to deliver all frames assuming error free channel.

II. The Effective transmission rate (Reff).

III. Assuming error free channel, find the transmission efficiency (ηNo Error).

IV. If the first frame received in error and Tout = 50msec, plot the time diagram
and sliding window(s) within first three frames, then find the transmission efficiency.
Solution
Msg. = 10 * 103 B
R = 1*106 bps
Lf (data + H) = 1500 B
Lh = 300 B
LACK = 300 B
Tproc. = 10 µsec.
vp = 2 * 108 m/sec
Distance = 500 m
𝑀𝑠𝑔. 10 ∗ 103
no. of frames = = = 8.3  9
(𝐿𝑓−𝐿ℎ) 1200
500
Tprop = = 2.5 µsec.
2 ∗ 108
1500 ∗ 8 300 ∗ 8
Tframe = = 12 msec. Tack = = 2.4 msec.
1 ∗ 106 1 ∗ 106
To(deliver 1 frame) = 2Tprop + 2Tproc + Tframe + Tack
= 2(2.5*10−6 ) + 2(10*10−6 ) + (12*10−3 ) + (2.4*10−3 )
= 14.425 msec.
Ws ≤ 2m -1 Ws +Wr≤ 2m
Stop-&-Wait Go-Back-2 2 +1≤ 2m Selective Repeat 2+2≤ 2m
m=2 m=2
I. Assume error free channel, I. Assume error free channel, I. Assume error free channel,

Tf(deliver all frames)


=no. of frames *To Tf(deliver all frames)= Tf(deliver all frames)=
= 9 * (14*10−3 ) =(no. of frames-1)*Tframe +To =(no. of frames-1)*Tframe + To
=129.825 msec. =8(12*10−3 )+ (14*10−3 ) =8(12*10−3 )+ (14*10−3 )
=110.25 msec. =110.25 msec.
Go-Back-2 Selective Repeat

II. Reff. = II. Reff. = II. Reff. =


no.of data bits/all frames no.of data bits/all frames no.of data bits/all frames
time to deliver all frames time to deliver all frames time to deliver all frames
no.of frames ∗ (Lf−Lh) no.of frames ∗ (Lf−Lh) no.of frames ∗ (Lf−Lh)
= = =
Tf(deliver all frames) Tf(deliver all frames) Tf(deliver all frames)
9 ∗ (1200 ∗ 8) 9 ∗ (1200 ∗ 8) 9 ∗ (1200 ∗ 8)
= = =
9 ∗ To 8∗Tf+To 8∗Tf+To
= 665.51 kbps = 783.67 kbps = 783.67 kbps

R𝐞𝐟𝐟 R𝐞𝐟𝐟 R𝐞𝐟𝐟


III. ηno error = = 0.66551 III. ηno error = = 0.78367 III. ηno error = = 0.78367
𝐑 𝐑 𝐑

IV. Assume 1st frame in error; IV. Assume 1st frame in error; IV. Assume 1st frame in error;
Tout = 50 msec. Tout = 50 msec. Tout = 50 msec.

(𝐋h + 𝐋f) ∗ 9
Reff=
𝐓out+9To (𝐋h + 𝐋f) ∗ 9
(1200∗8) ∗ 9 Reff=
= 𝐓out+(8Tf+To) (𝐋h + 𝐋f) ∗ 9
(50∗10−3 )+(129.825∗10−3 ) (1200∗8) ∗ 9
Reff=
𝐓𝐟+𝐓𝐨+𝐓𝐨+(𝟔𝐓𝐟+𝐓𝐨)
= 480.467 kbps = (50∗10−3)+(110.25∗10−3 (1200∗8) ∗ 9
) =
Reff 480.467∗ 103 127.275∗10−3
η= = =0.486 = 539.157 kbps
R 1∗ 106 Reff 539.157∗ 103 = 678.845 kbps
η= = = 0.539 Reff 678.84∗ 103
R 1∗ 106 η= = = 0.679
R 1∗ 106
 Problem “2”:
A 64-kilobyte message is to be transmitted from the source to the destination. The network limits packets
to a fixed size of two kilobytes, and each packet has a 32-byte header. The transmission lines in the
network have a bit error rate of 10−6 , and Stop-and-Wait ARQ is used in each transmission line.

How long does it take on average to get the message from the source to the destination? Assume that
the signal propagates at a speed of 2x108 m/second.

Solution:
Stop-and-Wait ARQ
File size = 64 kB
Pkt size = 2 kB (including 32 B header)
Bit Error Rate (BER) = 10-6
Signal Speed = 2x108 m/second
Neglect Tproc. And Ta (Tt of ACK)

 Initially, assume an error free channel.

1000𝑥103 2𝑥103 𝑥 8
Tprop. = = 0.005 𝑠𝑒𝑐 , Tf ( Tt of frame) = = 0.01 𝑠𝑒𝑐 Tf = 2 Tprop.
2𝑥108 1.5 𝑥106

64 𝑥103
No. of Packets (𝑁𝑝𝑘𝑡 ) = 2𝑥103 −32 = 33 𝑝𝑎𝑐𝑘𝑒𝑡𝑠

Calculating the total time at the destination: Ttotal = 3 Tprop. + 2 Tf + (𝑁𝑝𝑘𝑡 -1) (2*Tprop. + Tf) = 0.675 sec.

 For a channel with errors:

If probability of errored frame = PF, then the probability of correct frame = (1- PF).
Let’s say that for every 10 frames there is only 1 correct frame, so probability of a correct frame = 1/10.
Then, to ensure a correct transmission we have to send 10 frames. Leading to an Average number of
1
transmissions = 1/10 = 10. So,
1
Average number of transmissions = (1−𝑃
𝐹)
𝑡𝑜
Average transmission time = (1−𝑃𝐹 )
To get PF:
nf
Pf = 1- (1- BER) , where nf is the number of bits in the frame.

You might also like