ARP to Determine Next Hop IP Address

ARP is a protocol that is used to determine the MAC address of the host that has been assigned a particular IPv4 address. However, in each case, the actual IP address that is used in the ARP request changes depending upon where the source and destination hosts reside.

Refer to the following diagram:

arp-routers-and-hosts.png

H1, H2, and the Gi0/2 interface of C1 are all on the same L2 segment. Similarly, H3, H4, and the Gi0/2 interface of C2 are all on the same L2 segment. On these segments, you would use a subnet. For example:

  • 192.168.1.0/24 on the segment for H1, H2, and C1's Gi0/2 interface.
  • 192.168.2.0/24 on the segment for H3, H4, and C2's Gi0/2 interface.

When H1 sends a packet to H2, it will use ARP to determine the MAC address of H2. Because H2 is in the same subnet, they can reach each other directly.

However, when H1 sends a packet to H3, which is in another subnet, it will use ARP to determine the MAC address of the Gi0/2 interface of C1, which is the next hop and not that of H3 which exists in another subnet.

Remember ARP requests use broadcasts, which are limited to the specific subnet or broadcast domain within which they are generated. In the above example, the C1 router is considered a boundary of the broadcast domain, and it will not relay any ARP requests beyond C1 to other subnets.

The only exception to this rule is the use of Proxy Arp.

https://networklessons.com/ip-services/arp-address-resolution-protocol-explained