No luck changing from DHCP to static


I’m having a bit of trouble changing a server from DHCP over to static. When I make a change in the GUI it seems like it tries to make the change then reverts back to DHCP. By this I mean if I ping steady the dhcp address it stops/fails for a few cycles then starts again.

  • running FreePBX distro 2.210.62-2
  • tried using the GUI Admin> System Admin> Network Settings
    ** set IP Protocol to none, valid static address, subnet, gateway, left ‘On Boot’ set to yes, with and without MAC address
  • tried system-config-network >> command not found
  • tried system-config-network-tui >> command not found
  • tried removing virtual interface then saving my static settings
  • when I make a change I can view the file at /etc/sysconfig/network-scripts/ifcfg-eth0, that file reflects my static ip changes

By looking at other posts I should be able to run ‘system-config-network’ to solve my issues but no joy so far.

Ran a ‘yum install system-config-network-tui’ and it installed the package. Made changes in TUI (text user interface) to eth0 and DNS. Ran a ‘service network restart’. Same result, it acts like it tries to change over to static then reverts back to DHCP.

Mind you, I do not think it is the best way to make my changes since I am not sure how FreePBX manages the network/nic. In the ifcfg-eth0 file it states ‘do not make changes here’ which I think is what the TUI does.


I did have a ifcfg-eth0.sav2 file in the same folder. I deleted that and ran a service network restart and everything works fine now. Performed a system reboot just as another test and it stayed where I put it.

Don’t know why it would look at a .sav2 (original) file. Anyone care to enlighten me?

It seems in Centos, the ifcfg file ignores everything after the “.” . If you want to make a backup of the file you have to completely change the file name or move it to another directory. I really don’t remember where this is documented, of if it something you just know from trial and error.


Just look at the init script in /etc/init.d/network you can see how it parses those files.