One arp request for two different pings

3

I pinged google and yahoo and captured the packets using wireshark and found that there was only one arp request for both of them.

Can anyone explain why there is only one arp request for the two pings??

Dhrumit Patel

Posted 2014-05-25T00:15:37.143

Reputation: 309

I wouldn't necessarily assume the arp request was triggered by the ping. They tend to happen anyway, possibly regardless of the ping. But anyhow it's not ARPing yahoo or google, just things within the LAN. – barlop – 2014-05-25T00:37:44.997

Answers

4

The ARP request was sent to get the MAC address of your gateway, which was then used to deliver the first ping request to the gateway. Your second ping destination did not require another ARP request, since the first hop would be the same (i.e. the gateway), and was still in the local ARP cache.

Steven Monday

Posted 2014-05-25T00:15:37.143

Reputation: 1 445

2

ARP has nothing to do with what you're doing outside of your LAN.

ARP requests don't go past your router.

ARP is not like ping, doesn't have anything to do with a website or any computer past your router. It doesn't have anything to do with WHICH Website or server or computer you are trying to access past your router. Your computer just asks, is it external or internal, if it's external it uses the router's MAC, if it's internal it uses the MAC of the dest computer. And if it doesn't know a MAC it uses ARP, makes an ARP request

You might see a DNS request for yahoo.com and a DNS request for google.com but nothing to do with ARP.

ARP gets the Layer 2 address of a computer(or your router), and you don't know or ask for the Layer 2 address of a computer outside your router. You can't find it out unless you're in that particular LAN.

barlop

Posted 2014-05-25T00:15:37.143

Reputation: 18 677

ARP has nothing to do with what you're doing outside of your LAN. - Mostly true but to clarify: ARP needs to resolve the MAC address for the local Default Gateway for all non-local traffic, so it does have something to do with traffic outside the LAN. – joeqwerty – 2014-05-25T00:38:09.833

@joeqwerty that's a fair clarification. Emphasis on resolving the MAC address for the local default gateway ;-) – barlop – 2014-05-25T00:48:34.210

I'm with you. +1 – joeqwerty – 2014-05-25T00:53:48.280

Thanks for the help. It certainly answers my questions. Thanks a lot.. – Dhrumit Patel – 2014-05-25T22:34:03.933