I. Objective of the Experiment
1. Learn and master the basic functions and message format of the ICMP protocol.2. Understand the encapsulation relationship between the ICMP protocol and the IP protocol.3. Learn and master the application and message format of the ICMP protocol.4. Understand the working process of traceroute.Include the keyword: OSPF configuration.
II. Experimental Topology

III. Experimental Tools
GNS3 and Wireshark packet capture analysis software
IV. ICMP Protocol Encapsulation Format

(1) Type field, identifying the type of ICMP packet (2) Code field, identifying a specific packet within that ICMP type (3) Checksum, used to verify whether the packet is complete or modified (4) Identifier, identifies the process. It is used to differentiate in communications with multiple destinations (5) Sequence Number, identifies the sequence number of the packet from the source to the destination, generally starting from 1
V. Experimental Content and Steps
1) Ping and Traceroute Experiment
(1) Set up the experimental environment according to the topology diagram and configure the corresponding IP addresses for the interfaces (2) Enable the OSPF protocol for full network reachability OSPF configuration of R1

OSPF configuration of R2

OSPF configuration of R3
(3) Start packet capture software to capture traffic from R1’s F0/0 port (4) On R1, ping 12.1.1.2

(5) Analyze the ICMP packet in conjunction with the ICMP message encapsulation format and complete the table below.

1) Echo Request packet structure (type=8, code=0)

2) Echo Reply packet structure (type=0, code=0)

(6) Start packet capture software to capture traffic from R1’s f0/0 port and R2’s f0/1 (7) On R1, traceroute 3.3.3.3 probe 1 (set number of probes) (8) Which two types of ICMP packets were captured? Fill in the different packet types.


1) First probe UDP packet information at R1’s f0/0 (TTL=1)

2) TTL timeout structure returned by ICMP protocol at R2 (type=11, code=0)

3) Second probe UDP packet information at R1’s f0/0 (TTL=2)

4) Second probe UDP packet information at R2’s f0/1 (TTL=1)

5) Structure of port unreachable message returned by ICMP protocol at R3 (type=3, code=3)

6) Structure of port unreachable message returned by ICMP protocol at R2 (type=3, code=3)

2) Target Host Unreachable
(1) Configure the default route on R1: ip route 0.0.0.0 0.0.0.0 12.1.1.2, and enable ICMP debugging using the command debug ip icmp.

(2) Start the packet capture tool to capture traffic from R1’s f0/0 (3) On R1, ping 33.33.33.33

(4) Analyze the ICMP Host Unreachable message (type=3, code=1)

3) Port Unreachable (UDP Protocol – ICMP Unreachable Port Message)
(1) Start the packet capture tool to capture traffic from R1’s f0/0 (2) On R1, use the command copy tftp: flash: to download data to the router from 3.3.3.3

(3) Analyze the TFTP message structure

(4) Analyze the UDP port unreachable message structure (type=3, code=3)

4) Port Unreachable (TCP Protocol – Reset Flag Set in TCP Header)
(1) Start the packet capture tool to capture traffic from R1’s f0/0 (2) On R1, use the command telnet 3.3.3.3 80 to simulate browsing the web on port 80

(3) Analyze the TCP port unreachable message


5) Prohibited Unreachable (Blocked by ACL or Firewall Policy)
(1) Start the packet capture tool to capture traffic from R1’s f0/0 (2) On R2, write an ACL statement to prohibit any host from accessing 3.3.3.3 and apply the ACL to incoming traffic on R2’s F0/0

(3) On R1, ping 3.3.3.3

(4) Analyze the ICMP Prohibited Unreachable message (type=3, code=13)

6) Fragmentation Unreachable
(1) Remove the ACL call from R2’s F0/0 incoming direction

(2) On R1, start packet capture to capture traffic at F0/0 (needs fragmentation, but DF bit set) (3) On R2’s F1/0 interface, set mtu to 100 using the command ip mtu 100
(4) On R1, ping 3.3.3.3 size 200 df-bit

(5) Analyze the ICMP Fragmentation Unreachable message (type=3, code=4)

Disclaimer: The content of this article is contributed by internet users independently, and the views expressed are solely those of the author. This site only provides information storage space services, does not own the content, and does not assume legal responsibility. If you find any allegedly infringing/illegal content on this site, please email us to report it, and once verified, we will delete it immediately.
Summary
The experiment aims to teach the basic functions and message formats of the ICMP protocol, its relationship with the IP protocol, and the working of traceroute, while also exploring OSPF configuration. Using tools like GNS3 software and Wireshark, the experiment involves setting up a network topology and capturing traffic to analyze ICMP encapsulations, including various scenarios such as echo request/reply, host unreachable, and UDP/TCP port unreachable messages. The process involves ICMP debugging, ICMP packet analysis, and understanding network reachability through OSPF configurations.