# wlan0 and subnets

## cwr

Running hostapd on wlan0, with no bridge involved, I have the following

entries in /etc/dhcp/dhcpd.conf:

```

# This declares the addresses available for dynamic assignment.

# The eth0 interface is set to 195 in conf.d/net

subnet 192.168.0.192 netmask 255.255.255.224 {

    interface eth0;

    range 192.168.0.209 192.168.0.222;

    option subnet-mask 255.255.255.224;

    option broadcast-address 192.168.0.223;

    option domain-name-servers 192.168.0.195;

}

# This declares an interface on the AP COINS.

# The wlan0 interface is set to 225 in conf.d/net

subnet 192.168.0.224 netmask 255.255.255.224 {

    interface wlan0;

    range 192.168.0.225 192.168.0.254;

    option subnet-mask 255.255.255.224;

    option broadcast-address 192.168.0.255;

    #option domain-name-servers 192.168.0.195;

}

```

ifconfig shows that both eth0 and wlan0 have addresses,

but dhcpd gives "no subnet declaration for wlan0". DHCPD is happy

to issue the appropriate addresses on eth0.

This (or something very like it) used to work, so I'm missing something

obvious - does anyone know how I set up a subnet for wlan0?

Thanks - Will

----------

## Ant P.

I have nearly identical config and it works fine, only differences are my ranges are inside pool {…} blocks and the subnets are 192.168.1.0/24 and 192.168.2.0/24. I don't think dhcpd would get confused by small subnets but it's a possibility.

----------

## cwr

Thanks - I'll take a look at the pool statement.

Will

----------

