[Dnsmasq-discuss] VLANs and multiple IP addresses for one mac address

David Joslin davidj at nkcc.org.uk
Tue Jun 24 22:50:54 UTC 2014


Thanks for the reply, Simon.

How would I do that?

I already use the --dhcp-host option to allocate IP addresses by MAC
address for certain clients but these are all machines with just one IP
address on one VLAN. How would I allocate static IP addresses to these
access points when they require a different IP address per VLAN but all
with the same MAC address? Each VLAN is associated with a LAN bridge on the
machine running dnsmasq and I allocate DHCP addresses to the different
VLANs using the tag option in the --dhcp-range statements - for
example: dhcp-range=tag:br3,10.10.70.101,10.10.70.200,255.255.255.0,1440m.
This works fine. But I can't see how to allocate static IP addresses based
on VLAN membership.

Am I missing something obvious?

Cheers

David



On 24 June 2014 22:30, Simon Kelley <simon at thekelleys.org.uk> wrote:

> On 24/06/14 10:08, David Joslin wrote:
> > I have a wireless network split into several vlans, each with its own
> > subnet, with dnsmasq serving all vlans. The wireless network is a Ubiquti
> > Unifi system and the access points all have static IP addresses on the
> > management vlan. Additionally, the access points each request IP
> addresses
> > via DHCP for the other vlans and dnsmasq correctly allocates the IP
> > addresses for the relevant vlans.
> >
> > I noticed in dnsmasq's logs recently a bunch of 'lease not found'
> messages
> > whenever the access points attempted to renew the leases for these
> > addresses. The cause seems to be this: an access point's IP addresses are
> > all used on the same interface on the access point so when it renews
> these
> > addresses, the requests all come from the same mac address. Dnsmasq
> > services these requests but only the last address allocated is stored in
> > the lease file (I'm assuming the other addresses allocated are briefly
> > stored but then overwritten by subsequent allocations). So the access
> > points are happy enough - they have the addresses they need correctly
> > allocated by dnsmasq - but dnsmasq's lease file only records the last
> > address allocated. When the access points renew the leases, dnsmasq
> > generates the 'lease not found' error because there's no record of the
> > allocation in the lease file.
> >
> > The error messages themselves are no big deal and the access points do
> get
> > the correct addresses. The problem I can foresee is that dnsmasq might
> > allocate addresses to other clients that it has already allocated to the
> > access points because it has no record of those allocations in its lease
> > file.
> >
> > Is there any way dnsmasq can record more than 1 IP address against a mac
> > address? Or is there any other way round this problem? The access points
> > don't give any options for IP configuration apart from the address on the
> > management vlan; there aren't any configuration options for these DHCP
> > requested addresses.
>
> The obvious way to fix this would be to have the access points supply a
> different client-id for each VLAN. Client-ids trump MAC addresses as
> unique identifiers for leases. The lack of configuration options would
> seem to preclude that, however.
>
> You could at least solve the worry about having access point addresses
> re-allocated by giving them static addresses on each VLAN, associated
> with the MAC address.
>
> Cheers,
>
>
> Simon.
>
>
>
>
> >
> > Any help would be greatly appreciated.
> >
> > David
> >
> >
> >
> > _______________________________________________
> > Dnsmasq-discuss mailing list
> > Dnsmasq-discuss at lists.thekelleys.org.uk
> > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> >
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20140624/91b0eca0/attachment.html>


More information about the Dnsmasq-discuss mailing list