Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

address=/.devbox1.mydomain.com/192.168.1.3
address=/.devbox2.mydomain.com/192.168.1.4

e.g.

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.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.