ICMP (Part 2) – Introduction
We learned that when a IP packets sent from a computer to a destination computer on the Internet, it needed to travel via a number of gateways. Each gateway on the Internet will send the packet to the next gateway according to the routing table. In most cases, the packet will finally reach the destination computer. The scenario can be illustrated in the diagram below:
Normal Scenario of Computer A Sending Data Packet to Computer B:
- Computer A send a data packet to computer B
- The data packet will travel through the Internet to computer B. In other words, the data packet need to travel through a number of gateways in order to reach computer B.
- There are thousands of gateways on the Internet. The data packet has to travel through the most efficient route from computer A to computer B.
- Each gateway has a routing table that will determine the next route for the packet.
- Gateway A check it’s routing table and found that Gateway E is the best route for the packet. Therefore Gateway A will send the packet to Gateway E.
- When Gateway E receive the packet, it will check it’s routing table and found that the next best route is Gateway H. Therefore the packet is send to Gateway H.
- Gateway H will finally send the packet to computer B to process.
In fact, most data packets will travel successfully to the final destination. However, what if the data packet cannot send to the final destination? There must be a simple protocol that allow the gateway to inform the sender computer about the problem. This protocol is called ICMP (Internet Control Message Protocol).