ARP Mechanism – Understanding ARP Trigger Mechanism

arp

I have a question about how an interface triggers the ARP request.

For example if two routers have one interfaces each ->

(A)[intf1: 2.2.2.1/24] ——- (B)[intf2: 2.2.2.2/24].

If router A receives some Ipv4 packet destined to 2.2.2.2, so will interface A trigger an ARP request just based on that the IPv4 packet destination IP address is equal to its own subnet?

Best Answer

ARP is required when an IP packet is forwarded over Ethernet. When the IP address is in the local subnet it'll be ARPed, the IP packet wrapped into an Ethernet frame addressed to the ARPed MAC address and sent out.

When the IP address is not in the local subnet, another router is required (next hop), so the frame is addressed to the router's MAC address instead (which also requires ARP first).

Of course, not every IP packet triggers an ARP request - ARP responses are cached for some time ('ARP aging').