# [solved] Networmanager doesn't update resolv.conf

## musv

Edit: Topic was originally: DHCPD Server doesn't provide DNS servers

Good evening, 

I've installed on my NAS a DHCP server (dhcpd). Works quite well. It provides

fixed ip addresses for known devices

a dhcp range for unknown devices

Only the creation of the resolv.conf isn't working properly:

```
authoritative;

option domain-name "fritz.box";

option domain-name-servers 192.168.109.11, 192.168.109.1;

option routers 192.168.109.1;

option subnet-mask 255.255.255.0;

option broadcast-address 192.168.109.255;

subnet 192.168.109.0 netmask 255.255.255.0 {

    range 192.168.109.50 192.168.109.79; 

}

host hexe {

    hardware ethernet B8:AC:6F:3F:B1:C3;

    fixed-address 192.168.109.20;

    option host-name hexe;

}

… (something more)

```

And the result is:

```
#Generated by resolvconf

search fritz.box

nameserver 127.0.0.1
```

How do I get this to work as in the configuration file specified?Last edited by musv on Tue Apr 21, 2015 8:37 am; edited 1 time in total

----------

## charles17

Is this about an external NAS connected to Fritz!Box or about http://fritz.box/storage/settings.lua?

----------

## musv

It's a nas connected to my wlan router (fritzbox). The DHCP server on the fritzbox is deactivated. 

Found out another strange thing:

```
dhcpcd wlan0

DUID 00:01:00:01:1c:ad:49:36:00:26:2d:f5:9e:11

wlan0: IAID 82:96:5e:6d

wlan0: soliciting a DHCP lease

wlan0: offered 192.168.109.21 from 192.168.109.11

wlan0: leased 192.168.109.21 for 7200 seconds

wlan0: adding route to 192.168.109.0/24

wlan0: adding default route via 192.168.109.1

forked to background, child pid 1225

cat /etc/resolv.conf

# Generated by resolvconf

domain fritz.box

nameserver 127.0.0.1
```

But

```
dhclient wlan0

RTNETLINK answers: File exists

cat /etc/resolv.conf

domain fritz.box

search fritz.box

nameserver 192.168.109.11

nameserver 127.0.0.1
```

So dhclient seems to do something different than dhcpcd.

Is that now a client or a server problem?

----------

## musv

There's a new piece in the game:

Found in the logfile of my client:

```
Apr 16 17:05:17 miniding NetworkManager[296]: <info>    address 192.168.109.21

Apr 16 17:05:17 miniding NetworkManager[296]: <info>    plen 24 (255.255.255.0)

Apr 16 17:05:17 miniding NetworkManager[296]: <info>    gateway 192.168.109.1

Apr 16 17:05:17 miniding NetworkManager[296]: <info>    server identifier 192.168.109.11

Apr 16 17:05:17 miniding NetworkManager[296]: <info>    lease time 7200

Apr 16 17:05:17 miniding NetworkManager[296]: <info>    hostname 'miniding'

Apr 16 17:05:17 miniding NetworkManager[296]: <info>    nameserver '192.168.109.11'

Apr 16 17:05:17 miniding NetworkManager[296]: <info>    nameserver '127.0.0.1'

Apr 16 17:05:17 miniding NetworkManager[296]: <info>    domain name 'fritz.box'

Apr 16 17:05:17 miniding NetworkManager[296]: <info>  (wlan0): DHCPv4 state changed unknown -> bound

Apr 16 17:05:17 miniding NetworkManager[296]: <info>  (wlan0): Activation: Stage 5 of 5 (IPv4 Configure Commit) scheduled...

Apr 16 17:05:17 miniding NetworkManager[296]: <info>  (wlan0): Activation: Stage 5 of 5 (IPv4 Commit) started...

…

Apr 16 17:05:17 miniding dhclient[1571]: bound to 192.168.109.21 -- renewal in 2752 seconds.

Apr 16 17:05:17 miniding NetworkManager[296]: <info>  (wlan0): device state change: ip-config -> ip-check (reason 'none') [70 80 0]

Apr 16 17:05:17 miniding NetworkManager[296]: <info>  (wlan0): Activation: Stage 5 of 5 (IPv4 Commit) complete.

Apr 16 17:05:17 miniding NetworkManager[296]: <info>  (wlan0): device state change: ip-check -> secondaries (reason 'none') [80 90 0]

Apr 16 17:05:18 miniding NetworkManager[296]: <info>  (wlan0): device state change: secondaries -> activated (reason 'none') [90 100 0]

Apr 16 17:05:18 miniding NetworkManager[296]: <info>  NetworkManager state is now CONNECTED_LOCAL

Apr 16 17:05:18 miniding NetworkManager[296]: <info>  NetworkManager state is now CONNECTED_GLOBAL

Apr 16 17:05:18 miniding NetworkManager[296]: <info>  Policy set 'Blechnet-Wlan' (wlan0) as default for IPv4 routing and DNS.

Apr 16 17:05:18 miniding NetworkManager[296]: <info>  Writing DNS information to /usr/bin/resolvconf

Apr 16 17:05:18 miniding NetworkManager[296]: <info>  (wlan0): Activation: successful, device activated.

```

Ok, regarding to the log-file the Network Manager receives the correct nameservers and writes the information to /usr/bin/resolvconf

```
# resolv.conf from NetworkManager

# Generated by NetworkManager

search fritz.box

nameserver 192.168.109.11

nameserver 127.0.0.1
```

But:

```

# Generated by resolvconf

search fritz.box

nameserver 127.0.0.1
```

Means /usr/bin/resolvconf shows the correct entry, but /etc/resolv.conf is still wrong.

----------

## steveL

I wouldn't bother with NetworkManager; just use dhcpcd. 

It'll manage wpa-supplicant if you need WIFI, and there's a Qt/GTK systray applet for it too.

----------

## musv

 *steveL wrote:*   

> I wouldn't bother with NetworkManager.

 

It's a notebook, which has to be used in different environments. And also my wife has to use it. Therefore I need some kind of GUI. 

 *steveL wrote:*   

> It'll manage wpa-supplicant if you need WIFI, and there's a Qt/GTK systray applet for it too.

 

I'm using e16 without any systray box. 

The problem remains: /usr/bin/resolvconf doesn't update /etc/resolv.conf. 

If I force the update, then it works:

```
/usr/bin/resolvconf -u
```

Can I configure NetworkManager how to call/use resolvconf?

----------

## musv

Ok, found a / the solution:

```
resolv_conf=/etc/resolv.conf

resolvconf=NO

resolv_conf_passthrough=YES
```

Didn't need this before. But with that settings resolvconf writes the received data from networkmanager.

----------

