Using 2 NICS?
Robert G. Brown
rgb at phy.duke.edu
Thu Oct 26 05:31:03 PDT 2000
On Wed, 25 Oct 2000, Josip Loncaric wrote:
> Overall, you can get a minor benefit, but there will be a price to pay.
> Your setup will be more complicated and thus more likely to generate
I agree completely. However, I have to ask: Why don't you just
put the two NICs on different subnets? That's what subnets are FOR.
If you do e.g.
# On host b1
ifconfig eth0 192.168.0.1
ifconfig eth1 192.168.1.1
# On host b2
ifconfig eth0 192.168.0.2
ifconfig eth1 192.168.1.2
and so forth, and then set up your routing tables and so forth, life is
much simpler. For one thing, you can identify hosts on the basis of
their interface at the level of name resolution. In /etc/hosts,
192.168.0.1 b1_0 b1
192.168.0.2 b2_0 b2
Now life is good. Broadcasts and ARP requests and so forth will all be
automatically masked the way that they should be (again, that's what
subnets are for). All the complexity is now ONLY at the point of
generating your routing tables, but that's the place it is unavoidable
anyway. Even here it is simpler, as you don't have to ask yourself
which interface is associated with which IP number on host bN -- it is
built into the name resolution and usable even by raw socket code. I
>>think<< that by making b1_0 and b1 both aliases for the same IP number
that you can do things like "add b1" in pvm and have pvm do the right
thing, provided that you make b1_1 the route to b1 explicitly on the
hosts that are supposed to be using that interface to talk to b1.
One additional benefit that you gain from this is that you no longer
need to worry about getting different NICs. The reason that you were
probably doing this is because otherwise it is moderately difficult to
ensure that eth0 is the same NIC from boot to boot (although I believe
that there are module parameters that can be used to fix this). Now you
no longer care -- as long as they are all on the same switch, it doesn't
matter in the slightest which interface is eth0 and which eth1.
Robert G. Brown http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567 Fax: 919-660-2525 email:rgb at phy.duke.edu
More information about the Beowulf