2第二章课后习题及答案.docx
- 文档编号:4611807
- 上传时间:2022-12-07
- 格式:DOCX
- 页数:7
- 大小:63.95KB
2第二章课后习题及答案.docx
《2第二章课后习题及答案.docx》由会员分享,可在线阅读,更多相关《2第二章课后习题及答案.docx(7页珍藏版)》请在冰豆网上搜索。
2第二章课后习题及答案
2.-第二章课后习题及答案
第二章
1.(Q2)Foracommunicationsessionbetweenapairofprocesses,whichprocessistheclientandwhichistheserver?
Answer:
Theprocesswhichinitiatesthecommunicationistheclient;theprocessthatwaitstobecontactedistheserver.
.
2.(Q3)Whatisthedifferencebetweennetworkarchitectureandapplicationarchitecture?
Answer:
Networkarchitecturereferstotheorganizationofthecommunicationprocessintolayers(e.g.,thefive-layerInternetarchitecture).Applicationarchitecture,ontheotherhand,isdesignedbyanapplicationdeveloperanddictatesthebroadstructureoftheapplication(e.g.,client-serverorP2P)
3.(Q4)Whatinformationisusedbyaprocessrunningononehosttoidentifyaprocessrunningonanotherhost?
Answer:
TheIPaddressofthedestinationhostandtheportnumberofthedestinationsocket.
4.(Q6)ReferringtoFigure2.4,weseethatnoneoftheapplicationlistedinFigure2.4requiresbothnodatalossandtiming.Canyouconceiveofanapplicationthatrequiresnodatalossandthatisalsohighlytime-sensitive?
Answer:
Therearenogoodexampleofanapplicationthatrequiresnodatalossandtiming.Ifyouknowofone,sendane-mailtotheauthors
headerlinetoforcearesponsemessagewiththe304NotModifiedstatuscode.
Answer:
Issuedthefollowingcommand(inWindowscommandprompt)followedbytheHTTPGETmessagetothe“utopia.poly.edu”webserver:
>telnetutopia.poly.edu80
Sincetheindex.htmlpageinthiswebserverwasnotmodifiedsinceFri,18May200709:
23:
34GMT,thefollowingoutputwasdisplayedwhentheabovecommandswereissuedonSat,19May2007.Notethatthefirst4linesaretheGETmessageandheaderlinesinputbytheuserandthenext4lines(startingfromHTTP/1.1304NotModified)istheresponsefromthewebserver.
8.(Q14)Considerane-commercesitethatwantstokeepapurchaserecordforeachofitscustomers.Describehowthiscanbedonewithcookies.
Answer:
Whentheuserfirstvisitsthesite,thesitereturnsacookienumber.Thiscookienumberisstoredontheuser’shostandismanagedbythebrowser.Duringeachsubsequentvisit(andpurchase),thebrowsersendsthecookienumberbacktothesite.Thusthesiteknowswhenthisuser(moreprecisely,thisbrowser)isvisitingthesite.
9.(Q15)SupposeAlice,withaWeb-basede-mailaccount(suchasHotmailorgmail),sendsamessagetoBob,whoaccesseshismailfromhismailserverusingPOP3.DiscusshowthemessagegetsfromAlice’shosttoBob’shost.Besuretolisttheseriesofapplication-layerprotocolsthatareusedtomovethemessagebetweenthetwohosts.
Answer:
MessageissentfromAlice’shosttohermailserveroverHTTP.Alice’smailserverthensendsthemessagetoBob’smailserveroverSMTP.BobthentransfersthemessagefromhismailservertohishostoverPOP3.
10.(Q10)RecallthatTCPcanbeenhancedwithSSLtoprovideprocess-to-processsecurityservices,includingencryption.DoesSSLoperateatthetransportlayerortheapplicationlayer?
IftheapplicationdeveloperwantsTCPtobeenhancedwithSSL,whatdoesthedeveloperhavetodo?
Answer:
SSLoperatesattheapplicationlayer.TheSSLsockettakesunencrypteddatafromtheapplicationlayer,encryptsitandthenpassesittotheTCPsocket.IftheapplicationdeveloperwantsTCPtobeenhancedwithSSL,shehastoincludetheSSLcodeintheapplication.
11.(Q16)Printouttheheaderofane-mailmessageyouhaverecentlyreceived.HowmanyReceived:
headerlinesarethere?
Analyzeeachoftheheaderlinesinthemessage.
Answer:
from65.54.246.203(EHLObay0-omc3-)
Received:
(65.54.246.203)bywithSMTP;Sat,19May200716:
53:
51-0700
from([65.55.135.106])bybay0-omc3-
Received:
withMicrosoftSMTPSVC(6.0.3790.2668);Sat,19May200716:
52:
42-0700
Received:
frommailpickupservicebywithMicrosoftSMTPSVC;Sat,19May200716:
52:
41-0700
Message-ID:
Received:
from65.55.135.123bywithHTTP;Sat,19May200723:
52:
36GMT
From:
"prithuladhungel"
To:
prithula@
Bcc:
Subject:
Testmail
Date:
Sat,19May200723:
52:
36+0000
Mime-Version:
1.0
Content-Type:
Text/html;format=flowed
Return-Path:
prithuladhungel@
Figure:
Asamplemailmessageheader
Received:
ThisheaderfieldindicatesthesequenceinwhichtheSMTPserverssendandreceivethemailmessageincludingtherespectivetimestamps.
Inthisexamplethereare4“Received:
”headerlines.Thismeansthemailmessagepassedthrough5differentSMTPserversbeforebeingdeliveredtothereceiver’smailbox.Thelast(forth)“Received:
”headerindicatesthemailmessageflowfromtheSMTPserverofthesendertothesecondSMTPserverinthechainofservers.Thesender’sSMTPserverisataddress65.55.135.123andthesecondSMTPserverinthechainis.Thethird“Received:
”headerindicatesthemailmessageflowfromthesecondSMTPserverinthechaintothethirdserver,andsoon.
Finally,thefirst“Received:
”headerindicatestheflowofthemailmessagefromtheforthSMTPservertothelastSMTPserver(i.e.thereceiver’smailserver)inthechain.
Message-id:
ThemessagehasbeengiventhisnumberBAY130-F26D9E35BF59E0D18A819AFB9310@phx.gbl(bybay0-omc3-.Message-idisauniquestringassignedbythemailsystemwhenthemessageisfirstcreated.
From:
Thisindicatestheemailaddressofthesenderofthemail.Inthegiven
example,thesenderisprithuladhungel@
To:
Thisfieldindicatestheemailaddressofthereceiverofthemail.Intheexample,thereceiverisprithula@
Subject:
Thisgivesthesubjectofthemail(ifanyspecifiedbythesender).Intheexample,thesubjectspecifiedbythesenderis“Testmail”
Date:
Thedateandtimewhenthemailwassentbythesender.Intheexample,thesendersentthemailon19thMay2007,attime23:
52:
36GMT.
Mime-version:
MIMEversionusedforthemail.Intheexample,itis1.0.
Content-type:
Thetypeofcontentinthebodyofthemailmessage.Intheexample,itis“text/html”.
Return-Path:
Thisspecifiestheemailaddresstowhichthemailwillbesentifthe
receiverofthismailwantstoreplytothesender.Thisisalsousedbythesender’s
mailserverforbouncingbackundeliverablemailmessagesofmailer-daemon
errormessages.Intheexample,thereturnpathis
“prithuladhungel@”.
12.(Q18)Isitpossibleforanorganization’sWebserverandmailservertohaveexactlythesamealiasforahostname(forexample,)?
WhatwouldbethetypefortheRRthatcontainsthehostnameofthemailserver?
Answer:
Yesanorganization’smailserverandWebservercanhavethesamealiasforahostname.TheMXrecordisusedtomapthemailserver’shostnametoitsIPaddress.
13.(Q19)WhyisitsaidthatFTPsendscontrolinformation“out-of-band”?
Answer:
FTPusestwoparallelTCPconnections,oneconnectionforsendingcontrolinformation(suchasarequesttotransferafile)andanotherconnectionforactuallytransferringthefile.Becausethecontrolinformationisnotsentoverthesameconnectionthatthefileissentover,FTPsendscontrolinformationoutofband.
14.(P6)ConsideranHTTPclientthatwantstoretrieveaWebdocumentatagivenURL.TheIPaddressoftheHTTPserverisinitiallyunknown.Whattransportandapplication-layerprotocolsbesidesHTTPareneededinthisscenario?
Answer:
Applicationlayerprotocols:
DNSandHTTP
Transportlayerprotocols:
UDPforDNS;TCPforHTTP
15.(P9)ConsiderFigure2.12,forwhichthereisaninstitutionalnetworkconnectedtotheInternet.Supposethattheaverageobjectsizeis900,000bitsandthattheaveragerequestratefromtheinstitution’sbrowserstotheoriginserversis10requestspersecond.AlsosupposethattheamountoftimeittakesfromwhentherouterontheInternetsideoftheaccesslinkforwardsanHTTPrequestuntilitreceivestheresponseistwosecondsonaverage(seeSection2.2.5).Modelthetotalaverageresponsetimesasthesumoftheaverageaccessdelay(thatis,thedelayfromInternetroutertoinstitutionrouter)andtheaverageInternetdelay.Fortheaverageaccessdelay,use△/(1-△β),where△istheaveragetimerequiredtosendanobjectovertheaccesslinkandβisthearrivalrateofobjectstotheaccesslink.
a.Findthetotalaverageresponsetime.
b.NowsupposeacacheisinstalledintheinstitutionalLAN.Supposethehitrateis0.6.Findthetotalresponsetime.
Answer:
a.ThetimetotransmitanobjectofsizeLoveralinkorrateRisL/R.TheaveragetimeistheaveragesizeoftheobjectdividedbyR:
Δ=(900,000bits)/(1,500,000bits/sec)=0.6sec
Thetrafficintensityonthelinkis(1.5requests/sec)(0.6sec/request)=0.9.Thus,theaverageaccessdelayis(0.6sec)/(1-0.9)=6seconds.Thetotalaverageresponsetimeistherefore6sec+2sec=8sec.
b.Thetrafficintensityontheaccesslinkisreducedby40%sincethe40%oftherequestsaresatisfiedwithintheinstitutionalnetwork.Thustheaverageaccessdelayis(0.6sec)/[1–(0.6)(0.9)]=1.2seconds.Theresponsetimeisapproximatelyzeroiftherequestissatisfiedbythecache(whichhappenswithprobability0.4);theaverageresponsetimeis1.2sec+2sec=3.2secforcachemisses(whichhappens60%ofthetime).Sotheaverageresponsetimeis(0.4)(0sec)+(0.6)(3.2sec)=1.92seconds.Thustheaverageresponsetimeisreducedfrom8secto1.92sec.
16.(P12)WhatisthedifferencebetweenMAILFROM:
inSMTPandFrom:
inthemailmessa
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 第二 课后 习题 答案