You are not logged in.

#1 2013-06-25 19:52:16

Cadeyrn
Member
Registered: 2013-04-06
Posts: 136

[SOLVED] NetworkManager can't use DHCP

I just installed a fresh Arch Linux on whatever network modem is onboard the Gigabyte 990FXA-UD3 motherboard. The ethernet port works out-of-the-box using dhcpcd on the installer ISO and on my actual installation of Arch. Using KDE, I followed NetworkManager's setup guide in the wiki, but if I try to connect to anything, it instantly fails once I click on it. Then I tried clicking on Manage Connections and making a new Wired connection. It still failed. Then I tried changing that connection from DHCP to manual IPv4 and DNS numbers, and it worked just fine. I've done a lot of Googling, but nothing in the wiki or forums is fixing this issue for me.

Last edited by Cadeyrn (2013-06-25 22:24:32)

Offline

#2 2013-06-25 21:41:22

Thermi
Member
Registered: 2013-05-11
Posts: 5

Re: [SOLVED] NetworkManager can't use DHCP

Make sure you don't have a dhcp-daemon, dhclient or similiar running. Taking a loot at the journal would help, too. (journalctl -n 200 as root or as your own user, if you put yourself in the right group)

Offline

#3 2013-06-25 21:51:18

Cadeyrn
Member
Registered: 2013-04-06
Posts: 136

Re: [SOLVED] NetworkManager can't use DHCP

I don't see one in the log I get when I use that command, nor does this find anything:

$ sudo systemctl disable dhcp-daemon
Failed to issue method call: No such file or directory
$ sudo systemctl disable dhclient
Failed to issue method call: No such file or directory

Offline

#4 2013-06-25 21:59:16

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [SOLVED] NetworkManager can't use DHCP

Those things aren't services.  I think waht Thermi means by dhcp-daemon is actually a dhcp-client-daemon (dhcpcd).  Dhclient does not include a service.  You can see what is actually running by doing "systemctl" without any arguments.  I think that is a much better way to go about things instead of just blindly trying to disable things.  You can also see what is enabled/disabled by doing "systemctl list-unit-files [--type=service]" (where the square brackets indicate an optional segment, restricting to just services will give more sane ouput). 

I think the bigger question though is if you are able to use dhcpcd manually (or dhclient for that matter).  Either that, you can test if the dhcpcd@<interface>.service works for you.  If those work, then it is a problem with network manager.  If not, then you have a larger problem that is independent of any network management program.

Offline

#5 2013-06-25 22:20:29

Cadeyrn
Member
Registered: 2013-04-06
Posts: 136

Re: [SOLVED] NetworkManager can't use DHCP

Aha! You reminded me of a detail I completely forgot: while installing Arch, I enabled dhcpcd@<interface (in my case enp5s0)>.service. Disabling it just now fixed the problem. Thanks.

Offline

#6 2013-09-27 02:32:26

ke7mbz
Member
Registered: 2013-09-27
Posts: 17

Re: [SOLVED] NetworkManager can't use DHCP

Thank you! I read through several forums for both Arch and other distros before finding this. People were just guessing randomly at solutions, but it was so simple.

So why does having dhcpcd running cause NM not to work? Doesn't NM need it to get an IP address from the router? Hence the "dhcp" parameter in NetworkManager.conf.

This should definitely be in the troubleshooting section of the NM wiki. Mine was a very standard installation, and I ran into this.

Offline

#7 2013-10-22 04:38:09

salbahis
Member
Registered: 2013-10-17
Posts: 2

Re: [SOLVED] NetworkManager can't use DHCP

encoutered the same problem couple days, ago... what i did remove files manually, created by dhcpcd on /etc/systemd/systen/multi-user.target.wants

Offline

#8 2013-12-29 21:04:06

rubens
Member
Registered: 2013-07-23
Posts: 2

Re: [SOLVED] NetworkManager can't use DHCP

ke7mbz wrote:

So why does having dhcpcd running cause NM not to work? Doesn't NM need it to get an IP address from the router? Hence the "dhcp" parameter in NetworkManager.conf.

This should definitely be in the troubleshooting section of the NM wiki. Mine was a very standard installation, and I ran into this.

Interestingly enough, disabling `dhcpcd` was the solution here.
I was having the same issue with NM and dhcpcd. Now NM works
perfectly -- even logs in to the available wireless network when
the computer boots. I'm still curious about how NM is fetching
the IP address list with dhcpcd disabled.

