ICMP Echo
ICMP echo messages are sent to a remote host and are returned in an echo-reply response. The primary use for these messages is to check the availability of the target machine.
- Host A creates an ICMP echo datagram, using host A's address as the source, and host B's address as the destination.
- The ICMP echo datagram is transmitted via the network to the destination (host B).
- The destination system (host B) copies the echo information into a new echo-reply message datagram.
- The destination system (host B) destroys the original ICMP echo message.
- The destination machine (host B) now becomes the source of a new echo-reply datagram. Host B places it's own address in the source address field of the IP header, and host A's address in the destination field of the IP header.
- The datagram is transmitted to the network and is routed to host A.
That's how a PING works by the way...
using ping >>