計(jì)算機(jī)網(wǎng)絡(luò)原理習(xí)題答案_第1頁
計(jì)算機(jī)網(wǎng)絡(luò)原理習(xí)題答案_第2頁
計(jì)算機(jī)網(wǎng)絡(luò)原理習(xí)題答案_第3頁
計(jì)算機(jī)網(wǎng)絡(luò)原理習(xí)題答案_第4頁
計(jì)算機(jī)網(wǎng)絡(luò)原理習(xí)題答案_第5頁
已閱讀5頁,還剩8頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

ReviewQuestionsSection2.1Listfivenon-proprietary(非專有的)Internetapplicationsandtheapplication-layerprotocolsthattheyuse.列舉五種非專用的英特網(wǎng)應(yīng)用以及它們所使用的應(yīng)用層協(xié)議。applicationsprotocols

e-mail

SMTP

WEBHTTPstreamingmultimediaHTTP

,RTPfiletransfer

FTPremoteterminalaccess

Telnet

Foracommunicationsession(會(huì)議)betweentwohosts,whichhostistheclientandwhichistheserver?對(duì)倆主機(jī)之間的通信會(huì)話,哪個(gè)主機(jī)是客戶機(jī),哪個(gè)主機(jī)是服務(wù)器?Theprocesswhichinitiates(發(fā)起)thecommunicationistheclient;theprocessthatwaitstobecontactedistheserver.3)Whatinformationisusedbyaprocessrunningononehosttoidentifyaprocessrunningonanotherhost?運(yùn)行在一臺(tái)主機(jī)上的進(jìn)程使用什么信息標(biāo)識(shí)運(yùn)行在另一臺(tái)主機(jī)上的進(jìn)程?TheIPaddressofthedestinationhostandtheportnumberofthedestinationsocket.Listthevariousnetwork-applicationuseragentsthatyouuseonadailybasis.列舉你每天都會(huì)使用的網(wǎng)絡(luò)應(yīng)用程序用戶代理。WebbrowserE-mailapplicationuseragent

FileTransferuseragent

P2puseragent

audio/videouseragent

