Lab UDP
Lab UDP
Start capturing packets in Wireshark and then do something that will cause your host to
send and receive several UDP packets. After stopping packet capture, set your packet
filter so that Wireshark only displays the UDP packets sent and received at your host.
Pick one of these UDP packets and expand the UDP fields in the details window.
1. Select one packet. From this packet, determine how many fields there are in the
UDP header. (Do not look in the textbook! Answer these questions directly from
what you observe in the packet trace.) Name these fields.
There is 4 fields :
i) Source port
ii) Destination port
iii) Length
iv) Checksum
2. From the packet content field, determine the length (in bytes) of each of the UDP
header fields.
Length field is is a simple count of the number of bytes contained in the header
and data sections. The length of this UDP packet is 45 bytes.
4. What is the maximum number of bytes that can be included in a UDP payload.
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 IP
header.)
Hexadecimal = 0x11
Decimal = 161 + 160
= 16+1
= 17
7. Search “UDP” in Google and determine the fields over which the UDP checksum
is calculated.
To calculate UDP checksum a "pseudo header" is added to the UDP header. This
includes:
The checksum is calculated over all the octets of the pseudo header, UDP header
and data. If the data contains an odd number of octets a pad, zero octet is added
to the end of data. The pseudo header and the pad are not transmitted with the
packet.
8. Examine a pair of UDP packets in which the first packet is sent by your host and
the second packet is a reply to the first packet. Describe the relationship between
the port numbers in the two packets.
Extra Credit
1. Capture a small UDP packet. Manually verify the checksum in this packet. Show
all work and explain all steps.