I'm attempting to setup a network of three computers and some peripheral devices using an Ethernet switch and static IP addresses. All of the computers are using Ubuntu 14.04 LTS. On two of the three computers, everything works fine, but on the third I encounter a problem.

Using ifconfig eth0, I set a static IP address. By typing ifconfig, I can verify that the IP address is setup, and pinging the address from another computer works. However, after a short amount of time (<20s), using ifconfig shows that the IP address that I had set earlier is no longer associated with eth0 -- it has disappeared!

I then altered the network interfaces file to establish the exact network made using ifconfig in an attempt to make the setup permanent; this didn't work either, and the setup was ignored or reset. What would cause this behavior?

Likely this problem is very basic, but I have been struggling with it for some time, and any pointers or advice would be appreciated.

Update: I tried reverting all of the files back to their original states. I also poked around with the network manager, and tried setting the IP addresses with that, which worked. It seems that there is some sort of conflict between the different tools used to setup networks graphically versus in the command line, but I still don't understand why, so my original question still stands!


Ifconfig changes are temporary. They are erased when networking is restarted.

Permanent changes are stored in /etc/networking/interfaces from the command line or through network manager.

  • I have updated my question to include the fact that I had tried using the interfaces but experienced the same result. I had excluded this step for brevity's sake. As I mentioned in my update, it seems that network manager trumps other network tools (ifconfig, interfaces), and I would like to know why.
    – JSycamore
    Jul 13 '15 at 1:48

Network Manager is the GUI utility at fault. The purpose of network manager is to handle networking automatically so that the user doesn't have to think about it. To do this, network manager automatically switches between networks. While this utility is great for some applications and basic computer usage, when a strictly defined network is necessary, and the user wants to specify that network at the command line, Network Manager has an adverse effect.

When the network is specified in network interfaces, Network Manager overrides the setup automatically, using instead its own configuration. Likewise, when ifconfig is used, Network Manager sees a change and automatically switches the network configuration back to its own configuration. This is frustrating for users with specific goals in mind.

There are two options for getting past this frustration. The first is to set up the desired network configuration using Network Manager. The GUI is an obvious way of doing this, but it may not be possible for some situations. In situations where the GUI is not desired, Network Manager can be set via the command line with nmcli, which is an textual interface for Network Manager.

The second option is to disable Network Manager with the following commands:

sudo stop network-manager

echo "manual" | sudo tee /etc/init/network-manager.override

The first command stops Network Manager, and the second command prevents Network Manager from running on startup. After executing these commands, network interfaces or ifconfig can be used without having Network Manager override the configuration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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