-1

I have the following configuration (I'd post a pic but not enough rep for more than 2):

PC1 (10.0.2.10/24) and PC2 (10.0.2.137/29) are connected to a hub, which is connected to a router on interface FastEthernet0/1 (10.0.2.138/24).

I ran two tests with this configuration.

First test: I sent a ping from PC1 to PC2, having set no default gateways for either host. PC1 thinks that PC2 is in the same subnet, so it sends out an ARP broadcast. It is not though, so it does not receive any replies. So far so good. Result

Second test: I set the router as the default gateway in PC1 and PC2's routing tables. I then sent a ping from PC1 to PC2 once again. This time, PC2 seems to reply to PC1's ARP broadcast directly, and PC1 proceeds to send PC2 the ping request. PC2 then uses its routing table to reply to PC1 via the default gateway and then gets an ICMP redirect to update its routing cache to reply directly to PC1 instead. Result

My confusion: how does PC2 reply to PC1's ARP broadcast when it's on a different subnet? How does having a default gateway allow this? At first I thought Proxy ARP is being used, but that doesn't seem to be the case, as the source and destination addresses of the ARP packets are those of PC1 and PC2, not the router's.

Gerk
  • 1
  • 1
  • 2
  • Do you have proxy arp enabled on the router? – Aaron Feb 08 '16 at 05:54
  • Yep, it's enabled by default. – Gerk Feb 08 '16 at 06:00
  • We probably need the routing tables and network configuration of both hosts. Also, you said both are connected to a hub, but there is a router in the picture with proxy arp enabled. What happens if you disconnect the hub from the router and repeat the test? I usually get this weirdness when something upstream has proxy arp enabled and a subnet mask is incorrect on the router. – Aaron Feb 08 '16 at 06:06
  • [Here you go.](http://imgur.com/a/0lWN1) – Gerk Feb 08 '16 at 06:34

1 Answers1

0

You need to remember that an ARP request is a broadcast, and it will go to every host on the broadcast domain. Both PCs, connected to a hub, are on the same broadcast domain.

When PC1 has a gateway, and you try to send something (ping) off its network (to PC2), the ping will go to the gateway; PC1 will ARP to find the gateway address (not the PC2 address) and send the ping to its configured gateway.

Ron Maupin
  • 3,158
  • 1
  • 11
  • 16
  • Yes, that's what I thought should happen too, but if you look at the result you can see that it's not the router that responds to PC1's ARP broadcast but PC2 itself. The ICMP reply seems to initially hop from PC2 to router to PC1, but the router seems to not be used at all for the ICMP requests sent from PC1 to PC2... – Gerk Feb 08 '16 at 04:58
  • Are request doesn't care who answers: Request who-has x.x.x.x tell y.y.y.y Who ever has x.x.x.x can answer – selalerer Mar 07 '18 at 17:37