How Can I Design A Lab Activity That Effectively Demonstrates The Difference In Packet Loss Rates And Throughput Between A TCP-based File Transfer Protocol And A UDP-based Streaming Protocol, While Also Taking Into Account The Impact Of Varying Network Latency And Packet Sizes On A Local Area Network With 20 Students Simultaneously Running The Protocols On Their Laptops?

by ADMIN 374 views

Lab Activity Outline: Comparing TCP and UDP Performance Under Varying Network Conditions

Objective: To compare packet loss rates and throughput of TCP and UDP protocols under different network latency and packet size conditions in a LAN setting with 20 students.

Setup:

  1. Network Configuration:

    • Ensure all student laptops are connected to the same LAN.
    • Use network emulation tools (e.g., NetEm, ipfw) to simulate varying latency and packet loss conditions.
  2. Software Tools:

    • iPerf: For measuring throughput.
    • Wireshark: For packet capture and analysis.
    • TCP/UDP Transfer Tools: Implement or use existing tools for file transfer (TCP) and streaming (UDP).
  3. ** Roles:**

    • Each laptop acts as both client and server to send and receive data, ensuring synchronized testing without excessive traffic.

Procedure:

  1. Baseline Setup:

    • Instruct students to install necessary software and configure their laptops as both client and server.
  2. Trial Execution:

    • Trial 1: Low latency (~10ms) and small packet size (e.g., 1000 bytes).
    • Trial 2: Moderate latency (~50ms) and medium packet size (e.g., 1500 bytes).
    • Trial 3: High latency (~100ms) and large packet size (e.g., 3000 bytes).
  3. Data Collection:

    • TCP Test: Transfer a large file (e.g., video) using TCP. Measure throughput with iPerf and packet loss with Wireshark.
    • UDP Test: Stream video using UDP. Measure throughput and analyze packet loss.
  4. Synchronized Testing:

    • Students run both protocols simultaneously under each trial condition to gather comparative data.

Data Analysis:

  1. Throughput and Packet Loss Measurement:

    • Use iPerf for throughput and Wireshark to calculate packet loss rates by comparing sent and received packets.
  2. Graphical Representation:

    • Students graph throughput and packet loss against latency and packet size for both protocols.

Post-Lab Activities:

  1. Data Analysis and Comparison:

    • Students analyze results to compare TCP and UDP performance under different conditions.
  2. Group Discussion:

    • Discuss findings, focusing on protocol behavior and network condition impacts.
  3. Report Writing:

    • Each student submits a report detailing observations, analysis, and conclusions.

Considerations:

  • Traffic Management: Ensure tests are scheduled to avoid network congestion.
  • Tool Familiarity: Provide tutorials for tools like Wireshark and iPerf.
  • Collaboration: Encourage group work to accommodate varying skill levels.

Expected Outcomes:

  • Throughput: TCP may show higher throughput under low latency, while UDP may excel in high-latency streaming.
  • Packet Loss: UDP likely experiences higher loss, especially in adverse conditions, while TCP maintains reliability.

Conclusion: This lab activity will effectively demonstrate the performance differences between TCP and UDP, highlighting the impact of network conditions on their effectiveness.