Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 335005 - net-misc/dhcpcd 5.2.7 no longer obtains domain name from the router
Summary: net-misc/dhcpcd 5.2.7 no longer obtains domain name from the router
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-28 12:18 UTC by Alex Buell
Modified: 2010-10-22 18:55 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dhcpcd 4.0.15 transaction between my router and PC (dhcpcd-4.0.15,3.66 KB, text/plain)
2010-08-31 21:36 UTC, Alex Buell
Details
dhcpcd 5.2.7 transaction between my router and PC (dhcpcd-5.2.7,3.01 KB, text/plain)
2010-08-31 21:37 UTC, Alex Buell
Details
Raw packet capture with tcpdump on -s 0 -w flags (dhcpcd-4.0.15,956 bytes, application/octet-stream)
2010-09-01 15:42 UTC, Alex Buell
Details
Raw packat capture with tcpdump -s 0 -w flags (dhcpcd-5.2.7,528 bytes, application/octet-stream)
2010-09-01 15:42 UTC, Alex Buell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Buell 2010-08-28 12:18:24 UTC
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
Comment 1 William Hubbs gentoo-dev 2010-08-31 15:50:56 UTC
(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

Comment 2 Alex Buell 2010-08-31 16:36:37 UTC
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. 
Comment 3 William Hubbs gentoo-dev 2010-08-31 17:06:12 UTC
Roy,

do you have any suggestions for this?

Thanks,

William

Comment 4 Roy Marples 2010-08-31 18:25:45 UTC
Post a tcpdump of the DHCP transaction from dhcpcd-4.0.15 and dhcpcd-5.2.7

You can do this with wireshark
Comment 5 Alex Buell 2010-08-31 21:36:35 UTC
Created attachment 245548 [details]
dhcpcd 4.0.15 transaction between my router and PC
Comment 6 Alex Buell 2010-08-31 21:37:10 UTC
Created attachment 245549 [details]
dhcpcd 5.2.7 transaction between my router and PC
Comment 7 Alex Buell 2010-08-31 21:39:44 UTC
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
Comment 8 Roy Marples 2010-08-31 21:54:11 UTC
Hate to be a pain, but could you redo the captures using the -w flag please?

Thanks
Comment 9 Alex Buell 2010-09-01 15:42:09 UTC
Created attachment 245641 [details]
Raw packet capture with tcpdump on -s 0 -w flags
Comment 10 Alex Buell 2010-09-01 15:42:51 UTC
Created attachment 245643 [details]
Raw packat capture with tcpdump -s 0 -w flags
Comment 11 Alex Buell 2010-09-01 15:43:22 UTC
There you go, here's raw packet capture files. Hope this is helpful. 
Comment 12 Roy Marples 2010-09-01 23:22:44 UTC
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
Comment 13 Alex Buell 2010-09-02 12:37:48 UTC
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. 

Comment 14 Roy Marples 2010-09-02 19:59:12 UTC
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?
Comment 15 Alex Buell 2010-09-03 13:03:48 UTC
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)
Comment 16 William Hubbs gentoo-dev 2010-10-22 18:55:20 UTC
I am closing this as invalid because the comments show that this is not an issue with dhcpcd, but possibly with networkmanager.