You are not logged in.

#1 2014-04-19 10:18:32

jvc2014
Member
Registered: 2014-02-01
Posts: 7

Ethernet cant connect at boot because of DHCPCD

Hi Guys,

After upgrading all my packages I have a strange problem with ethernet. It repeatedly attempts to connect a few times and then gives up completely.

I narrowed it down a bit with some research and experimentation and to get it to work I just run this:

# sudo systemctl stop NetworkManager;sudo killall dhcpcd;sudo systemctl start NetworkManager

I have tried to disable dhcpcd across reboots with:

# sudo systemctl disable dhcpcd.service

but after a reboot the problem reoccurs and dhcpcd tells me

# sudo systemctl status dhcpcd.service

dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/usr/lib/systemd/system/dhcpcd.service; disabled)
   Active: inactive (dead)

killing dhcpcd and restarting Newtork Manager fixes it again.

Presumably dhcpcd and Network Manager are fighting over the same resource, busting the latter at boot.

This is going to be something simple I know but I am still an enthusiastic Arch Noob. Any help would be welcome smile


Kernel: 3.14.1-1-ARCH (x86_64), Board : 0P301D Dell Inc. , RAM: 4GB
CPU: 2x Intel(R) Core(TM)2 Duo CPU E7300 @ 2.66GHz
/ : ATA INTEL SSDSA2MH08  ,   /home : ATA WDC WD2500BEVT-2
Video: Advanced Micro Devices, Inc. [AMD/ATI] RV620 LE [Radeon HD 3450]

Offline

#2 2014-04-19 10:34:12

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: Ethernet cant connect at boot because of DHCPCD

Try to mask dhcpcd.

# systemctl mask dhcpcd.service

Offline

#3 2014-04-26 21:45:43

jvc2014
Member
Registered: 2014-02-01
Posts: 7

Re: Ethernet cant connect at boot because of DHCPCD

Thanks bstaletic.

I have run that command and when I reboot I will see if it worked

To try to understand the actual conflict between NetworkManager and dhcpcd I found this in the forums that explains it. Sorry I didn't spot it before sad

https://bbs.archlinux.org/viewtopic.php?id=165793


Kernel: 3.14.1-1-ARCH (x86_64), Board : 0P301D Dell Inc. , RAM: 4GB
CPU: 2x Intel(R) Core(TM)2 Duo CPU E7300 @ 2.66GHz
/ : ATA INTEL SSDSA2MH08  ,   /home : ATA WDC WD2500BEVT-2
Video: Advanced Micro Devices, Inc. [AMD/ATI] RV620 LE [Radeon HD 3450]

Offline

#4 2014-04-26 22:59:03

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

Re: Ethernet cant connect at boot because of DHCPCD

Network Manager is designed to be used with dhclient and from what I have heard, it properly kills instances of dhclient upon restarting of NetworkManager.service.  So I think if you want to use NetworkManager, you should probably be using it with dhclient for the best compatibility.

Offline

#5 2014-04-27 08:33:57

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

Re: Ethernet cant connect at boot because of DHCPCD

I've never had any problems with dhcpcd as NetworkManager's DHCP client instead of dhclient.

What you should determine, is how the dhcpcd instance(s) (the one(s) you're killing with killall) are started. The systemctl output shows that dhcpcd.service is inactive and disabled, so that's not it and I don't understand why bstaletic suggests masking it. There is also a template used as dhcpcd@<interface>.service, so you could have one of those enabled (or even netctl/wicd/connman/...). Did you check

# systemctl --type=service

for any conflicting network services? You could also disable NM and confirm that no dhcpcd process is running after a reboot. If it turns out that it is NM spawning the problematic dhcpcd instances, only then would I give dhclient a try. (If something else is starting dhcpcd, having NM start dhclient will probably just give you a conflict between dhcpcd and dhclient.)

Offline

#6 2014-04-27 15:55:50

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: Ethernet cant connect at boot because of DHCPCD

NetworkManager does have issues with not killing dhcpcd (https://bugzilla.gnome.org/show_bug.cgi?id=723746), but that should not affect the connection on boot, only when NM is restarted.

@jvc2014, can you try disabling NM and see if dhcpcd still starts? If so, you need to find out what's starting it, since systemd isn't doing it.

Offline

#7 2014-04-27 23:09:57

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

Re: Ethernet cant connect at boot because of DHCPCD

Scimmia wrote:

NetworkManager does have issues with not killing dhcpcd (https://bugzilla.gnome.org/show_bug.cgi?id=723746), but that should not affect the connection on boot, only when NM is restarted.

Indeed, I somehow totally glossed over the part about this problem occurring boot...  Sorry for the noise. smile

BTW, considering that NetworkManager was in fact designed to be used with dhclient, it still might not be a bad idea to use it.

Offline

#8 2014-04-28 09:42:03

Andy_Crowd
Member
From: 延雪平縣 Sweden
Registered: 2013-12-28
Posts: 119

Re: Ethernet cant connect at boot because of DHCPCD

Do you use a 3G modem or you have only ethernet connection? Uninstall ppp and depends if you have it.

sudo pacman  -Rs ppp

It might be also a problem with your router or a network card or some other hardware related, test with a Live CD with GUI interface.

Last edited by Andy_Crowd (2014-04-28 16:55:26)


Help to make Arora bug free!!
日不落 | Year 2081 | 笑傲江湖 | One more a really good book in my collection the Drystoll.

Offline

#9 2014-06-14 13:08:50

jvc2014
Member
Registered: 2014-02-01
Posts: 7

Re: Ethernet cant connect at boot because of DHCPCD

I have an ethernet connection.

I will try disabling NM before I next reboot


Kernel: 3.14.1-1-ARCH (x86_64), Board : 0P301D Dell Inc. , RAM: 4GB
CPU: 2x Intel(R) Core(TM)2 Duo CPU E7300 @ 2.66GHz
/ : ATA INTEL SSDSA2MH08  ,   /home : ATA WDC WD2500BEVT-2
Video: Advanced Micro Devices, Inc. [AMD/ATI] RV620 LE [Radeon HD 3450]

Offline

Board footer

Powered by FluxBB