View previous topic :: View next topic |
Author |
Message |
v_andal Guru
Joined: 26 Aug 2008 Posts: 541 Location: Germany
|
Posted: Fri Apr 08, 2016 10:41 am Post subject: [SOLVED] DHCP does not obtain IP for DNS servers |
|
|
Couple days ago my router (Fritz!Box 7490) got firmware update, since then my Gentoo Linux computer does not create correct /etc/resolv.conf. DHCP daemon writes there only domain name (fritz.box) but does not put any IP addresses for DNS servers. Windows computers and Android devices work fine. How could I debug (and hopefully solve) this issue? Well, for now I've disabled DNS updating and put IPs of Google DNS in /etc/resolv.conf but still I'm really curious, what could go wrong with DHCP?
Last edited by v_andal on Mon Apr 11, 2016 4:07 pm; edited 1 time in total |
|
Back to top |
|
|
Syl20 l33t
Joined: 04 Aug 2005 Posts: 619 Location: France
|
Posted: Fri Apr 08, 2016 10:52 am Post subject: |
|
|
Could you post the contents of your /etc/conf.d/net file (if you use OpenRC) please ? There are several available DHCP clients, and each has its own options. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Fri Apr 08, 2016 12:10 pm Post subject: Re: DHCP does not obtain IP for DNS servers |
|
|
v_andal wrote: | Couple days ago my router (Fritz!Box 7490) got firmware update, since then my Gentoo Linux computer does not create correct /etc/resolv.conf. DHCP daemon writes there only domain name (fritz.box) but does not put any IP addresses for DNS servers. Windows computers and Android devices work fine. How could I debug (and hopefully solve) this issue? Well, for now I've disabled DNS updating and put IPs of Google DNS in /etc/resolv.conf but still I'm really curious, what could go wrong with DHCP? |
Did you check http://fritz.box/?lp=wSet for your Gentoo device? Is there an IP address assigned? |
|
Back to top |
|
|
v_andal Guru
Joined: 26 Aug 2008 Posts: 541 Location: Germany
|
Posted: Sat Apr 09, 2016 9:36 am Post subject: |
|
|
Syl20 wrote: | Could you post the contents of your /etc/conf.d/net file (if you use OpenRC) please ? There are several available DHCP clients, and each has its own options. |
Nothing special in conf.d/net file
Code: |
modules_wlp9s0="wpa_supplicant"
config_wlp9s0="dhcp"
config_enp7s0="dhcp"
|
I'm using net-misc/dhcpcd version 6.10.1
The IP addresses are assigned without any problem, only the DNS servers are not written in /etc/resolv.conf
Are there any debugging flags for dhcpcd? How would I configure them and where would I find the logs? |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
|
Back to top |
|
|
v_andal Guru
Joined: 26 Aug 2008 Posts: 541 Location: Germany
|
Posted: Sun Apr 10, 2016 9:40 am Post subject: |
|
|
I've tried to run dhcpcd manually and captured its output. I've also captured the traffic using Wireshark. It appears, that my dhcpcd does not request DNS servers name from the server. In the "Parameter Request List" section the option "Domain Name Server" is missing.
Now comes the question, why doesn't dhcpcd request it?
Just in case, the output for dhcpcd -db can be found here. The wireshark trace here . To compare, here is the trace for "normal" dhcp |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sun Apr 10, 2016 10:06 am Post subject: |
|
|
v_andal wrote: | Now comes the question, why doesn't dhcpcd request it? |
v_andal ... that is triggered by the '20-resolv.conf' hook, this should be automatically enabled as if you don't want resolv.conf configured you have to pass '-C resolv.conf' (to disable the hook). Assuming you've added nothing to /etc/dhcpcd.conf then this may be a bug in 6.10.1 ... try the stable package 6.10.0.
best ... khay |
|
Back to top |
|
|
v_andal Guru
Joined: 26 Aug 2008 Posts: 541 Location: Germany
|
Posted: Sun Apr 10, 2016 2:24 pm Post subject: |
|
|
Hm, I've downgraded to 6.10.0, it didn't help. It's a mystery, it was working until the update of DSL Router.
Maybe there's something strange in my /etc/dhcpcd.conf? It is below
Code: |
interface lo
static ip_address=127.0.0.1/8
hostname
duid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option ntp_servers
option interface_mtu
require dhcp_server_identifier
slaac private
nohook lookup-hostname
|
|
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sun Apr 10, 2016 2:42 pm Post subject: |
|
|
v_andal wrote: | Maybe there's something strange in my /etc/dhcpcd.conf? It is below
Code: | interface lo
static ip_address=127.0.0.1/8 |
|
v_andal ... that may be the cause as 'interface' effects subsequent options, and so everything defined is for 'lo'. You don't need to have dhcpcd manage 'lo' as net.lo is doing this.
best ... khay |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Mon Apr 11, 2016 10:03 am Post subject: |
|
|
khayyam wrote: | v_andal wrote: | Maybe there's something strange in my /etc/dhcpcd.conf? It is below
Code: | interface lo
static ip_address=127.0.0.1/8 |
|
v_andal ... that may be the cause as 'interface' effects subsequent options, and so everything defined is for 'lo'. |
Good spot, that's exactly the problem.
Quote: | You don't need to have dhcpcd manage 'lo' as net.lo is doing this. |
Also true, but OP might not want to use net.* from the netifrc package.
Still init.d/network that ships with OpenRC can also handle the loopback interface. _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Mon Apr 11, 2016 11:55 am Post subject: |
|
|
UberLord wrote: | khayyam wrote: | You don't need to have dhcpcd manage 'lo' as net.lo is doing this. |
Also true, but OP might not want to use net.* from the netifrc package. Still init.d/network that ships with OpenRC can also handle the loopback interface. |
UberLord ... they posted their /etc/conf.d/net, so I would assume netifrc is in use.
best ... khay |
|
Back to top |
|
|
v_andal Guru
Joined: 26 Aug 2008 Posts: 541 Location: Germany
|
Posted: Mon Apr 11, 2016 4:06 pm Post subject: |
|
|
khayyam wrote: | v_andal wrote: | Maybe there's something strange in my /etc/dhcpcd.conf? It is below
Code: | interface lo
static ip_address=127.0.0.1/8 |
|
v_andal ... that may be the cause as 'interface' effects subsequent options, and so everything defined is for 'lo'. You don't need to have dhcpcd manage 'lo' as net.lo is doing this.
best ... khay |
You are right. Removing those 2 lines fixed the issue. Funny, I have them there since the time when I tried to manage network with dhcpcd only last year. It didn't work out quite well then, so I've reverted to using "standard" way, but the lines stayed. They didn't cause any problems until few days ago |
|
Back to top |
|
|
|