I now tested this with openSUSE 11.2 and discovered the gratuitous arp no longer occurs. It was apparently due to a spurious target IP address in the reply. That doesn’t happen with OS 11.2.
I did some more digging, and it seems that arp filter is supposed to prevent this behavior.
/usr/src/linux-2.6.27.37-0.1/Documentation/networking/ip-sysctl.txt
"arp_filter - BOOLEAN
1 - Allows you to have multiple network interfaces on the same
subnet, and have the ARPs for each interface be answered
based on whether or not the kernel would route a packet from
the ARP’d IP out that interface (therefore you must use source
based routing for this to work). In other words it allows control
of which cards (usually 1) will respond to an arp request.0 - (default) The kernel can respond to arp requests with addresses from other interfaces. This may seem wrong but it usually makes sense, because it increases the chance of successful communication. IP addresses are owned by the complete host on Linux, not by particular interfaces. Only for more complex setups like load- balancing, does this behaviour cause problems. arp_filter for the interface will be enabled if at least one of conf/{all,interface}/arp_filter is set to TRUE, it will be disabled otherwise
I did
echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
echo 1 > /proc/sys/net/ipv4/conf/eth0/arp_filter
echo 1 > /proc/sys/net/ipv4/conf/eth1/arp_filter
Which is documented to work here:
2.1. Address Resolution Protocol (ARP)
It does NOT prevent eth0 from answering for the ip address assigned to eth1. Perhaps there is something I need to configure with “source routing”, but I am not sure what nor how.