Routing – Will Host Send to Default Gateway if No ARP Response?

arproutingsubnet

Host A and B are on the same subnet. A sends ARP request(s) asking for B's MAC. For whatever reason, B doesn't respond. Will A either:

  1. Give up — it can't reach B
  2. Send the packet to the default gateway, router R, and let it try to route it to B?

Of course, if B was on a different subnet, A would go straight to #2 above. My question is, in a case where they're on the same subnet, but ARP fails, will hosts also try #2.

When does this come up? Two cases:

  1. A is really on a different subnet than B, but the subnet masks are misconfigured.

  2. A and B are on the same subnet, but both in protected ports (a private VLAN), and so can't directly communicate to each other, without the router.

PS I could imagine the behavior is implementation dependent. So I'd appreciate not just a theoretical argument, but citing how a particular OS behaves, or at least citing a RFC or standard.

Best Answer

If A's ARP requests aren't answered the ARP attempt will time out after a few retries and return an error (host unreachable or similar) returned to the upper layer.

A will not try to use a gateway router as B's destination address is located in the same subnet. The decision between attempting local delivery or using a gateway is made based on the local routing table which is in turn based on the network part and mask length of each host interface. There is no fallback to a gateway when local delivery fails.

A is really on a different subnet than B, but the subnet masks are misconfigured.

If A is located elsewhere or doesn't exist doesn't matter. B decides that A is local based on their common subnet prefix and if local delivery fails that's it.

A and B are on the same subnet, but both in protected ports (a private VLAN), and so can't directly communicate to each other, without the router.

Same thing - if B's ARP request doesn't reach A or A's reply doesn't reach B, ARP fails and no local delivery takes place (nor any other way).

ARP is defined in RFC 826, with a few updates.