On 08/09/2022 07:08, Hamish Moffatt wrote:


So, I got the suggestion off-list to set the DHCP client-id uniquely for each connection. This fixed IPv4, even without matching on the client ID in the config, because dnsmasq is tracking both separately in the leases file. Leases (just IPv4) showed:

1662658086 38:c9:86:40:86:37 192.168.42.18 potoroo ff:b7:b0:95:87:00:03:00:01:83:6d:06:a5:ef:01 1662658067 38:c9:86:40:86:37 192.168.66.18 potoroo-iotlan ff:cc:62:6a:65:00:03:00:01:cb:45:f5:1b:f7:42


However it did not fix IPv6, where the hostnames ended up being associated with the wrong IP sometimes and even shown that way in the log.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Just to clarify: it works if you stick to client-ids, but IPv6 breaks if you match both MAC and client-id, even when the client-ids are different?


Simon.


The fix for this was to match on client ID, but I couldn't get the
client ID to match for IPv4 and IPv6, so I ended up with two separate entries for each host:

dhcp-host=,id:ff:b7:b0:95:87:00:03:00:01:83:6d:06:a5:ef:01,192.168.42.18,potoroo dhcp-host=,id:ff:cc:62:6a:65:00:03:00:01:cb:45:f5:1b:f7:42,192.168.66.18,potoroo-iotlan
dhcp-host=,id:00:03:00:01:83:6d:06:a5:ef:01,[::0:18],potoroo
dhcp-host=,id:00:03:00:01:cb:45:f5:1b:f7:42,[::0:18],potoroo-iotlan


This seems to work as expected. In NetworkManager I had to set the following on each connection to get distinct client IDs:

connection.stable-id:                   "${CONNECTION}"
ipv4.dhcp-client-id:                    ipv6-duid
ipv6.dhcp-duid:                         stable-ll


... although there are many other configurations that would work too.


Hamish

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to