Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:


e.g. > maps to devbox1 static ip, site1 virtual host > maps to devbox1 static ip, site2 virtual host > 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

Your Answer


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

Browse other questions tagged or ask your own question.