“TCP/IP技术与应用”
实 验 报 告
实验一 HTTP报文分析
一、实验目的
? 熟悉HTTP的报文格式 ? 熟练Ethereal的使用方法
二、实验环境
? Windows操作系统 ? Ethereal协议分析仪
三、试验要求
1. Basic HTTP GET/response interaction
Open and examine the Ethereal captured packet file http-ethereal-trace-1, and then answer the following questions.
1) Is your browser running HTTP version 1.0 or 1.1? What version of HTTP is the server running? HTTP/1.1,HTTP/1.1
2) What languages (if any) does your browser indicate that it can accept to the server?
Answer:
3) What is the IP address of your computer? Of the gaia.cs.umass.edu server? Answer:192.168.1.102 63.240.76.19
4) What is the status code returned from the server to your browser?
Answer:200 HTTP/1.1 200 OK(text/html) 404 HTTP/1.1 404 Not Found(text/html)
5) When was the HTML file that you are retrieving last modified at the server?
Answer: 6) How many bytes of content are being returned to your browser?
Answer:
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.
Answer: Yes
2. The HTTP CONDITIONAL GET/response interaction
Open and examine the Ethereal captured packet file http-ethereal-trace-2, and then answer the following questions.
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? Answer: No
9) Inspect the contents of the server response. Did the server explicitly return the contents of the file?
How can you tell? Answer: Yes,
10) 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?
Answer: Yes. Date after Tue,23 Sep 2003 05:35:00 GMT
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. Answer:
NO,因为第一次访问后已经返回,第二次申请时未变
3. Retrieving Long Documents
Open and examine the Ethereal captured packet file http-ethereal-trace-3, and then answer the following questions.
12) How many HTTP GET request messages were sent by your browser? Answer:1
13) How many data-containing TCP segments were needed to carry the single HTTP response?
Answer:4
14) What is the status code and phrase associated with the response to the HTTP GET request? Answer:
15) Are there any HTTP status lines in the transmitted data associated with a TCP induced
“Continuation”? Answer: NO
4. HTML Documents with Embedded Objects
Open and examine the Ethereal captured packet file http-ethereal-trace-4, and then answer the following questions.
16) How many HTTP GET request messages were sent by your browser? To which Internet
addresses were these GET requests sent? Answer: 3,
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.
Answer: Parallel,因为第一次请求图片,未等到回复就继续第二次申请
试验二 TCP 报文分析
一、实验目的
? 熟悉TCP的报文格式 ? 熟练Ethereal的使用方法
二、实验环境
? Windows操作系统 ? Ethereal协议分析仪
三、试验要求
Open and examine the Ethereal captured packet file tcp-ethereal-trace-1, and then answer the following questions.
1. What is the IP address and TCP port number used by the client computer (source) that is
transferring the file to gaia.cs.umass.edu? Answer:
TCP segments for this connection? Answer:
2. What is the IP address of gaia.cs.umass.edu? On what port number is it sending and receiving
3. What is the sequence number of the TCP SYN segment that is used to initiate the TCP
connection between the client computer and gaia.cs.umass.edu? What is it in the segment that identifies the segment as a SYN segment? Answer:0,Flags中SYN为1
4. What is the sequence number of the SYNACK segment sent by gaia.cs.umass.edu to the client