您好,欢迎访问三七文档
Chapter2注:括弧之中红色标注为与课本习题对应的编号2.1,2.2节后作业:1.(R2)Foracommunicationsessionbetweenapairofprocesses,whichprocessistheclientandwhichistheserver?答:Theprocessisalways-onhostcalledtheserver.Theprocesswhichinitiatesthecommunicationistheclient.2.(R3)Whatisthedifferencebetweennetworkarchitectureandapplicationarchitecture?答:Networkarchitecturereferstotheorganizationofthecommunicationprocessintolayers.Applicationarchitecture,ontheotherhand,isdesignedbyanapplicationdeveloperanddicatesthebroadstructureoftheapplication.3.(R4)Whatinformationisusedbyaprocessrunningononehosttoidentifyaprocessrunningonanotherhost?答:TheIPaddressofthedestinationhostandtheportnumberofthedestinationsocket.4.(R7)Supposeyouwantedtodoatransactionfromaremoteclienttoaserverasfastaspossible.WouldyouuseUDPorTCP?Why?答:WewoulduseUDP.WithUDP,thetransactioncanbecompletedinoneroundtriptime–theclientsendsthetransactionrequestintoaUDPsocket,andtheserversendsthereplybacktotheclient’sUDPsocket.WithTCP,aminimumoftwoRTTsareneeded–onetoset-uptheTCPconnection,andanotherfortheclienttosendtherequest,andfortheservertosendbackthereply.5.(R8)Listthefourbroadclassesofservicesthatatransportprotocolcanprovide.Foreachoftheserviceclasses,indicateifeitherUDPorTCP(orboth)providessuchaservice.答:(1)ReliableDataTransfer:TCPprovidesareliablebyte-streambetweenclientandserverbutUDPdoesnot.(2)Throughput:Aguaranteethatacertainvalueforthroughputwillbemaintained;Neither.(3)Timing:Aguaranteethatdatawillbedeliveredwithinaspecifiedamountoftime;Neither.(4)Security:Neither.6.(R9)WhydoHTTP,FTP,SMTP,andPOP3runontopofTCPratherthanonUDP?答:Theapplicationsassociatedwiththoseprotocolsrequirethatallapplicationdatabereceivedinthecorrectorderandwithoutgaps.TCPprovidesthisservicewhereasUDPdoesnot.7.(R11)Whatismeantbyahandshakingprotocol?答:Aprotocoluseshandshakingifthetwocommunicatingentitiesfirstexchangecontrolpacketsbeforesendingdatatoeachother.SMTPuseshandshakingattheapplicationlayerwhereasHTTPdoesnot.2.3,2.4节后作业8.(R15)SupposeAlice,withaWeb-basede-mailaccount(suchasHotmailorgmail),sendsamessagetoBob,whoaccesseshismailfromhismailserverusingPOP3.DiscusshowthemessagegetsfromAlice'shosttoBob'shost.Besuretolisttheseriesofapplication-layerprotocolsthatareusedtomovethemessagebetweenthetwohosts.答:MessageissentfromAlice’shosttohermailserveroverHTTP.Alice’smailserverthensendsthemessagetoBob’smailserveroverSMTP.BobthentransfersthemessagefromhismailservertohishostoverPOP3.9.(R17)Fromauser'sperspective,whatisthedifferencebetweenthedownload-and-deletemodeandthedownload-and-keepmodeinPOP3?答:Withdownloadanddelete,afterauserretrievesitsmessagesfromaPOPserver,themessagesaredeleted.Thisposesaproblemforthenomadicuser,whomaywanttoaccessthemessagesfrommanydifferentmachines.Inthedownloadandkeepconfiguration,messagesarenotdeletedaftertheuserretrievesthemessages.Thiscanalsobeinconvenient,aseachtimetheuserretrievesthestoredmessagesfromanewmachine,allofnon-deletedmessageswillbetransferredtothenewmachine.10.(R18)Isitpossibleforanorganization'sWebserverandmailservertohaveexactlythesamealiasforahostname(forexample,foo.com)?WhatwouldbethetypefortheRRthatcontainsthehostnameofthemailserver?答:Yes,anorganization’smailserverandWebservercanhavethesamealiasforahostname.TheMXrecordisusedtomapthemailserver’shostnametoitsIPaddress.11.(R19)WhyisitsaidthatFTPsendscontrolinformationout-of-band?答:FTPusestwoparallelTCPconnections,oneconnectionforsendingcontrolinformationandanotherconnectionforactuallytransferringthefile.Becausethecontrolinformationisnotsentoverthesameconnectionthatthefileissentover,FTPsendscontrolinformationoutofband.2.5,2.6节后作业12.(P1)Trueorfalse?a.AuserrequestsaWebpagethatconsistsofsometextandthreeimages.Forthispage,theclientwillsendonerequestmessageandreceivefourresponsemessages.b.TwodistinctWebpages(forexample,)canbesentoverthesamepersistentconnection.c.Withnonpersistentconnectionsbetweenbrowserandoriginserver,itispossibleforasingleTCPsegmenttocarrytwodistinctHTTPrequestmessages.d.TheDate:headerintheHTTPresponsemessageindicateswhentheobjectintheresponsewaslastmodified.答:a.Fb.Tc.Fd.F13.(P7)SupposewithinyourWebbrowseryouclickonalinktoobtainaWebpage.TheIPaddressfortheassociatedURLisnotcachedinyourlocalhost,soaDNSlookupisnecessarytoobtaintheIPaddress.SupposethatnDNSserversarevisitedbeforeyourhostreceivestheIPaddressfromDNS;thesuccessivevisitsincuranRTTofnRTTRTT,...,1.FurthersupposethattheWebpageassociatedwiththelinkcontainsexactlyoneobject,consistingofasmallamountofHTMLtext.Let0RTTdenotetheRTTbetweenthelocalhostandtheservercontainingtheobject.Assumingzerotransmissiontimeoftheobject,howmuchtimeelapsesfromwhentheclientclicksonthelinkuntiltheclientreceivestheobject?答:ThetimetogetIPaddressisRTT1+RTT2+……+RTTn,oncetheIPaddressisknown,theresponsetimeis2RTT0+RTT1+……+RTTn.14.(P8)ReferringtoProblemP7,supposetheHTMLfilereferencesthreeverysmallobjectsonthesameserver.Neglectingtransmissiontimes,howmuchtimeelapseswitha.Non-persistentHTTPwithnoparallelTCPconnections?b.Non-persistentHTTPwithparal
本文标题:计网-第二章作业
链接地址:https://www.777doc.com/doc-2046076 .html