[Dnsmasq-discuss] DHCP assignment with dynamic VLANs

Andrea Galvani and.galva at gmail.com
Mon Oct 21 16:52:02 BST 2013

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

# static IP for the user

# tagging the user

# options for user...

"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


More information about the Dnsmasq-discuss mailing list