Computer Network Learning-Internet Control Packet protocol ICMP and applications (4)

Source: Internet
Author: User

ICMP (Internet Control Packet Protocol)

To forward IP data packets more effectively and improve the chances of successful delivery, the network layer uses the Internet Control Packet protocol ICMP. ICMP acts as the IP datagram data and adds the header of the datagram to form the IP datagram forwarding.

ICMP allows the host or router to report errors and reports exceptions.

ICMP messages are classified into two types: Error Report messages and inquiry messages.

Error Report Message types include: inaccessibility to the end point, source point suppression, time exceeding, parameter problems, route change (redirection ).

The types of inquiry messages include: Send-back request or answer, timestamp request or answer.

 

An important application of ICMP is packet inter-net groper, which is used to test the connectivity between two hosts. ICMP uses send-back requests and send-back response packets.

Ping is an example of using ICMP directly at the application layer without passing through TCP or UDP.

 

Another very useful application is traceroute (which is a keyword in UNIX) and tracert in windows. This application is used to track the path of a group from the source point to the end point.

The traceroute application sends a series of IP datagram to the target host, which encapsulates the undeliverable UDP user datagram.

The ttl of the first datagram P1 is set to 1. When the datagram reaches the first router R1 that receives it, the TTL is reduced by 1 because it becomes 0, therefore, router R1 discards the datagram and sends an ICMP packet to the source host that exceeds the error report time.

Then, the source host sends the second datagram P2 and sets the TTL to 2. P2 first reduces TTL by 1 after arriving at router R1, and then forwards the datagram to the next router R2, when R2 receives P2, the TTL is 1, and the value is 0 after it minus 1. Therefore, vror2 R2 discards this datagram P2 and sends an ICMP packet to the source host that exceeds the error report time.

This continues .......

When the last datagram arrives at the target host, the TTL of the datagram is exactly 1. The host does not forward the datagram, nor reduces the TTL by 1, however, because the IP datagram encapsulates a UDP User Datagram that cannot be delivered, the destination host sends an error report that is inaccessible to the source host.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.