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

David Joslin davidj at nkcc.org.uk
Fri Jun 27 19:35:09 UTC 2014


>
> Ok, pulling back a level or two in the discussion tree since I'd
>  gonethe wrong path, I have now tried the following:
>
> dhcp-range=<start1>,<stop1>...
> dhcp-range=tag:<vlan-if>,<start2>,<stop2>...
> dhcp-host=<eth-addr>,<ethwlan-addr>,<name1>,<ip-in-range1>
> dhcp-host=<eth-addr>,<ethwlan-addr>,<name2>,<ip-in-range2>
>
> I deleted the dnsmasq lease file in /var, ran dnsmasq -d, and from the
> host with given eth (or wlan) addr, did a dhclient on the main interface
> and on the VLAN-ed one. Each interface got its own IP as specified in
> the dhcp-host for the IP range corresponding to the interface, and both
> names got registered in DNS with the right IP address.
>
> It appears no tag is needed, and the right dhcp-option is found based
> on the subnet where the static IP belongs.
>
> Does this fulfill your requirements?
>
> I did not try with IPv6 and especially with auto-addition of SLAAC
> IPv6 addresses to the DNS zone, though.
>

​Bonjour Albert.

Well what do you know! It works! I had assumed that some sort of tag
matching was needed to get the right address for the right VLAN/interface.
But I followed what you suggested and included multiple dhcp-host lines,
all with the same mac address, but with different IPs from the different
subnets and the right addresses got allocated. It must be a bit of dhcp
magic in Simon's code!

Thanks for all your help.

David


>
> > Thanks for your help.
> >
> > David
>
> Amicalement,
> --
> Albert.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20140627/51f0dddf/attachment.html>


More information about the Dnsmasq-discuss mailing list