Bug 978
Summary: | ARPs sent with wrong src IP address | ||
---|---|---|---|
Product: | Networking | Reporter: | Carlos Velasco (carlosev) |
Component: | IPV4 | Assignee: | Dominik Brodowski (linux) |
Status: | CLOSED INVALID | ||
Severity: | normal | ||
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.0-test1, 2.4.21, 2.4.20 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Attachments: |
Patch for ARP v1- Seems to work
isolated patch for kernel 2.4.21 |
Description
Carlos Velasco
2003-07-22 15:36:42 UTC
Created attachment 595 [details]
Patch for ARP v1- Seems to work
It seems this to be a frequent problem with linux, behaviour changed from kernel versions: Linux kernel 2.0.xx doesn't do arp response on loopback alias and tunneling interfaces, it is good for the LVS cluster. However, Linux kernel 2.2.xx does all arp responses of all its IP addresses except the loopback addresses (127.0.0.0/255.0.0.0) and multicast addresses. http://www.linuxvirtualserver.org/docs/arp.html There's a hidden patch (thanks to Julian Anasatasov) that solves this problem (better patch than the one I have submitted): http://www.ssi.bg/~ja/#hidden http://www.ssi.bg/~ja/hidden.txt It seems that "normal" linux "shares" its interfaces. Julian and me have been working in a new patch for making interfaces to be "isolated" and make linux behave like other OSes and systems. I have called it "isolated patch". What it does? If output dev, isolated=0... we announce this dev IP through any input dev (normal linux behaviour) If output dev, isolated=1... we just announce this dev IP (ARP) if input dev == output dev, and you cannot reach this dev IP through another input dev unless forwarding=1 for input dev. How enabling it? First, you must apply the patch and recompile kernel. Second, you must enable the feature with: echo "1" >/proc/sys/net/ipv4/conf/all/isolated Third, you must enable the out dev where isolated is needed, or in every interface if you want linux behave like Solarius or other OSes: echo "1" >/proc/sys/net/ipv4/conf/lo/isolated echo "1" >/proc/sys/net/ipv4/conf/eth1/isolated Fourth, better you flush the route cache for changes to be inmediate: ip route flush cache It's all. Regards, Carlos Velasco Created attachment 615 [details]
isolated patch for kernel 2.4.21
Documentation/networking/ip-sysctl.txt: arp_announce - INTEGER Define different restriction levels for announcing the local source IP address from IP packets in ARP requests sent on interface: 0 - (default) Use any local address, configured on any interface 1 - Try to avoid local addresses that are not in the target's subnet for this interface. This mode is useful when target hosts reachable via this interface require the source IP address in ARP requests to be part of their logical network configured on the receiving interface. When we generate the request we will check all our subnets that include the target IP and will preserve the source address if it is from such subnet. If there is no such subnet we select source address according to the rules for level 2. 2 - Always use the best local address for this target. In this mode we ignore the source address in the IP packet and try to select local address that we prefer for talks with the target host. Such local address is selected by looking for primary IP addresses on all our subnets on the outgoing interface that include the target IP address. If no suitable local address is found we select the first local address we have on the outgoing interface or on all other interfaces, with the hope we will receive reply for our request and even sometimes no matter the source IP address we announce. Can anyone close this report please? According to bugzilla I don't have the privileges. @Patrick McHardy: you need to assign it first to be able to close it. |