ARP request outside of LAN; Target machine or router response

arp

If I sent an ARP request to the target machine, which is in over Internet and has 2 routers between, what will the target IP address on my request (0001) packet be? Will it be the Router IP address, which is my gateway, or will it be the target machine address?

Example: Lets say I want to do an ARP request from Computer A to Computer C, and the scheme is below.

Router1 => Internet => Router2 => Computer C 

What would be the target IP address, Router1 or Computer C?

Please help me with this. I am kind of confused.

Thank you.

Best Answer

Using your original diagram:

OP's original diagram

When Computer A tries to communicate with Computer C, the following steps resolve Router 1's software-assigned address to its hardware-assigned media access control address: Based on the contents of the routing table on Computer A, IP determines that the forwarding IP address to be used to reach Computer C is through Router 1, the IP address of its default gateway. Host A then checks its own local ARP cache for a matching hardware address for Router 1.

If Computer A finds no mapping in the cache, it broadcasts an ARP request frame to all hosts on the local network with the question "What is the hardware address for Router 1?" Both hardware and software addresses for the source, Host A, are included in the ARP request.

Each host on the local network receives the ARP request and checks for a match to its own IP address. If a host does not find a match, it discards the ARP request.

Router 1 determines that the IP address in the ARP request matches its own IP address and adds a hardware/software address mapping for Host A to its local ARP cache.

Router 1 then sends an ARP reply message containing its hardware address directly back to Host A.

When Host A receives the ARP reply message from the router, it updates its ARP cache with a hardware/software address mapping for Router 1.

Once the media access control address for Router interface 1 has been determined, Host A can send IP traffic to Router 1 by addressing it to the Router interface 1 media access control address. The router then forwards the traffic to Host C through the same ARP process as discussed in this section.

This was updated from a Microsoft Technet article to match your example. Another reference with a good example is Juniper networks description.

In a nutshell Host A when communicating with external IP addresses/hosts will look to its default gateway for external IP resolution and assume traffic to Host C will be forwarded by this gateway.

Related Topic