[Dnsmasq-discuss] Setting dns domain name through dhcpv6
tom at whyscream.net
Sat Mar 8 12:07:47 UTC 2014
-----BEGIN PGP SIGNED MESSAGE-----
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
>>> 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
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:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
-----END PGP SIGNATURE-----
More information about the Dnsmasq-discuss