Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

For some reason our office linux box is being assigned an ip address via dhcp and I don't know why. What is confusing to me is that when I check system-config-network it shows that my eth0 is setup to be a static ip address. And /etc/sysconfig/network-scripts/ifcfg-eth0 also shows it is setup to be a static ip, yet it is getting a different ip address than the one specified in the ifcfg-eth0. Let me know if you have any suggestions on or ideas on where I can look next.

Here are a few details that might help you figure out what an idiot I am :)
Fedora 11
Router in front of this box is running dhcp, starting at 10.42.1.100
This box is configured to be 10.42.1.50 (at least I think it is!), subnet 255.255.255.0 (which is same as the router's lan subnet)
Instead of having the static IP, this box is getting assigned 10.42.1.100.
Here are the ifcfg-eth0 details

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
NM_CONTROLLED=no
NETMASK=255.255.255.0
IPADDR=10.42.1.50
GATEWAY=10.42.1.1
share|improve this question
1  
Should have asked before I answered.. it really sounds like NetworkManager is running. You're certain it's killed off? –  McJeff Mar 26 '10 at 20:44
    
Find and check the other two ifcfg-eth0 files under /etc/* and see if they disagree with this file. In my experience, they often do. –  kmarsh Mar 31 '10 at 12:37
    
Thanks for the many answers guys. McJeff, yes, the NetworkManager was running and I turned that off. The problem still persisted after turning it off though. kmarsh, I think you were probably right, that one of my ifcfg-eth0 files was out-of-sync, but I didn't verify before I used a gui tool to fix. It has been a while now and I can't remember exactly what the tool was but I remember using a GUI program that I found via a (lengthy) google search. It wasn't your standard gnome/kde network config gui though. Gosh, if I come across the link again I will post here. –  sdek May 3 '10 at 20:31

5 Answers 5

up vote 4 down vote accepted

Here's a list of parameters that I would like to have you amend:

  1. BOOTPROTO=static
  2. Remove the NM_Controlled parameter, or at least comment it out. Execute 'service network restart' or '/etc/init.d/network restart' and it should work. Otherwise, you may have to reboot the system and check the relevant log files for further diagnosis.
share|improve this answer

You might try assigning the static IP from the router based on your box's MAC address. That's usually my preferred solution if doing static IPs.

share|improve this answer

Check to make sure that the Avahi daemon is not running. I have run into this program bringing up interfaces on RHEL5 regardless of what is in the sysconfig-file.

share|improve this answer

If you have just changed the settings file and brought the interface up & down, it may be that there's still a dhcp client running - ps aux | grep dhcpcd will give you an idea if that's the case.

If you found a reboot mysteriously made this issue disappear, that was almost certainly the cause :)

share|improve this answer
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
#NM_CONTROLLED=no (delete)
NETMASK=255.255.255.0
IPADDR=10.42.1.50
GATEWAY=10.42.1.1




service network restart
chkconfig network on 
chkconfig dhcpd off
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.