5)ReferringtoFigure2.1-2,weseethatnotnoneofapplicationslistedinthetablerequireboth"nodataloss"and"timing".Canyouconceiveofanapplicationthatrequiresnodatalossandthatisalsohighlytimesensitive?參見圖2.1-2,我們可以看到表中所列舉的應(yīng)用沒有一個(gè)既要求沒有數(shù)據(jù)丟失又要求定時(shí)。你能設(shè)想出一個(gè)應(yīng)用,既既要求沒有數(shù)據(jù)丟失又要求定時(shí)嗎?Therearenogoodexamplesofanapplicationthatrequiresnodatalossandtiming.Sections2.2-2.56)Whatismeantbyahandshakingprotocol?握手協(xié)議的意義?Aprotocoluseshandshakingifthetwocommunicatingentitiesfirstexchangecontrolpacketsbeforesendingdatatoeachother.SMTPuseshandshakingattheapplicationlayerwhereasHTTPdoesnot.7)WhydoHTTP,FTP,SMTP,POP3andIMAPrunontopofTCPratherthanUDP?為什么HTTP,F(xiàn)TP,SMTP,POP3和IMAP都運(yùn)行在TCP協(xié)議而不是UDP協(xié)議上?Theapplicationsassociatedwiththoseprotocolsrequirethatallapplicationdatabereceivedinthecorrectorderandwithoutgaps.TCPprovidesthisservicewhereasUDPdoesnot.14)Printouttheheaderofamessagethatyouhaverecentlyreceived.HowmanyRecieved:headerlinesarethere?Analyzeeachoftheheaderlinesinthemessage.打印出你最近收到的報(bào)文的首部,在Received中,首部行有多少行?分析該報(bào)文首部行的每一行。15)Fromauser'sperspective,whatisthedifferencebetweenthedownload-and-deletemodeandthedownload-and-keepmodeinPOP3?從用戶的觀點(diǎn)來看,POP3中“下載并刪除”模式和“下載并保留”模式有什么區(qū)別?Withdownloadanddelete,afterauserretrieves(取回)itsmessagesfromaPOPserver,themessagesaredeleted.Thisposesaproblemforthenomadic(游動(dòng)的)user,whomaywanttoaccessthemessagesfrommanydifferentmachines(officePC,homePC,etc.).Inthedownloadandkeepconfiguration(配置),messagesarenotdeletedaftertheuserretrievesthemessages.Thiscanalsobeinconvenient,aseachtimetheuserretrievesthestoredmessagesfromanewmachine,allofnon-deletedmessageswillbetransferredtothenewmachine(includingveryoldmessages).16)RedrawFigure2.5-4forwhenallqueriesfromthelocalnameserverareiterative.重繪時(shí),從本地域名服務(wù)器所有查詢迭代圖2.5-4。17)EachInternethostwillhaveatleastonelocalnameserverandoneauthoratativenameserver.WhatroledoeseachoftheseservershaveinDNS?每一臺(tái)英特網(wǎng)主機(jī)都至少有一個(gè)本地域名服務(wù)器和一個(gè)權(quán)威域名服務(wù)器。這兩種服務(wù)器在域名解析中起什么作用?AhostauthoritativenameserverprovidestheofficialtranslationofahostnametoanIPaddress(amongotherthings).Ahostlocalnameserverisaproxy(代理服務(wù)器)totheDNSsystem:thehostfirstqueriesitslocalnameserverforamapping;thelocalnameserverthenobtainsthemappingonthebehalfof(代表)thequeryinghost.18)Isitpossiblethatanorganization'sWebserverandmailserverhaveexactlythesamealias(別名)forahostname(e.g.,)?Whatwouldbethe"type"fortheRRthatcontainsthehostnameofthemailserver?一個(gè)機(jī)構(gòu)的web服務(wù)器和郵件服務(wù)器可以有有完全相同的主機(jī)別名嗎?包含了郵件服務(wù)器的主機(jī)名的RR有什么樣的類型?Yes。AnorganizationmailserverandWebservercanhavethesamealiasforahostname.TheMXrecordisusedtomapthemailserverhostnametoitsIPaddress.19)UsenslookuptofindaWebserverthathasmultipleIPaddresses.DoestheWebserverofyourinstitution(school,company,etc.)havemultipleIPaddresses?使用nslookup找到一個(gè)Web服務(wù)器有多個(gè)IP地址。貴機(jī)構(gòu)的Web服務(wù)器(如學(xué)校,公司,等)是否有多??個(gè)IP地址?Myinsititutiondoesn’thavemultipleIPaddress.Sections2.6-2.920)TheUDPserverdescribedinSection2.7onlyneededonesocket,whereastheTCPserverdescribedinSection2.6neededtwosockets.Why?IftheTCPserverweretosupportnsimultaneous(同時(shí)發(fā)生的)connections,eachfromadifferentclienthost,howmanysocketswouldtheTCPserverneed?2.7節(jié)描述的UDP服務(wù)器僅需要一個(gè)套接字,而2.6節(jié)描述的TCP服務(wù)器則需要兩個(gè)套接字。為什么?如果TCP服務(wù)器要支持n個(gè)并行連接,且每個(gè)連接都來自不同的客戶機(jī)主機(jī),那么TCP服務(wù)器需要多少個(gè)套接字?WiththeUDPserver,thereisnowelcomingsocket,andalldatafromdifferentclientsenterstheserverthroughthisonesocket.WiththeTCPserver,thereisawelcomingsocket,andeachtimeaclientinitiates(發(fā)起)aconnectiontotheserver,anewsocketiscreated.Thus,tosupportnsimultaneousconnections,theserverwouldneedn+1sockets.21)Fortheclient-serverapplicationoverTCPdescribedinSection2.6,whymusttheserverprogrambeexecutedbeforetheclientprogram?Fortheclient-serverapplicationoverUDPdescribedinSection2.7,whymaytheclientprogrambeexecutedbeforetheserverprogram?在2.6節(jié)所描述的運(yùn)行于TCP上的客戶機(jī)-服務(wù)器應(yīng)用程序,為什么服務(wù)器程序要先于客戶機(jī)程序運(yùn)行?在2.7節(jié)描述的運(yùn)行于UDP上的客戶機(jī)-服務(wù)器應(yīng)用程序,為什么客戶機(jī)程序要先于服務(wù)器程序運(yùn)行?FortheTCPapplication,assoonastheclientisexecuted,itattemptstoinitiateaTCPconnectionwiththeserver.IftheTCPserverisnotrunning,thentheclientwillfailtomakeaconnection.FortheUDPapplication,theclientdoesnotinitiateconnections(orattempttocommunicatewiththeUDPserver)immediatelyuponexecutionProblems1)Trueorfalse.a)SupposeauserrequestsaWebpagethatconsistsofsometextandtwoimages.Forthispagetheclientwillsendonerequestmessageandrecievethreeresponsemessages?假設(shè)一個(gè)用戶請(qǐng)求一個(gè)網(wǎng)頁,包含一些文本和兩個(gè)圖像。這個(gè)頁面的客戶端將發(fā)送一個(gè)請(qǐng)求消息和接收三個(gè)響應(yīng)消息?Fb)Trueorfalse.TwodistinctWebpages(e.g.,/research.htmland/students.html)canbesentoverthesamepersistentconnection?真或假。兩種截然不同的網(wǎng)頁(例如,/research.html和/students.html)可發(fā)送相同的持久連接?Tc)Withnon-persistentconnectionsbetweenbrowserandoriginserver,itispossibleforasingleTCPsegmenttocarrytwodistinctHTTPrequestmessages?瀏覽器和源服務(wù)器之間的非持久連接,它有可能為一個(gè)單一的TCP段進(jìn)行兩個(gè)不同的HTTP請(qǐng)求消息?Fd)TheDate:headerintheHTTPresponsemessageindicateswhentheobjectintheresponsewaslastmodified?日期:

