计算机网络实验报告年级:姓名:学号:
实验日期:
实验名称:实验三利用Ethereal分析HTTP协议
一、实验目的
1、利用抓包工具wireshark来分析http协议;
2、通过分析HTTP协议,探讨有关HTTP协议的以下几个方面:
(1)、基本的GET /响应交互,
(2)、HTTP的消息格式,
(3)、获取较大的HTML文件,
(4)、检索与嵌入HTML文件对象,
(5)、和HTTP身份验证和安全性。
二、实验器材
1、接入Internet的计算机主机;
2、抓包工具wireshark和截图工具snagit。
三、实验内容
(一). The Basic HTTP GET/response interaction
1. Is your browser running HTTP version 1.0 or 1.1? What version of HTTP is
theserver running?
答:我的浏览器上运行HTTP version 1.1如下图
2. What languages (if any) does your browser indicate that it can accept to
theserver?
答:浏览器所能接受的语言为:简体中文accept language : zh -cn\r\n 截图如下:
3. What is the IP address of your computer? Of the server? 答:本机IP地址:10.0.163.199,服务器IP地址:128.119.245.12 截图如下:
4. What is the status code returned from the server to your browser?
答:状态码及状态码200ok截图如下:
5. When was the HTML file that you are retrieving last modified at the server?
6. How many bytes of content are being returned to your browser?
7. By inspecting the raw data in the packet content window, do you see any headerswithin the data that are not displayed in the packet-listing window? If so, nameone.
答:没有。
(二). The HTTP CONDITIONAL GET/response interaction1
8. Inspect the contents of the first HTTP GET request from your browser to the server. Do you see an “IF-MODIFIED-SINCE” line in the HTTP GET?
答:没有看到。
9. Inspect the contents of the server response. Did the server explicitly return the contents of the file? How can you tell?
答:反回了,如下图所示
10. Now inspect the contents of the second HTTP GET request from your browser
to the server. Do you see an “IF-MODIFIED-SINCE:” line in the HTTP GET? If so, what information follows the “IF-MODIFIED-SINCE:” header?
答:实验结果如下图所示
11. What is the HTTP status code and phrase returned from the server in response
to this second HTTP GET? Did the server explicitly return the contents of the file?
Explain.
答:状态码和相应状态信息的值为304 Not Modified,它表示缓存器可以使用该对象。
第二次没有返回文件的内容,因为他只是作为对该条件GET的响应,Web服务器只发送一个响应报文,不包含请求的对象。
截图如下
(三). Retrieving Long Documents
12. How many HTTP GET request messages were sent by your browser?
答:一个,结果如下图
13. How many data-containing TCP segments were needed to carry the single
HTTP response?
答:结果如下图
状态码和短语是200 OK:表示请求成功,信息包含在响应的报文中。
14. What is the status code and phrase associated with the response to the
HTTPGET request?
状态码和短语是200 OK:表示请求成功,信息包含在响应的报文中。
15. Are there any HTTP status lines in the transmitted data associated with a
TCPinduced“Continuation”?
答:有,对于一个大的HTML文件会被TCP分为若干个独立的包,他们彼此相互
连续,如下所示为他们引诱所产生的
(四). HTML Documents with Embedded Objects
16. How many HTTP GET request messages were sent by your browser? To which
Internet addresses were these GET requests sent?
答:有四个,如下图中
17. Can you tell whether your browser downloaded the two images serially, or
whether they were downloaded from the two web sites in parallel? Explain.
第一个图片无法显示
18. What is the server’s response (status code and phrase) in response to the initial
HTTP GET message from your browser?
19. When your browser’s sends the HTTP GET m essage for the second time, what
new field is included in the HTTP GET message?
四、实验总结
1、通过实验让自己更深的了解了HTTP协议;
2、在实验中遇到一些问题,通过不断的思考与试验,自己解决了问题,收获很多;
3、试验增强了自己的动手能力。