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