# WLAN DHCP to static



## anddo (Mar 25, 2013)

Hi!

In installation, I chose DHCP for WLAN but now when I changed to static then it stops working.

Working good:

```
wlans_ath0="wlan0"
ifconfig_wlan0="WPA DHCP"
```

And I changed it to:
(not working)

```
wlans_ath0="wlan0"
ifconfig_wlan0="WPA inet 192.168.1.8 netmask 255.255.255.0"
```

What did I do wrong?


----------



## anddo (Mar 25, 2013)

I am using ASUS eeePC 900.

When I used
`# ./netif restart`
It wrote

```
wpa_supplicant[2469]: Failed to initialize control interface '/var/run/wpa_supplicant.'
```

But now when I added to rc.conf

```
routed_enable="YES"
```

It began to work. I am not good with Unix based environment yet. I am learning how to use it yet.

Thank you for your help!
I solved th


----------



## kpa (Mar 25, 2013)

When you don't use DHCP the default route has to come somewhere. Write down what address the DHCP negotiation gives as the default route and put it in rc.conf(5) like this:


```
defaultrouter=address
```

Using routed(8) may work but it's a major overkill to get just the default route set up.


----------

