5

I had this configuration in a server

/etc/network/interfaces

auto em1
iface em1 inet static
   address 192.168.1.250
   network 192.168.1.0
   netmask 255.255.255.0
   broadcast 192.168.1.255
   gateway 192.168.1.1

/etc/NetworkManager/system-connections/wired-conexion

[connection]
id=wired-conexion
uuid=0c501f08acc5497cb7de8c815a297537
type=8023ethernet

[8023ethernet]

[ipv4]
method=manual
dns=8.8.8.8;
dns-search=8.8.4.4;
address1=192.168.1.250/24,192.168.1.1

[ipv6]
method=auto
ip6privacy=0

Then I commented these lines in /etc/network/interfaces file

# auto em1
# iface em1 inet static
#    address 192.168.1.250
#    network 192.168.1.0
#    netmask 255.255.255.0
#    broadcast 192.168.1.255
#    gateway 192.168.1.1

I restarted the service

service network-manager restart

And I lost the communication with the server because I was remotely connected. I have a similar configuration in my laptop and everything works well. I thought the file /etc/network/interfaces was ignored when I used the network-manager, is that right? If I uncomment again the lines will it work again?

Update: more configurations (I change manage -> true) and /etc/network/interfaces should be ignored

/etc/NetworkManager/system-connections/conexionname

[connection]
id=conexionname
uuid=8e603a9b-...
type=802-3-ethernet

[802-3-ethernet]

[ipv4]
method=manual
dns=8.8.8.8;
dns-search=8.8.4.4;
address1=192.168.1.250/24,192.168.1.1
may-fail=false

[ipv6]
method=auto
ip6-privacy=0

/etc/NetworkManager/NetworkManager.conf

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

[ifupdown]
managed=true
ChesuCR
  • 175

1 Answers1

8

By default ifup/ifdown configures network interfaces based on interface definitions from /etc/network/interface file.

network-manager can read and configure interfaces reading this file, using a plugin named ifupdown.

You might see a line like in /etc/NetworkManager/NetworkManager.conf file's main configuration snippet :

plugins=ifupdown,keyfile,ofono

these are the plugins in use.

Next in the /etc/NetworkManager/NetworkManager.conf file you should have :

[ifupdown]
managed=false

This managed=false means network-manager will not manage network interfaces defined in /etc/network/interfaces.

To solve your problem you need to make it true so that the /etc/network/interfaces file is parsed by network-manager and hence the relevant interface(s) will be configured accordingly :

[ifupdown]
managed=true

On a different note, if you have interface(s) defined in /etc/network/interfaces and not using network-manager for any other interfaces then you should better consider these two options :

  • Let ifup/ifdown manages the interface(s) (you can uninstall network-manager if you want in this case)

  • Configure interface(s) directly using network-manager

heemayl
  • 93,925