Re: ssh into dual homed machine

From: P Gentry (rdgentry1_at_cablelynx.com)
Date: 06/12/04


Date: 12 Jun 2004 08:14:26 -0700

unruh@string.physics.ubc.ca (Bill Unruh) wrote in message news:<cadiln$2sa$1@string.physics.ubc.ca>...
> Michael Collard <quadfour@iinet.net.au> 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 ;-)
http://linux-ip.net/html/ether-arp.html#ether-arp-flux

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.

regards,
prg
email above disabled



Relevant Pages

  • Re: Cannot Ping Beyond Default Gateway & DHCP Server
    ... That computer has two ethernet NICs: one from Intel, and one from Linksys. ... He says he has never had to change a MAC nor tell the home office to change one. ... My assumption now is that this MAC control is occurring in the cable modem, and that clearing it with power off causes it to loose its previously-stored value. ... Network Diagnostics shows pings to his IP, Default Gateway, and DHCP Server work, but pings to DNS servers fail. ...
    (microsoft.public.windowsxp.network_web)
  • Re: 2 NICs different IPs in same network?
    ... My take on this is if you have two IPs with the same name, ... be a conflict with NetBIOS names ... enterprise) you need to disable NetBIOS, MS CLient Service and the F&P ... gives both NICs the same IP and they work in conjunction. ...
    (microsoft.public.win2000.networking)
  • Re: nic issue on Debian Lenny
    ... Then it just lost network ... First of all, when you say that you have "two onboard nics", I ... Usually, if a machine has two ethernet adapters, ... MAC address built-in to it. ...
    (Debian-User)
  • Re: Mac 10.4 OS on G5
    ... I called into the SBS Team Support yesterday because I was getting bombared ... changed before the Mac problem begin. ... the dual NICs on the server from teaming as Load Balance to Fault Tolerance ...
    (microsoft.public.windows.server.sbs)
  • Re: nic issue on Debian Lenny
    ... First of all, when you say that you have "two onboard nics", I ... interpret that to mean that there are two network adapters built-in ...  Usually, if a machine has two ethernet adapters, ... MAC address built-in to it. ...
    (Debian-User)