1

In Ubuntu Server 10.04 LTS, the network should be only configured in /etc/network/interfaces.

But now I am using the Desktop version..

  1. Why I can't see the setting from the GUI in /etc/network/interfaces, where it is stored?
  2. I have added some lines in the /etc/network/interfaces, seems it also works. So what is the load order of the configurations? (If any)

3 Answers 3

6
+25

Ubuntu Desktop relies on Network Manager to set up interfaces properly. From the list of files in the package we can found that it has its own configuration file /etc/NetworkManager/NetworkManager.conf. From NetworkManager.conf(5) manual page we get the necessary info:

  1. All connection settings set up in the NetworkManager are written into ini-files under /etc/NetworkManager/system-connections.
  2. NetworkManager does read /etc/network/interfaces using ifupdown plugin by default. Default settings also ask NetworkManager to ignore connections in interfaces(5) file so both mechanisms could work without conflicting each other.
  3. Plugins are used in order they are specified in NetworkManager's config file. The default is: plugins=ifupdown,keyfile which means ifupdown takes precedence if it can manage required connection.
  4. Finally, you can ask NetworkManager to control connections written in the interfaces(5) file by adding this to its config:
[ifupdown]
managed=true

You may also rely on just NetworkManager itself by removing connection settings from interfaces(5) file.

2
  • this is my /etc/NetworkManager/system-connections (pastebin.com/iU0EHxn0), but I cannot find the ifupdown plugin as you mentioned. But the system do read the /etc/network/interfaces and I am using Ubuntu 11.10. THanks
    – Howard
    Feb 27, 2012 at 2:51
  • ifupdown plugin is enabled in /etc/NetworkManager/NetworkManager.conf.
    – jollyroger
    Feb 27, 2012 at 20:23
1

As pointed out by others, the NetworkManager application manages all configurations related to networking in Ubuntu. And it typically overrides manual configuration. So, if you want to manually configure the network, uninstall NetworkManager. This is a problem I had experienced sometime back.

1
  • As I noted in my answer you can prevent NetworkManager from configuring network interfaces in /etc/network/interfaces by setting managed=false for the ifupdown plugin.
    – jollyroger
    Feb 29, 2012 at 14:50
-3

From my knowledge the network manager GUI is just a front-end application that will write the corresponding configuration in (/etc/network/interfaces, /etc/network/hostname, /etc/network/hosts) once it is saved.

To answer your question:

  1. I don't believe the GUI network manager ever showed the location of the configuration file in the system.

  2. I am not aware of any load order, but Ubuntu will read all the mentioned configuration files (/etc/network/interfaces, /etc/network/hostname, /etc/network/hosts) to setup the network interfaces, system hostname, etc.

2
  • 1
    And NetworkManager will also affect things like /etc/resolv.conf. NetWorkManager acts as if it is the sole owner of all of these files. If you want to edit networks, I seriously suggest you either do it completely through NetworkManager or completely remove it and do it by hand. If I have a desktop machine with a static IP, that is the first thing to go. IME, none of the configuration files will be reliable while NM is installed and working.
    – 1100110
    Feb 21, 2012 at 17:44
  • @1100110, I need to create a bridge but seems not supported by NM.
    – Howard
    Feb 27, 2012 at 2:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .