1.实验目的
- 了解HTTP协议及其报文结构
- 了解HTTP操作过程:TCP三次握手、请求和响应交互
- 掌握基于
tcpdump和wireshark软件进行HTTP数据包抓取和分析技术
2.实验环境
- 硬件要求:阿里云云主机ECS 一台。
- 软件要求:Linux/ Windows 操作系统
3.实验内容
使用wget下载新疆大学主页**[www.xju.edu.cn](http://www.xju.edu.cn)**,利用tcpdump抓包并利用wireshark分析。
- 浏览器运行HTTP版本1还是1.1?服务器运行的是什么版本的HTTP?
- 你的电脑的IP地址是什么?服务器呢?
- 从服务器返回到浏览器的状态代码是什么?
- 您在服务器上检索到的HTML文件是在什么时候修改的?
- 有多少字节的内容被返回到浏览器?
- 除以上已回答过的字段外,头部还有哪些字段?在数据包内容窗口中检查原始数据,是否有未在数据包列表中显示的头部?
4.实验结果与分析
1. 下载新疆大学主页并抓包

2. 使用**wireshark**对抓取文件进行分析
2.1 对http协议进行筛选

通过抓包结果可以看到,客户端向服务器请求一个简单的HTML文件,服务器将该文件返回给客户端。
2.2 问题解答
浏览器运行HTTP版本1还是1.1?服务器运行的是什么版本的HTTP?浏览器运行的HTTP版本是1.1,服务器运行的HTTP版本也是1.1。服务器浏览器你的电脑的IP地址是什么?服务器呢?电脑IP为172.16.2.155,服务器IP为100.100.109.104从服务器返回到浏览器的状态代码是什么?返回状态码为200,表示成功处理请求您在服务器上检索到的HTML文件是在什么时候修改的?时间为Tue, 07 Jun 2022 07:02:12 GMT有多少字节的内容被返回到浏览器?有0字节的内容被返回到浏览器除以上已回答过的字段外,头部还有哪些字段?在数据包内容窗口中检查原始数据,是否有未在数据包列表中显示的头部? HTTP请求报文中还有Host字段、connection字段、Accept字段、User-agent字段、Accept-Encoding字段等。HTTP响应报文中还有server字段、connection字段等。
5、实验小结
5.1 问题与解决办法
问题使用Xftp连接服务器时,出现连接错误的情况解决方法使用校园网连接后恢复正常,排查后发现为服务器防火墙原因
5.2 心得体会
- 本次实验报告熟系了对HTTP协议分析过程中代码及软件的操作,实现对课上知识的印证。通过这次实验,我掌握了wget命令使用中的具体流程,了解了常用HTTP协议分析软件的基本用法,提高了自身编程能力。
- 通过这些常用的HTTP分析命令操作,对HTTP协议使用时的跟踪分析,HTTP报文的结构分析,让我印证了上课所学的知识。
1. Objectives
- Understand the HTTP protocol and its message structure
- Understand the HTTP operation process: TCP three-way handshake, request and response interaction
- Master the techniques for capturing and analyzing HTTP packets using
tcpdumpandwireshark
2. Experimental Environment
- Hardware requirement: One Alibaba Cloud ECS instance
- Software requirement: Linux/Windows operating systems
3. Experimental Content
Use wget to download Xinjiang University homepage www.xju.edu.cn, capture packets with tcpdump, and analyze with wireshark.
- Does the browser run HTTP version 1 or 1.1? What version is the server running?
- What are your computer’s IP address and the server’s?
- What is the status code returned from the server to the browser?
- When was the HTML file retrieved on the server last modified?
- How many bytes of content were returned to the browser?
- In addition to the fields already mentioned, what other header fields exist? In the data packet content window, check the raw data to see if there are headers not shown in the packet list?
4. Experimental Results and Analysis
1. Download Xinjiang University homepage and capture packets

2. Use wireshark to analyze the captured file
2.1 Filter the HTTP protocol

From the packet capture results, you can see that the client requests a simple HTML file from the server, and the server returns that file to the client.
2.2 Answers
Does the browser run HTTP version 1 or 1.1? What version is the server running? The browser uses HTTP version 1.1, and the server also uses HTTP version 1.1. What are the IP addresses of your computer and the server? The computer’s IP is 172.16.2.155, the server’s IP is 100.100.109.104. What is the status code returned from the server to the browser? The status code is 200, indicating successful processing of the request. When was the HTML file on the server last modified? The time is Tue, 07 Jun 2022 07:02:12 GMT. How many bytes of content were returned to the browser? 0 bytes were returned. Besides the fields already answered above, what other header fields are there? In the data packet content window, check the raw data; are there headers not displayed in the packet list? The HTTP request message also includes Host, Connection, Accept, User-Agent, Accept-Encoding fields, etc. The HTTP response message also includes Server, Connection fields, etc.
5. Experiment Summary
5.1 Problems and Solutions
The problem: When using Xftp to connect to the server, a connection error occurred. The solution: After switching to the campus network, the connection returned to normal; after investigation, it was found to be caused by the server firewall.
5.2 Reflections
- This experiment report familiarized me with the operation of code and software during HTTP protocol analysis, validating the knowledge learned in class. Through this experiment, I mastered the concrete workflow of using the wget command, understood the basic usage of common HTTP protocol analysis software, and improved my programming ability.
- Through these commonly used HTTP analysis command operations, the tracking and analysis of HTTP protocol usage and the structural analysis of HTTP messages reinforced the knowledge learned in class.
1.実験目的
- HTTPプロトコルおよびそのメッセージ構造を理解する
- HTTP操作の過程を理解する:TCPの三者ハンドシェーク、リクエストとレスポンスのやり取りを理解する
tcpdumpとwiresharkのソフトウェアを用いたHTTPデータパケットのキャプチャと解析技術を習得する
2.実験環境
- ハードウェア要件:Alibaba Cloud の ECS を1台。
- ソフトウェア要件:Linux/Windows オペレーティングシステム
3.実験内容
wgetを使用して新疆大学のトップページ**[www.xju.edu.cn](http://www.xju.edu.cn)**を利用して、tcpdumpでパケットをキャプチャして、wiresharkで解析します。
- ブラウザはHTTPバージョン1か1.1で動作しますか?サーバーはどのHTTPバージョンを動作させていますか?
- あなたのPCのIPアドレスは何ですか?サーバーのIPは?
- サーバーからブラウザへ返されたステータスコードは何ですか?
- サーバー上で取得したHTMLファイルはいつ更新されましたか?
- ブラウザへ返された内容のバイト数はいくつですか?
- 上記ですでに回答したフィールド以外、ヘッダにはどんなフィールドがありますか?データパケットの内容ウィンドウで生データを確認すると、データパケットリストには表示されていないヘッダはありますか?
4.実験結果と分析
1. 新疆大学のトップページのダウンロードとパケットキャプチャ

2. 抽出したファイルをwiresharkで分析する
2.1 HTTPプロトコルのフィルタリング

パケットキャプチャの結果から、クライアントがサーバーに単純なHTMLファイルをリクエストし、サーバーがそのファイルをクライアントへ返すことが分かる。
2.2 質問への回答
ブラウザが使用するHTTPバージョンは1か1.1ですか?サーバーが使用しているHTTPのバージョンは何ですか?ブラウザが使用しているHTTPバージョンは1.1、サーバーが使用しているHTTPのバージョンも1.1です。サーバーからブラウザへ返された状態コードは何ですか?返された状態コードは200で、リクエストの処理が成功したことを示します。サーバー上で取得したHTMLファイルはいつ更新されましたか?時刻はTue, 07 Jun 2022 07:02:12 GMTです。ブラウザへ返された内容のバイト数はいくつですか?0バイトの内容がブラウザへ返されました。上記ですでに回答したフィールド以外、ヘッダにはどんなフィールドがありますか?データパケットの内容ウィンドウで生データを確認すると、パケットリストには表示されていないヘッダはありますか? HTTPリクエストメッセージにはHostフィールド、Connectionフィールド、Acceptフィールド、User-Agentフィールド、Accept-Encodingフィールドなどがあります。HTTPレスポンスメッセージにはServerフィールド、Connectionフィールドなどがあります。
5.実験のまとめ
5.1 問題と解決策
Xftpを使用してサーバへ接続する際、接続エラーが発生しました。解決策としてキャンパス内ネットワークに接続した後、正常に戻りました。原因を調査の結果、サーバのファイアウォールが原因であることが分かりました。
5.2 感想と考察
- 本実験レポートは、HTTPプロトコル分析の過程におけるコードおよびソフトウェアの操作に慣れ、授業で学んだ知識の検証を実現しました。今回の実験を通じて、wgetコマンドの使用手順を具体的に習得し、一般的なHTTPプロトコル分析ソフトウェアの基本的な使い方を理解し、自己のプログラミング能力を向上させました。
- これらの一般的なHTTP分析コマンドの操作を通じて、HTTPプロトコルの使用時の追跡分析、HTTPメッセージの構造分析を通じて、授業で学んだ知識を裏付けました。
部分信息可能已经过时









