Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wlan0 and subnets
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1968

PostPosted: Sun Nov 06, 2016 6:23 pm    Post subject: wlan0 and subnets Reply with quote

Running hostapd on wlan0, with no bridge involved, I have the following
entries in /etc/dhcp/dhcpd.conf:
Code:

# 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
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5592

PostPosted: Mon Nov 07, 2016 3:05 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1968

PostPosted: Mon Nov 07, 2016 9:31 am    Post subject: Reply with quote

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

Will
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum