View previous topic :: View next topic |
Author |
Message |
musv Advocate
Joined: 01 Dec 2002 Posts: 3333 Location: de
|
Posted: Wed Apr 01, 2015 8:58 pm Post subject: [solved] Networmanager doesn't update resolv.conf |
|
|
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:
cat /etc/dhcpd.conf: | 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:
cat /etc/resolv.conf: | #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 |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Thu Apr 02, 2015 7:03 am Post subject: Re: DHCPD Server doesn't provide DNS servers |
|
|
Is this about an external NAS connected to Fritz!Box or about http://fritz.box/storage/settings.lua? |
|
Back to top |
|
|
musv Advocate
Joined: 01 Dec 2002 Posts: 3333 Location: de
|
Posted: Fri Apr 03, 2015 11:26 am Post subject: |
|
|
It's a nas connected to my wlan router (fritzbox). The DHCP server on the fritzbox is deactivated.
Found out another strange thing:
Code: | 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
Code: | 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? |
|
Back to top |
|
|
musv Advocate
Joined: 01 Dec 2002 Posts: 3333 Location: de
|
Posted: Thu Apr 16, 2015 4:23 pm Post subject: |
|
|
There's a new piece in the game:
Found in the logfile of my client:
Code: | 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
/usr/bin/resolvconf -l: | # resolv.conf from NetworkManager
# Generated by NetworkManager
search fritz.box
nameserver 192.168.109.11
nameserver 127.0.0.1 |
But:
cat /etc/resolv.conf: |
# 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. |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Fri Apr 17, 2015 4:28 am Post subject: |
|
|
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. |
|
Back to top |
|
|
musv Advocate
Joined: 01 Dec 2002 Posts: 3333 Location: de
|
Posted: Fri Apr 17, 2015 5:22 am Post subject: |
|
|
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:
Code: | /usr/bin/resolvconf -u |
Can I configure NetworkManager how to call/use resolvconf? |
|
Back to top |
|
|
musv Advocate
Joined: 01 Dec 2002 Posts: 3333 Location: de
|
Posted: Tue Apr 21, 2015 8:35 am Post subject: |
|
|
Ok, found a / the solution:
/etc/resolvconf.conf: | 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. |
|
Back to top |
|
|
|