首页 > 其他分享 >Wireshark Lab: IP v7.0

Wireshark Lab: IP v7.0

时间:2022-10-14 19:01:44浏览次数:79  
标签:v7.0 fragment IP header Lab datagram 分片 first

实验文件地址

http://www-net.cs.umass.edu/wireshark-labs/Wireshark_IP_v7.0.pdf
在这里插入图片描述

Question & Answer

1. Select the first ICMP Echo Request message sent by your computer, and expand the Internet Protocol part of the packet in the packet details window. What is the IP address of your computer?

在这里插入图片描述

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

在这里插入图片描述

3. How many bytes are in the IP header? How many bytes are in the payload of the IP datagram? Explain how you determined the number of payload bytes.

在这里插入图片描述

There are 20 bytes in the IP header
The length of the payload of the IP datagram is 84 - 20 = 64 bytes.

4. Has this IP datagram been fragmented? Explain how you determined whether or not the datagram has been fragmented.

在这里插入图片描述

// mf = more fragments
uint16_t offset= ntoh16(iphdr->offset);
bool df= offset&IP_DF != 0;
bool mf= offset&IP_MF != 0;
offset &= IP_OFFMASK;
 
bool is_fragment= true;
if(mf)
{
	if(offset== 0) //first.
	{
	}
	else //middle.
	{
	}
}
else
{
	if(offset== 0) //complete.
	{
		is_fragment= false;
	}
	else //last
	{
	}
}

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?

在这里插入图片描述

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

在这里插入图片描述

stay constant : 
Version
Header Length
Differentiated Services Field
Flags
Protocol
Source Address
Destination Address 

must change:
Identification
Time to Live
Checksum

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

因为IP是无可靠服务,报文不可以按序接收(TCP可以实现按序接收)。
但当报文长度超过MTU而必须分片时,这字段来标识多个分片是否属于同一个报文(同一个报文的标识符相同)。
该字段Flags和Fragment Offest 结合实现在接受端组合分片报文

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

在这里插入图片描述

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

不变。当这个IP封包通过一个路由器时,TTL才会减一。

10. Find the first ICMP Echo Request message that was sent by your computer after you changed the Packet Size in pingplotter to be 2000. Has that message been fragmented across more than one IP datagram?

信息将会被分片。
这是因为收集跟踪的计算机上有一个以太网卡将最大IP数据包的长度限制为1500个字节。

11. Print out the first fragment of the fragmented IP datagram. What information in the IP header indicates that the datagram been fragmented? What information in the IP header indicates whether this is the first fragment versus a latter fragment? How long is this IP datagram?

在这里插入图片描述

Flags:0x20   # 表明分片
Fragment Offset: 0	# 表明第一个分片
Total Length: 1500	# 表明总长度

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?

在这里插入图片描述

Fragment Offset: 1480	# 表明不是第一个分片
由于包大小为2000bytes,一个分片最大为1500bytes,只能够分成两个片,故后面不会再有更多的分片。

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

Fragment Offser & Header Checksum

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

将会创造3个分片。

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

Header Checksum

标签:v7.0,fragment,IP,header,Lab,datagram,分片,first
From: https://www.cnblogs.com/astralcon/p/16792659.html

相关文章

  • Wireshark Lab: DHCP v7.0
    0.实验文件地址WiresharkLab:DHCPv7.0DHCP:动态主机配置协议。允许主机自动获取(被分配)一个IP地址(即插即用)。还允许一台主机得知其他信息,例如它的子网掩码、它的第一跳......
  • Wireshark Lab: Ethernet and ARP v7.0
    0.实验文件地址WiresharkLab:EthernetandARPv7.0数据字段(46~1500字节):这个字段承载了IP数据报。以太网的最大传输单元(MTU)是1500字节。目的地址(6字节):这个字段包含......
  • Wireshark Lab: HTTP v7.0
    0.实验文件地址http://www-net.cs.umass.edu/wireshark-labs/Wireshark_HTTP_v7.0.pdf方法字段可以取不同的值:GET、POST、HEAD、PUT和DELETE。GET:请求服务器发送某个......
  • Wireshark Lab: TCP v7.0
    0.实验文件地址http://www-net.cs.umass.edu/wireshark-labs/Wireshark_TCP_v7.0.pdf序号(seq):用来标识从TCP发送端向TCP接收端发送的数据字节流。它表示在这个报文段......
  • Wireshark Lab: DNS v7.0
    0.实验文件地址http://www-net.cs.umass.edu/wireshark-labs/Wireshark_DNS_v7.0.pdf1.nslookup2.ipconfig3.TracingDNSwithWireshark3.1www.ietf.org3......
  • Design Patterns in JavaScript Constructor, Factory, & Abstract Factory Creationa
    <html><body><h1>DesignPatternsinJavaScriptConstructor,Factory,&AbstractFactoryCreationalPatterns</h1><scripttype="text/javas......
  • ALV 红绿灯 单元格背景色 ion SALV_TEST_TOOLTIPS
    这是一个标准Demo程序,效果:可以直接进系统查看代码SALV_TEST_TOOLTIPS......
  • LcdTools如何编写MIPI指令(初始化代码)
    在LcdTools帮助文档中查看MIPI读写指令描述,如下图    编写LCM初始化代码就是配置LCMDriverIC寄存器值,一般只需用MipiWrite()指令写参数即可;下面......
  • 如何编写 Pipeline 脚本
    前言Pipeline编写较为麻烦,为此,DataKit中内置了简单的调试工具,用以辅助大家来编写Pipeline脚本。调试grok和pipeline指定pipeline脚本名称,输入一段文本即可判断......
  • 部署 GitLab、配置 GitLab、CI/CD 概述、部署 Jenkins
    版本控制版本库版本控制是一种记录一个或若干文件内容变化,以便将来查阅特定版本修订情况的系统。简单来说,就是为目录打快照。将来可以回到某一个历史记录点。是一个典型的......