Re: ssh into dual homed machine
From: P Gentry (rdgentry1_at_cablelynx.com)
Date: 12 Jun 2004 08:14:26 -0700
firstname.lastname@example.org (Bill Unruh) wrote in message news:<email@example.com>...
> Michael Collard <firstname.lastname@example.org> writes:
> ]On Fri, 11 Jun 2004 08:37:03 -0700, bad_knee wrote:
> ]> Hello All,
> ]> I setup a dual homed slackware box today on an internal LAN with the
> ]> IP addrs of 192.168.1.140 and 192.168.1.141. I hooked up a patch
> Why in the world would you do that? Stuff can be sent out of only one or
> the other.
> ]> cable from the hub to one of the nics on the slack box. From another
> ]> box on the same 192.168.1.0 network I notice that I can ssh into the
> ]> slack box regardless of which IP address I use! How is it that I can
> ]> use either .140 or .141 for ssh regardless of which NIC is wired to
> ]> the hub?
> What is the other one connected to?
> ]Bad! Having 2 NICs with the same network is bad, you will confuse the
> Why? They have distinct IP addesses. Arp requests will come to the one
> whose IP you have asked for. I cannot see a problem (except that it is
> silly to do so)
Linux doesn't so tightly associate MACs to IPs in dual-homed hosts --
see below ;-)
> ]kernel. If you changed one of the networks to another you could still SSH
> ]to it on either IP because they are both IPs of the Linux box, it doesn't
> ]care that its on another NIC.
> IP are addesses of the nic, not of the box. On the local net the computers
> will send out an arp request (whois 192.168.1.141) and that nic will answer
> with its MAC address. Stuff is then sent to that mac address.
But remember -- this is Linux ;-)
This is why having 2 nics on same physical segment (eg., via hub) can
get tricky at times -- and it's non-determinant, so can waste lots of
time chasing it down ... I know :-(
For the OP -- the 2 nics are (in your eg.) no different to the kernel
stack than two IPs on one nic.
email above disabled