Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


CentOS not saving network config. Stops responding to the outside world after every reboot
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

CentOS not saving network config. Stops responding to the outside world after every reboot

TinkuTinku Member
edited August 2017 in Help

Facing this issue on 2 different VPSes where i am running CentOS 6 i recently updated it and after that now it stops responding to the outside world after every reboot and to fix this issue i have to login through the SSH terminal given in the VPS panel and run these 2 commands:

ifdown eth0

ifup eth0

After running these commands it's starts running like normal again. But i am tired of doing it again and again after every reboot. Is there any way to save this network config?

Comments

  • ClouviderClouvider Member, Patron Provider

    Do you have ONBOOT=yes in the interface Config ?

  • I think the virtualization may matter a bit on this one. OpenVZ does not save those changes does it?

  • WSSWSS Member

    If it's OpenVZ, just click reconfigure network in SolusVM.

  • @Clouvider said:
    Do you have ONBOOT=yes in the interface Config ?

    Yes eth0 and eth1 both files using ONBOOT=yes

  • TinkuTinku Member
    edited August 2017

    @AuroraZ said:
    I think the virtualization may matter a bit on this one. OpenVZ does not save those changes does it?

    @WSS said:
    If it's OpenVZ, just click reconfigure network in SolusVM.

    Both VPS are KVM on virtualizor panel.

  • ClouviderClouvider Member, Patron Provider

    I take it MAC address nor UUID have not changed for this interfaces ?

    Is the networking service enabled in start up ? If so, what does the logs say ?

  • TinkuTinku Member
    edited August 2017

    Not a sys admin so not sure if it's the best way but here is a quick fix i found.

    Setting NM_CONTROLLED=no in /etc/sysconfig/network-scripts/ifcfg-eth0, then turning on the network service on startup chkconfig network on.

    It worked but would like you guys to confirm if it's ok to use this?

  • @Clouvider said:
    I take it MAC address nor UUID have not changed for this interfaces ?

    Is the networking service enabled in start up ? If so, what does the logs say ?

    Can you please confirm the fix i posted above is fine? Its working ok but im not sure if it will cause any other issues

  • Layer03Layer03 Member, Host Rep
    edited August 2017

    @Tinku said:
    Not a sys admin so not sure if it's the best way but here is a quick fix i found.

    Setting NM_CONTROLLED=no in /etc/sysconfig/network-scripts/ifcfg-eth0, then turning on the network service on startup chkconfig network on.

    It worked but would like you guys to confirm if it's ok to use this?

    Its a dirty fix but should work without any issues.

    You upgraded from centos 5 to 6?

  • @Layer03 said:

    @Tinku said:
    Not a sys admin so not sure if it's the best way but here is a quick fix i found.

    Setting NM_CONTROLLED=no in /etc/sysconfig/network-scripts/ifcfg-eth0, then turning on the network service on startup chkconfig network on.

    It worked but would like you guys to confirm if it's ok to use this?

    Its a dirty fix but should work without any issues.

    You upgraded from centos 5 to 6?

    Nah was using centos 6 and still using 6 but this happened after running the yum update recently there were some updates that i installed i don't remember exactly but i think there was kernel update

  • AGSQAGSQ Member

    You could also try to "chattr +i /etc/sysconfig/network-scripts/ifcfg-eth0" :)

  • IkoulaIkoula Member, Host Rep

    Hello,

    It is a little late but maybe it has to do with your runlevel, have you checked that ?

  • @Ikoula said:
    Hello,

    It is a little late but maybe it has to do with your runlevel, have you checked that ?

    Care to explain more?

  • Yeah I’ve had issues with the runlevel set to X11 and it somehow breaking the network on boot, keeping it at 3 seems to work just fine and is the standard server terminal boot

  • IkoulaIkoula Member, Host Rep
    edited September 2017

    @Tinku if you type the command "runlevel" what value does it return ?

  • @Ikoula said:
    @Tinku if you type the command "runlevel" what value does it return ?

    It says N 3

  • I always uninstall Network-Manager on CentOS 6 servers with static IP.

  • IkoulaIkoula Member, Host Rep
    edited September 2017

    Then it's fine, you have to check logs in /var/log/... to find out why network goes down at system startup.

  • Thanks all for the help i fixed this issue by running the ifup and ifdown commands through rc.local

Sign In or Register to comment.