Re: dhcpcd nor working until after dhclient
Roy Marples
Thu Jul 08 21:59:08 2010
On Thu, 2010-07-08 at 16:28 -0500, Jeremy C. Reed wrote:
> This is on NetBSD 5.0.2 i386 also tried on current kernel a couple days
> old.
>
> I have tried dhcpcd in NetBSD base and also 5.2.6 (I updated pkgsrc
> locally for this).
>
> The interface is ral0. I use ifconfig to defined my nwid and nwkey
> (wpa_supplicant doesn't work for it -- I don't know if that is related).
> Then I try to use dhcpcd and it will get an IP, but immediately loses
> it.
>
> If I use dhclient (in NetBSD base), it works immediately.
>
> If I use dhcpcd (after using and killing dhclient), it will assign the
> IP again and will not lose it.
>
> Please let me know what steps I should run to provide troubleshooting
> details.
Sounds like ral0 is reporting link up/down events.
On NetBSD, you could see this with the route(8) monitor command. syslog
messages are normally generated as well.
A good way to troubleshoot dhcpcd issues is simply to add the word debug
on a line by itself in /etc/dhcpcd.conf (or /usr/pkg/etc/dhcpcd.conf)
and then check syslog for extra messages. You can also keep dhcpcd in
the foreground and specify debugging manually like so:
dhcpcd -dB
Whilst your issue is isn't a dhcpcd issue itself, you can make dhcpcd
ignore the link up/down events by adding nolink to dhcpcd.conf or giving
the -K command line option. This makes dhcpcd behave more like dhclient
which has no link carrier support. Of course the longer term fix would
be to fix ral(4) in NetBSD. I say this because I have both ral(4) and
ath(4) in the same box and ral(4) behaves exactly as you describe.
Thanks
Roy
Archive administrator: postmaster@marples.name