计算机网络实验

实验1:HTTP
一、 实验内容。
使用Wireshark对HTTP协议从多方面进行研究和分析,如基础GET/Response交互、HTTP报文格式、检索大型HTML文件、检索带有嵌入对象的 HTML 文件以及HTTP鉴权与安全。

二、 实验操作步骤及结果。

  1. 基础GET/Response交互
    (1) 打开浏览器、Wireshark。在Wireshark中使用“http”过滤内容。
    (2) 在浏览器中访问http://gaia.cs.umass.edu/wireshark-labs/HTTP-wireshark-file1.html
    (3) 停止Wireshark 包嗅探。在Wireshark中发现两条侦测记录

(4) 相关问题回答

  1. Is your browser running HTTP version 1.0 or 1.1? What version of HTTP is the server running?

由请求行的 Request Version 和响应中的 Response Version 可知,浏览器和服务器都运行的是 HTTP/1.1。
2. What languages (if any) does your browser indicate that it can accept to the server?
由请求头中的 Accept-Language 字段可知浏览器能接受: zh-CN、zh、en、en-GB、en-US。
3. What is the IP address of your computer? Of the gaia.cs.umass.edu server?
从 Source IP 和 Destination IP 可知
本电脑的 IP 为 10.27.125.194,Server IP为128.119.245.12
4. What is the status code returned from the server to your browser?

200
5. When was the HTML file that you are retrieving last modified at the server?

  1. How many bytes of content are being returned to your browser?

540 bytes
7. By inspecting the raw data in the packet content window, do you see any headers within the data that are not displayed in the packet-listing window? If so, name one.
None,已全部显示

  1. The HTTP CONDITIONAL GET/response interaction
    (1)同之前操作,访问http://gaia.cs.umass.edu/wireshark-labs/HTTP-wireshark-file2.html
    然后刷新页面,得到侦测记录

(2)相关问题回答

  1. 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?
    由于是第一次请求,没有“IF-MODIFIED-SINCE” line
  2. Inspect the contents of the server response. Did the server explicitly return the contents of the file? How can you tell?

第一次请求准确返回了。
第二次请求没有文件内容返回
3. 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?

存在该 Header,内容如图
4. 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,意味浏览器缓存已经存储了最新信息,服务器不返回文件
3. Retrieving Long Documents

(1)步骤同前访问http://gaia.cs.umass.edu/wireshark-labs/HTTP-wireshark-file3.html
得到侦测记录

(2)相关问题回答

  1. How many HTTP GET request messages did your browser send? Which packet number in the trace contains the GET message for t
  • 2
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值