NetBSD Problem Report #46423
From www@NetBSD.org Mon May 7 14:01:40 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 6BBEE63BD33
for <gnats-bugs@gnats.NetBSD.org>; Mon, 7 May 2012 14:01:40 +0000 (UTC)
Message-Id: <20120507140139.6F85263B91F@www.NetBSD.org>
Date: Mon, 7 May 2012 14:01:39 +0000 (UTC)
From: tps@vr-web.de
Reply-To: tps@vr-web.de
To: gnats-bugs@NetBSD.org
Subject: dhcpcd does not send hostname to server, even if requested to do.
X-Send-Pr-Version: www-1.0
>Number: 46423
>Category: bin
>Synopsis: dhcpcd does not send hostname to server, even if requested to do.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 07 14:05:00 +0000 2012
>Last-Modified: Tue May 08 14:45:01 +0000 2012
>Originator: Thomas Schweikle
>Release: NetBSD 5.1.2 (GENERIC) #0: Thu Feb 2 12:12:28 UTC 2012
>Organization:
>Environment:
NetBSD arve.fritz.box 5.1.2 NetBSD 5.1.2 (GENERIC) #0: Thu Feb 2 12:12:28 UTC 2012 builds@b7.netbsd.org:/home/builds/ab/netbsd-5-1-2-RELEASE/amd64/201202021012Z-obj/home/builds/ab/netbsd-5-1-2-RELEASE/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
Configured /etc/dhcpcd.conf:
# $NetBSD: dhcpcd.conf,v 1.1.1.1.8.3 2009/11/23 03:13:28 snj Exp $
#
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.
# Inform the DHCP server of our hostname for DDNS.
hostname arve
# To share the DHCP lease across OSX and Windows a ClientID is needed.
# Enabling this may get a different lease than the kernel DHCP client.
# Some upstream DHCP servers may also require a ClientID, such as FRITZ!Box.
#clientid
# A list of options to request from the DHCP server.
#option domain_name_servers, domain_name, domain_search, host_name
option domain_name_servers, domain_name, domain_search
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU.
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
Hostname is not send to dhcp-server, nether with "hostname arve" or with only "hostname" set.
>How-To-Repeat:
Install NetBSD from cd as found on the mirrors. Give your installed machine a name dhcpd accepts and handles to dns. dns will only have the lease, but never the hostname, because in none one the dhcp-requests the hostname the client would like to have associated is sent to the server.
>Fix:
Kick out dhcpcd??
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: port-amd64-maintainer->bin-bug-people
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Mon, 07 May 2012 19:10:49 +0000
Responsible-Changed-Why:
not amd64 specific
From: Roy Marples <roy@marples.name>
To: <gnats-bugs@netbsd.org>
Cc:
Subject: Re: bin/46423: dhcpcd does not send hostname to server, even if
requested to do.
Date: Mon, 07 May 2012 21:19:45 +0100
dhcpcd-5.1.3 on my amd64 NetBSD-5.1 server works fine
Here's a tcpdump demonstrating this.
With "hostname fooey" in /etc/dhcpcd.conf
uberserver$ sudo tcpdump -i rtk0 -vvv -s 0 port bootps
[0,62/62]
tcpdump: listening on rtk0, link-type EN10MB (Ethernet), capture size
65535 byte
s
21:01:04.934412 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto
UDP (17)
, length 328) 0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok]
BOOTP/DHCP,
Request from 00:e0:4c:e5:0a:fd (oui Unknown), length 300, xid
0x6ef352b0, Flags
[none] (0x0000)
Client-Ethernet-Address 00:e0:4c:e5:0a:fd (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Requested-IP Option 50, length 4: 10.73.0.199
MSZ Option 57, length 2: 1500
Vendor-Class Option 60, length 12: "dhcpcd 5.1.3"
Hostname Option 12, length 5: "fooey"
Parameter-Request Option 55, length 12:
Subnet-Mask, Static-Route, Default-Gateway,
Domain-Name-Server
Hostname, Domain-Name, BR, NTP
Lease-Time, RN, RB, Option 119
END Option 255, length 0
PAD Option 0, length 0, occurs 11
With just "hostname" in /etc/dhcpcd.conf
uberserver$ sudo tcpdump -i rtk0 -vvv -s 0 port bootps
tcpdump: listening on rtk0, link-type EN10MB (Ethernet), capture size
65535 bytes
21:05:07.654348 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto
UDP (17), length 328) 0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum
ok] BOOTP/DHCP, Request from 00:e0:4c:e5:0a:fd (oui Unknown), length
300, xid 0xb990a884, Fla
gs [none] (0x0000)
Client-Ethernet-Address 00:e0:4c:e5:0a:fd (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Requested-IP Option 50, length 4: 10.73.0.199
MSZ Option 57, length 2: 1500
Vendor-Class Option 60, length 12: "dhcpcd 5.1.3"
Hostname Option 12, length 10: "uberserver"
Parameter-Request Option 55, length 12:
Subnet-Mask, Static-Route, Default-Gateway,
Domain-Name-Server
Hostname, Domain-Name, BR, NTP
Lease-Time, RN, RB, Option 119
END Option 255, length 0
PAD Option 0, length 0, occurs 6
So the question now becomes why do you think dhcpcd is at fault? Maybe
your DHCP server is discarding the information.
Can you post a tcpdump from your machine showing your DHCP message?
Thanks
Roy
From: Thomas Schweikle <tschweikle@googlemail.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/46423: dhcpcd does not send hostname to server, even if requested
to do.
Date: Tue, 08 May 2012 16:41:03 +0200
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig362411AD5C47DB1EB2925246
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Am 07.05.2012 22:20, schrieb Roy Marples:
> The following reply was made to PR bin/46423; it has been noted by GNAT=
S.
>=20
> From: Roy Marples <roy@marples.name>
> To: <gnats-bugs@netbsd.org>
> Cc:=20
> Subject: Re: bin/46423: dhcpcd does not send hostname to server, even i=
f
> requested to do.
> Date: Mon, 07 May 2012 21:19:45 +0100
>=20
> dhcpcd-5.1.3 on my amd64 NetBSD-5.1 server works fine
> Here's a tcpdump demonstrating this.
> =20
> With "hostname fooey" in /etc/dhcpcd.conf
> =20
> uberserver$ sudo tcpdump -i rtk0 -vvv -s 0 port bootps =
=20
does not ;-)
---
$ cat /var/lib/misc/dnsmasq.leases
1336485899 00:0c:29:d1:98:bc 172.19.8.141 * *
---
---
15:34:59.562519 IP (tos 0x10, ttl 32, id 0, offset 0, flags [none],
proto UDP (17), length 328)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP,
Request from 00:0c:29:d1:98:bc, length 300, xid 0xa616ae26, Flags
[none] (0x0000)
Client-Ethernet-Address 00:0c:29:d1:98:bc
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Requested-IP Option 50, length 4: 172.19.8.141
Parameter-Request Option 55, length 7:
Subnet-Mask, BR, Time-Zone, Default-Gateway
Domain-Name, Domain-Name-Server, Hostname
---
Asking for Hostname, even if configured not to.
Not handling a hostname to the server, even if configured to.
---
END Option 255, length 0
PAD Option 0, length 0, occurs 41
15:34:59.598406 IP (tos 0x0, ttl 64, id 61945, offset 0, flags
[none], proto UDP (17), length 331)
172.19.8.1.67 > 172.19.8.141.68: [udp sum ok] BOOTP/DHCP, Reply,
length 303, xid 0xa616ae26, Flags [none] (0x0000)
Your-IP 172.19.8.141
Server-IP 172.19.8.1
Client-Ethernet-Address 00:0c:29:d1:98:bc
file "boot/grub/i386-pc/core.0"
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Offer
Server-ID Option 54, length 4: 172.19.8.1
Lease-Time Option 51, length 4: 1800
RN Option 58, length 4: 900
RB Option 59, length 4: 1575
Subnet-Mask Option 1, length 4: 255.255.255.0
Domain-Name Option 15, length 9: "fritz.box"
Domain-Name-Server Option 6, length 4: 172.19.8.1
Default-Gateway Option 3, length 4: 172.19.8.2
BR Option 28, length 4: 172.19.8.255
END Option 255, length 0
---
/etc/dhcpcd.conf:
---
# $NetBSD: dhcpcd.conf,v 1.1.1.1.8.3 2009/11/23 03:13:28 snj Exp $
#
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.
# Inform the DHCP server of our hostname for DDNS.
hostname arve
# To share the DHCP lease across OSX and Windows a ClientID is needed.
# Enabling this may get a different lease than the kernel DHCP client.
# Some upstream DHCP servers may also require a ClientID, such as
FRITZ!Box.
#clientid
# A list of options to request from the DHCP server.
#option domain_name_servers, domain_name, domain_search, host_name
option domain_name_servers, domain_name, domain_search
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU.
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
---
Even if the manual states dhcpcd shall be used, dhclient is started.
After creating the neccessary configuration file, dhclient now sends
the hostname. Looks like docs are wrong here: dhclient is default,
not dhcpcd. Changing to dhcpcd in rc.conf makes the whole thing work
too.
--=20
Thomas
--------------enig362411AD5C47DB1EB2925246
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: GnuPT 2.9.2
iEYEARECAAYFAk+pMIUACgkQJuPdOes4UCQBzwCgnwcZGVrmcbvCEwHF5zntJugR
VtwAn3981xxfbH+iu9szKXgQDooPjhDi
=IU52
-----END PGP SIGNATURE-----
--------------enig362411AD5C47DB1EB2925246--
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.