[Dnsmasq-discuss] DHCP assignment with dynamic VLANs

Michael Rack michael.rack at rsm-freilassing.de
Mon Oct 21 19:42:59 BST 2013

Hi Andrea,

that is not possible with DNSMASQ. Thats is as by software design.

If a request receives on the br-lan interface, DNSMASQ will serve only 
IP-Ranges that matches that interface.

If you find a other DHCP-Software that does what you want, let me know :)

Liebe Grüße aus Freilassing,

Michael Rack
RSM Freilassing
RSM Freilassing                 Tel.: +49 8654 607110
Nocksteinstr. 13                Fax.: +49 8654 670438
D-83395 Freilassing            www.rsm-freilassing.de

Am 21.10.2013 17:52, schrieb Andrea Galvani:
> Hello everyone.
> I'm running dnmasq 2.62 on a OpenWRT router and I'm trying to 
> understand if this DHCP configuration is feasable or not:
> The address space that I'm using for my network is /24.
> When a new user accesses my network through Wi-Fi I need to give him a 
> private network just for comunicating with the router, so I 
> DYNAMICALLY allocate a /30 vlan interface just for him. This vlan 
> interface's address space is NOT part of my network address space, for 
> example it can be /30.
> In this case, the router will configure as its address for 
> the new vlan and the user must obtain through DHCP.
> I know the user's MAC address so I thought about a static assignment.
> I added this to dnsmasq.conf
> ---
> # the IP pool for the VLAN
> dhcp-range=set:vlan6,,
> # static IP for the user
> dhcp-host=br-lan,00:0d:88:65:5a:5d,
> # tagging the user
> dhcp-host=00:0d:88:65:5a:5d,set:vlan6
> # options for user...
> dhcp-option=tag:vlan6,3,
> dhcp-option=tag:vlan6,54,
> dhcp-option=tag:vlan6,1,
> dhcp-option=tag:vlan6,28,
> dhcp-option=tag:vlan6,6,
> dhcp-option=tag:vlan6,15,vlan6
> ---
> "br-lan" is my lan interface which is bridged to wireless
> "vlan6" is the tag I use to distinguish the options for my user/vlan. 
> I set the router's address on the vlan as dgw and server identifier, 
> the /30 netmask and the broadcast address.
> As a result I get:
> "no address range available for DHCP request via br-lan"
> But if I set a DHCP range for br-lan ( /24) the user will get 
> an address from BR-LAN POOL, ignoring the static assignment and the 
> part regarding the vlan!
> Basically the user gains access to the LAN and sends a broadcast DHCP 
> Discover on that interface. What should happen is that this user is in 
> someway "redirected" on the new VLAN interface (different address 
> pool), and obtains an IP of that interface.
> Is it possible to have a behaviour like this with dnsmasq?
> Thanks for your attention
> Andrea
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

More information about the Dnsmasq-discuss mailing list