Click to See Complete Forum and Search --> : Weirdness with dual homed system!


soleblazer
09-12-2003, 05:36 PM
Greetings,

I have a RH9 2.4-20 system. It is running on a compaq 166mhz 92mb ram box and its sweet, only used for wu-imap and postfix.

Here is the odd thing I can't figure out.

When I set it up, I set it up to use two ips. eth0 was the onboard 10mbit card and eth1 was my 100mbit 3com card.

The ips were assigned eth0-192.168.1.10 eth1 192.168.1.11

Now, on my webserver I pointed squirellmail to hit the .10 ip by accident., also, i had been ssh'ing to this ip as well. All was working, but it was slow occasionally. Today I noticed that I never even plugged the 10mbit ip (slow one) into the switch. This whole time traffic has been going to .10, but somehow it has been working. In my modules.conf file I am loading both nic modules. I noticed by running ifconfing that all the packets are going to .11 (fast one).. , ifconfig shows zero packets hitting eth0.

So how the hell is this working? Anything going to .10 should never work since its not plugged in. The interface was listed as up, but why would linux do this? Its as if it was nat'ing or something...i have nothing extra running..

anyone got any idea?

fredg
09-12-2003, 06:21 PM
You did not provide the netmasks, but if they were 255.255.255.0, then your mistake is that you have two network interfaces belonging to the same network in the same machine. This can not and will not work, regardless whether there are cables plugged into the cards or not.

Change one of the interfaces to to be in some other private network such as 192.168.2.0, or 10.x.y.0, etc.

soleblazer
09-12-2003, 06:27 PM
Originally posted by fredg
You did not provide the netmasks, but if they were 255.255.255.0, then your mistake is that you have two network interfaces belonging to the same network in the same machine. This can not and will not work, regardless whether there are cables plugged into the cards or not.

Change one of the interfaces to to be in some other private network such as 192.168.2.0, or 10.x.y.0, etc.

When you say it won't work, what does that mean? I have used multihomed machines for a while now, and while all the outgoing packets will go out from the first card in the routing table on the machine, I have never seen this behavior before.

I know what you are saying about the networks though, normally you wold want the traffic to be segmented completly, but in this case I simply have two cards on the same network. If I pull eth0 isnt plugged in, it shouldnt respond to a ping.

Its as if the two cards were bridged somehow.

fredg
09-12-2003, 06:46 PM
It means your single class C network is ambigously defined to have two interfaces. It isn't multi-homed since there is only one network.

Ask your self the question: Which NIC defines the 192.168.1.0 network? The answer is they both do. But they both can't and have it work as intended.