🧪 ICMP Virtual Laboratory Internet Control Message Protocol

Hands-on simulation of Ping (Echo Request/Reply) & Traceroute concepts | For undergraduate CS students

🌐 ICMP Packet Simulator Echo Request/Reply
> Ready. Click 'Send ICMP Echo Request' to simulate ping.
> ICMP packets are generated virtually with headers.
📨 Latest ICMP Packet Structure
— No packet sent yet —
Type: 8 (Echo Request) Type: 0 (Echo Reply) Code: 0 Checksum: 16-bit
📖 Learning Resources

Internet Control Message Protocol (ICMP)

ICMP is a core protocol of the Internet Protocol Suite, used primarily for error reporting and diagnostic functions. Unlike TCP/UDP, ICMP is not used for data transport but for network-layer control messages.

  • Echo Request (Type 8) & Echo Reply (Type 0): The basis of the ping utility. Measures round-trip time and reachability.
  • Destination Unreachable (Type 3): Indicates that a packet could not be delivered.
  • Time Exceeded (Type 11): Used by traceroute to discover intermediate hops.
  • ICMP Header: 8 bytes: Type (1 byte), Code (1 byte), Checksum (2 bytes), Identifier & Sequence Number (4 bytes).

In this virtual lab, you will simulate ICMP Echo requests and visualize the packet structure. The traceroute simulation demonstrates how ICMP Time Exceeded messages reveal network paths.

Why ICMP matters: Network diagnostics, MTU discovery, and troubleshooting rely heavily on ICMP. Understanding its format and behavior is essential for network engineers.

🔬 Lab Procedure (Virtual)

  1. Step 1: In the ICMP Packet Simulator (left panel), enter a destination IP (e.g., 8.8.8.8 or 1.1.1.1).
  2. Step 2: Adjust packet size (between 32–1472 bytes) to observe how payload influences ICMP datagram.
  3. Step 3: Click "Send ICMP Echo Request" → Observe generated ICMP header, simulated RTT, and reply message.
  4. Step 4: Run traceroute simulation to a destination. Observe each hop's response and ICMP Time Exceeded messages.
  5. Step 5: Analyze the packet structure shown below the output console: note Type, Code, Identifier, Sequence, Checksum.
  6. Step 6: Change destination to an unreachable pattern (e.g., 192.0.2.1) and note simulated "Destination Unreachable".
  7. Step 7: Record observations, RTT values, and packet fields for your report.
💡 Note: This simulation mimics ICMP behavior logically. For real capture, use Wireshark, but this virtual lab reinforces conceptual understanding.

📄 Guidelines for Writing Lab Report

  • Title & Objective: "ICMP Analysis using Virtual Lab" – describe objectives: understanding packet format, ping vs traceroute.
  • Introduction: Brief overview of ICMP, its role in IP networking, and common message types.
  • Methodology: Describe the virtual lab setup, parameters used (packet size, destinations).
  • Results & Observations: Include screenshots or text output showing ICMP header fields, RTT values, traceroute hops. Create a table comparing ping responses for different destinations.
  • Analysis: Explain the significance of Type, Code, Checksum. Relate traceroute to ICMP Time Exceeded messages. Discuss why some destinations might not reply.
  • Conclusion: Summarize key takeaways: ICMP diagnostics, security considerations, and real-world tools like ping/traceroute.
  • References: RFC 792, standard networking textbooks.

✅ Attach at least 3 simulation logs showing different scenarios (successful ping, unreachable host, traceroute).

🧠 ICMP Message Structure & Educational Notes

📡 Echo Request/Reply Format

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Type      |     Code      |          Checksum             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Identifier           |        Sequence Number       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Data (optional)                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                

⚙️ Virtual Lab Mechanics

This simulator constructs realistic ICMP packets. For each Echo Request, a random identifier (process ID) and sequence number increment. RTT is simulated between 15–65 ms based on network conditions. Traceroute sends probes with increasing TTL (Time To Live) and captures simulated ICMP Time Exceeded messages from intermediate "virtual routers".

All outputs emulate standard command-line tools (ping / traceroute).