1

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.

2
  • In order to have the functionality you desire, you'll need VLANs and wireless/switch gear that has "DHCP helper" functionality.
    – EEAA
    Jan 3, 2016 at 19:33
  • 1
    It's possible without VLANs, if your router/firewall/AP supports proxy DHCP (my setup is: multiple LANs, Checkpoint firewall with proxy DHCP, and isc-dhcp-server on the DHCP server). I gave up on dnsmasq for anything more complicated than one single DHCP range, and recommend the ISC DHCP server.
    – Dominik R
    Jan 3, 2016 at 21:53

1 Answer 1

0

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 runs dnsmasq) 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .