Re: [Dnsmasq-discuss] IPv6 host-id
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. 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. On Tue, Apr 21, 2020 at 10:13 AM Pali Rohár wrote: > 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=,192.168.0.150,[::0:1000],livingroom.internal,12h > > > > > > # Assign 192.168.0.151 and [::0:1001] to my file server > > > > dhcp-host=,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=,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 > . 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.ro...@gmail.com > ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] IPv6 host-id
On Tue, Apr 21, 2020 at 09:47:35AM -0400, Jiawen Chen wrote: > On Tue, Apr 21, 2020 at 3:01 AM Geert Stappers wrote: > > On Mon, Apr 20, 2020 at 10:27:11PM -0400, Jiawen Chen wrote: > > > > > > I'd like to use DHCPv6 and IPv6, using the host-id-only option. > > > > > > ``` > > > # Enable IPv6 Router Advertisement. > > > enable-ra > > > > > > # Enable DHCPv6. Serve a range for each VLAN. > > > dhcp-range=::0:2,::0:500,constructor:br0,slaac > > > > note the interface > > > > > > > > > > # Assign 192.168.0.150 and [::0:1000] to my living room pc > > > > > dhcp-host=,192.168.0.150,[::0:1000],livingroom.internal,12h > > > > > > # Assign 192.168.0.151 and [::0:1001] to my file server > > > > > dhcp-host=,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=,192.168.0.150,[interface(br0)::0:1000],livingroom.internal,12h > > > > > Thanks for the suggestion - I will try it tonight. Is your suggested > notation of \[interface()\] documented anywhere? Nope ... > I can't seem to find it on the man page after looking carefully. In > particular, the string "interface(" does not appear. ... because it is only a suggestion. Sorry for not writing } FWIW I suggest implementation of configuration syntax that allows } } dhcp-host=,192.168.0.150,[interface(br0)::0:1000],livingroom.internal,12h Groeten Geert Stappers -- Silence is hard to parse ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] IPv6 host-id
On Tue, Apr 21, 2020 at 3:01 AM Geert Stappers wrote: > On Mon, Apr 20, 2020 at 10:27:11PM -0400, Jiawen Chen wrote: > > Hi, > > > ... > > > > > > Finally, I'd like to use DHCPv6 and IPv6, using the host-id-only option. > > > > ``` > > # Enable IPv6 Router Advertisement. > > enable-ra > > > > # Enable DHCPv6. Serve a range for each VLAN. > > dhcp-range=::0:2,::0:500,constructor:br0,slaac > > note the interface > > > > > > # Assign 192.168.0.150 and [::0:1000] to my living room pc > > > dhcp-host=,192.168.0.150,[::0:1000],livingroom.internal,12h > > > > # Assign 192.168.0.151 and [::0:1001] to my file server > > > dhcp-host=,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=,192.168.0.150,[interface(br0)::0:1000],livingroom.internal,12h > > Thanks for the suggestion - I will try it tonight. Is your suggested notation of \[interface()\] documented anywhere? I can't seem to find it on the man page after looking carefully. In particular, the string "interface(" does not appear. > > Groeten > Geert Stappers > -- > Silence is hard to parse > > ___ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss > ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] IPv6 host-id
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=,192.168.0.150,[::0:1000],livingroom.internal,12h > > > > # Assign 192.168.0.151 and [::0:1001] to my file server > > dhcp-host=,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=,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 . 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.ro...@gmail.com ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] IPv6 host-id
On Mon, Apr 20, 2020 at 10:27:11PM -0400, Jiawen Chen wrote: > Hi, > ... > > > Finally, I'd like to use DHCPv6 and IPv6, using the host-id-only option. > > ``` > # Enable IPv6 Router Advertisement. > enable-ra > > # Enable DHCPv6. Serve a range for each VLAN. > dhcp-range=::0:2,::0:500,constructor:br0,slaac note the interface > > # Assign 192.168.0.150 and [::0:1000] to my living room pc > dhcp-host=,192.168.0.150,[::0:1000],livingroom.internal,12h > > # Assign 192.168.0.151 and [::0:1001] to my file server > dhcp-host=,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=,192.168.0.150,[interface(br0)::0:1000],livingroom.internal,12h Groeten Geert Stappers -- Silence is hard to parse ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss