Web Hosting Talk







View Full Version : Odd IP & eth problem


mpope
04-18-2002, 01:58 AM
Hello,

I have a very odd problem here. I have recently found out that I have a server setup wrong. Basically, it has two ethernet cards eth0 and eth1. They are both setup using the same ip address (which is what caused the problems). Now, eth1 is the only one that is connected to the network. Everything works fine except machines cannot talk to each other on the local network. All machines work fine connecting to machines outside of the network. So... the server can connect and serve web pages, etc. But cannot send an email (or even ping) from machine1-> machine2.

Now, since it is the only one connected to the network, eth1 should be setup with all of the IP addresses. It appears that all IP's were setup on eth0. Here is the output of route -n:

Destination Gateway Genmask Flags Metric Ref Use Iface
216.xx.xxx.96 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
216.xx.xxx.97 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
216.xx.xxx.98 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
216.xx.xxx.26 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
216.xx.xxx.25 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
216.xx.xxx.24 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
216.xx.xxx.31 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
216.xx.xxx.30 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
216.xx.xxx.29 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
216.xx.xxx.28 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
216.xx.xxx.0 0.0.0.0 255.255.255.128 U 0 0 0 eth0
216.xx.xxx.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
216.xx.xxx.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 216.xx.xxx.1 0.0.0.0 UG 0 0 0 eth1
0.0.0.0 216.xx.xxx.1 0.0.0.0 UG 0 0 0 eth0

(There are more IP's than that listed, I only copied part of them)

SO... I want to change these IP's over to eth1 so that I can shut down the eth0 interface. Does anyone know how to do that?

(If I shut down the eth0 interface, all of the IP's still work, but for some reason DNS does not, which is no good).

Thanks!

bitserve
04-18-2002, 09:42 PM
Originally posted by mpope
I have a very odd problem here. I have recently found out that I have a server setup wrong. Basically, it has two ethernet cards eth0 and eth1. They are both setup using the same ip address (which is what caused the problems). Now, eth1 is the only one that is connected to the network. Everything works fine except machines cannot talk to each...

This is where you lost me. If only one machine is connected to the network, how would the others talk to eachother?

serve-you
04-19-2002, 01:23 AM
You would use ifconfig to add/remove the interfaces.

-Dan

mpope
04-19-2002, 06:51 PM
Sorry for being unclear!

There are two machines connected to the network. Each machine has 2 ethernet cards. On the one machine, the IP's are all screwed up. eth1 is connected to the network, eth0 is not. However the IP's are setup as using eth0. The odd thing is that I can access the machine on those IP's that are setup on the wrong ethernet card from outside the lan (Ie, from the rest of the internet) but I cannot access the machine on the Lan.

I had someone try to fix it for me, he took eth0 offline, which caused the lan to start working, but it made DNS stop working on the machine :eek: It was really wierd, as I could hit the IP's individually, just not using DNS.

Just in case you guys were wondering how all this crap happened, it was due to a motherboard upgrade in the server and going from a 3com ethernet card to onboard NICs. (And a little misconfiguration on my part) :stickout

bitserve
04-20-2002, 03:33 PM
So you just want to know why it's routing that way, or you want to resolve the problem?

If you're trying to replace eth0 with eth1, then you should use ifconfig to make sure that all of your IP addresses are on eth1 and then use route to fix your routing table.

I don't know what OS you are using, but more than likely you'll have to update some network scripts so that it keeps these changes when you reboot. If your OS has a network configure tool, you might just use that to make these changes.

If your intent was to just keep eth0, then you should plug it back into the network and fix your routing table.

It's also possible that what you think is eth0 is actually eth1 now. Because your OS may be finding the integrated NIC first, and calling it eth0, even though your 3com used to be eth0.