Review_for_Chapter_2,川大计网部分习题答案第二章

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

Chapter2ReviewQeustionsR1,R3,R4,R5,R10,R11,R13,R15,R16,R20,R21,R22,R27,R28R1.ListfivenonproprietaryInternetapplicationsandtheapplication-layerprotocolsthattheyuse.Answer:TheWeb:HTTP;filetransfer:FTP;remotelogin:Telnet;NetworkNews:NNTP;e-mail:SMTP.R3.Whatisthedifferencebetweennetworkarchitectureandapplicationarchitecture?Answer:Networkarchitecturereferstotheorganizationofthecommunicationprocessintolayers(e.g.,thefive-layerInternetarchitecture).Applicationarchitecture,ontheotherhand,isdesignedbyanapplicationdeveloperanddictatesthebroadstructureoftheapplication(e.g.,client-serverorP2P)•R4Whatinformationisusedbyaprocessrunningononehosttoidentifyaprocessrunningonanotherhost?Answer:TheIPaddressofthedestinationhostandtheportnumberofthedestinationsocket.•R5ForaP2Pfile-sharingapplication,doyouagreewiththestatement,“Thereisnonotionofclientandserversidesofacommunicationsession”?Whyorwhynot?Answer:No.Asstatedinthetext,allcommunicationsessionshaveaclientsideandaserverside.InaP2Pfile-sharingapplication,thepeerthatisreceivingafileistypicallytheclientandthepeerthatissendingthefileistypicallytheserver.•R10RecallthatTCPcanbeenhancedwithSSLtoprovideprocess-to-processsecurityservices,includingencryption.DoesSSLoperateatthetransportlayerortheapplicationlayer?IftheapplicationdeveloperwantsTCPtobeenhancedwithSSL,whatdoesthedeveloperhavetodo?Answer:SSLoperatesattheapplicationlayer.TheSSLsockettakesunencrypteddatafromtheapplicationlayer,encryptsitandthenpassesittotheTCPsocket.IftheapplicationdeveloperwantsTCPtobeenhancedwithSSL,shehastoincludetheSSLcodeintheapplication.•R11Whatismeantbyahandshakingprotocol?Answer:Aprotocoluseshandshakingifthetwocommunicatingentitiesfirstexchangecontrolpacketsbeforesendingdatatoeachother.SMTPuseshandshakingattheapplicationlayerwhereasHTTPdoesnot.•R13TelnetintoaWebserverandsendamultilinerequestmessage.IncludeintherequestmessagetheIf-modified-since:headerlinetoforcearesponsemessagewiththe304NotModifiedstatuscode.Answer:Issuedthefollowingcommand(inWindowscommandprompt)followedbytheHTTPGETmessagetothe“utopia.poly.edu”webserver:telnetutopia.poly.edu80Sincetheindex.htmlpageinthiswebserverwasnotmodifiedsinceFri,18May200709:23:34GMT,thefollowingoutputwasdisplayedwhentheabovecommandswereissuedonSat,19May2007.Notethatthefirst4linesaretheGETmessageandheaderlinesinputbytheuserandthenext4lines(startingfromHTTP/1.1304NotModified)istheresponsefromthewebserver.•R15SupposeAlice,withaWeb-basede-mailaccount(suchasHotmailorgmail),sendsamessagetoBob,whoaccesseshismailfromhismailserverusingPOP3.DiscusshowthemessagegetsfromAlice’shosttoBob’shost.Besuretolisttheseriesofapplication-layerprotocolsthatareusedtomovethemessagebetweenthetwohosts.Answer:MessageissentfromAlice’shosttohermailserveroverHTTP.Alice’smailserverthensendsthemessagetoBob’smailserveroverSMTP.BobthentransfersthemessagefromhismailservertohishostoverPOP3.•R16Printouttheheaderofane-mailmessageyouhaverecentlyreceived.HowmanyReceived:headerlinesarethere?Analyzeeachoftheheaderlinesinthemessage.Answer:skipped•R20ConsideranewpeerAlicewhojoinsBitTorrentwithoutpossessinganychunks.Withoutanychunks,shecannotbecomeatop-fouruploaderforanyoftheotherpeers,sinceshehasnothingtoupload.HowthenwillAlicegetherfirstchunk?Answer:Alicewillgetherfirstchunkasaresultofshebeingselectedbyoneofherneighborsasaresultofan“optimisticunchoke,”forsendingoutchunkstoher.•R21InBitTorrent,supposeAliceprovideschunkstoBobthroughouta30-secondinterval.WillBobnecessarilyreturnthefavorandprovidechunkstoAliceinthissameinterval?Whyorwhynot?Answer:ItisnotnecessarythatBobwillalsoprovidechunkstoAlice.Alicehastobeinthetop4neighborsofBobforBobtosendoutchunkstoher;thismightnotoccurevenifAliceisprovideschunkstoBobthroughouta30-secondinterval.•R22Whatisanoverlaynetwork?Doesitincluderouters?Whataretheedgesintheoverlaynetwork?Howisthequery-floodingoverlaynetworkcreatedandmaintained?Answer:TheoverlaynetworkinaP2Pfilesharingsystemconsistsofthenodesparticipatinginthefilesharingsystemandthelogicallinksbetweenthenodes.Thereisalogicallink(an“edge”ingraphtheoryterms)fromnodeAtonodeBifthereisasemi-permanentTCPconnectionbetweenAandB.Anoverlaynetworkdoesnotincluderouters.WithGnutella,whenanodewantstojointheGnutellanetwork,itfirstdiscoverstheIPaddressofoneormorenodesalreadyinthenetwork.Itthensendsjoinmessagestothesenodes.Whenthenodereceivesconfirmations,itbecomesamemberoftheofGnutellanetwork.Nodesmaintaintheirlogicallinkswithperiodicrefreshmessages.•R27Fortheclient-serverapplicationoverTCPdescribedinsection2.7,whymusttheserverprogrambeexecutedbeforetheclientprogram?Fortheclient-serverapplicationoverUDPdescribedinSection2.8,whymaytheclientprogrambeexecutedbeforetheserverprogram?Answer:FortheTCPapplication,assoonastheclientisexecuted,itattemptstoinitiateaTCPconnectionwiththeserver.IftheTCPserverisnotrunning,thentheclientwillfailtomakeaconnection.FortheUDPapplication,theclientdoesnotinitiateconnections(orattempttocommunicatewiththeUDPserver)immediatelyuponexecution•R28TheUDPserverdescribedinSection2.8neededonlyonesocket,whereth

1 / 49
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功