Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
2473023
IS 504 – HW 2
1.
a. The stop and wait protocol, time-space diagram:
X Y
X time
t=0 s, send time
pkt a pkt a t=1 s, receives pkt
ack0 a, sends ack0
t=2 s, receives
pkt b
ack0 and send x
pkt b
Timeout,t=7 s,
pkt b
resend pkt b
t=8 s, receives pkt
t=9 s, receives ack1 b, sends ack1
ack1 and sends pkt c
pkt c t=10 s, receives
x ack2 pkt c, sends ack2
Timeout,t=14 s,
pkt c
resend pkt c t=15 s, ignore
duplicate pkt c ,
t=15 s, receives ack2
sends ack2
ack2
X Y
[a,?,?], send pkt a time X time
[a,b,?], send pkt b pkt a, sq=0
t=0
[a,b,c], send pkt c pkt b, sq=1
pkt c, sq=2 t=1 s, rcv pkt a, send ack0
t=1 s, rcv pkt b, send ack1
t=1 s, rcv pkt c, send ack2
[b,c,d], rcv ack0, send pkt d, ack0 ack1 x
ack2
Timer starts
t=2 s, rcv ack2, send pkt e pkt d, sq=3
x
(X knows that up to ack2 pkt e, sq=4
including ack2, all packets are
t=3 s, discard pkt e, send ack2
received by Y.
ack2
t=4 s, rcv ack2
X Y
[a,?,?], send pkt a time X time
[a,b,?], send pkt b pkt a, sq=0
t=0
[a,b,c], send pkt c pkt b, sq=1
pkt c, sq=2 t=1 s, rcv pkt a, send ack0
t=1 s, rcv pkt b, send ack1
t=1 s, rcv pkt c, send ack2
ack0 ack1 x
[b,c,d], rcv ack0, send pkt d ack2
2. a.
x1= 100000 m, r1= 1*10^6 bps, c=2*10^8 m/sec
LA= 100 bytes = 800 bits
LB= 25 bytes = 200 bits
n= number of packets = 10000
A B
t=0 s,send pkt 1 time X time
𝑥1 𝐿𝐴 𝑥1 𝐿𝐵
d=( + )+( + ) delay time of transmission of one packet from A to
𝑐 𝑟1 𝑐 𝑟1
B and transmission of one acknowledge packet from B to A.
and 9999 packets will be delivered= 9999*2 = 19998 msec and the last packet
100000 800
delay time is ( + 6 )= 1.3 msec. Then total time is 19998+1.3=19999,3
2∗108 10
msec.
b. The minimum window size should be:
𝑑 800
Wmin = ( ) where d=2 msec and d_trans= = 0.8 𝑚𝑠𝑒𝑐
𝑑_𝑡𝑟𝑎𝑛𝑠 106