From: "=?ISO-8859-1?Q?Abel_Mart=EDn?=" Date: Wed, 27 Sep 2006 09:27:48 +0000 Subject: Re: [LARTC] Same ip address assigned to two interfaces... Message-Id: <915136920609270227o7b75a937yd08cef2c08f62f20@mail.gmail.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============0073002603==" List-Id: References: <20060925153049.GA10828@sv.lnf.it> In-Reply-To: <20060925153049.GA10828@sv.lnf.it> To: lartc@vger.kernel.org --===============0073002603== Content-Type: multipart/alternative; boundary="----=_Part_32136_6256301.1159349268489" ------=_Part_32136_6256301.1159349268489 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 9/25/06, Marco Gaiarin wrote: > > > [i'm not clearly a network guru, but i've some knowledge... anyway i > think i've arrived to my ``end point'' here. Probably i've also done > some big mistake, so please sorry me.] > > > I've setup in a local branch of my office two servers, say radagast > (10.27.1.2) and olorin (10.27.1.3). They share the same UPS and the > same place, sitting at roughly 20 centimeters each other. > Network devices are in another room, not UPSes, and so if there's a > power loss, radagast compain about that UPS desappear. > Also this two servers share a samba domain, and the syncronize each > other (LDAP, some folders, some other nfs-mounted, ...). > > > So i've thinked to simply put a gigabit ethernet on each of the two > server and link them together with a simple switched cable. > Note that: i'm not interested in bonding nor in some sort of > ``failover'' configuration , only to link together them. > > The first, for me, simple solution was to fire up the interfaces with > the same IP and list an explicit link, so: > > on radagast (10.27.1.2 on eth0): > ifconfig eth1 10.27.1.2 netmask 255.255.255.255 up > route add -host 10.27.1.3 eth1 > > on olorin (10.27.1.3 on eth0) > ifconfig eth1 10.27.1.3 netmask 255.255.255.255 up > route add -host 10.27.1.2 eth1 > > and with this simple solution all seems works. Seems. > After some ``hot calls'' i discovered that simply some services (i > tested squid and the openldap server) does not communicate > anymore; digging with tcpdump arise the problem: olorin acces the squid > proxy on radagast via the eth1 interfaces, but reply on eth0, so olorin > kernel drop the packet (i've not enabled log_martian, but i think was > interesting ;). Hi, Did you try using ip from iproute tools, which is a much more advanced tool than ifconfig and route? I think your problem is at the link layer and may have to do with ARP resolution. Check the neighbour object from ip command. With this you can bind an ip address to a MAC address which I think is your problem: some times the ARP resolution that your hosts perform results in different MAC addresses. In any case I must tell I don't like this workaround. It makes no sense, to be honest. Having a host with two nics whith the same IP seems a horrible setup to me. Why don't you use a different network for the link between these two hosts? Why do you need this link? You wouldn't have routing nor ARP resolution problems. For your words I think you only want a direct link between this two hosts. ------=_Part_32136_6256301.1159349268489 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

On 9/25/06, Marco Gaiarin <xxx@xxxx.xxx> wrote:

[i'm not clearly a network guru, but i've some knowledge... anyway i
think i've arrived to my ``end point'' here. Probably i've also done
some big mistake, so please sorry me.]


I've setup in a local branch of my office two servers, say radagast
(10.27.1.2) and olorin (10.27.1.3). They share the same UPS and the
same place, sitting at roughly 20 centimeters each other.
Network devices are in another room, not UPSes, and so if there's a
power loss, radagast compain about that UPS desappear.
Also this two servers share a samba domain, and the syncronize each
other (LDAP, some folders, some other nfs-mounted, ...).


So i've thinked to simply put a gigabit ethernet on each of the two
server and link them together with a simple switched cable.
Note that: i'm not interested in bonding nor in some sort of
``failover'' configuration , only to link together them.

The first, for me, simple solution was to fire up the interfaces with
the same IP and list an explicit link, so:

  on radagast (10.27.1.2 on eth0):
        ifconfig eth1 10.27.1.2 netmask 255.255.255.255 up
        route add -host 10.27.1.3 eth1

  on olorin (10.27.1.3 on eth0)
        ifconfig eth1 10.27.1.3 netmask 255.255.255.255 up
        route add -host 10.27.1.2 eth1

and with this simple solution all seems works. Seems.
After some ``hot calls'' i discovered that simply some services (i
tested squid and the openldap server) does not communicate
anymore; digging with tcpdump arise the problem: olorin acces the squid
proxy on radagast via the eth1 interfaces, but reply on eth0, so olorin
kernel drop the packet (i've not enabled log_martian, but i think was
interesting ;).

Hi,

Did you try using ip from iproute tools, which is a much more advanced tool than ifconfig and route?

I think your problem is at the link layer and may have to do with ARP resolution. Check the neighbour object from  ip command. With this you can bind an ip address to a MAC address which I think is your problem: some times the ARP resolution that your hosts perform results in different MAC addresses.

In any case I must tell I don't like this workaround. It makes no sense, to be honest. Having a host with two nics whith the same IP seems a horrible setup to me. Why don't you use a different network for the link between these two hosts? Why do you need this link? You wouldn't have routing nor ARP resolution problems. For your words I think you only want a direct link between this two hosts.
------=_Part_32136_6256301.1159349268489-- --===============0073002603== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============0073002603==--