Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #178614 > unrolled thread

How to disable dhclient to control the interfaces with NetworkManager?

Started byFarhad Mohammadi Majd <farhadbenyamin@yahoo.com>
First post2017-03-09 14:40 +0100
Last post2017-03-09 22:30 +0100
Articles 5 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  How to disable dhclient to control the interfaces with  NetworkManager? Farhad Mohammadi Majd <farhadbenyamin@yahoo.com> - 2017-03-09 14:40 +0100
    Re: How to disable dhclient to control the interfaces with  NetworkManager? Joe <joe@jretrading.com> - 2017-03-09 14:50 +0100
    Re: How to disable dhclient to control the interfaces with  NetworkManager? Jonathan Dowland <jmtd@debian.org> - 2017-03-09 15:00 +0100
      Re: How to disable dhclient to control the interfaces with  NetworkManager? Henning Follmann <hfollmann@itcfollmann.com> - 2017-03-09 15:30 +0100
        Re: How to disable dhclient to control the interfaces with  NetworkManager? Jonathan Dowland <jmtd@debian.org> - 2017-03-09 22:30 +0100

#178614 — How to disable dhclient to control the interfaces with NetworkManager?

FromFarhad Mohammadi Majd <farhadbenyamin@yahoo.com>
Date2017-03-09 14:40 +0100
SubjectHow to disable dhclient to control the interfaces with NetworkManager?
Message-ID<tj6sp-5OK-3@gated-at.bofh.it>
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?

Sorry for my bad english; Thanks for help.

[toc] | [next] | [standalone]


#178615

FromJoe <joe@jretrading.com>
Date2017-03-09 14:50 +0100
Message-ID<tj6C6-5St-5@gated-at.bofh.it>
In reply to#178614
On Thu, 09 Mar 2017 16:44:34 +0330
Farhad Mohammadi Majd <farhadbenyamin@yahoo.com> 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?
> 
> Sorry for my bad english; Thanks for help.
> 

If Network Manager is installed, it should also be managing any wired
connections. Dhcpclient should not be overriding NM.

I don't have an NM installation to hand at the moment, but it is
possible to edit the properties of any interface to connect
automatically or not. Try left- or right-clicking the network icon and
there should be an entry for configuration. It's a long time since I
used it last.

I recall having several fixed IP addresses that I wanted to switch a
laptop between to troubleshoot a network, and any number of
configurations can be created and called by name. All were set to
manual connection.

-- 
Joe

[toc] | [prev] | [next] | [standalone]


#178616

FromJonathan Dowland <jmtd@debian.org>
Date2017-03-09 15:00 +0100
Message-ID<tj6LL-5W9-3@gated-at.bofh.it>
In reply to#178614

[Multipart message — attachments visible in raw view] — view raw

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)

-- 
Jonathan Dowland
Please do not CC me, I am subscribed to the list.

[toc] | [prev] | [next] | [standalone]


#178617

FromHenning Follmann <hfollmann@itcfollmann.com>
Date2017-03-09 15:30 +0100
Message-ID<tj7eN-6nW-5@gated-at.bofh.it>
In reply to#178616
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.


-H



-- 
Henning Follmann           | hfollmann@itcfollmann.com

[toc] | [prev] | [next] | [standalone]


#178627

FromJonathan Dowland <jmtd@debian.org>
Date2017-03-09 22:30 +0100
Message-ID<tjdNf-2mg-9@gated-at.bofh.it>
In reply to#178617

[Multipart message — attachments visible in raw view] — view raw

On Thu, Mar 09, 2017 at 09:26:40AM -0500, Henning Follmann wrote:
> 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.

That was my understanding of OP's desire: to have NetworkManager handle the
interface, and do what it does.

-- 
Jonathan Dowland
Please do not CC me, I am subscribed to the list.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web