computer network课后答案1.docx
《computer network课后答案1.docx》由会员分享,可在线阅读,更多相关《computer network课后答案1.docx(8页珍藏版)》请在冰豆网上搜索。
computernetwork课后答案1
Chapter1ReviewQuestions
1.Thereisnodifference.Throughoutthistext,thewords“host”and“endsystem”areusedinterchangeably.EndsystemsincludePCs,workstations,Webservers,mailservers,Internet-connectedPDAs,WebTVs,etc.
3.Anetworkingprogramusuallyhastwoprograms,eachrunningonadifferenthost,communicatingwitheachother.Theprogramthatinitiatesthecommunicationistheclient.Typically,theclientprogramrequestsandreceivesservicesfromtheserverprogram.
22.application-layermessage:
datawhichanapplicationwantstosendandpassedontothetransportlayer;transport-layersegment:
generatedbythetransportlayerandencapsulatesapplication-layermessagewithtransportlayerheader;network-layerdatagram:
encapsulatestransport-layersegmentwithanetwork-layerheader;linklayerframe:
encapsulatesnetwork-layerdatagramwithalink-layerheader.
23.Routersprocesslayers1through3.(Thisisalittlebitofawhitelie,asmodernrouterssometimesactasfirewallsorcachingcomponents,andprocesslayerfouraswell.Linklayerswitchesprocesslayers1through2.Hostsprocessallfivelayers.
Chapter1Problems
Problem6.
admsprop=/seconds.
bdLRtrans=/seconds.
cd(m/sL/Rendtoend=+?
?
seconds.
dThebitisjustleavingHostA.
eThefirstbitisinthelinkandhasnotreachedHostB.
fThefirstbithasreachedHostB.
gWant
(2.510893
2810
1008
3≠=
≠
=S=
R
mLkm.
Problem10.
IttakesLN/RsecondstotransmittheNpackets.Thus,thebufferisemptywhenabatchofNpacketsarrive.
ThefirstoftheNpacketshasnoqueueingdelay.The2ndpackethasaqueueingdelay
ofL/Rseconds.Thenthpackethasadelayof(n?
1L/Rseconds.Theaveragedelayis
2
(1
2
1(1/111(1
10
?
=
?
┣?
=┣=?
==
N
R
NNL
RN
nL
RN
nLRL
N
N
n
N
n
.
Problem11.
aThetransmissiondelayisL/R.Thetotaldelayis
I
LR
R
L
RI
IL
?
+=
?
1
/
(1
bLetx=L/R.
Totaldelay=
ax
x
1?
Problem14.
a40,000bits
b40,000bits
cthebandwidth-delayproductofalinkisthemaximumnumberofbitsthatcanbein
thelink
d1bitis250meterslong,whichislongerthanafootballfield
es/R
Problem18.
a150msec
b1,500,000bits
c600,000,000bits
Chapter2ReviewQuestions
1.TheWeb:
HTTP;filetransfer:
FTP;remotelogin:
Telnet;NetworkNews:
NNTP;email:
SMTP.
5.No.Asstatedinthetext,allcommunicationsessionshaveaclientsideandaserverside.InaP2Pfile-sharingapplication,thepeerthatisreceivingafileistypicallytheclientandthepeerthatissendingthefileistypicallytheserver.
6.TheIPaddressofthedestinationhostandtheportnumberofthedestinationsocket.
10.Theapplicationsassociatedwiththoseprotocolsrequirethatallapplicationdatabereceivedinthecorrectorderandwithoutgaps.TCPprovidesthisservicewhereasUDPdoesnot.
22.WiththeUDPserver,thereisnowelcomingsocket,andalldatafromdifferentclientsenterstheserverthroughthisonesocket.WiththeTCPserver,thereisawelcomingsocket,andeachtimeaclientinitiatesaconnectiontotheserver,anewsocketiscreated.Thus,tosupportnsimultaneousconnections,theserverwouldneedn+1sockets.Chapter2Problems
Problem1.
aF
bT
cF
dF
Problem4.
Applicationlayerprotocols:
DNSandHTTP
Transportlayerprotocols:
UDPforDNS;TCPforHTTP
Problem9.
aThetimetotransmitanobjectofsizeLoveralinkorrateRisL/R.TheaveragetimeistheaveragesizeoftheobjectdividedbyR:
┐=(900,000bits/(1,500,000bits/sec=.6sec
Thetrafficintensityonthelinkis(1.5requests/sec(.6msec/request=.9.Thus,the
averageaccessdelayis(.6sec/(1-.9=6seconds.Thetotalaverageresponsetimeistherefore6sec+2sec=8sec.
bThetrafficintensityontheaccesslinkisreducedby40%sincethe40%oftherequestsaresatisfiedwithintheinstitutionalnetwork.Thustheaverageaccessdelay
is(.6sec/[1쭯(.6(.9]=1.2seconds.Theresponsetimeisapproximatelyzeroiftherequestissatisfiedbythecache(whichhappenswithprobability.4;theaverageresponsetimeis1.2sec+2sec=3.2secforcachemisses(whichhappens60%ofthetime.Sotheaverageresponsetimeis(.4(0sec+(.6(3.2sec=1.92seconds.Thustheaverageresponsetimeisreducedfrom8secto1.92sec.Chapter3ReviewQuestions
1.Sourceportnumberyanddestinationportnumberx.
2.AnapplicationdevelopermaynotwantitsapplicationtouseTCP’scongestioncontrol,whichcanthrottletheapplication’ssendingrateattimesofcongestion.Often,designersofIPtelephonyandIP
videoconferenceapplicationschoosetoruntheirapplicationsoverUDPbecausetheywanttoavoidTCP’scongestioncontrol.Also,someapplicationsdonotneedthereliabledatatransferprovidedbyTCP.
4.afalsebfalsectruedfalseetrueffalsegfalse
5.a20bytesbacknumber=90
Chapter3Problems
Problem1.
sourceportnumbers
destinationportnumbers
aA∪S46723
bB∪S51323
cS∪A23467
dS∪B23513
eYes.
fNo.
Problem3.
11000101
01110000
01010101
+
00010001
01001100
11000101
+
One'scomplement=11101110.
Todetecterrors,thereceiveraddsthefourwords(thethreeoriginalwordsandthechecksum.Ifthesumcontainsazero,thereceiverknowstherehasbeenanerror.Allone-biterrorswillbedetected,buttwo-biterrorscanbeundetected(e.g.,ifthelastdigitofthefirstwordisconvertedtoa0andthelastdigitofthesecondwordisconvertedtoa1.
Problem19.
aTrue.Supposethesenderhasawindowsizeof3andsendspackets1,2,3att0.Att1(t1>t0thereceiverACKS1,2,3.Att2(t2>t1thesendertimesoutandresends1,2,3.Att3thereceiverreceivestheduplicatesandre-acknowledges1,2,3.Att4thesenderreceivesthe
ACKsthatthereceiversentatt1andadvancesitsnwindowto4,5,6.Att5thesenderreceivestheACKs1,2,3thereceiversentatt2.TheseACKsareoutsideitswindow.bTrue.Byessentiallythesamescenarioasin(a.cTrue.dTrue.Notethatwithawindowsizeof1,SR,GBN,andthealternatingbitprotocolarefunctionallyequivalent.Thewindowsizeof1precludesthepossibilityofout-of-orderpackets(withinthewindow.AcumulativeACKisjustanordinaryACKinthissituation,sinceitcanonlyrefertothesinglepacketwithinthewindow.Chapter4ReviewQuestions3.Forwardingisaboutmovingapacketfromarouter’sinputlinktotheappropriateoutputlink.Routingisaboutdeterminingtheend-to-routesbetweensourcesanddestinations.8.switchingviamemory;switchingviaabus;switchingviaaninterconnectionnetwork12.Yes.Theyhaveoneaddressforeachinterface.16.50%overhead34.FalseChapter4ProblemsProblem7.aPrefixMatchLinkInterface11100000011100001000000001111000012otherwise3bPrefixmatchforfirstaddressis4thentry:
linkinterface3Prefixmatchforsecondaddressis2ndentry:
linkinterface1Prefixmatchforfirstaddressis3rdentry:
linkinterface2Problem8.DestinationAddressRangeLinkInterface00000000through00011111101000000
through10111111110000000through21011111111000000through311111111numberofaddressesineachrange=26=64Problem13.AnyIPaddressinrange101.101.101.65to101.101.101.127Fourequalsizesubnets:
101.101.101.64/28,101.101.101.80/28,101.101.101.96/28,101.101.101.112/28Problem16.MP3filesize=4millionbytes.AssumethedataiscarriedinTCPsegments,witheachTCPsegmentalsohaving20bytesofheader.Theneachdatagramcancarry1500-40=1460bytesoftheMP3fileNumberoffragmentsrequired=274014604106=?
?
?
?
?
?
≠=.Allbutthelastfragmentwillbe1,500bytes;thelastfragmentwillbe1060+40=1100bytes.Theoffsetswillbemultiplesof185(asinexampleinSection4.4.1.Chapter5ReviewQuestions1.AlthougheachlinkguaranteesthatanIPdatagramsentoverthelinkwillbereceivedattheotherendofthelinkwithouterrors,itisnotguaranteedthatIPdatagramswillarriveattheultimatedestinationintheproperorder.WithIP,datagramsinthesameTCPconnectioncantakedifferentroutesinthenetwork,andthereforearriveoutoforder.TCPisstillneededtoprovidethereceivingendoftheapplicationthebytestreaminthecorrectorder.Also,IPcanlosepacketsduetorouting
loopsorequipmentfailures.7.248MACaddresses;232IPv4addresses;2128IPv6addresses.Chapter5ProblemsProblem4.Ifwedivide1001into10101010000weget10010111,witharemainderofR=001.Problem11.Att=0Atransmits.Att=576,Awouldfinishtransmitting.Intheworstcase,Bbeginstransmittingattimet=224.Attimet=224+225=449B'sfirstbitarrivesatA.Because449<576,Aabortsbeforecompletingthetransmissionofthepacket,asitissupposedtodo.ThusAcannotfinishtransmittingbeforeitdetectsthatBtransmitted.ThisimpliesthatifAdoesnotdetectthepresenceofahost,thennootherhostbeginstransmittingwhileAistransmitting.