From: skandranon Subject: Problem with ARP-replies on Kernels 2.6 (possibly 3.0, but not 2.4!) Date: Wed, 28 Sep 2011 19:49:41 +0200 Message-ID: <4E835E35.3030503@gmx.at> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: netdev@vger.kernel.org Return-path: Received: from mailout-de.gmx.net ([213.165.64.22]:47212 "HELO mailout-de.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754642Ab1I1Rtq (ORCPT ); Wed, 28 Sep 2011 13:49:46 -0400 Sender: netdev-owner@vger.kernel.org List-ID: Hi, I sure hope that this is the right forum to find help with my problem. If not, please someone provide me with a pointer! Following up to a complaint, I found some strange behavior with ARP replies being sent out for IP addresses via interfaces that have no relation to the IP addresses being queried. The setup is about as follows: I have a machine connected to multiple physically disconnected networks, neither doing any routing, bridging or anything similar. MyMachine:eth0: 10.1.1.1/24 MyMachine:eth1: 192.168.1.2/24 MyMachine:eth2: 172.20.7.7/24 Network 10.1.1.0/24 is not controlled by me, and someone decided to setup a Windows machine doing multinetworking:similar to HisMachine:eth0: 10.1.1.15/24 HisMachine:eth0:0: 192.168.1.2/24 Now, HisMachine is detecting another server using IP address 192.168.1.2, and it is giving the MAC address of MyMachine:eth0 as the offender. Some investigation showed that MyMachine is responding to ARP-broadcasts coming in on interface eth0 if those ARP packets have a source address of either 0.0.0.0 or some IP address from 10.1.1.0/24 irrespective of the IP address that is being queried: example queries: "ARP: who has 192.168.1.2 tell 0.0.0.0", received on MyMachine:eth0 => MyMachine sends a reply with the MAC-address of its eth0 "ARP: who has 192.168.1.2 tell 10.1.1.15", received on MyMachine:eth0 => MyMachine send a reply with the MAC-address of its eth0 "ARP: who has 192.168.1.2 tell 192.168.1.x" (x=1..254), received on MyMachine:eth0 => no reply is being sent Similar behaviour can be seen for other combination of IP addresses and interfaces (e.g. "ARP: who has 10.1.1.1 tell 0.0.0.0" received on interface eth1 would also be answered - via eth1, of course) I've tested this using arping -I -s arping -I -D for several different systems (SuSE SLES 8- 2.421, SuSE SLES 9 - 2.6.5, SuSE SLES 10 - 2.6.16, SuSE SLES 11 - 2.6.32, Open Suse 11.3 - 2.6.34, OpenSuSE 11.4 - 2.6.37, several different Ubuntu versions...), and found that any 2.6-based system displayed similar behaviour, but not the old 2.4-based ones. Basically, I would have expected MyMachine to answer ARP queries received via eth0 only if an address was queried that was assigned to eth0 (also secondary IP addresses assigned by "ip" or virtual interfaces generated by ifconfig). So: Is this a bug or a feature? In any case: many thanks to each of you developers (but for you, I wouldn't have my current job), and also many thanks to each of you taking the time to answer questions on this list! Best Regards, Frank Mayer