I have dnsmasq running as a dns server with a number of linux boxes using static ips that run several virtual hosts on subdomains.
I currently have the following address line in my dnsmasq.conf to map the subdomain of a boxes address to the boxes static ip:
site1.devbox1.mydomain.com > maps to devbox1 static ip, site1 virtual host site2.devbox1.mydomain.com > maps to devbox1 static ip, site2 virtual host site3.devbox2.mydomain.com > maps to devbox2 static ip, site3 virtual host
I was wondering if I can change the machines over to DHCP addresses (instead of static) and have dnsmasq use the dhcp ip instead of the static one?
Can I modify the address line to refer to the DHCP address (obviously, I cant hardcode the address)?
I know I could add mac address to ip allocation, but I want to avoid this if possible.