UDP Lab Exercise: Understanding User Datagram Protocol, Schemes and Mind Maps of Law

This lab exercise provides a comprehensive guide to understanding the user datagram protocol (udp), a transport protocol used in the internet. It covers key concepts like udp message structure, header fields, and practical applications. The exercise includes step-by-step instructions for capturing and analyzing udp traffic using wireshark, a network protocol analyzer. It also explores the relationship between udp and other protocols like ip and dns, and examines the use of broadcast and multicast addresses in udp communication.

Typology: Schemes and Mind Maps

2023/2024

Uploaded on 12/16/2024

shichien0716
shichien0716 🇯🇵

1 document

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Lab Exercise UDP
Objective
To look at the details of UDP (User Datagram Protocol). UDP is a transport protocol used throughout the
Internet as an alternative to TCP when reliability is not required. It is covered in §6.4 of your text. Re-
view that section before doing this lab.
The trace file is here: https://kevincurran.org/com320/labs/wireshark/trace-udp.pcap
Step 1: Capture a Trace
There are many ways to cause your computer to send and receive UDP messages since UDP is widely
used as a transport protocol. The easiest options are to:
Do nothing but wait for a while. UDP is used for many “system protocols” that typically run in
the background and produce small amounts of traffic, e.g., DHCP for IP address assignment and
NTP for time synchronization.
Use your browser to visit sites. UDP is used by DNS for resolving domain names to IP addresses,
so visiting fresh sites will cause DNS traffic to be sent. Be careful not to visit unsafe sites; pick
recommended sites or sites you know about but have not visited recently. Simply browsing the
web is likely to cause a steady stream of DNS traffic.
Start up a voice-over-IP call or simply open wireshark as your network may have UDP packets
flowing from various devices. UDP is used by RTP, which is the protocol commonly used to carry
media samples in a voice or video call over the Internet.
pf3
pf4
pf5

Partial preview of the text

Download UDP Lab Exercise: Understanding User Datagram Protocol and more Schemes and Mind Maps Law in PDF only on Docsity!

Lab Exercise – UDP

Objective

To look at the details of UDP (User Datagram Protocol). UDP is a transport protocol used throughout the Internet as an alternative to TCP when reliability is not required. It is covered in §6.4 of your text. Re- view that section before doing this lab. The trace file is here: https://kevincurran.org/com320/labs/wireshark/trace-udp.pcap

Step 1: Capture a Trace

There are many ways to cause your computer to send and receive UDP messages since UDP is widely used as a transport protocol. The easiest options are to:

  • Do nothing but wait for a while. UDP is used for many “system protocols” that typically run in the background and produce small amounts of traffic, e.g., DHCP for IP address assignment and NTP for time synchronization.
  • Use your browser to visit sites. UDP is used by DNS for resolving domain names to IP addresses, so visiting fresh sites will cause DNS traffic to be sent. Be careful not to visit unsafe sites; pick recommended sites or sites you know about but have not visited recently. Simply browsing the web is likely to cause a steady stream of DNS traffic.
  • Start up a voice-over-IP call or simply open wireshark as your network may have UDP packets flowing from various devices. UDP is used by RTP, which is the protocol commonly used to carry media samples in a voice or video call over the Internet.

Proceed as follows to capture a trace of UDP traffic; alternatively, you may use a supplied trace:

  1. Launch Wireshark, select the correct interface and then start a capture with a filter of “udp “. Figure 1 : Setting up the capture options
  2. When the capture is started, perform some activities that will generate UDP traffic. We de- scribed several options above, e.g., browse the web or start a short VoIP call.
  3. Wait a little while (say 60 seconds) after you have stopped your activity to also observe any background UDP traffic. It is likely that you will observe a trickle of UDP traffic because system activity often uses UDP to communicate. We want to see some of this activity.
  4. Use the Wireshark menus or buttons to stop the capture. You should now have a trace with pos- sibly many UDP packets. Our example is shown below. We have selected a packet and expand- ed the detail of the UDP header. Figure 2 : Trace of UDP traffic showing the details of the UDP header

Step 3: UDP Message Structure

To check your understanding of UDP, you should sketch a figure of the UDP message structure as you ob- served. It should show the position of the IP header, UDP header, and UDP payload. Within the UDP header, show the position and size of each UDP field you can observe using Wireshark. Your figure can simply show the message as a long, thin rectangle. Try not to look at the figure of a UDP segment in the answer on next page. To work out sizes, observe that when you click on a protocol block in the middle panel (the block itself, not the “+” expander) then Wireshark will highlight the bytes it corresponds to in the packet in the lower panel and display the length at the bottom of the window. By looking at the details of the UDP messages in your trace, answer these questions:

  1. What does the Length field include? The UDP payload, UDP payload and UDP header, or UDP payload, UDP header, and lower layer headers?
  2. How long in bits is the UDP checksum?
  3. How long in bytes is the entire UDP header? (Please note that answers are on next page).

Solutions – Step 3 UDP Message Structure Figure 1 : Structure of a UDP message This drawing shows the same UDP header fields as in the book in a slightly different format and with lengths given in bytes, not bits. It also shows the relation of the IP header and UDP payload to the UDP header. The answers to the questions are:

  1. The Length field gives the length of the UDP payload plus the UDP header.
  2. The checksum is 16 bits long.
  3. The UDP header is 8 bytes long. [END]

Solutions to Step 4: UDP Usage The answers to the questions are:

  1. The IP Protocol field value of 17 indicates UDP.
  2. A variety of broadcast and multicast addresses may be found. These include the Internet broad- cast address of 255.255.255.255, subnet broadcast addresses such as 192.168.255.255 (where the 192.168 portion is the subnet number and the .255.255 portion means broadcast), and mul- ticast IP addresses such as 224.0.xx.xx (such as 224.0.0.251 for multicast DNS).
  3. This answer will vary with your trace. Most often they are a few hundred bytes or less, and often may be around 100 bytes. That is, many messages are relatively short packets.