Network settings are lost after server reboots

1

I have installed debian on my old computer and assigned a static IP address to it through /etc/network/interfaces.

However when I boot my server the settings in the interfaces file are lost.

Only when I restart networking interfaces using /etc/init.d/networking restart, the settings are loaded. They don't load automatically on server boot up. What's the problem?

My interfaces file is like this

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 192.168.1.42
    netmask 255.255.255.0
    gateway 192.168.1.1

Sanket

Posted 2012-03-04T14:10:39.880

Reputation:

sanksr, you need to register on the site to be able to regain control of your question. Also, we don't use BB Code here for formatting. – slhck – 2012-03-04T15:03:33.243

paste your /etc/network/interfaces file content – Guntis – 2012-03-04T14:24:07.037

Answers

1

You are probably using something other than networking to manage your networking, such as NetworkManager, which uses different configuration files. You have two good choices. You can fully switch over to NetworkManager and configure things there. Or you can switch over to networking by disabling the NetworkManager service and making sure networking is set to run on startup.

David Schwartz

Posted 2012-03-04T14:10:39.880

Reputation: 58 310

0

the interfaces file seems correct, if networking restart solves the problem it might not autostart on the appropriate runlevels check if links ./rc6.d/S35networking and ./rc0.d/S35networking do exist. Also check in /var/log/messages and dmesg for clues what can prevent to bring the interface up.

Feczo

Posted 2012-03-04T14:10:39.880

Reputation: 325