[Dnsmasq-discuss] IPv6 host-id

Pali Rohár pali.rohar at gmail.com
Tue Apr 21 15:13:03 BST 2020


On Tuesday 21 April 2020 08:27:49 Geert Stappers wrote:
> On Mon, Apr 20, 2020 at 10:27:11PM -0400, Jiawen Chen wrote:
> > # Assign 192.168.0.150 and [::0:1000] to my living room pc
> > dhcp-host=<livingroom_pc_MAC_redacted>,192.168.0.150,[::0:1000],livingroom.internal,12h
> > 
> > # Assign 192.168.0.151 and [::0:1001] to my file server
> > dhcp-host=<fileserver_MAC_redacted>,192.168.0.151,[::0:1001],fileserver.internal,12h
> > ```
> > 
> > Sadly, the host-id-only notation ([::0:1000]) does not appear permitted
> > when dnsmasq parses /etc/hosts.
> > 
> > Any suggestions would be greatly appreciated!
> 
> FWIW  I  suggest configuration syntax that allows
> 
>  dhcp-host=<livingroom_pc_MAC_redacted>,192.168.0.150,[interface(br0)::0:1000],livingroom.internal,12h

Hello Jiawen! Beware that IPv6 address does not have to be assigned
based on MAC address settings in config file. MAC to IPv6 assignment is
not enforced by dnsmasq and if your DHCPv6 client changes DUID or IAID
(e.g. dualbooting to different OS or PXE or reinstalling OS) then some
another free IPv6 address would be assigned for your PC identified by
<livingroom_pc_MAC_redacted>. There is my pending patch which should fix
this problem and when user want then IPv6 address would be enforced for
particular MAC address.

-- 
Pali Rohár
pali.rohar at gmail.com



More information about the Dnsmasq-discuss mailing list