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

下載本文檔

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

文檔簡(jiǎn)介

ReviewQuestions

Section2.1

1)Listfivenon-proprietary(三、專有的)Internetapplicationsandthe

application-layerprotocolsthattheyuse.

列舉五種非專用的英特網(wǎng)應(yīng)用以及它們所使用的應(yīng)用層協(xié)議。

applicationsprotocols

e-mailSMTP

WEBHTTP

streamingmultimediaHTTPfRTP

filetransferFTP

remoteterminalaccessTelnet

2)Foracommunicationsession(會(huì)議)betweentwohosts,whichhostisthe

clientandwhichistheserver?

對(duì)倆主機(jī)之間的通信會(huì)話,哪個(gè)主機(jī)是客戶機(jī),哪個(gè)主機(jī)是服務(wù)器?

Theprocesswhichinitiates(發(fā)起)thecommunicationistheclient;

theprocessthatwaitstobecontactedistheserver.

3)Whatinformationisusedbyaprocessrunningononehosttoidentifya

processrunningonanotherhost?

運(yùn)行在一臺(tái)主機(jī)上的進(jìn)程使用什么信息標(biāo)識(shí)運(yùn)行在另一臺(tái)主機(jī)上的進(jìn)程?

TheIPaddressofthedestinationhostandtheportnumberofthedestination

socket.

3)Listthevariousnetwork-applicationuseragentsthatyouuseonadaily

basis.

列舉你每天都會(huì)使用的網(wǎng)絡(luò)應(yīng)用程序用戶代理。

WebbrowserE-mailapplicationuseragent

FileTransferuseragent

P2puseragent

audio/videouseragent

5)ReferringtoFigure2.1-2,weseethatnotnoneofapplicationslistedinthe

tablerequireboth"nodataloss"and"timing".Canyouconceiveofan

applicationthatrequiresnodatalossandthatisalsohighlytimesensitive?

參見(jiàn)圖2.1-2,我們可以看到表中所列舉的應(yīng)用沒(méi)有一個(gè)既要求沒(méi)有數(shù)據(jù)丟失又要求定時(shí)。你能設(shè)想

出一個(gè)應(yīng)用,既既要求沒(méi)有數(shù)據(jù)丟失又要求定時(shí)嗎?

Therearenogoodexamplesofanapplicationthatrequiresnodatalossand

timing.

6)Whatismeantbyahandshakingprotocol?握手協(xié)議的意義?

Aprotocoluseshandshakingifthetwocommunicatingentities

firstexchangecontrolpacketsbeforesendingdatatoeach

other.SMTPuseshandshakingattheapplicationlayer

whereasHTTPdoesnot.

7)WhydoHTTP,FTP,SMTP,POP3andIMAPrunontopofTCPratherthanUDP?

為什么HTTP,FTP,SMTP,POP3和IMAP都運(yùn)行在TCP協(xié)議而不是UDP協(xié)議上?

Theapplicationsassociatedwiththoseprotocolsrequirethatall

applicationdatabereceivedinthecorrectorderandwithout

gaps.TCPprovidesthisservicewhereasUDPdoesnot.

8)Considerane-commercesitethatwantstokeepapurchaserecordforeach

ofitscustomers.DescribehowthiscanbedonewithHTTPauthentication.(認(rèn)

證)Describehowthiscanbedonewithcookies.

考慮一個(gè)電子商務(wù)網(wǎng)站需要保留每一個(gè)客戶的購(gòu)買(mǎi)記錄,描述如何使用HTTP認(rèn)證;描述這是如何

用cookies來(lái)實(shí)現(xiàn)的。

Whentheuserfirstvisitsthesite,thesitereturnsacookienumber.

Thiscookienumberisstoredontheuser'shostandismanaged

bythebrowser.Duringeachsubsequentvisit(andpurchase),

thebrowsersendsthecookienumberbacktothesite.Thusthe

siteknowswhenthisuser(moreprecisely,thisbrowser)is

visitingthesite.

