Networking Forums

Networking Forums > Computer Networking > Linux Networking > ssh into dual homed machine

Reply
Thread Tools Display Modes

ssh into dual homed machine

 
 
bad_knee
Guest
Posts: n/a

 
      06-11-2004, 03:37 PM
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
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?
 
Reply With Quote
 
 
 
 
Michael Collard
Guest
Posts: n/a

 
      06-11-2004, 09:57 PM
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
> 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?


Bad! Having 2 NICs with the same network is bad, you will confuse the
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.

Regards
Michael Collard
 
Reply With Quote
 
Bill Unruh
Guest
Posts: n/a

 
      06-12-2004, 12:27 AM
Michael Collard <(E-Mail Removed)> 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)


]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.
 
Reply With Quote
 
P Gentry
Guest
Posts: n/a

 
      06-12-2004, 03:14 PM
(E-Mail Removed) (Bill Unruh) wrote in message news:<cadiln$2sa$(E-Mail Removed)>...
> Michael Collard <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Homed Question DJ Windows Networking 6 02-06-2007 12:44 PM
dual homed issues spec Linux Networking 6 07-08-2006 08:54 PM
dual-homed dell? Ross M. Greenberg Wireless Internet 9 06-12-2006 02:51 PM
Dual homed machine delphinuscadmus@yahoo.com Linux Networking 0 04-24-2006 04:15 AM
Dual homed DC´s Lem Windows Networking 2 08-25-2004 02:15 AM



1 2 3 4 5 6 7 8 9 10 11