计算机网络原理习题答案_第1页
计算机网络原理习题答案_第2页
计算机网络原理习题答案_第3页
计算机网络原理习题答案_第4页
计算机网络原理习题答案_第5页
已阅读5页,还剩8页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

ReviewQuestionsSection2.1Listfivenon-proprietary(非专有的)Internetapplicationsandtheapplication-layerprotocolsthattheyuse.列举五种非专用的英特网应用以及它们所使用的应用层协议。applicationsprotocols

e-mail

SMTP

WEBHTTPstreamingmultimediaHTTP

,RTPfiletransfer

FTPremoteterminalaccess

Telnet

Foracommunicationsession(会议)betweentwohosts,whichhostistheclientandwhichistheserver?对俩主机之间的通信会话,哪个主机是客户机,哪个主机是服务器?Theprocesswhichinitiates(发起)thecommunicationistheclient;theprocessthatwaitstobecontactedistheserver.3)Whatinformationisusedbyaprocessrunningononehosttoidentifyaprocessrunningonanotherhost?运行在一台主机上的进程使用什么信息标识运行在另一台主机上的进程?TheIPaddressofthedestinationhostandtheportnumberofthedestinationsocket.Listthevariousnetwork-applicationuseragentsthatyouuseonadailybasis.列举你每天都会使用的网络应用程序用户代理。WebbrowserE-mailapplicationuseragent

FileTransferuseragent

P2puseragent

audio/videouseragent

