[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#239121: netcfg: Use default hostname from DHCP if one is received



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 05 April 2004 22:47, C. Gatzemeier wrote:
> But in fact, the newest dhcp3-client package (and udeb) (3.0.1rc13-1) seems
> to have a "more or less rewriten dhclient-script" and should now default to
> anounce any non-empty hostname to the dhcp server and set the hostname to
> the one received by dhcp if the localy resolved one is empty or "none"
> #165086 #151820

My experience is that it does _not_ do this by default but only if a line
with 'send host-name "<hostname>";' is included in dhclient.conf.

Please see: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=236533

This bugreport is valid for both dhcp-client _and_ dhcp3-client.
In the case of dhcp3-client I could only ping the new system using the FQDN 
_after_ adding the above line to /etc/dhcp3/dhclient.conf.
This means that the hostname is not added dynamically in my DNS-server.

In both cases the hostname can (should?) be unqualified.

I have just tested with dhcp3-client by:
- - making a clean install (i386 100MB netinst CD Apr 05)
  hostname: sauron
- - apt-get install dhcp3-client (removes old dhcp-client)
- - verified that this was 3.0.1rc13-1
- - /etc/init.d/networking restart
- - ping sauron.fjphome.nl => 'unknown host'
- - add 'send host-name "sauron";' to /etc/dhcp3/dhclient.conf
- - /etc/init.d/networking restart
- - ping sauron.fjphome.nl => ping OK (address returned from DNS-server)

I have attached an extract from syslog from my DHCP/DNS-server (with 
comments). If you need any more info, please contact me.

Hope this helps,

FJP
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFAcfCUgm/Kwh6ICoQRAhUEAJ4oSxmcn6f2CTxAf/uZwFpo+Al1swCbB3JJ
56h690L8bQhtpBeUyaIgGDc=
=Wrfl
-----END PGP SIGNATURE-----
Start of 1st stage installation: dhcp-client
Apr  6 00:42:11 elrond dhcpd: DHCPDISCOVER from 00:50:ba:20:51:b0 via eth0
Apr  6 00:42:12 elrond dhcpd: DHCPOFFER on 10.19.66.40 to 00:50:ba:20:51:b0 via eth0
Apr  6 00:42:14 elrond dhcpd: Wrote 1 leases to leases file.
Apr  6 00:42:14 elrond dhcpd: DHCPREQUEST for 10.19.66.40 (10.19.66.2) from 00:50:ba:20:51:b0 via eth0
Apr  6 00:42:14 elrond dhcpd: DHCPACK on 10.19.66.40 to 00:50:ba:20:51:b0 via eth0

Automatic update after 5 minutes
Apr  6 00:47:14 elrond dhcpd: DHCPREQUEST for 10.19.66.40 from 00:50:ba:20:51:b0 via eth0
Apr  6 00:47:14 elrond dhcpd: DHCPACK on 10.19.66.40 to 00:50:ba:20:51:b0 via eth0

Reboot for 2nd stage installation: dhcp-client
Apr  6 00:51:02 elrond dhcpd: DHCPDISCOVER from 00:50:ba:20:51:b0 via eth0
Apr  6 00:51:03 elrond dhcpd: DHCPOFFER on 10.19.66.40 to 00:50:ba:20:51:b0 via eth0
Apr  6 00:51:05 elrond dhcpd: DHCPREQUEST for 10.19.66.40 (10.19.66.2) from 00:50:ba:20:51:b0 via eth0
Apr  6 00:51:05 elrond dhcpd: DHCPACK on 10.19.66.40 to 00:50:ba:20:51:b0 via eth0

Installation of dhcp3-client; no changes in config files; restart networking
Apr  6 01:06:09 elrond dhcpd: DHCPREQUEST for 10.19.66.40 from 00:50:ba:20:51:b0 via eth0
Apr  6 01:06:09 elrond dhcpd: DHCPACK on 10.19.66.40 to 00:50:ba:20:51:b0 via eth0

Edited /etc/dhclient.conf - which is the wrong file for dhcp3-client :-(
Apr  6 01:08:51 elrond dhcpd: DHCPREQUEST for 10.19.66.40 from 00:50:ba:20:51:b0 via eth0
Apr  6 01:08:51 elrond dhcpd: DHCPACK on 10.19.66.40 to 00:50:ba:20:51:b0 via eth0

Edited /etc/dhcp3/dhclient.conf
The sequence of events may look a bit strange (dhcpd is 'slow' in logging),
but basically this is:
- DHCPD sending the new address to DNS for dynamic update
- DNS accepting the new address, notifying my 2nd DNS-server and transfering the update
Apr  6 01:10:46 elrond named[14090]: client 127.0.0.1#1167: updating zone 'fjphome.nl/IN': adding an RR
Apr  6 01:10:46 elrond named[14090]: client 127.0.0.1#1167: updating zone 'fjphome.nl/IN': adding an RR
Apr  6 01:10:46 elrond named[14090]: zone fjphome.nl/IN: sending notifies (serial 2003101936)
Apr  6 01:10:46 elrond dhcpd: Added new forward map from sauron.fjphome.nl to 10.19.66.40
Apr  6 01:10:46 elrond named[14090]: client 127.0.0.1#1167: updating zone '66.19.10.in-addr.arpa/IN': deleting an rrset
Apr  6 01:10:46 elrond named[14090]: client 127.0.0.1#1167: updating zone '66.19.10.in-addr.arpa/IN': adding an RR
Apr  6 01:10:46 elrond named[14090]: zone 66.19.10.in-addr.arpa/IN: sending notifies (serial 2003111490)
Apr  6 01:10:46 elrond dhcpd: added reverse map from 40.66.19.10.in-addr.arpa. to sauron.fjphome.nl
Apr  6 01:10:46 elrond dhcpd: DHCPREQUEST for 10.19.66.40 from 00:50:ba:20:51:b0 via eth0
Apr  6 01:10:46 elrond dhcpd: DHCPACK on 10.19.66.40 to 00:50:ba:20:51:b0 (sauron) via eth0
Apr  6 01:10:46 elrond named[14090]: client 10.19.66.1#1436: transfer of 'fjphome.nl/IN': IXFR started
Apr  6 01:10:47 elrond named[14090]: client 10.19.66.1#1437: transfer of '66.19.10.in-addr.arpa/IN': IXFR started

Reply to: