Wireshark Lab: Analyzing UDP Packets

Overview

In this lab, you will explore the structure and behavior of the User Datagram Protocol (UDP) by using Wireshark to capture and analyze packets. You’ll use the command: nslookup ycp.edu This command sends a DNS query over UDP. You’ll analyze the request and its response using Wireshark.


Lab Objectives


Instructions

  1. Open Wireshark and start a new capture.
  2. In a terminal or command prompt, enter:
    nslookup ycp.edu
    
  3. Stop the capture after the response is received.
  4. Use the display filter udp to isolate UDP packets.

Questions

1. First UDP Segment


2. Length of UDP Header Fields

Using Wireshark:


3. UDP Length Field


4. Maximum UDP Payload Size

Hint: Consider the total size of the Length field and subtract the header size.


5. Maximum Source Port Number


6. UDP Protocol Number in IP Header


7. UDP Query and Response Pair

Find the UDP request sent from your machine and the corresponding response from the server.

For the first packet (the request):

For the second packet (the response):

Explain the relationship between the port numbers in the request and the response. Why are they arranged this way?


Note: Be sure to save your packet capture file (.pcapng) for submission or reference.

Grading

Submit your lab report, including the packet capture file and screenshots, via Marmoset by the scheduled due date listed in the syllabus.

Note: Label your answers clearly using the question numbers above.

How to Save Your Packet Capture

  1. After stopping the capture in Wireshark, go to the File menu.
  2. Select Save As… or Save.
  3. Choose a location on your computer to save the capture file.
  4. Ensure the file extension is .pcap or .pcapng.
  5. Click Save.

Note: All answers should be derived directly from your Wireshark analysis.