Posted 29 September 2012 - 02:45 AM
hello Peter Fabian from ottawa,
Since your attempting a ping from A ->B ICMP protocol which runs over IP protocol, Layer 3 communication),for that to happen the host device would need to know the
1) Source and destination IP info
2) Source and destination mac-address
Assuming the source has the ip info and its own mac address but destination info is unavailable, the host will send an Arp broadcast to all hosts.
The destination host will then respond to the arp broadcast with its source mac-address.
Once the host receives this packet, now it has all info to packetize and send it and the destination will response since all info is available to it in the packet.
To summarize, the ping has worked on layer 3 using layer 2 and layer 1 communication.
What Ping can tell you:-
Ping places a unique sequence number on each packet it transmits, and reports which sequence numbers it receives back. Thus, you can determine if packets have been dropped, duplicated, or reordered.
Ping checksums each packet it exchanges. You can detect some forms of damaged packets.
Ping places a timestamp in each packet, which is echoed back and can easily be used to compute how long each packet exchange took - the Round Trip Time (RTT).
Ping reports other ICMP messages that might otherwise get buried in the system software. It reports, for example, if a router is declaring the target host unreachable.