9)WhatisthedifferencebetweenpersistentHTTPwithpipelining(持久HTTP流

水線)andpersistentHTTPwithoutpipelining(沒(méi)有流水線的持久HTTP連接)7Which

ofthetwoisusedbyHTTP/1.1?

InpersistentHTTPwithoutpipelining,thebrowserfirstwaitstoreceiveaHTTPresponse

fromtheserverbeforeissuinganewHTTPrequest.InpersistentHTTPwithpipelining,the

browserissuesrequestsassoonasithasaneedtodoso,withoutwaitingforresponse

messagesfromtheserver.persistentHTTPwithpipeliningisusedbyHTTP/1.1。

10)TelnetintoaWebserverandsendamuli-linerequestmessage.Includein

therequestmessagetheif-modified-since:headerlinetoforcearesponse

messagewiththe304NotModifiedstatuscode.

用Telnet向web服務(wù)器發(fā)送一條多行的請(qǐng)求報(bào)文。在該請(qǐng)求報(bào)文中包含

首部行,迫使響應(yīng)報(bào)文中出現(xiàn)304NotModified狀態(tài)碼。

11)WhyisitsaidthatFTPsendscontrolinformation"outofband"?(頻帶夕卜的)

為什么說(shuō)FTP在“帶外“發(fā)送控制信息?

FTPusestwoparallel(平行的)TCPconnections,oneconnection

forsendingcontrolinformation(suchasarequesttotransfera

file)andanotherconnectionforactuallytransferringthefile.

Becausethecontrolinformationisnotsentoverthesame

connectionthatthefileissentover,FTPsendscontrol

informationoutofband.

12)SupposeAlicewithaWeb-basede-mailaccount(suchasYahoo!mailor

Hotmail)sendsamessagetoBob,whoaccesseshismailfromhismailserver

usingPOP3.DiscusshowthemessagegetsfromAlice'shosttoBob'shost.Be

suretolisttheseriesofapplication-layerprotocolsthatareusedtomovethe

messagebetweenthetwohosts.

假設(shè)Alice使用一個(gè)基于web的電子郵件賬戶向Bob發(fā)送郵件,而B(niǎo)ob使用POP3協(xié)議訪問(wèn)他

的郵件服務(wù)器來(lái)獲取郵件。討論信息是如何從Alice的主機(jī)到Bob的主機(jī)的。一定要列出在兩臺(tái)主

機(jī)間移動(dòng)信息所用的應(yīng)用層協(xié)議。

MessageissentfromAlice'shosttohermailserveroverHTTP.Alice's

mailserverthensendsthemessagetoBob'smailserveroverSMTP.Bobthen

transfersthemessagefromhismailservertohishostoverPOP3.

13)Supposethatyousendane-mailmessagewhoseonlydataisaMicrosoft

Excelattachment.Whatmighttheheaderlines(includingMIMElines)look

like?

假定你發(fā)送一封電子郵件,唯一的數(shù)據(jù)就是一個(gè)表格附件??赡艿氖撞啃?包含MIME行)是什么

樣的?

Subject:hello

MIME-Version:1.0

Content-Transfer-Encoding:base64

Content-Type:Application/MS-Excel

14)Printouttheheaderofamessagethatyouhaverecentlyreceived.How

manyRecieved:headerlinesarethere?Analyzeeachoftheheaderlinesinthe

message.

打印出你最近收到的報(bào)文的首部,在Received中,首部行有多少行?分析該報(bào)文首部行的每一行。

15)Fromauser'sperspective,whatisthedifferencebetweenthe

download-and-deletemodeandthedownload-and-keepmodeinPOP3?

從用戶的觀點(diǎn)來(lái)看,POP3中“下載并刪除”模式和“下載并保留”模式有什么區(qū)別?

Withdownloadanddelete,afterauserretrieves(取回)itsmessagesfrom

aPOPserver,themessagesaredeleted.Thisposesaproblemforthenomadic

(游動(dòng)的)user,whomaywanttoaccessthemessagesfrommanydifferent

