# [Solved] NetworkManager doesn't play with dhclient anymore??

## pste

Help Wanted!

After an upgrade (sorry, I didn't notice the specific packages) NetworkManager does not work anymore... None of my connections get anything from dhclient. Log follows:

```
Aug 02 22:20:01 [NetworkManager] <info> (eth0): carrier now ON (device state 2)_

Aug 02 22:20:01 [NetworkManager] <info> (eth0): device state change: 2 -> 3 (reason 40)_

Aug 02 22:20:11 [NetworkManager] <info> Activation (eth0) starting connection 'Auto eth0'_

Aug 02 22:20:11 [NetworkManager] <info> (eth0): device state change: 3 -> 4 (reason 0)_

Aug 02 22:20:11 [NetworkManager] <info> Activation (eth0) Stage 1 of 5 (Device Prepare) scheduled..._

Aug 02 22:20:11 [NetworkManager] <info> Activation (eth0) Stage 1 of 5 (Device Prepare) started..._

Aug 02 22:20:11 [NetworkManager] <info> Activation (eth0) Stage 2 of 5 (Device Configure) scheduled..._

Aug 02 22:20:11 [NetworkManager] <info> Activation (eth0) Stage 1 of 5 (Device Prepare) complete._

Aug 02 22:20:11 [NetworkManager] <info> Activation (eth0) Stage 2 of 5 (Device Configure) starting..._

Aug 02 22:20:11 [NetworkManager] <info> (eth0): device state change: 4 -> 5 (reason 0)_

Aug 02 22:20:11 [NetworkManager] <info> Activation (eth0) Stage 2 of 5 (Device Configure) successful._

Aug 02 22:20:11 [NetworkManager] <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) scheduled._

Aug 02 22:20:11 [NetworkManager] <info> Activation (eth0) Stage 2 of 5 (Device Configure) complete._

Aug 02 22:20:11 [NetworkManager] <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) started..._

Aug 02 22:20:11 [NetworkManager] <info> (eth0): device state change: 5 -> 7 (reason 0)_

Aug 02 22:20:11 [NetworkManager] <info> Activation (eth0) Beginning DHCPv4 transaction (timeout in 45 seconds)_

Aug 02 22:20:11 [NetworkManager] <info> dhclient started with pid 3973_

Aug 02 22:20:11 [NetworkManager] <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) complete._

Aug 02 22:20:11 [dhclient] Internet Systems Consortium DHCP Client V3.1.2p1-Gentoo

Aug 02 22:20:11 [dhclient] Copyright 2004-2009 Internet Systems Consortium.

Aug 02 22:20:11 [dhclient] All rights reserved.

Aug 02 22:20:11 [dhclient] For info, please visit http://www.isc.org/sw/dhcp/

Aug 02 22:20:11 [dhclient] Usage: dhclient [-1dqrx] [-nw] [-p <port>] [-s server]

Aug 02 22:20:11 [dhclient] [-cf config-file] [-lf lease-file][-pf pid-file] [-e VAR=val]

Aug 02 22:20:11 [dhclient] [-sf script-file] [interface]

Aug 02 22:20:11 [dhclient] If you did not get this software from ftp.isc.org, please

Aug 02 22:20:11 [dhclient] get the latest from ftp.isc.org and install that before

Aug 02 22:20:11 [dhclient] requesting help.

Aug 02 22:20:11 [dhclient] If you did get this software from ftp.isc.org and have not

Aug 02 22:20:11 [dhclient] yet read the README, please read it before requesting help.

Aug 02 22:20:11 [dhclient] If you intend to request help from the dhcp-server@isc.org

Aug 02 22:20:11 [dhclient] mailing list, please read the section on the README about

Aug 02 22:20:11 [dhclient] submitting bug reports and requests for help.

Aug 02 22:20:11 [dhclient] Please do not under any circumstances send requests for

Aug 02 22:20:11 [dhclient] help directly to the authors of this software - please

Aug 02 22:20:11 [dhclient] send them to the appropriate mailing list as described in

Aug 02 22:20:11 [dhclient] the README file.

Aug 02 22:20:11 [dhclient] exiting.

Aug 02 22:20:11 [NetworkManager] <info> (eth0): DHCPv4 client pid 3973 exited with status 1_

Aug 02 22:20:11 [NetworkManager] <info> Activation (eth0) Stage 4 of 5 (IP4 Configure Timeout) scheduled..._

Aug 02 22:20:11 [NetworkManager] <info> Activation (eth0) Stage 4 of 5 (IP4 Configure Timeout) started..._

Aug 02 22:20:11 [NetworkManager] <info> (eth0): device state change: 7 -> 9 (reason 5)_

Aug 02 22:20:11 [NetworkManager] <info> Marking connection 'Auto eth0' invalid._

Aug 02 22:20:11 [NetworkManager] <warn> Activation (eth0) failed._

Aug 02 22:20:11 [NetworkManager] <info> Activation (eth0) Stage 4 of 5 (IP4 Configure Timeout) complete._

Aug 02 22:20:11 [NetworkManager] <info> (eth0): device state change: 9 -> 3 (reason 0)_

Aug 02 22:20:11 [NetworkManager] <info> (eth0): deactivating device (reason: 0)._
```

If I start the the network with an unconfigured (=dhcp) rc-script like:

```
/etc/init.d/net.eth0 start
```

 I get the following:

```
Aug 02 22:21:12 [rc-scripts] Configuration not set for eth0 - assuming DHCP

Aug 02 22:21:13 [dhclient] DHCPREQUEST on eth0 to 255.255.255.255 port 67

Aug 02 22:21:13 [dhclient] DHCPNAK from 10.0.1.254

Aug 02 22:21:14 [dhclient] DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7

Aug 02 22:21:14 [dhclient] DHCPOFFER from 10.0.1.254

Aug 02 22:21:14 [dhclient] DHCPREQUEST on eth0 to 255.255.255.255 port 67

Aug 02 22:21:14 [dhclient] DHCPACK from 10.0.1.254

Aug 02 22:21:14 [dhclient] bound to 10.0.1.5 -- renewal in 2147483648 seconds.
```

To me this seems like Networkmanager fails to communicate properly with dhclient but I cannot find why - anyone any hints?

/psteLast edited by pste on Tue Aug 03, 2010 8:37 am; edited 1 time in total

----------

## robnotts

I gave up and dropped back to 0.8-r1, which does work. As I have 4 machines running NetworkManager I didn't have time to find out why all of them suddenly stopped connecting.

Will get around to upgrading one soon and see what I can find.

----------

## pste

Yes it certainly was the NetworkManager "upgrade" that messed it up! - a simple downgrade of that single package did the trick! Thanks a lot robnotts for helping me out!

/pste

----------

## Dagger

Hi,

From what I can see the problem wasn't solved.

Please file a bug and we will have a look.

Thanks

----------

## toaster666

NetworkManager-0.8.1 needs at least dhcp-4 but the ebuild does not reflect this (see https://bugs.gentoo.org/show_bug.cgi?id=330319).

When calling dhclient it uses the parameter '-4' (for IPV4 I assume) which is not present in dhclient 3.

Since dhcp is masked I recommend to go back to NetworkManager-0.8-r1.

----------

## Dagger

HI,

Thanks. It's in portage tree now.

----------

## pste

Well this is not a solution for dhclient either, but I've managed to get networkmanager-0.8.1-r3 working by switching to dhcpcd.

I'd just like share two snags I ran into, if anyone's interested:

It didn't suffice to switch use flags (from dhclient to dhcpcd)! I had to explicitly remove dhclient with:

```
emerge -C dhcp
```

in order to have netwokmanager stop calling dhclient.

After that I got some odd pptp plugin version mismatch - probably due to my experimentation and switching back and forth between 0.8 and 0.8.1. Just to make sure I ran a:

```
emerge -v1 $(qlist -ICo networkmanager)
```

and rebooted - voila! even VPN works   :Cool: 

Just my two cents of advice!

/pste

PS: Anyone care to elaborate on differences and pros/cons between dhcpcd and dhclient (dhcp), please feel free!

----------

## mixikaabin

thanks it did the trick for me  :Very Happy: 

----------

