Background

Objective


Ping

Handling Packet Loss


Traceroute

How Traceroute Works

What Your Program Should Do

Stopping Criteria


Code Snippets


References


Discussion Questions

  1. ICMP and Packet Behavior
    • What is the purpose of ICMP in the network stack, and how does it differ from TCP and UDP?
    • Why must ping and traceroute use raw sockets instead of standard socket types?
    • What fields in the ICMP Echo Request and Echo Reply messages does your program need to set or parse?
    • Why does traceroute rely on TTL expiration to discover intermediate routers?
  2. Timing and Measurements
    • How did you measure the Round-Trip Time (RTT)? What functions or system calls did you use?
    • What factors can cause RTT values to fluctuate between pings?
    • How accurate do you believe your RTT calculations are? What might introduce error?
  3. Packet Loss and Timeouts
    • What conditions might cause a ping request to time out even on a healthy network?
    • How did you implement the 2-second timeout (e.g., select(), setsockopt(), etc.)?
    • What differences did you observe between packet loss in ping and missing responses during traceroute?
  4. Traceroute Behavior
    • Did any routers along the path fail to respond with Time Exceeded messages? Why might some hops not respond?
    • Did you observe any hops where the hostname could not be resolved? What does that indicate about DNS configuration?
    • What determines the maximum number of hops needed before traceroute terminates?
  5. Implementation Details
    • What challenges did you face when constructing raw ICMP packets?
    • How did you verify that your checksum implementation was correct?
    • Did you encounter permission issues when using raw sockets? How did you address them?
  6. Testing and Wireshark Analysis
    • How did Wireshark help you verify your program’s correctness?
    • Did the packets captured by Wireshark match your expected ICMP packet structure?
    • What differences did you notice between how Linux and other operating systems generate ICMP packets (if applicable)?
  7. Reflection and Extensions
    • If the ping utility were extended to IPv6, how would the implementation change?
    • How could traceroute be redesigned using UDP or TCP instead of ICMP?
    • What additional features could improve your diagnostic tools?

Extra Credit


Testing


Grading and Submission

Post your answers in Marmoset by the scheduled due date in the syllabus.

1. Code Submission

2. Wireshark Packet Capture

3. Questions / Observations

Note: Double-check that any screenshots clearly show packet details and are legible.