machines(officePC,homePC,etc.).

Inthedownloadandkeepconfiguration(配置),messagesarenotdeleted

aftertheuserretrievesthemessages.Thiscanalsobeinconvenient,aseach

timetheuserretrievesthestoredmessagesfromanewmachine,allof

non-deletedmessageswillbetransferredtothenewmachine(includingvery

oldmessages).

16)RedrawFigure2.5-4forwhenallqueriesfromthelocalnameserverare

iterative.

重繪時(shí),從本地域名服務(wù)器所有查詢迭代圖2.5-4。

17)EachInternethostwillhaveatleastonelocalnameserverandone

authoratativenameserver.WhatroledoeseachoftheseservershaveinDNS?

每一臺(tái)英特網(wǎng)主機(jī)都至少有一個(gè)本地域名服務(wù)器和一個(gè)權(quán)威域名服務(wù)器。這兩種服務(wù)器在域名解析中

起什么作用?

Ahostauthoritativenameserverprovidestheofficialtranslationofa

hostnametoanIPaddress(amongotherthings).Ahostlocalnameserver

isaproxy(代理服務(wù)器)totheDNSsystem:thehostfirstqueriesits

localnameserverforamapping;thelocalnameserverthenobtainsthe

mappingonthebehalfof(代表)thequeryinghost.

18)Isitpossiblethatanorganization'sWebserverandmailserverhave

exactlythesamealias(9J^>forahostname(e.g.rfoo)?Whatwouldbethe

"type"fortheRRthatcontainsthehostnameofthemailserver?

一個(gè)機(jī)構(gòu)的web服務(wù)器和郵件服務(wù)能可以有有完全相同的主機(jī)別名嗎?包含了郵件服務(wù)器的主機(jī)

名的RR有什么樣的類型?

YesoAnorganizationmailserverandWebservercanhavethesame

aliasforahostname.TheMXrecordisusedtomapthemailserverhost

nametoitsIPaddress.

19)UsenslookuptofindaWebserverthathasmultipleIPaddresses.Doesthe

Webserverofyourinstitution(school,company,etc.)havemultipleIP

addresses?

使用nslookup找到一個(gè)Web服務(wù)器有多個(gè)IP地址。貴機(jī)構(gòu)的Web服務(wù)器(如學(xué)校,公司,等)

是否有多個(gè)IP地址?

Myinsititutiondoesn'thavemultipleIPaddress.

20)TheUDPserverdescribedinSection2.7onlyneededonesocket,whereas

theTCPserverdescribedinSection2.6neededtwosockets.Why?IftheTCP

serverweretosupportnsimultaneous(同時(shí)發(fā)生的)connections,eachfroma

differentclienthost,howmanysocketswouldtheTCPserverneed?

2.7節(jié)描述的UDP服務(wù)器僅需要一個(gè)套接字,而2?6節(jié)描述的TCP服務(wù)器則需要兩個(gè)套接字。為

什么?如果TCP服務(wù)器要支持n個(gè)并行連接,且每個(gè)連接都來(lái)自不同的客戶機(jī)主機(jī),那么TCP服

務(wù)器需要多少個(gè)套接字?

WiththeUDPserver,thereisnowelcomingsocket,andalldata

fromdifferentclientsenterstheserverthroughthisonesocket.

WiththeTCPserver,thereisawelcomingsocket,andeach

limeaclientinitiates(發(fā)起)aconneclioiitotheserver,anew

socketiscreated.Thus,tosupportnsimultaneousconnections,

theserverwouldneedn+1sockets.

21)Fortheclient-serverapplicationoverTCPdescribedinSection2.6,why

musttheserverprogrambeexecutedbeforetheclientprogram?Forthe

client-serverapplicationoverUDPdescribedinSection2.7,whymaytheclient

programbeexecutedbeforetheserverprogram?

在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,itattemptstoinitiatea

TCPconnectionwiththeserver.IftheTCPserverisnotrunning,thenthe

clientwillfailtomakeaconnection.

