How does the ping command really work? Specifically where does the ARP (Address Resolution Protocol) come into picture?
I was asked this question in an interview and I was not able to come up with a scenario when ARP could be used.
|
How does the ping command really work? Specifically where does the ARP (Address Resolution Protocol) come into picture? I was asked this question in an interview and I was not able to come up with a scenario when ARP could be used. |
|||||||||||
|
|
Ping is actually two different ICMP (Internet Control Message Protocol) packets. To ping a host you first send a ICMP Echo Request Packet, the host will then reply with an ICMP Echo Reply. For more information see: http://en.wikipedia.org/wiki/Ping |
|||
|
|
If you really want to understand, there is an excellent (very well written) white paper here: http://images.globalknowledge.com/wwwimages/whitepaperpdf/WP_Mays_Ping.pdf Here is the summary ->
Since there is no TCP layer in between, the Hope that helps. |
||||
|
|
|
Ping and ARP are different things located at different layers in the network protocol stack. Ping is at network layer (or Internet layer - Have a look to ICMP protocol like pointed out by @ServerMonkey). Arp protocol is at link level (a lower level). Arp protocol is designed to allow physical connection between network hardware, that is directly connected. In TCP/IP network stack, every layer uses the layer below to forward its data, encapsulating it inside the low level protocol. Each layer is independent from the other and possibly unaware of the other levels specific details and implementations (this is not always true: see cross-layer function). |
|||||
|
|
ARP provides a MAC address, but sometimes if there is no DMAC address, the broadcast address is used. This frame using broadcast DMAC is called as ARP broadcast frame, with this we get DMAC address. |
||||
|
|