[Dnsmasq-discuss] Setting dns domain name through dhcpv6

Tom Hendrikx tom at whyscream.net
Sat Mar 8 12:07:47 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 08-03-14 10:26, Roy Marples wrote:
> On 08/03/2014 8:36, Simon Kelley wrote:
>> On 07/03/14 21:42, Tom Hendrikx wrote:
>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
>>> 
>>> Hi,
>>> 
>>> I'm using dnsmasq 2.66 to provide my local network with ipv4
>>> dhcp, and ipv6 information requests (ip addressing is handled
>>> by my router).
>>> 
>>> I'm able to to provide clients with a dns-server and such
>>> through dhcpv6, but I'm failing to find the dhcp option that
>>> sets 'domain lan.example.org' in /etc/resolv.conf, i.e. the v6
>>> equivalent of dhcp-option=option:domain-name,lan.example.org
>>> 
>>> Can anyone enlighten me? I've searching through 
>>> https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml
>>>
>>>
>>> 
but I'm failing to find something useful...
>> 
>> What you want is option 39, OPTION_CLIENT_FQDN
> 
> domain in resolv.conf(5) isn't normally used. I wouldn't expect any
> DHCP clients to put it there based on the FQDN. dhcpcd(8) does :)

I double checked behaviour here (dhclient, as part of networkmanager on
ubuntu), and it didn't use it. I was under the impression that the
domain option in resolv.conf was set after processing the dhcpv4
information, and then discarded after the dhcpv6 information coming in
a few seconds later, that didn't specify it. But it isn't set at all.

> 
> What you probably want is option 24, OPTION_DOMAIN_LIST which I
> would expect every DHCP client to fill out the search entry instead
> of the domain entry. If you read resolv.conf(5) you'll find that
> both pretty much do the same thing, but search allows >1 entry.
> 

I was already using the search option, but it was giving me some
headaches, mainly because what I actually was trying to get to work
was that 'hostname --fqdn' on the client would actually return the
correct fqdn from the dhcp network.

Looking back, my question should have been: why doesn't my dhcp
client's OS use the dhcp-provided domain name for 'hostname --fqdn'
and friends? I fixed that by fumbling around with /etc/nsswitch.conf,
preferring dns over files for hosts database. Ugly reading material:
https://bugs.launchpad.net/ubuntu/+source/netcfg/+bug/8980

Thanks anyway!

Kind regards,
	Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTGwgQAAoJEJPfMZ19VO/1JpQQAMn2h/yKo3fPJwt0g0KzI58+
8UzkgGqtspnV1qKxv1MXLRX07psaU06YsRcEG9NRPZyqzm+4TeNTW5bOclIWiqVa
tQJQwUK0oqZY5e4ANobccQPgX+os0mlesUIw7+bZUe17q3Q+pAqmlyn7JiAiT7Pn
4/iSxBh/8TA1k81SLR24jMVnL14rZLHuxio2O4UGMEL7fGtPul23N/03a+nZUhru
TxwxzlaEVjrveXlz0TEorwxm9hK+4bxBcT8JtDrS7wAnMl9RwMxyAgh6UAkEsgRR
7MCSPdhpRoS7itDH0M+jaI0oFel7xoezKrYxm9JdfRwyHOKmJUP6jsKXLxCw9rD1
kPbub3YfISL+YF+/hGRCPNcq6Tt22RwhA2Vj1t30mPy9B89ofak67HH8XFyI7TbZ
F5VgU7EIa5TJgtR0Mr2WifTYtTcKtPzGHo7E+UIA8cbgHKxpebJY70N0tb1sHVEQ
IITuhzWS56d0m4+2gOokZIUDIRtFJdv9PQVsXHNUFj30m2PwMWcSfrvyYJ/T4Exp
LR8bAaWNu0tB1MP4YNaxAEl9wqPTKuoGmmLVoAj40AkAHKHNt1iRECqENjzFOt9g
Cow5CMt60isqR6BJaSLBxvY4lI6fz1o6SojwdI5arUdejHwsqByxDzco0/Ww8Ti7
fDTQolK8AS3QGCTGv3i8
=J0Ey
-----END PGP SIGNATURE-----



More information about the Dnsmasq-discuss mailing list