在HTTP響應(yīng)消息頭指示的最后修訂在響應(yīng)對(duì)象時(shí)?F2)ReadRFC959forFTP.ListalloftheclientcommandsthataresupportedbytheRFC.FTP閱讀RFC959。列出所有的客戶端支持的命令是由RFC。Accesscontrolcommands:USER,PASS,ACT,CWD,CDUP,SMNT,REIN,QUIT.Transferparameter(參數(shù))commands:PORT,PASV,TYPESTRU,MODE.Servicecommands:RETR,STOR,STOU,APPE,ALLO,REST,RNFR,RNTO,ABOR,DELE,RMD,MRD,PWD,LIST,NLST,SITE,SYST,STAT,HELP,NOOP.3)ReadRFC1700.

Whatarethewell-knownportnumbersforthe"simplefiletransferprotocol"(sftp)?Forthe"networknewstransfoerprotocol"(nntp)?閱讀RFC1700中。什么是“簡單文件傳輸協(xié)議”(SFTP)眾所周知的端口號(hào)?對(duì)于“新聞聯(lián)播transfoer協(xié)議”(NNTP)?4)Supposewithinyourwebbrowseryouclickonalinktoobtainawebpage.SupposethattheIPaddressfortheassociatedURLisnotcached(緩存)inyourlocalhost,sothataDNSlookupisnecessarytoobtaintheIPaddress.SupposethatnDNSserversarevisitedbeforeyourhostreceivestheIPaddressfromDNS;thesuccessivevisitsincur(產(chǎn)生)aRTTofRTT1,...,RTTn.Furthersupposethatwebpageassociatedwiththelinkcontainsexactlyoneobject,asmallamountofHTMLtext.LetRTT0denote(表示)theRTTbetweenthelocalhostandtheservercontainingtheobject.Assumingzerotransmissiontimeoftheobject,howmuchtimeelapses(流逝)fromwhentheclientclicksonthelinkuntiltheclientreceivestheobject.假定在你的瀏覽器中,你點(diǎn)擊一個(gè)超鏈接來獲得一個(gè)web頁面。假定相關(guān)的URL的IP地址沒有緩存在你的本地主機(jī)上,因此必須進(jìn)行DNS查詢以獲得IP地址。假設(shè)你的主機(jī)從DNS獲得IP地址之前,已經(jīng)訪問了n個(gè)DNS服務(wù)器,相繼產(chǎn)生的RTT依次為RTT1,~RTTn。進(jìn)一步假設(shè),與連接相關(guān)的web網(wǎng)頁只含有一個(gè)對(duì)象,即少量的HTML文本。讓RTT0表示本地主機(jī)和包含對(duì)象的服務(wù)器之間的RTT。假設(shè)對(duì)象傳輸時(shí)間為0,從客戶點(diǎn)擊連接到接收到對(duì)象需要多長時(shí)間?ThetotalamountoftimetogettheIPaddressis.OncetheIPaddressisknown,elapsestosetuptheTCPconnectionandanotherelapsestorequestandreceivethesmallobject.ThetotalresponsetimeisReferringtoquestion(4),supposethepagecontainsthreeverysmallobjects.Neglectingtransmissiontimes,howmuchtimeelapseswith(a)nonpersistentHTTPwithnoparallelTCPconnections,(b)nonpersistentHTTPwithparallelconnections,(c)persistentHTTPwithpipelining.提到的問題(4),假設(shè)該頁面包含三個(gè)非常小的物體。忽略的傳輸時(shí)間,間隔時(shí)間多長(一)非持久的HTTP沒有并行的TCP連接,(b)與并行連接的非持久的HTTP,(c)與持久HTTP流水線。a).b).c)6)TwoHTTPrequestmethodsareGETandPOST.ArethereanyothermethodsinHTTP/1.0?Ifso,whataretheyusedfor?HowaboutHTTP/1.1?兩個(gè)HTTP請(qǐng)求方法是GET和POST。在HTTP/1.0是否有任何其他的方法?如果是這樣,它們是什么使用?關(guān)于HTTP/1.1的怎么樣?7)WriteasimpleTCPprogramforaserverthatacceptslinesofinputfromaclientandprintsthelinesontotheserver'sstandardoutput.(YoucandothisbymodifyingtheTCPServer.javaprograminthetext.)Compileandexecuteyourprogram.OnanyothermachinewhichcontainsaWebbrowser,settheproxyserverinthebrowsertothemachineinwhichyourserverprogramisrunning;alsoconfiguretheportnumberappropriately.YourbrowsershouldnowsenditsGETrequestmessagestoyourserver,andyourservershoulddisplaythemessagesonitsstandardoutput.UsethisplatformtodeterminewhetheryourbrowsergeneratesconditionalGETmessagesforobjectsthatarelocallycached.寫一個(gè)簡單的TCP服務(wù)器接受從客戶端的輸入線和輸出到服務(wù)器的標(biāo)準(zhǔn)輸出線方案。(您可以通過修改文本TCPServer.java方案。)編譯和執(zhí)行程序。在任何其他機(jī)器,其中包含一個(gè)Web瀏覽器,在瀏覽器中設(shè)置代理服務(wù)器在您的服務(wù)器程序運(yùn)行的機(jī)器,也適當(dāng)配置的端口號(hào)。您的瀏覽器現(xiàn)在應(yīng)該GET請(qǐng)求消息發(fā)送到您的服務(wù)器,您的服務(wù)器上顯示的消息,它的標(biāo)準(zhǔn)輸出。利用這一平臺(tái),以確定是否您的瀏覽器生成本地緩存的對(duì)象,有條件的GET消息。8)ReadthePOP3RFC,RFC1939.

