ECS 152A Computer Networks

Assignment II
Due: 10/26/07 by pm!
Q 1)
a) Why do we need an unreliable UDP service when we have a reliable TCP service?
b) What advantae does the !elective "e#eat #rotocol have over the $o %ac& '
#rotocol? [2]
c) ()#lain the conce#t o* *ast retrans+it in the TCP #rotocol, [-]
a) .* we incorrectly esti+ate the ti+e out interval/ it can cause #roble+s in our #ac&et
trans+ission, .* the ti+e out interval 0"T1) is too s+all/ then ti+e outs will occur very
*re2uently and the sender will end u# retrans+ittin a lot o* #ac&ets unnecessarily, This
will add to the conestion in the networ&, [1]
.* the "T1 is lare/ then in the event o* #ac&et loss/ the sender will wait *or a lon ti+e
be*ore retrans+ittin/ thus slowin down the e**ective rate, [1]

b) .* in a #articular connection/ the window si3e and the bandwidth4delay #roduct are
both lare/ +any #ac&ets can be in the #i#eline, 5 sinle #ac&et error can thus cause $%'
to retrans+it a lare nu+ber o* #ac&ets/ +any unnecessarily, 5s the #robability o*
channel errors increases/ the #i#eline can beco+e *illed with these unnecessary
retrans+issions, !elective re#eat avoids unnecessary retrans+issions by havin the
sender retrans+it only those #ac&ets that were received in error at the receiver, [2]
c) .* the ti+e out interval is too lon/ then the sender will wait too lon be*ore
retrans+ittin a #ac&et causin larer delays, !ince a sender sends a lare nu+ber o*
se+ents bac& to bac& and one se+ent ets lost/ there will be +any bac& to bac&
du#licate 5C6s, .* the sender receives three du#licate 5C6s *or the sa+e data #ac&et
be*ore its ti+er e)#ires/ it will send the #ac&ets aain be*ore the ti+e out, This is *ast
Q 2)
a) Draw the 7!8 *or the receiver side o* #rotocol rdt -,9, [-]
a) Same as FSM for rdt 2.2 receiver in the text book.
b) $ive a trace o* the o#eration o* #rotocol rdt -,9 when data #ac&ets and
ac&nowlede+ent #ac&ets are arbled, 0!i+ilar to *i, -,1: in the te)t boo&) [-]

;999 6+ 1999 6+
.n the iven setu#/ 5 sends +essaes to % and % *orwards the+ to C/ both usin sto#
and wait #rotocol, Data rate between 5 and % is 199 6b#s, Pac&et lenth is 1999 bits,
The #ro#aation delay is < +icroseconds = 6+, The 5C6 #ac&ets are neliible in
lenth, There are no errors and losses,
What would be the data rate between % and C such that % is not overloaded 0arrival
rate at % is less than rate at which % can send the #ac&ets? [;]
B receives a packet every 30 ms.
So, B must send a packet in ess than 30 ms to not be overoaded.
!F " is the transmission time, then " # $ % 30
" % 2$ &' (000)* % 2$
&' * ' +0 ,bps -+.
/herefore, the rate from B to 0 shoud at east be +0 ,bps.
Q -) !tate whether the *ollowin are true or *alse, $ive reason i* *alse, [-]
a) TCP uses cu+ulative ac&nowlede+ent,
b) >ost 5 sends >ost % a *ile over a TCP connection, >ost % has no data to send to
>ost 5, >ost % will not send ac&nowlede+ents to >ost 5 because >ost % cannot
#iybac& the ac&nowlede+ents on data,
c) .n selective re#eat/ the receiver will not ac&nowlede a correctly received #ac&et
i* it is out o* order,
a) /rue
b) Fase.
5 % C
c) Fase.