5)ReferringtoFigure2.1-2,weseethatnotnoneofapplicationslistedinthetablerequireboth"nodataloss"and"timing".Canyouconceiveofanapplicationthatrequiresnodatalossandthatisalsohighlytimesensitive?参见图2.1-2,我们可以看到表中所列举的应用没有一个既要求没有数据丢失又要求定时。你能设想出一个应用,既既要求没有数据丢失又要求定时吗?Therearenogoodexamplesofanapplicationthatrequiresnodatalossandtiming.Sections2.2-2.56)Whatismeantbyahandshakingprotocol?握手协议的意义?Aprotocoluseshandshakingifthetwocommunicatingentitiesfirstexchangecontrolpacketsbeforesendingdatatoeachother.SMTPuseshandshakingattheapplicationlayerwhereasHTTPdoesnot.7)WhydoHTTP,FTP,SMTP,POP3andIMAPrunontopofTCPratherthanUDP?为什么HTTP,FTP,SMTP,POP3和IMAP都运行在TCP协议而不是UDP协议上?Theapplicationsassociatedwiththoseprotocolsrequirethatallapplicationdatabereceivedinthecorrectorderandwithoutgaps.TCPprovidesthisservicewhereasUDPdoesnot.14)Printouttheheaderofamessagethatyouhaverecentlyreceived.HowmanyRecieved:headerlinesarethere?Analyzeeachoftheheaderlinesinthemessage.打印出你最近收到的报文的首部,在Received中,首部行有多少行?分析该报文首部行的每一行。15)Fromauser'sperspective,whatisthedifferencebetweenthedownload-and-deletemodeandthedownload-and-keepmodeinPOP3?从用户的观点来看,POP3中“下载并删除”模式和“下载并保留”模式有什么区别?Withdownloadanddelete,afterauserretrieves(取回)itsmessagesfromaPOPserver,themessagesaredeleted.Thisposesaproblemforthenomadic(游动的)user,whomaywanttoaccessthemessagesfrommanydifferentmachines(officePC,homePC,etc.).Inthedownloadandkeepconfiguration(配置),messagesarenotdeletedaftertheuserretrievesthemessages.Thiscanalsobeinconvenient,aseachtimetheuserretrievesthestoredmessagesfromanewmachine,allofnon-deletedmessageswillbetransferredtothenewmachine(includingveryoldmessages).16)RedrawFigure2.5-4forwhenallqueriesfromthelocalnameserverareiterative.重绘时,从本地域名服务器所有查询迭代图2.5-4。17)EachInternethostwillhaveatleastonelocalnameserverandoneauthoratativenameserver.WhatroledoeseachoftheseservershaveinDNS?每一台英特网主机都至少有一个本地域名服务器和一个权威域名服务器。这两种服务器在域名解析中起什么作用?AhostauthoritativenameserverprovidestheofficialtranslationofahostnametoanIPaddress(amongotherthings).Ahostlocalnameserverisaproxy(代理服务器)totheDNSsystem:thehostfirstqueriesitslocalnameserverforamapping;thelocalnameserverthenobtainsthemappingonthebehalfof(代表)thequeryinghost.18)Isitpossiblethatanorganization'sWebserverandmailserverhaveexactlythesamealias(别名)forahostname(e.g.,)?Whatwouldbethe"type"fortheRRthatcontainsthehostnameofthemailserver?一个机构的web服务器和邮件服务器可以有有完全相同的主机别名吗?包含了邮件服务器的主机名的RR有什么样的类型?Yes。AnorganizationmailserverandWebservercanhavethesamealiasforahostname.TheMXrecordisusedtomapthemailserverhostnametoitsIPaddress.19)UsenslookuptofindaWebserverthathasmultipleIPaddresses.DoestheWebserverofyourinstitution(school,company,etc.)havemultipleIPaddresses?使用nslookup找到一个Web服务器有多个IP地址。贵机构的Web服务器(如学校,公司,等)是否有多​​个IP地址?Myinsititutiondoesn’thavemultipleIPaddress.Sections2.6-2.920)TheUDPserverdescribedinSection2.7onlyneededonesocket,whereastheTCPserverdescribedinSection2.6neededtwosockets.Why?IftheTCPserverweretosupportnsimultaneous(同时发生的)connections,eachfromadifferentclienthost,howmanysocketswouldtheTCPserverneed?2.7节描述的UDP服务器仅需要一个套接字,而2.6节描述的TCP服务器则需要两个套接字。为什么?如果TCP服务器要支持n个并行连接,且每个连接都来自不同的客户机主机,那么TCP服务器需要多少个套接字?WiththeUDPserver,thereisnowelcomingsocket,andalldatafromdifferentclientsenterstheserverthroughthisonesocket.WiththeTCPserver,thereisawelcomingsocket,andeachtimeaclientinitiates(发起)aconnectiontotheserver,anewsocketiscreated.Thus,tosupportnsimultaneousconnections,theserverwouldneedn+1sockets.21)Fortheclient-serverapplicationoverTCPdescribedinSection2.6,whymusttheserverprogrambeexecutedbeforetheclientprogram?Fortheclient-serverapplicationoverUDPdescribedinSection2.7,whymaytheclientprogrambeexecutedbeforetheserverprogram?在2.6节所描述的运行于TCP上的客户机-服务器应用程序,为什么服务器程序要先于客户机程序运行?在2.7节描述的运行于UDP上的客户机-服务器应用程序,为什么客户机程序要先于服务器程序运行?FortheTCPapplication,assoonastheclientisexecuted,itattemptstoinitiateaTCPconnectionwiththeserver.IftheTCPserverisnotrunning,thentheclientwillfailtomakeaconnection.FortheUDPapplication,theclientdoesnotinitiateconnections(orattempttocommunicatewiththeUDPserver)immediatelyuponexecutionProblems1)Trueorfalse.a)SupposeauserrequestsaWebpagethatconsistsofsometextandtwoimages.Forthispagetheclientwillsendonerequestmessageandrecievethreeresponsemessages?假设一个用户请求一个网页,包含一些文本和两个图像。这个页面的客户端将发送一个请求消息和接收三个响应消息?Fb)Trueorfalse.TwodistinctWebpages(e.g.,/research.htmland/students.html)canbesentoverthesamepersistentconnection?真或假。两种截然不同的网页(例如,/research.html和/students.html)可发送相同的持久连接?Tc)Withnon-persistentconnectionsbetweenbrowserandoriginserver,itispossibleforasingleTCPsegmenttocarrytwodistinctHTTPrequestmessages?浏览器和源服务器之间的非持久连接,它有可能为一个单一的TCP段进行两个不同的HTTP请求消息?Fd)TheDate:headerintheHTTPresponsemessageindicateswhentheobjectintheresponsewaslastmodified?日期:

