3

What is the default network manager configuration file in Ubuntu? When I install it on top of the default /etc/network/interfaces network setup on a server it overrides the configuration in some file as the network stops functioning,

I've tried to change my /etc/network/interfaces before starting the network-manager but it doesn't seem like it's using the settings from that file.

By default it's a static/manual configuration in the /etc/network/interfaces but if I remove that or keep it, network manager will use its own settings and the network will no longer work, how would i make nm work in conjunction with the settings I already had? Thanks.

My default current plugins and settings in /etc/NetworkManager/NetworkManager.conf is:

[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

[ifupdown]
managed=false

wouldn't changing the variable of managed decide whether what configuration to use?

EDIT: So far I have tried to put this in my /etc/NetworkManager/NetworkManager.conf But it doesn't work, when I had no address and ip set (it's static) then it worked for a few seconds at startup and then stopped working. How do I set up a proper ip static configuration in NetworkManager.conf if poss?

[connection]
id=Main ens3
uuid=myuuid
type=802-3-ethernet
autoconnect=true

[ipv4]
method=manual
address-data=myip
gateway=mygateway

[802-3-ethernet]
mac-address=mymacaddress

UPDATE: I tried to put only

[ifupdown]
managed=true
in my NetworkManager.conf and ignored the rest of the settings I applied so it'll use the settings provided in /etc/network/interfaces, then when I reboot and start NetworkManager it only works the first few seconds and then the Network stops. There must be something in NetworkManager that is conflicting with the settings provided in /etc/network/interfaces, if so, which is it? If I would use
[ifupdown]
managed=false
NetworkManager would use its own settings but not in this case as stated here ifupdown.

1
  • Ubuntu currently
    – S. L
    Commented May 5, 2017 at 20:12

1 Answer 1

2

Everything is relatively depending on your distribution.

Reading man(5) for NetworkManager.conf you can see, that it's configuration is placed on /etc/NetworkManager/NetworkManager.conf, when talking about CentOS for example.

There you have bunch of plugins and management options for network interfaces management. By default it uses ifcfg-rh plugin for CentOS. It means that, more or less, its configuration is based on /etc/sysconfig/network-scripts/ifcfg-* scripts.

Talking about Debian, I can see that network interfaces are handled by NetworkManager, iff they are not specified in /etc/network/interfaces [Debian Handbook]. Hence you specified interface in /etc/network/interfaces, NM has nothing to do here. There is no conjuction here. You can use nmcli or nmtui to manage interfaces easily with NetworkManager. nmtui is much more friendly.

3
  • These are my current plugins in /etc/NetworkManager/NetworkManager.conf: ifupdown,keyfile,ofono and managed=false wouldn't changing the variable of managed decide whether what configuration to use? So I cannot force NetworkManager to use my /etc/network/interfaces file it looks like? So I have to remove my interfaces from /etc/network/interfaces and then add a similiar connection by using nmtui. Ok I got it.
    – S. L
    Commented May 5, 2017 at 20:22
  • Nmtui or nmcli doesn't seem to work while network-manager is off. How would i go to do it then, change the NetworkManager.conf file if it's possible there?, Ok @roaima.
    – S. L
    Commented May 5, 2017 at 20:36
  • @S.L The manual configuration should be done from the /etc/network/interfaces the NetworkManager.conf is used by NM see man interfaces
    – GAD3R
    Commented May 6, 2017 at 0:04

You must log in to answer this question.

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