<div dir="ltr">Thanks! That makes sense. I actually do dual-boot my living room PC but not very often and there are only a few configurations. So I can just statically add their DUID/IAIDs to dhcp-host.<div><br><div>I guess the problem you're referring to is that dhcp-host only supports a single "id:" option instead of a set for DHCPv6. For DHCPv4, it is clear and makes sense: you can use multiple, mutually exclusive MAC addresses and optionally append "id:*" to ignore the client-id.</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 21, 2020 at 10:13 AM Pali Rohár <<a href="mailto:pali.rohar@gmail.com">pali.rohar@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tuesday 21 April 2020 08:27:49 Geert Stappers wrote:<br>
> On Mon, Apr 20, 2020 at 10:27:11PM -0400, Jiawen Chen wrote:<br>
> > # Assign 192.168.0.150 and [::0:1000] to my living room pc<br>
> > dhcp-host=<livingroom_pc_MAC_redacted>,192.168.0.150,[::0:1000],livingroom.internal,12h<br>
> > <br>
> > # Assign 192.168.0.151 and [::0:1001] to my file server<br>
> > dhcp-host=<fileserver_MAC_redacted>,192.168.0.151,[::0:1001],fileserver.internal,12h<br>
> > ```<br>
> > <br>
> > Sadly, the host-id-only notation ([::0:1000]) does not appear permitted<br>
> > when dnsmasq parses /etc/hosts.<br>
> > <br>
> > Any suggestions would be greatly appreciated!<br>
> <br>
> FWIW I suggest configuration syntax that allows<br>
> <br>
> dhcp-host=<livingroom_pc_MAC_redacted>,192.168.0.150,[interface(br0)::0:1000],livingroom.internal,12h<br>
<br>
Hello Jiawen! Beware that IPv6 address does not have to be assigned<br>
based on MAC address settings in config file. MAC to IPv6 assignment is<br>
not enforced by dnsmasq and if your DHCPv6 client changes DUID or IAID<br>
(e.g. dualbooting to different OS or PXE or reinstalling OS) then some<br>
another free IPv6 address would be assigned for your PC identified by<br>
<livingroom_pc_MAC_redacted>. There is my pending patch which should fix<br>
this problem and when user want then IPv6 address would be enforced for<br>
particular MAC address.<br>
<br>
-- <br>
Pali Rohár<br>
<a href="mailto:pali.rohar@gmail.com" target="_blank">pali.rohar@gmail.com</a><br>
</blockquote></div>