Last edited by rubens (2013-12-29 21:05:19)

Offline

#9 2013-12-29 22:33:36

Raynman
Member
Registered: 2011-10-22
Posts: 1,094

Re: [SOLVED] NetworkManager can't use DHCP

You are confusing a number of things. You're not disabling dhcpcd in the sense that the DHCP client is no longer allowed to start; you're disabling the systemd .service file that starts a dhcpcd instance that takes control of all interfaces and tries to configure them using DHCP. Disabling this allows NM (or any other network manager, such as wicd) to control the interface. When you tell NM to use DHCP, it will still use dhcpcd (or dhclient) to take care of that, but NM is the one managing everything.

You should see dhcpcd.service* as a (more basic) alternative to NetworkManager.service or wicd.service. You should never have two or more of these network managers competing to take control of a network interface.

@salbahis: I doubt that dhcpcd enabled itself. You are in control of your system and you enabled dhcpcd.service* (creating symlinks in the .wants directory).

* or dhcpcd@<interface>.service

Offline

#10 2013-12-30 01:14:41

jeff story
Member
Registered: 2009-05-31
Posts: 237
Website

Re: [SOLVED] NetworkManager can't use DHCP

So it seems this is an ongoing problem ....... with the networkmanager section in the wiki.

If the solution to this was clearly spelled out in the wiki, which it is obviously not, based on this and many other threads related to this issue, this problem (of documentation) would not continue to surface on the forums and be a problem to users. Not to mention the 1700+ views to this thread.

Unfortunately, the wiki "over loards" seem to obviously not want to clarify this common and ongoing issue .......

Perhaps this will prompt someone knowledgeable and persistent enough within the arch community to fix this issue and stand up the the wiki over lords. 

Seems some don't want to include more appropriate, clear and concise instructions in the wiki related to this issue that are comprehend-able to ALL skill levels of Arch users .

Last edited by jeff story (2013-12-30 01:27:29)


Check out my website for info on the Arch Linux Installer

Offline

#11 2013-12-30 02:08:16

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,164

Re: [SOLVED] NetworkManager can't use DHCP

jeff story wrote:

Unfortunately, the wiki "[sic]over loards" seem to obviously not want to clarify this common and ongoing issue .......

I'm confused, did someone prevent you from updating the Wiki?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#12 2013-12-30 02:36:56

jeff story
Member
Registered: 2009-05-31
Posts: 237
Website

Re: [SOLVED] NetworkManager can't use DHCP

I'm confused, did someone prevent you from updating the Wiki?

Yes, I tried, but I admittedly lack the skills to debate technically, with someone who obviously possesses the skills.

https://wiki.archlinux.org/index.php?title=NetworkManager&action=history

(cur | prev) 07:09, 3 September 2013 Lahwaacz (Talk | contribs) . . (28,477 bytes) (-253) . . (Undo revision 274198 by Jeff story (talk) completely covered by the note above removed text)
(cur | prev) 23:18, 2 September 2013 Jeff story (Talk | contribs) . . (28,730 bytes) (+253) . . (clarify and instruct to disable and stop dhcpcd.service)

Honestly though, at this point, your question is no longer important.

What would be cool though is for someone with the expertise on this subject to take notice, figure out exactly what is lacking in the wiki and be willing to contribute the info for the good of the community, which I believe should include the Arch newbs or non coders / programmers.

Then be able to persuade Scimmia and Lahwaacz that in fact, something needs "fixed", even though from their perspective (Linux guru?) there is nothing wrong or missing.

EDIT: Added second name to clarify situation.

Last edited by jeff story (2013-12-30 03:53:51)


Check out my website for info on the Arch Linux Installer

Offline

#13 2013-12-30 02:50:31

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 5,086

Re: [SOLVED] NetworkManager can't use DHCP

I agree with Lahwaacz, the note covers it.

Note: It may be a good idea to use systemctl --type=service to ensure that no other service is running that may want to configure the network. Multiple networking services will conflict.

Did you miss this note or just not understand that dhcpcd would be one of the services that would be a problem? You had to enable dhcpcd manually, so you had to have some understanding that it was configuring the network.

Last edited by Scimmia (2013-12-30 02:52:53)

Offline

#14 2013-12-30 05:28:35

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,164

Re: [SOLVED] NetworkManager can't use DHCP

Okay, As this thread has been marked as solved, I am going to close it.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB