# dhcpd starts on wrong wlan if



## hnk (Mar 12, 2014)

Hi!

I have a slightly irritating issue on my router.

I have a WLAN interface ath0 which the pseudo interface (or whatever you can call it) wlan0 uses and vr1 for the wired LAN. Now I want my router to start dhcpd on the vr1 and wlan0 interface, see the configuration below:


```
/etc/rc.conf

#wlan
ifconfig_wlan0="inet 192.168.2.1/24"
wlans_ath0="wlan0"
create_args_wlan0="wlanmode hostap mode 11g channel 11"
hostapd_enable=YES

#vr1
ifconfig_vr1="inet 192.168.1.1/24"

#DHCPD
dhcpd_enable="yes"
dhcpd_flags="-q"
dhcpd_ifaces="wlan0 vr1"
```

Every time my router boots it won't lease any IP adresses on my WLAN. If I do a `ps aux | grep dhcp` I get this line:

```
/usr/sbin/dhcpd -q vr1 ath0
```
I  kill it and manually run the command `dhcpd -q vr1 wlan0` and everything works like a charm.


```
uname -a
FreeBSD randomhostname 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Sun May 29 23:25:21 CEST 2011
```
I run an old as version of FreeBSD, but if it works, don't fix it. Does anyone have any idea of what's going on here? What else information do you need me to post?


----------



## SirDice (Mar 12, 2014)

hnk said:
			
		

> ```
> uname -a
> FreeBSD randomhostname 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Sun May 29 23:25:21 CEST 2011
> ```
> I run an old as version of FreeBSD, but if it works, don't fix it.


Topics about unsupported FreeBSD versions


----------



## hnk (Mar 12, 2014)

I'll get back to this thread after I've updated my box. Hopefully my problem will go away with the upgrades.


----------



## SirDice (Mar 12, 2014)

You don't have to upgrade all the way to 10.0 or even 9.2, 8.4 will be fine. At least until June next year 

http://www.freebsd.org/security/index.html#sup


----------



## varda (Mar 14, 2014)

Just run dhcpd without specify any interface:

```
/usr/sbin/dhcpd -q
```
But specify exact interface at *dhcpd.con*:

```
subnet 192.168.0.0 netmask 255.255.255.0 {
  interface ivr1;
  ...
}
subnet 192.168.1.0 netmask 255.255.255.0 {
  interface wlan0;
  ...
}
```


----------

