Subject: Re: DHCP with wifi (wi0)?
To: Stephen Borrill <netbsd@precedence.co.uk>
From: Andy Ruhl <acruhl@gmail.com>
List: netbsd-help
Date: 12/17/2006 18:14:24
On 12/17/06, Stephen Borrill <netbsd@precedence.co.uk> wrote:
> Well, it all sound about right. My first thought was ordering between the
> network and dhclient script, but network comes first so should set the
> ssid. I should point out that in our product, we've written our own
> network script from scratch. What we found was that when you set the ssid
> or nwkey, the network isn't active immediately (you may even want an up in
> your ifconfig.wi0 file) and so dhclient would often fail. So we set up
> ssid and nwkey, sleep for a while, check ifconfig for status: active, if
> not present ifconfig down and up and then go back to the sleep. We repeat
> 5 times before giving up. I've found this works flawlessly.

It was my own fault, I wasn't using mediaopt adhoc because I'm not on
a base station.

So far I haven't had the problem you describe, but that seems like a good idea.

For everyone else reading, I think these basic steps should be used:

1. Find wireless network (I'm using wiconfig wi0 -D), and take note of ssid
2. Set up an /etc/ifconfig.wi0 file with as many specifics for the
network as you have, but no IP related information since we are using
DHCP. (ifconfig -m wi0 helps too)
3. Set dhclient=YES in /etc/rc.conf
4. Reboot and see if it works.

Thanks.

Andy