SDN DHCP DNS

Imtiazali

New Member
Dec 5, 2023
10
0
1
with reference to this Setup Simple Zone With SNAT and DHCP I tried to set the simple zone it's working fine. but I am not sure if we can set up multiple DNS servers and search domain in subnet.cfg file.

please share any guidance or reference to any article


Code:
                                                                     /etc/pve/sdn/subnets.cfg                                                                                           
subnet: inside-10.10.10.0-24
        vnet VLAN10
        dhcp-range start-address=10.10.10.11,end-address=10.10.10.149
        dhcp-dns-server 10.10.10.110
#        dhcp-dns-server 8.8.8.8,10.10.10.110
        gateway 10.10.10.1
        domain=mylab.local
        snat 1
 
You should be able to set multiple DNS server in dhcp-dns-server and it should work fine. Please note that this is currently only an implementation detail for dnsmasq and might change in subsequent versions or with the addition of other plugins.

You cannot set multiple search domains.
 
You should be able to set multiple DNS server in dhcp-dns-server and it should work fine. Please note that this is currently only an implementation detail for dnsmasq and might change in subsequent versions or with the addition of other plugins.

You cannot set multiple search domains.
Hi Stefan -- an update on this for anyone else who Googled: On 8.1.4, using the config as shown in Imtiazali's original post (two DNS servers, no comma, one line) does not work. Neither does two dhcp-dns-server entries, each with one line.
 
Last edited:
Hi Stefan -- an update on this for anyone else who Googled: On 8.1.4, using the config as shown in Imtiazali's original post (two DNS servers, no comma, one line) does not work. Neither does two dhcp-dns-server entries, each with one line.

Indeed - this has changed before the release and I had it wrongly in my head - sorry!

Since, by default, DHCP is using the Gateway as the DNS server you can configure the instance on the host to act accordingly. The dnsmasq configuration should be located in /etc/dnsmasq.d/<zone> where you can set it up to use additional DNS servers - for more information see the dnsmasq documentation [1]. It would be best to add a new configuration file that isn't prefixed with 00 or 10, e.g. 20-dns.conf that contains your desired settings for DNS and then reload dnsmasq: systemctl restart dnsmasq@<zone>


[1] https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!