[Dnsmasq-discuss] Chaining instances?

TJ dnsmasq at iam.tj
Sun Feb 24 10:09:05 GMT 2013


I'm investigating the best way to integrate virtual machine sub-net hostname/IP addresses controlled by libvirt into the LAN DNS records.

The LAN has its own dnsmasq instance on the host "gateway.lan" that does DHCP and DNS for the entire LAN.

Several servers on the LAN use libvirt to control virtual machines that can come and go frequently - they aren't just started and left running for long periods.

libvirtd runs its own instance of dnsmasq on each VM host. Each instance handles DHCP for that libvirtd sub-net. The libvirtd network is routed.

I'm trying to find a way to have the libvirtd dnsmasq instances pass on DHCP lease REQUEST/RELEASE hostname/IP combinations to the LAN's dnsmasq so that every device - physical or virtual - can find
every other by name and so that the gateway can route internet traffic to VM-net DMZs.

I have one side of this working: each libvirtd dnsmasq has the LAN dnsmasq as its upstream DNS server. Here's a rough ASCII diagram:


<internet>---<vdsl at gateway.lan@br0>--------<eth0 at server1.lan@virbr1>-----<eth0 at vm-server1-01>
                                       |                              |--<eth0 at vm-server1-02>
                                       |
                                       |---<eth0 at server2.lan@virbr1>-----<eth0 at vm-server2-01>
                                                                      |--<eth0 at vm-server2-02>

I wondered if maybe configuring the libvirtd dnsmasq instances to be dhcp proxies for the LAN dnsmasq, and use multiple dhcp-range's with tags might do it?

My brain is a bit fried right now having had to fix several bugs in vmbuilder and libvirt, plus add new functionality to libvirtd to allow its dnsmasq instance to read a conf-file and use a separate
log-facility, so any pointers or examples would be welcome.



More information about the Dnsmasq-discuss mailing list