dhcpcd-discuss

hostname Option

David Hauck

Thu May 01 23:04:38 2014

Hi Roy,

I just received a report about something I thought I'd verified a couple months ago. However, I've now verified via Wireshark that my current v6.1.0 dhcpcd client isn't sending option 12 (hostname) in its initial DISCOVER packet, while the same configuration in v6.0.5 does. 

Here's the configuration file:

# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Inform the DHCPv4 server of our hostname for DDNS.
# This has been superceded by the FQDN option below, but is included
# by default for servers which do not understand it.
hostname

# Inform the DHCP server of our hostname for DDNS
# and/or query for what it should be.
fqdn

# Use the hardware address of the interface for the Client ID.
#clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
duid

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU.
# Some interface drivers reset when changing the MTU so disabled by default.
#option interface_mtu

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname

# Use this to define the lease time (in seconds).
#leasetime 60

# Use an infinite timeout so we never fallback to a static IP.
timeout 0

# Don't attempt to obtain an IPv4LL address if we failed to get one via DHCP.
noipv4ll

# Only configure IPv4.
ipv4only

# Be sure to handshake our vendor code (for interoperability with NNIT).
vendor 01,"0"

There seems to be some interaction between hostname and fqdn options in 6.1.0: when I comment out 'fqdn' above I see option 12 (hostname) show up in the DISCOVER. So there seems to be some weird interaction between hostname and fqdn in 6.1.0 (this same interaction does not seem to be present in 6.0.5 - i.e., the above configuration works fine wrt option 12).

Any explanation for why this might be?

Thanks,
-David

Follow-Ups:
Re: hostname OptionRoy Marples
Archive administrator: postmaster@marples.name