| |
|
开发:
C++知识库
Java知识库
JavaScript
Python
PHP知识库
人工智能
区块链
大数据
移动开发
嵌入式
开发工具
数据结构与算法
开发测试
游戏开发
网络协议
系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程 数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁 |
-> 开发测试 -> Wireshark-Lab7:ICMP -> 正文阅读 |
|
[开发测试]Wireshark-Lab7:ICMP |
更好的阅读体验Lab7:ICMPIn this lab, we’ll explore several aspects of the ICMP protocol: 在本实验中,我们将探讨 ICMP 协议的几个方面:
Before attacking this lab, you’re encouraged to review the ICMP material in section 5.6 of the text1 . We present this lab in the context of the Microsoft Windows operating system. However, it is straightforward to translate the lab to a Unix or Linux environment. 在开始本实验之前,我们建议您查看课本的 5.6 节中的 ICMP 章节。此实验是在Windows 下完成的,如果您使用其他系统也不用担心,因为大体都相同。 1. ICMP and Ping ICMP 协议和 Ping 程序Let’s begin our ICMP adventure by capturing the packets generated by the Ping program. You may recall that the Ping program is simple tool that allows anyone (for example, a network administrator) to verify if a host is live or not. The Ping program in the source host sends a packet to the target IP address; if the target is live, the Ping program in the target host responds by sending a packet back to the source host. As you might have guessed (given that this lab is about ICMP), both of these Ping packets are ICMP packets. 让我们通过捕获 Ping 程序生成的数据包开始我们的 ICMP 实验。 您可能还记得Ping 程序是一个简单的工具,允许任何人(例如:网络管理员)验证主机是否存标主机中的 Ping 程序将会发送响应 Ping 数据包证明他在线,这两个 Ping 数据包都是 ICMP 数据包。 因此您可能猜出我们这个实验都是关于 ICMP 的实验了。 Do the following : 请按照以下动作做:
At the end of the experiment, your Command Prompt Window should look something like Figure 1. In this example, the source ping program is in Massachusetts and the destination Ping program is in Hong Kong. From this window we see that the source ping program sent 10 query packets and received 10 responses. Note also that for each response, the source calculates the round-trip time (RTT), which for the 10 packets is on average 375 msec. 在实验结束时,您的命令提示符窗口应如图 1 所示。在此示例中,源 ping 程序位于马萨诸塞州,目标 Ping 程序位于香港。 从这个窗口我们看到源 ping 程序发送了10 个查询包并收到了 10 个响应。 另请注意,对于每个响应,源计算往返时间(RTT),对于 10 个数据包平均为 375 毫秒。 Figure 2 provides a screenshot of the Wireshark output, after “icmp” has been entered into the filter display window. Note that the packet listing shows 20 packets: the 10 Ping queries sent by the source and the 10 Ping responses received by the source. Also note that the source’s IP address is a private address (behind a NAT) of the form 192.168/12; the destination’s IP address is that of the Web server at HKUST. Now let’s zoom in on the first packet (sent by the client); in the figure below, the packet contents area provides information about this packet. We see that the IP datagram within this packet has protocol number 01, which is the protocol number for ICMP. This means that the payload of the IP datagram is an ICMP packet. 如图 2,在将“icmp”输入过滤器显示窗口后 Wireshark 输出的屏幕截图。 请注意,数据包列表显示 20 个数据包:源发送的 10 个 Ping 查询和源接收的 10 个 Ping 响应。 另请注意,源的 IP 地址是 192.168 / 12 格式的私有地址(通过 NAT 协议连接互联网); 目的地的 IP 地址是香港科技大学网络服务器的 IP 地址。 现在让我们点击显示第一个由客户端发送的数据包; 在图中的下方,数据包内容区域提供有关此数据包的信息。 我们看到该数据包中的 IP 数据报具有协议号 01,这是 ICMP 的协议号。 这意味着 IP 数据报的有效载荷是 ICMP 数据包。 Figure 3 focuses on the same ICMP but has expanded the ICMP protocol information in the packet contents window. Observe that this ICMP packet is of Type 8 and Code 0 - a so-called ICMP “echo request” packet. (See Figure 5.19 of text.) Also note that this ICMP packet contains a checksum, an identifier, and a sequence number. 图 3 同样使用相同的 ICMP 过滤器,展开可以看到该 ICMP 包的详情信息。 观察到该 ICMP 数据包是类型 8 和代码 0 ——所谓的 ICMP“回应请求”数据包。 (请参见书本的图 5.19。)此外,此 ICMP 数据包包含校验和,标识符和序列号。 What to Hand In: 回答问题 You should hand in a screen shot of the Command Prompt window similar to Figure 1 above. Whenever possible, when answering a question below, you should hand in a printout of the packet(s) within the trace that you used to answer the question asked. Annotate the printout3 to explain your answer. To print a packet, use File->Print, choose Selected packet only, choose Packet summary line, and select the minimum amount of packet detail that you need to answer the question. 请善用标记来展示您的答案请尽量清晰的展示您的答案,必要时您可以在图中用标记辅以说明。您的答案应该简单可读。 You should answer the following questions: 请回答以下问题:
2. ICMP and Traceroute ICMP 协议和 Traceroute 命令Let’s now continue our ICMP adventure by capturing the packets generated by the Traceroute program. You may recall that the Traceroute program can be used to figure out the path a packet takes from source to destination. Traceroute is discussed in Section 1.4 and in Section 5.6 of the text. 现在让我们通过捕获 Traceroute 程序生成的数据包继续我们的 ICMP 实验。 您可能还记得 Traceroute 程序可用于确定数据包从源到目的地的路径。 Traceroute 命令可以在课本中的 1.4 节和 5.6 节中找到。 Traceroute is implemented in different ways in Unix/Linux/MacOS and in Windows. In Unix/Linux, the source sends a series of UDP packets to the target destination using an unlikely destination port number; in Windows, the source sends a series of ICMP packets to the target destination. For both operating systems, the program sends the first packet with TTL=1, the second packet with TTL=2, and so on. Recall that a router will decrement a packet’s TTL value as the packet passes through the router. When a packet arrives at a router with TTL=1, the router sends an ICMP error packet back to the source. In the following, we’ll use the native Windows tracert program. A shareware version of a much nice Windows Traceroute program is pingplotter (www.pingplotter.com). We’ll use pingplotter in our Wireshark IP lab since it provides additional functionality that we’ll need there. 每个系统有不同路由跟踪实现办法,在 Unix / Linux 中,路由跟踪 traceroute 使用发送不可到达(无使用的)端口的 UDP 包来实现,在 Windows 中,路由跟踪tracert 仅使用 ICMP 数据包来实现,但是对于他们来说,都是发送 TTL 增加的数据包,例如 TTL=1,TTL=2,回想下,每经过一个路由器,TTL 就会减一,当 TTL=1的包达到路由器,该路由器会将该包丢弃,并且发送 ICMP 错误给请求的机器,在本次实验,我们使用 window 自带的 tracert。有一个跨平台 Windows Traceroute 程序的是 pingplotter(www.pingplotter.com)(收费但可以试用)。 我们将在Wireshark IP 实验室中使用 pingplotter,因为它提供了我们在那里需要的其他功能。 Do the following4 : 请执行以下步骤
At the end of the experiment, your Command Prompt Window should look something like Figure 4. In this figure, the client Traceroute program is in Massachusetts and the target destination is in France. From this figure we see that for each TTL value, the source program sends three probe packets. Traceroute displays the RTTs for each of the probe packets, as well as the IP address (and possibly the name) of the router that returned the ICMP TTL-exceeded message. 在实验结束时,您的命令提示符窗口应如图 4 所示。在此图中,客户端 Traceroute程序主机位于马萨诸塞州,目标主机位于法国。 从该图中我们看到,对于每个TTL 值,源程序发送三个探测包。 Traceroute 显示每个探测包的 RTT,以及返回ICMP TTL 超出消息的路由器的 IP 地址(可能还有名称)。 Figure 5 displays the Wireshark window for an ICMP packet returned by a router. Note that this ICMP error packet contains many more fields than the Ping ICMP messages. 图 5 显示了路由器返回的 ICMP 数据包的 Wireshark 窗口。 请注意,此 ICMP 错误数据包包含的字段比 Ping ICMP 消息多得多。 What to Hand In: 回答问题 For this part of the lab, you should hand in a screen shot of the Command Prompt window. Whenever possible, when answering a question below, you should hand in a printout of the packet(s) within the trace that you used to answer the question asked. Annotate the printout to explain your answer. To print a packet, use File->Print, choose Selected packet only, choose Packet summary line, and select the minimum amount of packet detail that you need to answer the question. 请尽量清晰的展示您的答案,必要时您可以在图中用标记辅以说明。您的答案应该简单可读。 Answer the following questions: 请回答以下问题:
3. Extra Credit 额外问题For one of the programming assignments you created a UDP client ping program. This ping program, unlike the standard ping program, sends UDP probe packets rather than ICMP probe packets. Use the client program to send a UDP packet with an unusual destination port number to some live host. At the same time, use Wireshark to capture any response from the target host. Provide a Wireshark screenshot for the response as well as an analysis of the response. 对于一个编程任务,您可能创建了一个 UDP 客户端 ping 程序。 与标准 ping 程序不同,此 ping 程序发送 UDP 探测包而不是 ICMP 探测包。 使用客户端程序将具有异常目标端口号的 UDP 数据包发送到某个活动主机。 同时,使用 Wireshark 捕获目标主机的任何响应。 提供响应的 Wireshark 屏幕截图以及响应分析。 |
|
开发测试 最新文章 |
pytest系列——allure之生成测试报告(Wind |
某大厂软件测试岗一面笔试题+二面问答题面试 |
iperf 学习笔记 |
关于Python中使用selenium八大定位方法 |
【软件测试】为什么提升不了?8年测试总结再 |
软件测试复习 |
PHP笔记-Smarty模板引擎的使用 |
C++Test使用入门 |
【Java】单元测试 |
Net core 3.x 获取客户端地址 |
|
上一篇文章 下一篇文章 查看所有文章 |
|
开发:
C++知识库
Java知识库
JavaScript
Python
PHP知识库
人工智能
区块链
大数据
移动开发
嵌入式
开发工具
数据结构与算法
开发测试
游戏开发
网络协议
系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程 数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁 |
360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 | -2024/11/18 0:26:06- |
|
网站联系: qq:121756557 email:121756557@qq.com IT数码 |