陕西师范大学 计网英文实验报告——UDP
实验报告内容
实验题目:Analyze UDP with Wireshark
实验目的:Understanding the application layer UDP protocol through wireshark packet capture.
实验要求:Complete the experiment and answer the questions through the experimental steps provided by wireshark.
实验器材:omputer and wireshark runtime environment
实验步骤/程序源代码:
- Select one UDP packet from your trace. From this packet, determine how many
fields there are in the UDP header. (You shouldnt look in the textbook! Answer
these questions directly from what you observe in the packet trace )Name these
fields. - By consulting the displayed information in Wireshark’s packet content field for this packet, determine the length (in bytes) of each of the UDP header fields.
- The value in the Length field is the length of what? (You can consult the text for this answer). Verify your claim with your captured UDP packet.
- What is the maximum number of bytes that can be included in a UDP payload? the answer to this question can be determined by your answer to 2. above )
5.What is the largest possible source port number? (Hint: see the hint in 4.) - What is the protocol number for UDP? Give your answer in both hexadecimal and
decimal notation. To answer this question, you ll need to look into the protocol
field of the IP datagram containing this UDP segment(see Figure 4.13 in the text,
and the discussion of IP header fields). - Examine a pair of UDP packets in which your host sends the first UDP packet and the 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 should be the destination of the second packet). Describe the relationship between the port numbers in the two packets.
实验结果分析:
-
Select one UDP packet from your trace. From this packet, determine how many
fields there are in the UDP header. (You shouldnt look in the textbook! Answer
these questions directly from what you observe in the packet trace )Name these
fields.(如图1所示)
A: The UDP header has four fields, Source Port, Destination Port, Length, Checksum. -
By consulting the displayed information in Wireshark’s packet content field for this packet, determine the length (in bytes) of each of the UDP header fields.
A: Each header field of UDP consists of 2 bytes. -
The value in the Length field is the length of what? (You can consult the text for this answer). Verify your claim with your captured UDP packet.
A: The Length field indicates the length of the UDP message (in bytes) including the header. As shown in Figure 1, the Length field is 66 bytes, which is the sum of 58 bytes and 8 bytes of the data segment (Data). -
What is the maximum number of bytes that can be included in a UDP payload? the answer to this question can be determined by your answer to 2. above )
A: The maximum number of bytes that can be included in a UDP payload is 2, which is 65535. In addition to the first 8 bytes, the maximum number is 65535-8=65527 bytes.
5.What is the largest possible source port number? (Hint: see the hint in 4.)
答:The largest possible source port number is 65535.
-
What is the protocol number for UDP? Give your answer in both hexadecimal and
decimal notation. To answer this question, you ll need to look into the protocol
field of the IP datagram containing this UDP segment(see Figure 4.13 in the text,
and the discussion of IP header fields).(如图2所示)
A: Protocol UDP (17) in Figure 2 means:
The UDP protocol number in decimal is: 17
The UDP protocol number in hexadecimal is: 0x11 -
Examine a pair of UDP packets in which your host sends the first UDP packet and the 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 should be the destination of the second packet). Describe the relationship between the port numbers in the two packets.(如图3、4所示)
A: As known in Figures 3 and 4, the destination port number of the datagram sent by the host is 13995, and the source port number received by the host is 7273.