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

下載本文檔

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

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

Common

Gateway

Interface,

溫馨提示

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

最新文檔

評論

0/150

提交評論