ĐẠI HỌC QUỐC GIA TP.
HỒ CHÍ MINH
TRƯỜNG ĐẠI HỌC BÁCH KHOA
KHOA HỌC VÀ KỸ THUẬT MÁY TÍNH
BÁO CÁO
MẠNG MÁY TÍNH THỰC HÀNH (CO3094)
LAB 3A
GV hướng dẫn: Lê Bảo Khánh
SV thực hiện: Ngô Minh Hiệp
Thành phố Hồ Chí Minh, Tháng 10 năm 2024
1 The Assignment
1. Select one UDP packet from your trace. From this packet, determine how many fields there
are in the UDP header. (You shouldn’t look in the textbook! Answer these questions directly
from what you observe in the packet trace.) Name these fields
Answer:
UDP header contains 4 fields: 1. source port; 2. destination port; 3. length; 4. Checksum
2. 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.
Answer: The UDP header has a fixed length of 8 bytes. Each of these 4 header fields is 2 bytes
long.
The UDP header has a fixed length of 8 bytes. Each of these 4 header fields is 2 bytes long.
3. The value in the Length field is the length of what? (You can consult the text for this answer).
What is the length of UDP payload for your selected packet.
Answer: The length field specifies the number of bytes in the UDP segment (header plus data).
An explicit length value is needed since the size of the data field may differ from one UDP
segment to the next. The length of UDP payload for selected packet is 32 bytes. 48bytes - 8
bytes = 40 bytes.
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)
Answer: The maximum number of bytes that can be included in a UDP payload is (2^16 – 1)
bytes plus the header bytes. This gives 65535 bytes – 8 bytes = 65527 bytes.
5. What is the largest possible source port number?
Answer:The largest possible source port number is (2^16 – 1) = 65535.
6. 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).
Answer: The IP protocol number for UDP is 0x11 hex, which is 17 in decimal value.
7. 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.
Answer: The source port of the UDP packet sent by the host is the same as the destination port of
the reply packet, and conversely the destination port of the UDP packet sent by the host is the
same as the source port of the reply packet.