NAME: 孙浩

ID:2024141530052

在 pingplotter 中设置 Packet Size 字段分别为 56、2000、3500,使用 wireshark 抓包

查看 icmp 回显请求

# 1.What is the IP address of your computer?

10.89.61.245

# 2.Within the IP packet header, what is the value in the upper layer protocol field?

Protocol: ICMP (1)

# 3.How many bytes are in the IP header? How many bytes are in the payload of the IP datagram?

IP 首部长度 = 20 bytes
IP 数据报总长度 = 56 bytes
IP payload 长度 = 56 - 20 = 36 bytes

# 4.Has this IP datagram been fragmented?

Flags: 0x0
Fragment Offset: 0,没有发生分片。

# 5.Which fields in the IP datagram always change from one datagram to the next within this series of ICMP messages sent by your computer?

Identification
TTL
Header Checksum

# 6.Which fields stay constant? Which of the fields must stay constant? Which fields must change? Why?

保持不变的字段通常有:

1
2
3
4
5
6
7
8
9
Version
Header Length
Differentiated Services Field
Total Length
Flags
Fragment Offset
Protocol
Source Address
Destination Address

必须保持不变的字段有:

1
2
3
4
5
Source Address
Destination Address
Protocol
Version
Header Length

原因是这些 ICMP Echo Request 都是从同一台主机发往同一个目标主机,并且使用的都是 ICMP 协议。

必须变化的字段有:

1
2
3
Identification
TTL
Header Checksum

原因:

1.TTL 必须变化,因为 traceroute/PingPlotter 依靠不同 TTL 值来发现路径上的路由器。

2.Identification 一般会随着每个新的 IP 数据报递增或变化。

3.Header Checksum 需要根据 IP 首部重新计算,因此当 TTL 或 Identification 改变时,校验和也会变化。

# 7.Describe the pattern you see in the values in the Identification field of the IP datagram.

可以观察到 Identification 字段逐渐增加,由 0x57e5 到 0x57e9

# 8.What is the value in the Identification field and the TTL field?

由第一跳路由器返回给本机的 ICMP TTL Exceeded 报文

Identification: 0x57e5
TTL: 255

# 9.Do these values remain unchanged for all of the ICMP TTL-exceeded replies sent to your computer by the nearest router? Why?

保持不变。

原因是这些 ICMP TTL-exceeded 报文都来自同一个第一跳路由器,因此该路由器生成这些返回报文时,使用的初始 TTL 和 Identification 规则通常相同。

# 10.Find the first ICMP Echo Request message sent after Packet Size was changed to 2000. Has that message been fragmented across more than one IP datagram?

该 ICMP Echo Request 被分片成了两个 IP 数据报。

# 11.Print out the first fragment. What information in the IP header indicates that the datagram has been fragmented? What information indicates this is the first fragment? How long is this IP datagram?

第一个分片是 Frame 602。该分片的 More fragments 标志被设置,说明该 IP 数据报后面还有其他分片,因此原始数据报已经发生分片。该分片的 Fragment Offset 为 0,说明它是原始数据报的第一个分片。该 IP 数据报的总长度由在 Total Length 字段为 1500 bytes。

# 12.Print out the second fragment of the fragmented IP datagram. What information in the IP header indicates that this is not the first datagram fragment? Are the more fragments? How can you tell?

第二个分片是 Frame 603。该分片的 Fragment Offset 大于 0,说明它不是第一个分片,而是后续分片。同时 More fragments 标志未设置,说明该分片后面没有更多分片,因此它是最后一个分片。

# 13.What fields change in the IP header between the first and second fragment?

IP 首部中发生变化的字段有 Total LengthFlags 中的 More fragments 以及 Fragment Offset

# 14.How many fragments were created from the original datagram?

Packet Size = 3500 后,原始 IP 数据报被分成了 3 个分片。

# 15.What fields change in the IP header among the fragments?

在 Packet Size = 3500 的三个分片之间,IP 首部中发生变化的字段主要有 Total LengthFlags 中的 More fragments 标志以及 Fragment Offset

更新于 阅读次数