# On boot DHCP for Wireless BCM4309 is not started

## v_andal

Hello!

Have really strange problem. After boot the DHCP for wireless interface is not started. If I run /etc/init.d/net.wlan0 restart then everything works perfectly.

What could be the problem? After boot ifconfig reports that wlan0 is up. wpa_supplicant is also running, only dhcp daemon is missing, so there's no IP address on wlan0.

net.conf has 

 *Quote:*   

> 
> 
> modules_wlan0="wpa_supplicant"
> 
> config_eth0="dhcp"
> ...

 

----------

## szatox

It's weird that it doesn't work for the first time but does the second. Suggests race condition. Do you mind showing a dump of all your services? `rc-config show all` would do.

----------

## v_andal

No problem. Here's the output of 

```
rc-config show all
```

 right after boot

 *Quote:*   

> 
> 
> Status of init scripts in runlevel "boot"
> 
>   alsasound                 [started]
> ...

 

After I run /etc/init.d/net.wlan0 restart the status of net.wlan0 turns to "started".

Quite possible it is some race condition, because sometimes (not very often) I get things working right after the boot.

----------

## szatox

 *Quote:*   

> net.eth0 [inactive]
> 
> net.lo [started]
> 
> net.wlan0 [inactive]
> ...

 

That's funny, sshd requires net but it's already started before net services. Net.lo doesn't provide net (or does it now again?)

Basicaly inactive means it's waiting for something. In case of wifi it's most likely going to be connection to access point. Or IP address.

So, one thing is rc-update --update to force cache resync. Might help. Or might not. Try it

Another thing is to determine what is it waiting for. Does it receive IP address if you call dhcp manually? Is wpa_supplicant running? Is the interface associated with AP?

Does grep -i "wpa\|wlan" /var/log/everything/current show anything interesting?

Maybe dmesg | grep wlan ?

----------

## v_andal

I have rc_depend_strict="NO" in rc.conf, maybe this is the reason for sshd to come up. Or maybe it is simply because the service was started, it just didn't become active.

As I said, the wpa_supplicant is started, just the dhcpcd is not running. Of course, since it is not running the interface does not get any IP address.

According to logs wlan0 performs authentication and association.

----------

