Vous êtes sur la page 1sur 5

COMP2330 Data Communications and Networking

Written Assignment 1
Sample Solutions
1. Which of the OSI layers handles each of the following: (a) Dividing the transmitted
it stream into frames. () Determining which route through the sunet to use.
(1! mar"s)
#ns:
(a) Data $in" $ayer
() %etwor" $ayer
&. #n image is 1!&'()*+ pi(els with , ytes-pi(el. #ssume the image is uncompressed.
.ow long does it ta"e to transmit it over a /*0"ps modem channel1 Over a 102ps
cale modem1 Over a 1!02ps 3thernet1 Over 1!!02ps 3thernet1 (1! mar"s)
#ns:
4he si5e of the image is 1!&' ( )*+ ( , ( + 6 1++)',*+ its.
7or a /*0"ps modem8 it ta"es 1++)',*+-/*!!!

,,) seconds.
7or a 102ps cale modem8 it ta"es 1++*',*+-1!
*

1+.9 seconds.
7or a 1!02ps 3thernet8 it ta"es around 1.+9 seconds.
7or a 1!!02ps 3thernet8 it ta"es around !.19 seconds.
,. # digital signaling system is re:uired to operate at 9*!!ps. (1! mar"s)
(a) If a signal element encodes a '0it word8 what is the minimum re:uired andwidth
of the channel if we assume a noise free system1
() ;epeat part (a) for the case of +0it words.
#ns:
<ecause we assume noise free8 we can use %y:uist=s e:uation: > 6 &< log
&
2.
We have > 6 9*!! ps
(a) log
2
2 6 '8 ecause a signal element encodes a '0it word. (So8 actually 261*).
4herefore8 > 6 9*!! 6 &< '8 and we have < 6 1&!! .5
(b) 9*!! 6 &< +8 and so < 6 *!! .5
'. 4he following waveform elongs to a 2anchester encoded inary data stream.
Determine the eginning and end of it periods (i.e.8 e(tract cloc" information) and
give the data se:uence. (1! mar"s)
#ns:
With 2anchester8 there is always a transition in the middle of a it period.
1 1 1 0 0 1 1 0 1 0
/. We have a message D 6 1!1!!!11!1 (1! its). ?sing a predetermined divisor @ 6
11!!11 (* its)8 please find the 7>S (frame chec" se:uence) using >;> techni:ue.
(1/
mar"s)
#ns:
4he 7>S is !111!.
;emar": if your answer is A111!B8 you will e wrong ecause the length of 7>S is
e(actly 5 bits8 i.e.8 one it less than the length of the divisor @.
1 ! 1 ! ! ! 1 1 ! 1 ! ! ! ! ! 1 1 ! ! 1 1
1 1 ! ! 1 1 1 ! 1 !
1 1 ! ! 1 1
1 1 ! 1 1 1
1 1 ! ! 1 1
1 ! ! 1 ! 1
1 1 ! ! 1 1
1 ! 1 1 ! !
1 1 ! ! 1 1
1 1 1 1 1 !
1 1 ! ! 1 1
1 1 ! 1 ! !
1 1 ! ! 1 1
! 1 1 1 !
*. Isn Sliding0Window flow control8 suppose k its are used to specify the se:uence
numers of frames. It can support the range of se:uence numers from ! to &
"
01.
3(plain8 y an e(ample8 why the ma(imum window si5e can not e(ceed &
k
01.
#ns: We consider the Co0ac"0% scheme which is ased on sliding window flow control.
Suppose "6,8 i.e.8 a ,0it se:uence numer is used to denote the frames. Suppose a
sender sends frame ! and gets ac" an ;;1 from the receiver. Suppose window si5e is
&
,
6+. 4he sender continues to send frames 18 &8 ,8 '8 /8 *8 )8 ! in its window and get
another ;;1. .owever8 the sender does not "now the meaning of this ;;1. It could mean
that all eight frames are received correctly and the ;;1 is a cumulative
ac"nowledgement. It could also mean that all eight frames are damaged or lost in
transmit8 and the receiver is repeating its previous ;;1. 4herefore8 window si5e should
e less than &
,
.
). # channel has a data rate of R ps and a propagation delay of t s-"m. 4he distance
etween the sending and receiving nodes is L "m. %odes e(change fi(ed0si5e frames
of B its.
What is the propagation time1
What is the frame transmission time1
.ow to set the window si5e to achieve the ma(imum channel utili5ation in the Sliding0
Window flow control1 (1/ mar"s)
#ns:
@ropagation time (in seconds): tD$
7rame transmission time (in seconds): <-;
In order to achieve the ma(imum channel utili5ation8 the window si5e should e at least
&
1
tLR
B

+


. 4he notation
x

means the smallest integer greater than or e:ual to x.
+. Suppose Selective0;eEect #;F is employed in error control. 3(plain8 y e(ample8
how to deal with the case that ;; message is damaged.
#ns:
Suppose receiver gets frame i and replies sender ;;0(iG1) which is lost or damaged.
If sender receives the ne(t ac"nowledgement8 i.e.8 ;;0(iGn)8 efore its timer e(pires8
transmission resumes without errors. If sender=s timer e(pires8 it sends a re:uest to
receiver as"ing for instructions. 4he receiver receiving this re:uest will send sender a
new ;; which indicates the ne(t frame it e(pects.
9. 3(plain the asic idea of the Statistical 4ime Division 2ultiple(ing.
#ns:
In statistical 4D28 time slots are dynamically assigned to different source ased on
demand8 such that channel utili5ation is improved. .owever8 it re:uires to provide
addresses in the time slots.
1!. # disadvantage of the contention approach for $#%s is the capacity wasted due to
multiple stations attempting to access the channel at the same time. Suppose that time is
divided into discrete slots8 with each of N stations attempting to transmit with proaility
p during each slot. 4here is no collision detection. What fraction of slots are wasted due
to multiple simultaneous transmission attempts1
#ns:
4he fraction of slots wasted due to multiple transmission attempts is e:ual to the proaility that
there will e & or more transmission attempts in a slot.
@roH& or more attemptsI 6 1 J @roHno attemptsI J @roHe(actly 1 attemptI
6 1 J (1 J p)
%
J %p(1 J p)
%J1

&
1
. 7or p0persistent >S2#8 consider the following situation. # station is ready to transmit
and is listening to the current transmission. %o other station is ready to transmit8 and
there will e no other transmission for an indefinite period. If the time unit used in the
protocol is T8 show that the average numer of iterations of step 1 of the protocol is 1-p
and that therefore the e(pected time that the station will have to wait after the current
transmission is T(1-p J 1).
.int: use the e:uality

=
1
&
1
) 1 (
1
i
i
X
iX
.
11. What are the main differences etween hu8 ridge8 and lay0& 3thernet switch1
#ns:
.u is a layer01 device. 4he signal is roadcasted to all the stations connected to the hu.
4he andwidth is shared y all the stations ecause at any time only one station can send
out signals successfully.
<ridge is a layer0& device. It is used to connect different $#%s. It can also improve the
performance over a single $#% ecause different communications can happen
simultaneously as long as there is only one communications within each $#%. # ridge
uses store0and0forward scheme to transfer frames among different $#%s.
$ayer0& 3thernet switch is also a layer0& device. It is a multi0port ridge and is usually
implemented y hardware. # switch can use either store0and0forward or cut0through.
1&. Why cannot Wireless $#% use >S2#->D1
#ns:
4here are three reasons that Wireless $#% doesn=t use A>ollision DetectionB: (1) it is not
practical on wireless networ"K (&) the dynamic range of signals is very largeK (,)
transmitting station cannot distinguish incoming wea" signals from noise and effects of
own transmission
1
4his is a difficult prolem.

Vous aimerez peut-être aussi