FortheUDPapplication,theclientdoesnotinitiateconnections

(orattempttocommunicatewiththeUDPserver)immediatelyupon

execution

PROBLEMS

1)Trueorfalse.

a)SupposeauserrequestsaWebpagethatconsistsofsometextandtwo

images.Forthispagetheclientwillsendonerequestmessageandrecieve

threeresponsemessages?假設(shè)一個(gè)用戶請(qǐng)求一^b網(wǎng)頁(yè),包含一些文本和兩個(gè)圖像。這個(gè)

頁(yè)面的客戶端將發(fā)送一個(gè)請(qǐng)求消息和接收三個(gè)響應(yīng)消息?

F

b)Trueorfalse.TwodistinctWebpages(e.g.z

/research.htmland/students.html)canbesent

overthesamepersistentconnection?真或假。兩種截然不同的網(wǎng)頁(yè)(例如,

/research.html和/students.html)可發(fā)送相同的持久連

接?

T

c)Withnon-persistentconnectionsbetweenbrowserandoriginserver,

itispossibleforasingleTCPsegmenttocarrytwodistinctHTTPrequest

messages?瀏覽器和源服務(wù)器之間的非持久連接,它有可能為一個(gè)單一的TCP段進(jìn)行兩

個(gè)不同的HTTP請(qǐng)求消息?

F

d)TheDate:headerintheHTTPresponsemessageindicateswhenthe

objectintheresponsewaslastmodified?日期:在HTTP響應(yīng)消息頭指示的最

后修訂在響應(yīng)對(duì)象時(shí)?

F

2)ReadRFC959forFTP.Listalloftheclientcommandsthataresupportedbythe

RFC.

FTP閱讀RFC959o列出所有的客戶端支持的命令是由RFC。

Accesscontrolcommands:

USER,PASS,ACT,CWDZCDUP,SMNT,REIN,QUIT.

Transferparameter(參數(shù))commands:

PORT,PASVZTYPESTRU,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"simplefile

transferprotocol"(sftp)?Forthe"networknewstransfoerprotocol"(nntp)?

閱讀RFC1700中。什么是''簡(jiǎn)單文件傳輸協(xié)議“(SFTP)眾所周知的端口號(hào)?對(duì)于''新聞聯(lián)播

transfoer協(xié)議“(NNTP)?

4)Supposewithinyourwebbrowseryouclickonalinktoobtainawebpage.

SupposethattheIPaddressfortheassociatedURLisnotcached(緩存)inyour

localhost,sothataDNSlookupisnecessarytoobtaintheIPaddress.Suppose

thatnDNSserversarevisitedbeforeyourhostreceivestheIPaddressfrom

DNS;thesuccessivevisitsincur(產(chǎn)生)aRTTofRTTi,RTTn.Furthersuppose

thatwebpageassociatedwiththelinkcontainsexactlyoneobject,asmall

amountofHTMLtext.LetRTTodenote(表示)theRTTbetweenthelocalhostand

theservercontainingtheobject.Assumingzerotransmissiontimeoftheobject,

howmuchtimeelapses(流逝)fromwhentheclientclicksonthelinkuntilthe

clientreceivestheobject.

假定在你的瀏覽器中,你點(diǎn)擊一個(gè)超鏈接來(lái)獲得一個(gè)web頁(yè)面。假定相關(guān)的URL的IP地址沒(méi)有緩

存在你的本地主機(jī)上,因此必須進(jìn)行DNS查詢以獲得IP地址。假設(shè)你的主機(jī)從DNS獲得IP地址

之前,已經(jīng)訪問(wèn)了n個(gè)DNS服務(wù)器,相繼產(chǎn)生的RTT依次為RTT1,~RTTn。進(jìn)一步假設(shè),與

連接相關(guān)的web網(wǎng)頁(yè)只含有一個(gè)對(duì)象,即少量的HTML文本。讓RTTO表示本地主機(jī)和包含對(duì)象

