您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 其它文档 > 计算机网络实验报告一
1计算机网络实验报告一班级:智能1401姓名:蒙寿伟学号:201408070120一、HTTP1.TheBasicHTTPGET/responseinteraction实验步骤:1.Startupyourwebbrowser.2.StartuptheEtherealpacketsniffer,asdescribedintheIntroductorylab(butdon’tyetbeginpacketcapture).Enter“http”(justtheletters,notthequotationmarks)inthedisplay-filter-specificationwindow,sothatonlycapturedHTTPmessageswillbedisplayedlaterinthepacket-listingwindow.(We’reonlyinterestedintheHTTPprotocolhere,anddon’twanttoseetheclutterofallcapturedpackets).3.Waitabitmorethanoneminute(we’llseewhyshortly),andthenbeginEtherealpacketcapture.4.Enterthefollowingtoyourbrowser实验结果:1.IsyourbrowserrunningHTTPversion1.0or1.1?WhatversionofHTTPistheserverrunning?结果:我的浏览器HTTP的版本是1.1,服务器的HTTP版本是1.12.Whatlanguages(ifany)doesyourbrowserindicatethatitcanaccepttotheserver?结果:浏览器可以接受的语言版本:zh-Hans-CN,zh-Hans;q=0.8,en-US;q=0.5,en;q=0.33.WhatistheIPaddressofyourcomputer?Ofthegaia.cs.umass.eduserver?结果:电脑的IP地址为192.168.1.8服务器IP为:128.119.245.1224.Whatisthestatuscodereturnedfromtheservertoyourbrowser?结果:状态代码是200(请求成功)5.WhenwastheHTMLfilethatyouareretrievinglastmodifiedattheserver?结果:Last-Modified:Tue,18Apr201705:59:01GMT\r\n6.Howmanybytesofcontentarebeingreturnedtoyourbrowser?结果:返回到浏览器的内容的字节1267.Byinspectingtherawdatainthepacketcontentwindow,doyouseeanyheaderswithinthedatathatarenotdisplayedinthepacket-listingwindow?Ifso,nameone通过检查数据包内容窗口中的原始数据,您会看到任何标题在数据包列表窗口中未显示的数据中?如果是这样,找出一个。结果:没有。2.TheHTTPCONDITIONALGET/responseinteraction实验步骤:•Startupyourwebbrowser,andmakesureyourbrowser’scacheiscleared,as3discussedabove.•StartuptheEtherealpacketsniffer•EnterthefollowingURLintoyourbrowser•QuicklyenterthesameURLintoyourbrowseragain(orsimplyselecttherefreshbuttononyourbrowser)•StopEtherealpacketcapture,andenter“http”inthedisplay-filter-specificationwindow,sothatonlycapturedHTTPmessageswillbedisplayedlaterinthepacket-listingwindow.•(Note:IfyouareunabletorunEtherealonalivenetworkconnection,youcanusethehttp-ethereal-trace-2packettracetoanswerthequestionsbelow;seefootnote1.Thistracefilewasgatheredwhileperformingthestepsaboveononeoftheauthor’scomputers.)实验结果:8.InspectthecontentsofthefirstHTTPGETrequestfromyourbrowsertotheserver.Doyouseean“IF-MODIFIED-SINCE”lineintheHTTPGET?结果:第一次HTTPGET没有看到“IF-MODIFIED-SINCE”9.Inspectthecontentsoftheserverresponse.Didtheserverexplicitlyreturnthecontentsofthefile?Howcanyoutell?检查服务器响应的内容。服务器是否显式返回文件的内容?你怎么知道?结果:返回内容:410.NowinspectthecontentsofthesecondHTTPGETrequestfromyourbrowsertotheserver.Doyouseean“IF-MODIFIED-SINCE:”lineintheHTTPGET?Ifso,whatinformationfollowsthe“IF-MODIFIED-SINCE:”header?客户端第二次请求此URL时,根据HTTP协议的规定,浏览器会向服务器传送If-Modified-Since报头结果:有“IF-MODIFIED-SINCE:”,内容是:If-Modified-Since:Sat,22Apr201705:59:01GMT\r\n11.WhatistheHTTPstatuscodeandphrasereturnedfromtheserverinresponsetothissecondHTTPGET?Didtheserverexplicitlyreturnthecontentsofthefile?Explain.答案:状态码和相应状态信息的值为302MovedTemporarily。代表的意思是新的URL应该被视为临时性的替代。3.RetrievingLongDocuments5实验步骤:•Startupyourwebbrowser,andmakesureyourbrowser’scacheiscleared,asdiscussedabove.•StartuptheEtherealpacketsniffer•EnterthefollowingURLintoyourbrowser•StopEtherealpacketcapture,andenter“http”inthedisplay-filter-specificationwindow,sothatonlycapturedHTTPmessageswillbedisplayed.•(Note:IfyouareunabletorunEtherealonalivenetworkconnection,youcanusethehttp-ethereal-trace-3packettracetoanswerthequestionsbelow;seefootnote1.Thistracefilewasgatheredwhileperformingthestepsaboveononeoftheauthor’scomputers.)实验结果:12.HowmanyHTTPGETrequestmessagesweresentbyyourbrowser?结果:2个GET请求13.Howmanydata-containingTCPsegmentswereneededtocarrythesingleHTTPresponse?需要多少数据包含TCP片段来承载单个HTTP响应?结果:4个14.WhatisthestatuscodeandphraseassociatedwiththeresponsetotheHTTPGETrequest?答案:状态码和短语是200OK:表示请求成功,信息包含在响应的报文中。615.ArethereanyHTTPstatuslinesinthetransmitteddataassociatedwithaTCPinduced“Continuation”?结果:有,对于一个大的HTML文件会被TCP分为若干个独立的包。4.HTMLDocumentswithEmbeddedObjects实验步骤:•Startupyourwebbrowser,andmakesureyourbrowser’scacheiscleared,asdiscussedabove.•StartuptheEtherealpacketsniffer•EnterthefollowingURLintoyourbrowser’slogoisretrievedfromthe’scoverisstoredatthemanic.cs.umass.eduserver.•StopEtherealpacketcapture,andenter“http”inthedisplay-filter-specificationwindow,sothatonlycapturedHTTPmessageswillbedisplayed.•(Note:IfyouareunabletorunEt
本文标题:计算机网络实验报告一
链接地址:https://www.777doc.com/doc-5077413 .html