Subject: dhclient stops at boot
To: None <tech-net@netbsd.org>
From: Ian Zagorskih <ianzag@megasignal.com>
List: tech-userlevel
Date: 06/09/2004 22:33:43
$ uname -a
NetBSD IANZAG 2.0_BETA NetBSD 2.0_BETA (IANZAG) #0: Thu Jun  3 20:54:46 NOV=
ST=20
2004  ianzag@IANZAG:/usr/src/sys/arch/i386/compile/IANZAG i386

In short: dhclient stops forever when system boots.

I found this weird behaviour several weeks ago under NetBSD-release-2-0 and=
 i=20
can reproduce it now with 100%.

On my workstation dhclient is started by rc.d like:

=2D--/etc/rc.conf---
rc_configured=3DYES
hostname=3DIANZAG
wscons=3DYES
dhclient=3DYES
#dhclient_flags=3D"-q"
rpcbind=3DYES
cron=3DYES
inetd=3DYES
sshd=3DYES
slpd=3DYES
cupsd=3DYES
nmbd=3DYES
smbd=3DYES
samba=3DYES
=2D--/etc/rc.conf---

I always used "dhclient=3DYES" since NetBSD 1.6 and all worked fine. Now wh=
en=20
dhclient is started by rc.d it prints smth like listed below and just stops=
=2E=20
I can sniff LAN from neigbour machine with tcpdump and i see that there's n=
o=20
eth broadcast or udp/dhcp packets. Just complete silence.

=2D--cut---
Starting dhclient.
Internet Software Consortium DHCP Client V3.0.1rc11
Copyright 1995-2002 Internet Software Consortium.
All rights reserved.
=46or info, please visit http://www.isc.org/products/DHCP

Listening on BPF/rtk0/00:20:ed:42:63:05
Sending on   BPF/rtk0/00:20:ed:42:63:05
Sending on   Socket/fallback
DHCPREQUEST on rtk0 to 255.255.255.255 port 67
=2D--cut---

After this message all stops. I don't see this DHCPREQUEST message with=20
tcpdump.

On the other hand, when i disable dhclient in rc.conf and start it manually=
 as=20
"/etc/rc.d/dhclient start" when system boot finished all works fine like:

=2D--cut---
Starting dhclient.
Internet Software Consortium DHCP Client V3.0.1rc11
Copyright 1995-2002 Internet Software Consortium.
All rights reserved.
=46or info, please visit http://www.isc.org/products/DHCP

Listening on BPF/rtk0/00:20:ed:42:63:05
Sending on   BPF/rtk0/00:20:ed:42:63:05
Sending on   Socket/fallback
DHCPREQUEST on rtk0 to 255.255.255.255 port 67
ip length 328 disagrees with bytes received 332.
accepting packet with data after udp payload.
DHCPACK from 192.168.100.99
New Network Number: 192.168.100.0
New Broadcast Address: 192.168.100.255
bound to 192.168.100.37 -- renewal in 286 seconds.
=2D--cut---

=46rom my understanding all is configured ok:
1. Local network adapter/driver working fine (RTL 8139)
2. BPF is configured and works fine (default 8 devices).
3. Remote DHCPD server works fine and always accessible.

So i cannot successfully run dhclient *only* at boot time from rc.d. All ot=
her=20
cases works.

Any ideas ?

$ ident /sbin/dhclient
/sbin/dhclient:
     $Id: res_update.c,v 1.2 2002/06/10 00:30:35 itojun Exp $
     $Id: res_mkupdate.c,v 1.3 2003/01/02 10:04:32 tron Exp $
     $Id: res_findzonecut.c,v 1.4 2003/02/18 17:08:43 drochner Exp $
     $Id: ns_verify.c,v 1.2 2002/03/18 20:13:54 bjh21 Exp $
     $Id: ns_samedomain.c,v 1.3 2003/02/18 17:08:43 drochner Exp $
     $Id: ns_sign.c,v 1.3 2003/02/18 17:08:43 drochner Exp $
     $Id: ns_parse.c,v 1.5 2002/06/11 15:22:57 wiz Exp $
     $Id: ns_name.c,v 1.3 2003/02/18 17:08:43 drochner Exp $
     $Id: dhclient.c,v 1.9 2003/10/24 05:27:55 mellon Exp $
     $Id: clparse.c,v 1.5 2003/10/24 05:19:31 mellon Exp $
     $Id: dispatch.c,v 1.2 2003/02/18 17:08:40 drochner Exp $
     $Id: comapi.c,v 1.5 2003/02/18 17:08:40 drochner Exp $
     $Id: memory.c,v 1.4 2003/02/18 17:08:41 drochner Exp $
     $Id: discover.c,v 1.6 2003/05/16 15:16:41 abs Exp $
     $Id: execute.c,v 1.4 2003/02/18 17:08:41 drochner Exp $
     $Id: dns.c,v 1.5 2003/02/18 17:08:40 drochner Exp $
     $Id: alloc.c,v 1.4 2003/02/18 17:08:40 drochner Exp $
     $Id: tables.c,v 1.4 2003/02/18 17:08:41 drochner Exp $
     $Id: tree.c,v 1.4 2003/02/18 17:08:41 drochner Exp $
     $Id: options.c,v 1.4 2002/06/11 14:12:58 drochner Exp $
     $Id: bpf.c,v 1.6.2.1 2004/04/21 03:55:53 jmc Exp $
     $Id: print.c,v 1.5 2003/02/18 17:08:41 drochner Exp $
     $Id: packet.c,v 1.4 2003/10/24 05:30:33 mellon Exp $
     $Id: socket.c,v 1.6 2003/09/25 01:01:39 mycroft Exp $
     $Id: fddi.c,v 1.4 2003/02/18 17:08:41 drochner Exp $
     $Id: inet.c,v 1.3 2003/02/18 17:08:41 drochner Exp $
     $Id: ethernet.c,v 1.2 2003/02/18 17:08:41 drochner Exp $
     $Id: conflex.c,v 1.2 2002/06/11 14:00:01 drochner Exp $
     $Id: parse.c,v 1.7 2003/10/27 21:08:25 mellon Exp $
     $Id: convert.c,v 1.3 2002/06/10 00:30:36 itojun Exp $
     $Id: auth.c,v 1.2 2002/06/11 14:00:04 drochner Exp $
     $Id: hash.c,v 1.3 2002/06/11 14:00:04 drochner Exp $
     $Id: errwarn.c,v 1.2 2001/08/03 13:07:05 drochner Exp $
     $NetBSD: crt0.c,v 1.13 2003/07/26 19:24:27 salo Exp $

// wbr