ssh into dual homed machine

This is a discussion on ssh into dual homed machine within the Linux Networking forums, part of the Linux Forums category; Hello All, I setup a dual homed slackware box today on an internal LAN with the IP addrs of 192....


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-11-2004
bad_knee
 
Posts: n/a
Default ssh into dual homed machine

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
  #2 (permalink)  
Old 06-11-2004
Michael Collard
 
Posts: n/a
Default Re: ssh into dual homed machine

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
  #3 (permalink)  
Old 06-12-2004
Bill Unruh
 
Posts: n/a
Default Re: ssh into dual homed machine

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)


]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
  #4 (permalink)  
Old 06-12-2004
P Gentry
 
Posts: n/a
Default Re: ssh into dual homed machine

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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 01:02 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0