用Wireshark进行HTTP协议分析.doc_第1页
用Wireshark进行HTTP协议分析.doc_第2页
用Wireshark进行HTTP协议分析.doc_第3页
用Wireshark进行HTTP协议分析.doc_第4页
用Wireshark进行HTTP协议分析.doc_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

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

文档简介

TCP/IP 实 验 报 告实验1 用Wireshark进行HTTP协议分析 学 院 计算机学院 专 业 网络工程 班 级 1班 姓 名 刘小芳 学 号 41009040127 2012 5 1.1 实验性质本实验为操作分析性实验。1.2 实验目的1. 掌握Wireshark软件的基本使用方法。2. 掌握基本的网络协议分析方法。3. 使用Wireshark抓包工具,分析HTTP数据报的格式。4. 加深理解HTTP协议的原理及其工作过程。1.3 实验环境1. 硬件环境:PC机1台。2. 网络环境:PC机接入LAN或Internet。物理地址:00-E0-4C-00-16-78Ip地址:313. 软件环境:Windows操作系统和Wireshark软件。1.4 实验学时2学时(90分钟)。1.5 实验内容与要求1.5.1 启动Wireshark协议分析工具1.5.2 抓取HTTP数据包1.5.3分析HTTP报文1. The Basic HTTP GET/response interaction1. Is your browser running HTTP version 1.0 or 1.1? What version of HTTP is theserver running?HTTP 1.12. What languages (if any) does your browser indicate that it can accept to theserver?Accept-Language: zh-cnrn3. What is the IP address of your computer? Of the server?31 604. What is the status code returned from the server to your browser?200 ok5. When was the HTML file that you are retrieving last modified at the server20 May 2013 09:42:43 GMTrn 6. How many bytes of content are being returned to your browser?4297. 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.有2. The HTTP CONDITIONAL GET/response interactionAnswer the following questions:8. Inspect the contents of the first HTTP GET request from your browser to theserver. 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 thecontents of the file? How can you tell?有 HTTP/1.1 200 OKrn10. Now inspect the contents of the second HTTP GET request from your browser tothe server. Do you see an “IF-MODIFIED-SINCE:” line in the HTTP GET? Ifso, what information follows the “IF-MODIFIED-SINCE:” header?没有11. What is the HTTP status code and phrase returned from the server in response tothis second HTTP GET? Did the server explicitly return the contents of the file?200 没有3. Retrieving Long DocumentsAnswer the following questions:12. How many HTTP GET request messages were sent by your browser?113. How many data-containing TCP segments were needed to carry the single HTTPresponse?414. What is the status code and phrase associated with the response to the HTTP GETrequest?Code 200 phrase ok15. Are there any HTTP status lines in the transmitted data associated with a TCPinduced“Continuation”?no1.6 实验总结http协议工作原理HTTP协议的主要特点可概括如下:1.支持客户/服务器模式。2.简单快速:客户向服务器请求服务时,只需传送请求方法和路径。请求方法常用的有GET、HEAD、POST。每种方法规定了客户与服务器联系的类型不同。由于HTTP协议简单,使得HTTP服务器的程序规模小,因而通信速度很快。3.灵活:HTTP允许传输任意类型的数据对象。正在传输的类型由Content-Type加以标记。4.无连接:无连接的含义是限制每次连接只处理一个请求。服务器处理完客户的请求,并收到客户的应答后,即断开连接。采用这种方式可以节省传输时间。5.无状态:HTTP协议是无状态协议。无状态是指协议对于事务处理没有记忆能力。缺少状态意味着如果后续处理需要前面的信息,则它必须重传,这样可能导致每次连接传送的数据量龃蟆A硪环矫妫诜衿鞑恍枰惹靶畔彼挠鹁徒峡臁?. http协议除了TCP/IP协议,http可以说是最重要,且使用最多的网络协议了假设现在有一个html文件:http.html, 存放在Web服务器上,其URL为/http.html,文件内容为:HTML 代码:http.htmlhello, http现在,一个用户通过IE访问该地址,IE首先将此地址的域名通过DNS转换为一个IP地址,然后通过一个Web服务器开放的端口(默认为80,不为80需在域名后加上“:端口号”,例如:81)与其连接, 然后传送一个类似这样的http请求(使用flashget等下载软件下载文件时,在详细信息里也可以看到类似的信息):GET /http.html HTTP/1.1Host:Accept: */*User-Agent: Mozilla/4.0 (compatible; MSIE.6.0; Windows NT 5.1)Pragma: no-cacheCache-Control: no-cacheConnection: close空行请求的第一行为请求内容, 表示通过GET方法向服务器请求资源,/http.html为请求资源名称,HTTP/1.1 表示使用http协议,版本1.1。然后接下来的几行称为请求信息的标头(header),其中描述了请求的一些信息,比如客户端浏览器标识等。最后一个空行表示请求结束。当Web服务器接收到该请求时,服务器检查所请求的资源是否有效,且是否有相应的权限。如果没有问题,则服务器会传回类似如下的http响应信息:HTTP/1.1 200 OKServer: Microsoft-IIS/5.0Date: Thursday, March 31, 2005 17:15:23 GMTContent-Type: text/htmlContent-Length: 88空行http.htmlhello, http其中第一行的“200”是一个状态码,表示服务器成功完成该请求,如果不成功会返回其他状态码。Content-Type表示返回的数据类型,Content-Length表示返回的

温馨提示

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

评论

0/150

提交评论