Server with eth0, eth1 lost connectivity after changing gateway and rebooting

Issues related to configuring your network
Post Reply
efraimkyr
Posts: 4
Joined: 2008/06/24 08:38:45

Server with eth0, eth1 lost connectivity after changing gateway and rebooting

Post by efraimkyr » 2008/06/24 12:18:21

I'm facing a problem with my network.

I have a server with 2 network cards enabled (eth0 and eth1). I only use the one.
I have set a static ip. Everything worked fine, until i had to change the gateway ip.
I've run netconfig and changed the gateway's ip.
I've run service network restart and everything worked fine.
But when i rebooted the server i lost connectivity. The server could not even see itself (I have a MySQL DB on it, but the connection failed, because it couldn't see its own IP!). I've run ifconfig and the ip looks ok.
The strange thing is that i (actually another guy, since I've lost connectivity) set the old gateway ip with netconfig,which worked fine, but the problem remained!

I also followed some other suggestions (see below) but it didn't work for me:

1) I disabled Kudzu on bootup with chkconfig kudzu off

Unbinded the MAC address for eth0 in /etc/sysconfig/network-scripts/ifcfg-eth0 by removing the line
HWADDR=XX:XX:XX:XX:XX:XX

The contents of the ifcfg-eth0 files were:

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=xxx.xxx.xxx.xxx
NETMASK=xxx.xxx.xxx.xxx
GATEWAY=xxx.xxx.xxx.xxx

Unfortunately, I cannot see the contents of this file or of any other log after reboot, since i'm connecting remotely to the server (ssh) and I've lost connection.
I've another identical server wih the same configuration, from witch i can see the files, but before rebooting the server.

Someone suggested that I should check /etc/sysconfig/network-scripts and remove any non active ethernet entries that gets placed in that directory after this bootup problem. I haven't done it at the first server. I have done this on the second one, but am afraid to reboot it

On the second server I only left:
ifcfg-eth0 and
ifcfg-lo

(removed ifcfg-eth1)

No firewalls are turned on ( have checked it with iptables -L)

When i tried to use the second ethernet port, it worked fine, but when i change the gateway with netconfig and reboot the server , same thing happens.
Another strange thing i noticed is that under /etc/sysconfig/network-scripts there was a ifcfg-eth1 file, but in /etc/sysconfig/hwconf, the second ethernet adapter's name is eth2!!

Can anyone help me on this?
Should I restart the second server (if i lose connectivity i'll be unable to connect) or is there more to be done?

Thanks in advance for any advice,
efraimkyr

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Server with eth0, eth1 lost connectivity after changing gate

Post by gerald_clark » 2008/06/24 13:12:03

Without the HWADDR lines in the config files, the machine may not be able
to tell which interface is eth0 or eth1.
Have you tried moving the ethernet cable to the other interface to see if that is
the active one?

Do both interfaces use the same driver?
If not, what is the contents of /etc/modprobe.conf?
Do you have the aliases correct?

efraimkyr
Posts: 4
Joined: 2008/06/24 08:38:45

Re: Server with eth0, eth1 lost connectivity after changing gateway and rebooting

Post by efraimkyr » 2008/06/24 13:36:00

We've managed to make it work by changing a setting in BIOS. The ethernet cards was enabled as "ENABLED PHE".
We changed this setting to just "ENABLED" and it worked. Don't know what this setting is for ( the server is a DELL 2950 , if i'm not mistaken).


Without the HWADDR lines in the config files, the machine may not be able
to tell which interface is eth0 or eth1.
When i used HWADDR it couldn't get the right value ( it told me MAC address incorrect, or something like that)
Have you tried moving the ethernet cable to the other interface to see if that is
the active one?
Yes, and it worked, but after changing values through netconfig and restarting I had the same problem

Do both interfaces use the same driver?
If not, what is the contents of /etc/modprobe.conf?
They use the same driver.
Do you have the aliases correct?
I don't know if that's what you mean, but I've edited my post.
I wrote:
"When i tried to use the second ethernet port, it worked fine, but when i change the gateway with netconfig and reboot the server , same thing happens.
Another strange thing i noticed is that under /etc/sysconfig/network-scripts there was a ifcfg-eth1 file, but in /etc/sysconfig/hwconf, the second ethernet adapter's name is eth2!!"

Anyway thanks alot gerald_clark for your suggestions. I will go with the solution i've found.
But I would appreciate if anyone could explain me why it worked and what ENABLED PHE stands for.

Regards,
efraimkyr

pjwelsh
Posts: 2622
Joined: 2007/01/07 02:18:02
Location: Central IL USA

Re: Server with eth0, eth1 lost connectivity after changing gateway and rebooting

Post by pjwelsh » 2008/06/24 13:53:52

[quote]Do both interfaces use the same driver?[/quote]

The HWADDR option gives explicit indication of *which* MAC address will get setup. It's like "drive labels" for network cards. You will always get HWADDR of {whatever} to get assigned IP of {whatever} no matter which order the cards are found. This happens when you move cards in PCI slots or USB devices etc.

Post Reply

Return to “CentOS 4 - Networking Support”