LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-24-2018, 06:00 AM   #1
wilhe_jo
LQ Newbie
 
Registered: Dec 2015
Posts: 6

Rep: Reputation: Disabled
dhcpd has problems getting IP... dhclient works


Hi there!

I was tracking down crazy problems with getting an IP on my RPi3.

After seriously trying to find an HW error (custom HAT, JTAG debugger,... attached) I ended up searching for problems in the software.

It seems NetworkManager has problems with dhcpd (default in slackware) to get an IP.

This was already documented in:
https://www.linuxquestions.org/quest...er-4175576144/

5 reboots gave at least 1 problem in getting an IP.
Changing to dhclient resulted in a stable system.

Btw the router runs 14.2 and manages the nets with dnsmasq.

Anyone knows of any drawbacks of using dhclient???

73
 
Old 06-24-2018, 08:34 AM   #2
laprjns
Member
 
Registered: Oct 2005
Location: Connecticut USA
Distribution: SalixOS
Posts: 179

Rep: Reputation: 88
I've been using dhclient for two years now. Had problems with Networkmanger right out of the box when 14.2 was released, Changing to dhclient solve the problem.
 
Old 06-24-2018, 09:49 AM   #3
wilhe_jo
LQ Newbie
 
Registered: Dec 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
well, then why does slackware prefer dhcpd???

73
 
Old 06-24-2018, 10:53 AM   #4
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,966

Rep: Reputation: 1715Reputation: 1715Reputation: 1715Reputation: 1715Reputation: 1715Reputation: 1715Reputation: 1715Reputation: 1715Reputation: 1715Reputation: 1715Reputation: 1715
Quote:
well, then why does slackware prefer dhcpd???
A bit old now, but perhaps this will help.
 
Old 06-24-2018, 11:21 AM   #5
wilhe_jo
LQ Newbie
 
Registered: Dec 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hmm...

So there are already a bunch of people having troubles...

maybe we should reconsider the default NetworkManager configuration ????

73
 
Old 06-24-2018, 01:18 PM   #6
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 & 7
Posts: 2,968

Rep: Reputation: 794Reputation: 794Reputation: 794Reputation: 794Reputation: 794Reputation: 794Reputation: 794
dhcpd is a DHCP server, not a client.
 
Old 06-24-2018, 01:51 PM   #7
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 472

Rep: Reputation: 107Reputation: 107
One could try to uncomment clientid and comment out duid in /etc/dhcpcd.conf:

Code:
# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
#duid
This I need to do to get an eth0-connection at work

HTH

rob
 
Old 06-24-2018, 03:31 PM   #8
TommyC7
Member
 
Registered: Mar 2012
Distribution: Slackware, CentOS, OpenBSD, FreeBSD
Posts: 480

Rep: Reputation: Disabled
Are you sure you used dhcpcd and not dhcpd?

dhcpcd is a dhcp client (like dhclient) whereas dhcpd is a dhcp server daemon as mentioned by smallpond.

Last edited by TommyC7; 06-24-2018 at 03:33 PM.
 
Old 06-24-2018, 08:37 PM   #9
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 2,973

Rep: Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346
Quote:
Originally Posted by wilhe_jo View Post
Hmm...

So there are already a bunch of people having troubles...

maybe we should reconsider the default NetworkManager configuration ????

73
There's also a bunch of other people who haven't had troubles.

When you do have trouble, it isn't that difficult to find the client which works is it?
 
Old 06-25-2018, 01:38 AM   #10
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 679

Rep: Reputation: 523Reputation: 523Reputation: 523Reputation: 523Reputation: 523Reputation: 523
Quote:
Originally Posted by Richard Cranium View Post
There's also a bunch of other people who haven't had troubles.

When you do have trouble, it isn't that difficult to find the client which works is it?
I found that it is. NetworkManager does not support dhcpcd very well. The settings to control the behaviour (timeouts, in this case) required within dhcpcd cannot be set within NetworkManager, because the NM helper tool doesn't support them.
I also tried getting dhclient to work without luck. In the end I disabled NM and reverted to dhcpcd being called directly from the rc scripts, where I have control over the command line operators.
 
Old 06-25-2018, 04:02 AM   #11
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 2,973

Rep: Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346
Quote:
Originally Posted by drmozes View Post
I found that it is. NetworkManager does not support dhcpcd very well. The settings to control the behaviour (timeouts, in this case) required within dhcpcd cannot be set within NetworkManager, because the NM helper tool doesn't support them.
I also tried getting dhclient to work without luck. In the end I disabled NM and reverted to dhcpcd being called directly from the rc scripts, where I have control over the command line operators.
For that matter, the way NetworkManager launches dhcpcd, you don't get the benefit of the hooks in /lib/dhcpcd/dhcpcd-run-hooks. As far as I can tell, /usr/libexec/nm-dhcp-helper only works to inform NetworkManager about dhcpcd's actions and nothing else.

You can hook into /etc/NetworkManager/dispatcher.d to view and maybe manipulate NetworkManager's environment. (I've only done the former and not the latter.)
 
Old 06-25-2018, 04:23 PM   #12
wilhe_jo
LQ Newbie
 
Registered: Dec 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Richard Cranium View Post
There's also a bunch of other people who haven't had troubles.

When you do have trouble, it isn't that difficult to find the client which works is it?
Well so far, this is the first time I get this problem... and to be honest, tracking down the problem was quite painful since you get next to none information via the usual log files...

I would have never ever thought about dhcpcd (sorry for this typo...) being a problem... or at least being troublesome/unstable when used with NM in certain combinations...

However, more interesting is IMHO the fact that none of my other 14.2 boxes showed problems so far...
I need to get a paper done till september... after that I'll go and put -current on one of my x86 boxes to check for similar behaviour.

reverting back to plain rc-scripts for the headless rpi boxes... well might be an option

73
 
Old 06-25-2018, 05:00 PM   #13
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 2,973

Rep: Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346
Most of my home network uses the rc.inet1 script to manage their connections. My laptops use NetworkManager for their wireless connections; I haven't seen problems talking to my gateway with them, but I'm running bind and dhcpd versus dnsmasq.

There's also wicd in /extras, IIRC. Quite a few people have used it and many still do.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dhcpd - allocating diffrent IPs to PXE clients and dhclient zrubi Linux - Server 1 08-21-2009 07:26 PM
MadWiFi, getting Netgear WG311T to connect with dhclient/dhcpd (DHCP) Cb6000 Linux - Wireless Networking 30 02-16-2006 03:29 PM
dhcpd subnet declaration problems in dhcpd.conf vcrispo Linux - Networking 6 07-15-2005 10:32 AM
what if no dhclient pump or dhcpd? stabu Linux - Newbie 2 05-30-2005 04:23 PM
dhcpd and dhclient virendratp Linux - Networking 17 08-02-2004 07:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration