example problems
TRANSCRIPT
-
1. Exerciseproblem4.5(Tanenbaumsbook)2. Exerciseproblem4.6(Tanenbaumsbook)3. Exerciseproblem6.5(LeonGarciasbook)4. Exerciseproblem6.8(LeonGarciasbook)
(Theproblemstatementsweregivenintheclassandsolutionsdiscussedindetail)(ThefollowingproblemsarefromthenotesofProf.SKB)
5. Considerthesimplesystemshownwhereastreamofdata istobesentfromAtoBusingpackets.For
eachpacket,anoverheadofhbitswillberequiredandthesewillbeaddedtotheLbitsofdata inthepacket.The linksuffersfromabiterrorprobabilityofpandapacketwillbeconsideredtobe inerror ifanyofitsdatabitsoroverheadbitsisinerror.ApacketinerrorisimmediatelyretransmittedandwillberetransmittedagainuntilitreachesBwithouterrors.
(a) Given L, h and p,what is the efficiencywithwhich the link is being used? [You can defineefficiencyasL/(Averagetotalnumberofbitsthathavetobesentforeachpacket).Remembertotake intoaccountboththeoverheadbitsandtheaveragenumberoftimesapackethastoberetransmittedbecauseoferrors.]
(b) WhatwillbetheoptimumchoiceofLgivenhandp?Assumethatp
-
6. SupposeGoBackNARQ isusedovera1.5Mbpsgeostationarysatellite linkbetweenanearthstationandthesatellite,wherethedistancebetweenthesatelliteand theearth is36000km.Assumethat250byteframesareusedinthedatalinkcontrol.
(a) Whatisthemaximumrateatwhichinformationcanbetransmittedoverthelinkifa7bit sequencenumber field isused? (Note thatonenode is theearth stationand theotheristhesatellite.)
(b) Redo (a)assuming that the satellite link isusedbetween twoearth stationswith thesatelliteactingasarepeaterwithan8bitdelay.
(c) Redo (a)assuming that the satellite link isusedbetween twoearth stationswith thesatelliteactingasarepeaterwithan8bitdelaybutwheretheGoBackNARQprotocolisonewhichusesan11bitsequencenumberfield.
Solution(a)R=1.5Mbps
FrameSizenf=250bytes=2000bitsFrameDurationtf=2000/(1.5x10
6)=1.33msPropagationDelaybetweenearthandsatellite=tprop=36x10
6/(3x108)=120msThemaximuminformationrateisachievedwhenthereisnoerror,andhencenoretransmissionWitha7bitsequencenumberfield,thenumberofframesinacycleN=271=127Forthis, tcycle=minimumtimetotransmitagroupofNpackets
=tf+2tprop=241.33ms n=No.ofbitstransmittedinacycle=N*nf=127*2000=254000bits
Therefore Rmax=N*nf/tcycle=254000/(241.33x103)=1.052Mbps
(b)R=1.5Mbps BitDuration=0.00067msFrameSizenf=250bytes=2000bitsFrameDurationtf=2000/(1.5x10
6)=1.33msEffectiveProp.Delaybetweenthetwoearthstations=tprop=2x120+8x(0.00067)ms240msThemaximuminformationrateisachievedwhenthereisnoerror,andhencenoretransmissionWitha7bitsequencenumberfield,thenumberofframesinacycleN=271=127Forthis, tcycle=minimumtimetotransmitagroupofNpackets =tf+2tprop=481.33ms n=No.ofbitstransmittedinacycle=N*nf=127*2000=254000bitsTherefore Rmax=N*nf/tcycle=254000/(481.33x10
3)=0.5277Mbps(c)R=1.5MbpsBitDuration=0.00067msFrameSizenf=250bytes=2000bitsFrameDurationtf=2000/(1.5x10
6)=1.33msEffectiveProp.Delaybetweenthetwoearthstations=tprop=2x120+8x(0.00067)ms240msThemaximuminformationrateisachievedwhenthereisnoerror,andhencenoretransmissionWitha11bitwindow,thenumberofframesinacycleN=2111=2047
-
Timetakentotransmit2047frameswouldbe2047x2/1.5ms=2729msSincethisismorethantcycle=tf+2tprop=481.33ms,thechannelwouldbeusedwith100%efficiencyandRmaxwillbe1.5Mbps(sameasthebitrateofthechannel)
3. NodesAandBareonthesame10MbpsEthernetsegmentandthepropagationdelaybetweenthem is225bit times.SupposenodeAbegins transmissionand thatbeforeA finishes,Balsostarts transmitting a frame. As per the Ethernet specifications, the minimum frame size is512+64bittimes(64bytesframewith64bitpreambleandstartofframeindicator).
(a)WouldAfinishtransmissionbeforeitdetectsthatBhastransmitted?(b)WhatistheslottimeofthissystemassumingthatAandBareattheextremeendsofasinglerepeaterlessEthernetsegment? (c)For thecaseof (b),whatwouldbe thephysicalcable lengthbetweenAandBassuming
thatthevelocityofsignalpropagationinthecabletobe2x108m/s?Solution(a)SupposeAstartstransmittingattimet=0andconsiderthatwearemeasuringtimeinunitsofbittimes.WeconsidertheworstcasewhenA istransmittingaminimumsizedframe. Itwillthenfinish itstransmissionattimet=576.
ForB,theworstcasescenariowouldbethatitstartstransmittingattimet=224(i.e.justbeforeithearsAs
transmission).BstransmissionwillreachAattimet=224+225=449.Since449