Re: ssh into dual homed machine
From: P Gentry (rdgentry1_at_cablelynx.com)
Date: 06/12/04
- Next message: P Gentry: "Re: linux nfs server tuning"
- Previous message: /dev/rob0: "Re: pppd daemon dying"
- In reply to: Bill Unruh: "Re: ssh into dual homed machine"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: P Gentry: "Re: linux nfs server tuning"
- Previous message: /dev/rob0: "Re: pppd daemon dying"
- In reply to: Bill Unruh: "Re: ssh into dual homed machine"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|