[lug] RE: NIC does not retain configured IP address after reboot

David Anselmi anselmi at anselmi.us
Fri Apr 16 17:27:23 MDT 2004


Tim Stephenson wrote:
[...]
> DEVICE=eth0
> ONBOOT=yes
> BOOTPROTO=static
> IPADDR=xx.x.x.xx
> NETMASK=xxx.xxx.x.x
> Gateway=x.x.x.x
> 
> As an alternative configured Eth1 (PCI network card) with same IP, Subnet,
> gateway etc and could ping out through that. On shutdown/reboot it too lost
> all config info. Don't know whether this is hardware or software problem.
> Any suggestins appreciated.

The info in /etc/sysconfig/network-scripts/ifcfg-eth0 is used (IIRC) by 
the ifup and ifdown commands.  When you reboot and the NIC is down, what 
does ifconfig show you (should show no IP and perhaps no eth0 at all)? 
Then if you run "ifup eth0" what does that say?

The ifup eth0 is what your init scripts do to bring the network up.  The 
Linux boot process isn't very mysterious, just look at the scripts 
(probably called net* in /etc/rc.d/init.d, again IIRC).

It may be that the module for your NIC doesn't load before the network 
script runs (and so it fails).  If you can bring the card up by hand 
then it would seem the module autoloads correctly but maybe there is 
something preventing it.

I have also seen a NIC where ifup would fail (couldn't get a DHCP lease 
or something).  But running dhclient by hand not only got the lease but 
set up the rest of the stuff ifup was supposed to do.  Obviously DHCP 
shouldn't be part of your problems but maybe there is a similar failure 
in ifup.

HTH,
Dave




More information about the LUG mailing list