In SOME cases (I know Linux can behave this way, not sure of others), but a host can respond to ARP's on the "wrong" interface. Take this network:
10.0.0.0/24 ==== Host A ==== 192.168.0.0/24
Host A has an address on both networks; let's say
If Host A receives an ARP for 192.168.0.1 via the 10.0.0.1 interface, it will respond with the MAC address of the 10.0.0.1 interface.
This behaviour is controlled by the
arp_ignore kernel tunable (Source: http://blog.steve-miller.org/2010/03/tweaking-arp-behavior-in-linux.html):
arp_ignore - Define different modes for sending replies in response to received ARP requests that resolve local target IP addresses:
0 - (default): reply for any local target IP address, configured on any interface.
1 - reply only if the target IP address is local address configured on the incoming interface.
2 - reply only if the target IP address is local address configured on the incoming interface and both with the sender's IP address are part from same subnet on this interface.
3 - do not reply for local addresses configured with scope host, only resolutions for global and link addresses are replied.
4-7 - reserved
8 - do not reply for all local addresses.
As above, the default is to respond for any local address (ie, an address configured on Host A) regardless of the interface the ARP is received on.