What

isthepurposeoftheUIDLPOP3command?閱讀的POP3RFC,RFC1939中。UIDLPOP3命令的目的是什么?UIDLabbreviates(是~的縮寫)“unique-IDlisting”.WhenaPOP3clientissuestheUIDLcommand,theserverrespondswiththeuniquemessageIDforallofthemessagespresentintheusersmailbox.Thiscommandisusefulfor“downloadandkeep”.Bykeepingafilethatliststhemessagesretrievedinearliersessions,theclientcanusetheUIDLcommandtodeterminewhichmessagesontheserverhavealreadybeenseen.8)InstallandcompiletheJavaprogramsTCPClientandUDPClientononehostandTCPServerandUDPServeronanotherhost.a)SupposeyourunTCPClientbeforeyourunTCPServer.Whathappens?Why?

b)SupposeyourunUDPClientbeforeyourunUDPServer.Whathappens?Why?

c)Whathappensifyouusedifferentportnumbersfortheclientandserversides?9)RewriteTCPServer.javasothatitcanacceptmultipleconnections.(Hint:Youwillneedtousethreads.)

重寫TCPServer.java,以便它能夠接受多個(gè)連接。(提示:您將需要使用線程)。DiscussionQuestionsWhatisaCGIscript?GiveexamplesoftwopopularWebsitesthatuseCGIscripts.ExplainhowthesesitesuseCGI.WhichlanguagesareCGIscriptstypicallywrittenin?什么是CGI腳本?給出了兩個(gè)流行的網(wǎng)站,使用CGI腳本的例子。說明這些網(wǎng)站如何使用CGI。哪些語言是CGI腳本通常寫在?Abbreviationof

Common

Gateway

Interface,

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論