Hi, I recently started exploring the more advanced features of dnsmasq and have been very impressed.
TL;DR: as the subject line says, is the DNS name assigned by dnsmasq not persistent? I.e., it only exists once the device has connected? I'm using dnsmasq for DHCP + DNS on my home LAN and use dhcp-host to statically assign an IP address and hostname. However, I'm discovering that while it works most of the time, sometimes, ssh for example, can't find the host by name, only IP. One instance is a Linux VM. Initially I can ssh into the VM. But if I power down the VM for say a few days, and start it back up, the name is missing (even though it is somehow assigned the same IP (it keeps its MAC)). dnsmasq.conf: ``` # other irrelevant stuff no-resolv server=18.104.22.168 server=22.214.171.124 server=126.96.36.199 expand-hosts domain-needed bogus-priv local=/internal/ # Assign 192.168.0.150 to my living room pc dhcp-host=<livingroom_pc_MAC_redacted>,192.168.0.150,livingroom.internal,infinite # Assign 192.168.0.151 to my file server dhcp-host=<fileserver_MAC_redacted>,192.168.0.151,fileserver.internal,infinite ``` For these static DHCP leases, is the best practice to set them in /etc/hosts instead? I also discovered --host-record, which does something very similar. Is there an advantage in using one option vs the other? Finally, I'd like to use DHCPv6 and IPv6, using the host-id-only option. E.g., the above becomes: ``` # Enable IPv6 Router Advertisement. enable-ra # Enable DHCPv6. Serve a range for each VLAN. dhcp-range=::0:2,::0:500,constructor:br0,slaac # 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,infinite # 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,infinite ``` Sadly, the host-id-only notation ([::0:1000]) does not appear permitted when dnsmasq parses /etc/hosts. Any suggestions would be greatly appreciated! Thanks, Jiawen Chen
_______________________________________________ Dnsmasq-discuss mailing list Dnsmasqemail@example.com http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss