Web lists-archives.com

Re: How to disable dhclient to control the interfaces with NetworkManager?

On Thu, Mar 09, 2017 at 01:51:40PM +0000, Jonathan Dowland wrote:
> On Thu, Mar 09, 2017 at 04:44:34PM +0330, Farhad Mohammadi Majd wrote:
> > Hello, I did install Debian GNU/Linux v8.7 through NetInstall option,
> > during installation I did not select any Desktop Environment for install
> > on system, only `standard utilities', after finish the installation, I
> > did use `aptitude' to install xorg, gnome-shell, gnome-session and some
> > parts of GNOME without recomended packages.
> > 
> > Now anytime on system booting, dhclient automatically connects the
> > interface to network and I just know to use `ifdown' by root user to
> > turn off the interface.
> > 
> > I want to disable dhclient to control the interface with NetworkManager
> > by regular user.
> > 
> > How is this possible?
> Edit /etc/network/interfaces and comment out the lines corresponding to
> your network interface, e.g. 'auto eth0', 'iface eth0 inet dhcp', etc.
> then restart NetworkManager (systemctl restart NetworkManager.service)

Any interface defined in the /etc/network/interfaces is by default ignored
by the NetwokManager. 
So you have to make the decision how to manage your interface. By removing
it from that file, NetworkManager takes over control again. However by
default the NetworkManager also connects the interface if it is plugged in.
It will try to assign the ip address through dhcp. If you do not want that
you have to define a new profile and assign that to the interface.


Henning Follmann           | hfollmann@xxxxxxxxxxxxxxx