的服務(wù)器之間的RTT。假設(shè)對(duì)象傳輸時(shí)間為0,從客戶點(diǎn)擊連接到接收到對(duì)象落要多長(zhǎng)時(shí)間?

ThetotalamountoftimetogettheIPaddressis

町+H7T2+…

OncetheIPaddressisknown,RTTOelapsestosetuptheTCPconnectionand

anotherRTTOelapsestorequestandreceivethesmallobject.Thetotalresponse

timeis

4)Referringtoquestion(4),supposethepagecontainsthreeverysmall

objects.Neglectingtransmissiontimes,howmuchtimeelapseswith(a)

nonpersistentHTTPwithnoparallelTCPconnections,(b)nonpersistent

HTTPwithparallelconnections,(c)persistentHTTPwithpipelining.

提到的問(wèn)題(4),假設(shè)該頁(yè)面包含三個(gè)非常小的物體。忽略的傳輸時(shí)間,間隔時(shí)間多長(zhǎng)(一)

非持久的HTTP沒(méi)有并行的TCP連接,(b)與并行連接的非持久的HTTP,(c)與持久HTTP

流水線。

a)

=8RTT。+RTT[+…+RTT”.

b)

=4R77;+R7T]+…+R7T”.

c)

6)TwoHTTPrequestmethodsareGETandPOST.Arethereanyothermethods

inHTTP/1.0?Ifsozwhataretheyusedfor?HowaboutHTTP/1.1?

兩個(gè)HTTP請(qǐng)求方法是GET和POSTo在HTTP/1.0是否有任何其他的方法?如果是這樣,它們

是什么使用?關(guān)于HTTP/1.1的怎么樣?

7)WriteasimpleTCPprogramforaserverthatacceptslinesofinputfroma

clientandprintsthelinesontotheserver'sstandardoutput.(Youcandothisby

modifyingtheTCPServer.javaprograminthetext.)Compileandexecuteyour

program.OnanyothermachinewhichcontainsaWebbrowser,settheproxy

serverinthebrowsertothemachineinwhichyourserverprogramisrunning;

alsoconfiguretheportnumberappropriately.Yourbrowsershouldnowsend

itsGETrequestmessagestoyourserver,andyourservershoulddisplaythe

messagesonitsstandardoutput.Usethisplatformtodeterminewhetheryour

browsergeneratesconditionalGETmessagesforobjectsthatarelocally

cached.

寫(xiě)一個(gè)簡(jiǎn)單的TCP服務(wù)器接受從客戶端的輸入線和輸出到服務(wù)器的標(biāo)準(zhǔn)輸出線方案。(您可以通過(guò)

修改文本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.WhatisthepurposeoftheUIDLPOP3

command?

閱讀的POP3RFC,RFC1939中。UIDLPOP3命令的目的是什么?

UIDLabbreviates(是?的縮寫(xiě))“unique-IDlisting”.WhenaPOP3

clientissuestheUIDLcommand,theserverrespondswiththeunique

messageIDforallofthemessagespresentintheusersmailbox.This

commandisusefulfor“downloadandkeep”.Bykeepingafilethat

liststhemessagesretrievedinearliersessions,theclientcanusethe

UIDLcommandtodeterminewhichmessagesontheserverhave

alreadybeenseen.

8)InstallandcompiletheJavaprogramsTCPCIientandUDPCIientononehost

andTCPServerandUDPServeronanotherhost.

a)SupposeyourunTCPCIientbeforeyourunTCPServer.Whathappens?

Why?

b)SupposeyourunUDPCIIentbeforeyourunUDPServer.Whathappens?

Why?

c)Whathappensifyouusedifferentportnumbersfortheclientandserver

sides?

9)RewriteTCPServer.javasothatitcanacceptmultipleconnections.(Hint:You

willneedtousethreads.)

MTCPServer.java,以便它能夠接受多個(gè)連接。(提示:您將需要使用線程)。

DISCUSSIONQUESTIONS

1)WhatisaCGIscript?GiveexamplesoftwopopularWebsitesthatuseCGI

scripts.Explainhowthesesite

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(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)論