计算机网络自顶向下WireShark实验:UDP

本文详细解读了如何通过Wireshark分析UDP报头结构,包括字段数量、长度、有效负载限制、源端口范围,以及数据包交互中的端口号对应关系。还涉及UDP协议号查找和协议字段的应用实例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

前言

计算机WireShark实验记录可供参考

题目(有英文原文)

1.Select one UDP packet from your trace. From this packet, determine how manyfields there are in the UDP header. (You shouldn’t look in the textbook! Answerthese questions directly from what you observe in the packet trace.) Name thesefields.
从跟踪中选择一个 UDP 数据包。根据此数据包,确定 UDP 报头中有多少字段。(你不应该看教科书!根据您在数据包跟踪中观察到的情况直接回答这些问题。)命名这些字段。

在这里插入图片描述
长度是57字节,而UDP的有效载荷是49字节,所以UDP的头部所占字节为8字节
2.By consulting the displayed information in Wireshark’s packet content field forthis packet, determine the length (in bytes) of each of the UDP header fields.
通过查阅 Wireshark 数据包内容字段中显示的信息,确定每个 UDP 报头字段的长度(以字节为单位)。

答:8字节
3. The value in the Length field is the length of what? (You can consult the text forthis answer). Verify your claim with your captured UDP packet.
长度字段中的值是什么的长度?(这个答案可以参考正文)。用捕获的 UDP数据包验证您的声明。

答:UDP报文段中的字节数
在这里插入图片描述
4.What is the maximum number of bytes that can be included in a UDP payload?(Hint: the answer to this question can be determined by your answer to 2. above)
UDP 有效负载中可以包含的最大字节数是多少?(提示:这个问题的答案可以由你对 2 的回答来决定。以上)

答:由于长度的表示位只占2字节,所以最多可以表示2^16-1-8个字节
5.What is the largest possible source port number? (Hint: see the hint in 4.)
最大可能的源端口号是多少?(提示:参见 4 中的提示。)

答:源端口号一样占两字节,所以其最大端口号为2^16-1
6.What is the protocol number for UDP? Give your answer in both hexadecimal anddecimal notation. To answer this question, you’ll need to look into the Protocolfield of the IP datagram containing this UDP segment (see Figure 4.13 in the text,and the discussion of IP header fields).
UDP 的协议号是多少?用十六进制和十进制表示法给出你的答案。要回答这个问题,您需要查看包含这个 UDP 段的 IP 数据报的协议字段(参见文本中的图 4.13,以及对 IP 报头字段的讨论)。

答:
在这里插入图片描述
7. Examine a pair of UDP packets in which your host sends the first UDP packet andthe second UDP packet is a reply to this first UDP packet. (Hint: for a second
packet to be sent in response to a first packet, the sender of the first packet shouldbe the destination of the second packet). Describe the relationship between theport numbers in the two packets.
检查一对 UDP 数据包,其中您的主机发送第一个 UDP 数据包,第二个 UDP 数据包是对此第一个 UDP 数据包的回复。(提示:对于响应第一个数据包而发送的第二个数据包,第一个数据包的发送方应该是第二个数据包的目的地)。描述两个数据包中端口号之间的关系

答:端口号之间是对应的

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值