Unlike with 4.0.15, dhcpcd does not get domain name from dhcp server. I notice it has now been masked in portage though. How can I get 5.0.x to exhibit same behaviour as 4.0.15 when obtaining domain name from dhcp server? Reproducible: Always
(In reply to comment #0) > Unlike with 4.0.15, dhcpcd does not get domain name from dhcp server. I notice > it has now been masked in portage though. I checked the latest profiles/package.mask, and dhcpcd is not listed there, so it should not be masked. > How can I get 5.0.x to exhibit same behaviour as 4.0.15 when obtaining domain > name from dhcp server? The default dhcpcd.conf includes the domain_name option which allows this to happen. If you have removed the line in dhcpcd.conf which reads: option domain_name_servers, domain_name, domain_search, host_name you need to add one that says: option domain_name then restart dhcpcd. Once that is done, report back to this bug and feel free to re-open it if the issue still exists. Thanks, William
There was a time when 5.2.7 was stable and that is when I started having problems getting the domain from my dhcp server. Once it was reverted back to 4.0.15, things went back to normal. I definitely have not removed domain_name from my /etc/dhcpcd.conf file. There was also, if I remember correctly, a problem in some kernels with dhcpcd 5.2.7 that might have been the cause but can't check now.
Roy, do you have any suggestions for this? Thanks, William
Post a tcpdump of the DHCP transaction from dhcpcd-4.0.15 and dhcpcd-5.2.7 You can do this with wireshark
Created attachment 245548 [details] dhcpcd 4.0.15 transaction between my router and PC
Created attachment 245549 [details] dhcpcd 5.2.7 transaction between my router and PC
Duly submitted, two separate tcpdump sessions with dhcpcd 4.0.15 and 5.2.7, if this isn't what you needed, let me know. I am using tcpdump with the following parameters: -s 0 -X -i eth0 host router 5.2.7 always fails, whilst 4.0.15 works perfectly. I used the same dhcpcd.conf file with both, as follows: hostname option domain_name_servers, domain_name, domain_search, host_name
Hate to be a pain, but could you redo the captures using the -w flag please? Thanks
Created attachment 245641 [details] Raw packet capture with tcpdump on -s 0 -w flags
Created attachment 245643 [details] Raw packat capture with tcpdump -s 0 -w flags
There you go, here's raw packet capture files. Hope this is helpful.
It got the domain name just fine. Can you run this command please (dhcpcd-5.2.7) dhcpcd -T eth0 Replace eth0 with the real interface
I was very surprised to boot up this morning with dhcpcd 4.0.15 and not get a domain name from my router. I ran dhcpcd -t eth0 and it showed the domain name. So, I don't think dhcpcd is the problem! On further investigation, it was quickly realised that NetworkManager is actually initiating the dhcpcd process and not setting the domain name. Perhaps this needs investigating further.
If you ensure that NetworkManager is stopped, and you run dhcpcd manually without the -T option, does it correctly put a domain in /etc/resolv.conf?
Yes dhcpcd 5.2.7 does correctly set the domain name in /etc/resolv.conf. Thanks, perhaps we can close this one out; somehow the domain name returned isn't being set as the domain name, and the most likely culprit is Network Manager. $ cat /etc/resolv.conf # Generated by NetworkManager domain local.net search local.net nameserver 192.168.1.2 $ domainname (none)
I am closing this as invalid because the comments show that this is not an issue with dhcpcd, but possibly with networkmanager.