Re: Specify DNS and gateway for dnsmasq

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

 



On 03/12/2018 06:45 PM, Gionatan Danti wrote:
> Hi all,
> how I can set dhcp options as DNS, gateway, etc in libvirt's network
> definitions?

The default GW depends on the IP address you assigned to your network:

<ip address='192.168.122.1' netmask='255.255.255.0'/>

This says the default GW is 192.168.122.1/24. However, you can insert
other routes too:

<route address="192.168.222.0" prefix="24" gateway="192.168.122.2"/>

For handling DNS, you need to focus on <dns/> element. For instance, to
set a different forwarder than GW:

<dns>
  <forwarder addr="8.8.8.8"/>
</dns>

It's all documented here:

https://libvirt.org/formatnetwork.html#elementsStaticroute

and in the subsequent section.


> 
> From what I read here[1], I can use the <option> tag. However, I can not
> find nothing on libvirt official documentation.

No, that was just a proposal. RFC, a discussion how should we implement
some special features of DHCP. Those are not patches and in fact patches
implementing that were never merged.

Michal

_______________________________________________
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