Questión about DNS config on dnsmasq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello guys...

I'm using libvirt in my local laboratory and I have a question/problem about DNS settings over dnsmasq (by libvirt)

I have a NAT network separately from my real network, i need simulated some DNS hosts to NAT network like ftp.debian.org (for testing purposes, etc)

This is for example a dumpxml (yes, i'm using PXE boot for testing and is working fine)

<network>
  <name>net0</name>
  <uuid>5a014735-f658-7a87-c7d4-e6b0f488c332</uuid>
  <forward mode='nat'/>
  <bridge name='net0' stp='on' delay='0'/>
  <mac address='52:54:00:b5:24:7b'/>
  <dns>
    <host ip='192.168.122.1'>
      <hostname>mirrors.kernel.org</hostname>
      <hostname>mirrors.dcarsat.com.ar</hostname>
      <hostname>ftp.debian.org</hostname>
    </host>
  </dns>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <tftp root='/home/tftp'/>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.99'/>
      <bootp file='pxelinux.0'/>
    </dhcp>
  </ip>
</network>

Look <dns> & <hostname> section, that works correctly but only if I add hostnames on net0 when was offline.

  <dns>
    <host ip='192.168.122.1'>
      <hostname>mirrors.kernel.org</hostname>
      <hostname>mirrors.dcarsat.com.ar</hostname>
      <hostname>ftp.debian.org</hostname>
    </host>
  </dns>


How i can add more hostnames with my network (net0) are still online...?

virsh net-update default add-last dns-host (for example, doesn't work)

and the official documentation @
http://libvirt.org/formatnetwork.html#elementsAddress
doesn't say more.

I test with <forwarder > but doesn't work 
(192.168.10.100 is a dnsmasq outside libvirt control)

<network>
  <name>net0</name>
  <uuid>5a014735-f658-7a87-c7d4-e6b0f488c332</uuid>
  <forward mode='nat'/>
  <bridge name='net0' stp='on' delay='0'/>
  <mac address='52:54:00:b5:24:7b'/>
  <dns>
    <forwarder addr="192.168.10.100"/>
  </dns>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <tftp root='/home/tftp'/>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.99'/>
      <bootp file='pxelinux.0'/>
    </dhcp>
  </ip>
</network>

Anyone can help me...?

thanks

--
"La Voluntad es el único motor de nuestros logros"
http://blog.ngen.com.ar/

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users

[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux