Is there a way to configure dnsmasq to hand out IPs from different range to different wireless access points?
I have a basic Asus router configured as access point (it does no routing and doesn't run dhcpd of its own) with address 192.168.10.2 and my dnsmasq (on a different server) has these lines:
dhcp-range=set:ten,192.168.10.100,192.168.10.150,12h
dhcp-range=set:guest,192.168.30.100,192.168.30.150,12h
However the clients connecting to that access point get addresses in 192.168.30.0/24 range which I don't want.
I assumed the access point broadcasts dhcp requests on 192.168.10.255 given its IP is set to 192.168.10.2 and dnsmasq would implicitly figure out to hand out the 192.168.10.0/24 range. But that's not happening.
If this configuration is not possible with dnsmasq, please suggest a different dhcp server implementation I can look into.
To be able to provide ip via DHCP in range 192.168.10.x, you need to have an interface in that range.
dnsmasq
is providing an ip in range 192.168.30.0/24 because the request arrive in the interface (the interface of the server that runsdnsmasq
) which has an IP in that range.BTW, the dhcp broadcast is done on 255.255.255.255 (and not 192.168.10.255 like you said), as at this stage the client has no idea of the network range.