在HTTP响应消息头指示的最后修订在响应对象时?F2)ReadRFC959forFTP.ListalloftheclientcommandsthataresupportedbytheRFC.FTP阅读RFC959。列出所有的客户端支持的命令是由RFC。Accesscontrolcommands:USER,PASS,ACT,CWD,CDUP,SMNT,REIN,QUIT.Transferparameter(参数)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中。什么是“简单文件传输协议”(SFTP)众所周知的端口号?对于“新闻联播transfoer协议”(NNTP)?4)Supposewithinyourwebbrowseryouclickonalinktoobtainawebpage.SupposethattheIPaddressfortheassociatedURLisnotcached(缓存)inyourlocalhost,sothataDNSlookupisnecessarytoobtaintheIPaddress.SupposethatnDNSserversarevisitedbeforeyourhostreceivestheIPaddressfromDNS;thesuccessivevisitsincur(产生)aRTTofRTT1,...,RTTn.Furthersupposethatwebpageassociatedwiththelinkcontainsexactlyoneobject,asmallamountofHTMLtext.LetRTT0denote(表示)theRTTbetweenthelocalhostandtheservercontainingtheobject.Assumingzerotransmissiontimeoftheobject,howmuchtimeelapses(流逝)fromwhentheclientclicksonthelinkuntiltheclientreceivestheobject.假定在你的浏览器中,你点击一个超链接来获得一个web页面。假定相关的URL的IP地址没有缓存在你的本地主机上,因此必须进行DNS查询以获得IP地址。假设你的主机从DNS获得IP地址之前,已经访问了n个DNS服务器,相继产生的RTT依次为RTT1,~RTTn。进一步假设,与连接相关的web网页只含有一个对象,即少量的HTML文本。让RTT0表示本地主机和包含对象的服务器之间的RTT。假设对象传输时间为0,从客户点击连接到接收到对象需要多长时间?ThetotalamountoftimetogettheIPaddressis.OncetheIPaddressisknown,elapsestosetuptheTCPconnectionandanotherelapsestorequestandreceivethesmallobject.ThetotalresponsetimeisReferringtoquestion(4),supposethepagecontainsthreeverysmallobjects.Neglectingtransmissiontimes,howmuchtimeelapseswith(a)nonpersistentHTTPwithnoparallelTCPconnections,(b)nonpersistentHTTPwithparallelconnections,(c)persistentHTTPwithpipelining.提到的问题(4),假设该页面包含三个非常小的物体。忽略的传输时间,间隔时间多长(一)非持久的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是否有任何其他的方法?如果是这样,它们是什么使用?关于HTTP/1.1的怎么样?7)WriteasimpleTCPprogramforaserverthatacceptslinesofinputfromaclientandprintsthelinesontotheserver'sstandardoutput.(YoucandothisbymodifyingtheTCPServer.javaprograminthetext.)Compileandexecuteyourprogram.OnanyothermachinewhichcontainsaWebbrowser,settheproxyserverinthebrowsertothemachineinwhichyourserverprogramisrunning;alsoconfiguretheportnumberappropriately.YourbrowsershouldnowsenditsGETrequestmessagestoyourserver,andyourservershoulddisplaythemessagesonitsstandardoutput.UsethisplatformtodeterminewhetheryourbrowsergeneratesconditionalGETmessagesforobjectsthatarelocallycached.写一个简单的TCP服务器接受从客户端的输入线和输出到服务器的标准输出线方案。(您可以通过修改文本TCPServer.java方案。)编译和执行程序。在任何其他机器,其中包含一个Web浏览器,在浏览器中设置代理服务器在您的服务器程序运行的机器,也适当配置的端口号。您的浏览器现在应该GET请求消息发送到您的服务器,您的服务器上显示的消息,它的标准输出。利用这一平台,以确定是否您的浏览器生成本地缓存的对象,有条件的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脚本?给出了两个流行的网站,使用CGI脚本的例子。说明这些网站如何使用CGI。哪些语言是CGI脚本通常写在?Abbreviationof

Common

Gateway

Interface,

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论